/****************************************************************************
  1) THEME INFO
****************************************************************************/
/*
    Theme Name: LL22
    Template: twentytwentyfive
    Author: Jan
    Version: 1.0
*/

/****************************************************************************
  2) CUSTOM CLASSES OVERVIEW
****************************************************************************/
/*
.scroll-popup-button       → Floating button group that appears on scroll.
.popup-btn                → Generic class for popup buttons (applies common styles).
.green-btn                → Styles the "Naroči prevoz" button (green).
.desktop-only             → Shows elements only on desktop screens.
.mobile-only              → Shows elements only on mobile screens.
.kontaktni-podatki        → Styles the contact information section in the footer.
.alternating-layout       → Applies alternating styles for posts in a query loop.
*/

/****************************************************************************
  3) FONT AWESOME ICONS
****************************************************************************/
.fa {
    color: #00a3c8 !important; /* Default icon color */
    font-size: 1.5rem;        /* Default icon size */
}
.fa.black {
    color: #000000 !important;
    font-size: 1.5rem;
}

/****************************************************************************
  4) NAVIGATION LINKS
****************************************************************************/
nav.wp-block-navigation a {
    text-decoration: none;
    transition: color 0.2s ease;
    color: #000000;
}
nav.wp-block-navigation a:hover {
    color: #006FAF !important;
}
nav.wp-block-navigation .current-menu-item > a,
nav.wp-block-navigation .current-page-ancestor > a,
nav.wp-block-navigation .current-page-parent > a {
    color: #006FAF !important;
}

/****************************************************************************
  5) RESPONSIVE NAVIGATION (BURGER MENU)
****************************************************************************/
/* Mobile (≤ 829px): Show burger icon & hide desktop menu */
@media (max-width: 829px) {
  /* Show burger icon */
  .wp-block-navigation__responsive-container-open {
    display: block !important;
  }
  /* Hide responsive container (mobile menu) by default */
  .wp-block-navigation__responsive-container {
    display: none !important;
  }
  /* When active (with .is-menu-open), show mobile menu */
  .wp-block-navigation__responsive-container.is-menu-open {
    display: block !important;
  }
}

/* Desktop (≥ 830px): Show desktop menu & hide burger icon */
@media (min-width: 830px) {
  /* Hide burger icon on desktop */
  .wp-block-navigation__responsive-container-open {
    display: none !important;
  }
  /* Show responsive container as desktop menu; remove overlay effects */
  .wp-block-navigation__responsive-container {
    display: block !important;
    position: static !important;
    background: none !important;
    box-shadow: none !important;
    max-height: none !important;
    overflow: visible !important;
  }
  /* Display the desktop menu (ul container) as flex row */
  .wp-block-navigation__container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* Additional mobile alignment fixes */
@media screen and (max-width: 830px) {
  .wp-block-navigation__container {
    text-align: center !important;
  }
  .wp-block-navigation__container .wp-block-navigation-item {
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
    flex-wrap: wrap !important; /* Allow multi-line links */
  }
  .wp-block-navigation__container .wp-block-navigation-item a {
    display: block !important;
    text-align: center !important;
    white-space: normal !important; /* Allow wrapping */
  }
}

/****************************************************************************
  6) ALTERNATING LAYOUT FOR QUERY LOOP
****************************************************************************/
/* Default: Image left, content right */
.alternating-layout .wp-block-post:nth-child(odd) .wp-block-columns {
    display: flex;
    flex-direction: row;
    align-items: center;
}
/* Alternate: Image right, content left */
.alternating-layout .wp-block-post:nth-child(even) .wp-block-columns {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
}
/* Equal width for columns */
.alternating-layout .wp-block-columns .wp-block-column {
    flex: 1;
}
/* Mobile fix: stack columns (≤ 829px) */
@media (max-width: 829px) {
    .alternating-layout .wp-block-post .wp-block-columns {
        flex-direction: column !important;
    }
    .alternating-layout .wp-block-post .wp-block-columns .wp-block-column:first-child {
        order: -1;
    }
}
/* Background color for even posts */
.alternating-layout .wp-block-post:nth-child(even) .wp-block-columns {
    background-color: rgba(255, 237, 0, 0.1);
    border-radius: 10px;
}

/****************************************************************************
  7) BUTTON STYLES (BLUE & GREEN)
****************************************************************************/
.wp-block-button__link {
    background-color: #006FAF !important;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 20px;
    padding: 12px 30px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.wp-block-button__link:hover {
    background-color: #005F8C !important;
    color: #ffffff !important;
}
.green-btn .wp-block-button__link {
    background-color: #01BD10 !important;
    border: none !important;
    color: #ffffff !important;
}
.green-btn .wp-block-button__link:hover {
    background-color: #2c8500 !important;
}

/****************************************************************************
  8) RESPONSIVE GOOGLE MAP
****************************************************************************/
iframe {
    width: 100% !important;
    max-width: 100%;
    height: 500px;
}
@media (max-width: 829px) {
    iframe {
        height: 300px;
    }
}

/****************************************************************************
  9) STICKY HEADER
****************************************************************************/
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
}

/****************************************************************************
  10) FOOTER CONTACT INFORMATION
****************************************************************************/
@media (max-width: 829px) {
    .kontaktni-podatki {
        text-align: center;
    }
}

/****************************************************************************
  11) SCROLL POPUP BUTTONS
****************************************************************************/
/* Default scroll-popup-button container styling */
.scroll-popup-button {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 163, 200, 0.9);
    border-radius: 30px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    transition: bottom 0.5s ease-in-out, opacity 0.5s ease-in-out;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    max-width: 320px;
}
.scroll-popup-button.visible {
    bottom: 20px;
    opacity: 1;
    pointer-events: auto;
}
.scroll-popup-button .popup-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #ffffff;
    color: #00a3c8;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 20px;
    transition: background-color 0.3s ease, padding 0.3s ease;
    width: 100%;
    text-align: center;
}
/* Responsive adjustments for container */
@media (max-width: 829px) {
    .scroll-popup-button {
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }
}
@media (min-width: 830px) {
    .scroll-popup-button {
        left: 30px;
        transform: none;
    }
}
/* Show/hide popup buttons based on device */
.scroll-popup-button .desktop-only, 
.scroll-popup-button .mobile-only {
    display: none;
}
@media (max-width: 829px) {
    .scroll-popup-button .mobile-only {
        display: flex !important;
        justify-content: center;
        align-items: center;
        text-align: center;
        margin: 0 auto;
    }
    .scroll-popup-button .desktop-only {
        display: none !important;
    }
}
@media (min-width: 830px) {
    .scroll-popup-button .desktop-only {
        display: flex !important;
        justify-content: center;
        align-items: center;
        text-align: center;
        margin: 0 auto;
    }
    .scroll-popup-button .mobile-only {
        display: none !important;
    }
}
/* Remove default WP block button outlines */
.scroll-popup-button .wp-block-button__link {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
.scroll-popup-button .wp-block-button {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px; /* Adjust as needed */
}
.scroll-popup-button .wp-block-button__link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 12px 30px;
}
.scroll-popup-button .wp-block-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

/* .button-wrapper (if you wanted a border, commented out by default)
.button-wrapper {
    border: 2px solid #FFD700 !important;
    border-radius: 20px;
    padding: 0.5em;
}
*/

/* 1) Remove the blue background from .scroll-popup-button container */
.scroll-popup-button {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 2) Remove any border/background from .button-wrapper */
.button-wrapper {
    border: none !important;
    background: transparent !important;
    padding: 0 !important; 
}

/* 3) Remove the white background from .popup-btn */
.scroll-popup-button .popup-btn {
    background-color: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    border-radius: 0 !important;
}

/* 4) Add shadow to the final button (.wp-block-button__link) */
.scroll-popup-button .wp-block-button__link {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
    border-radius: 20px !important; 
}

/****************************************************************************
  12) RESPONSIVE COVER IMAGES
****************************************************************************/
.cover-image-desktop {
    /* Desktop cover image settings */
    min-height: 840px !important;
    background-position: center center;
    background-size: cover;
    display: block;
}
.cover-image-mobile {
    /* Mobile cover image settings */
    min-height: 730px !important;
    background-position: center center;
    background-size: cover;
    display: none;
}
@media screen and (max-width: 829px) {
    .cover-image-desktop {
        display: none !important;
    }
    .cover-image-mobile {
        display: block !important;
    }
}

/****************************************************************************
  13) TWO-LINE TEXT BREAK (#two-line)
****************************************************************************/
@media (max-width: 829px) {
  /* At mobile sizes, show the <br> to break text in #two-line */
  #two-line br.mobile-break {
    display: inline !important;
  }
}
@media (min-width: 830px) {
  /* At desktop sizes, hide the <br> in #two-line */
  #two-line br.mobile-break {
    display: none !important;
  }
}

/****************************************************************************
  14) SITE LOGO SIZING ON MOBILE
****************************************************************************/
@media (max-width: 829px) {
  /* ~70% of original width (233px * 0.70 ≈ 163px) */
  .wp-block-site-logo img {
    width: 163px !important;
  }
}

/****************************************************************************
  15) GUTENBERG EDITOR NAVIGATION OVERRIDE
****************************************************************************/
@media (min-width: 830px) {
  .editor-styles-wrapper .wp-block-navigation__responsive-container {
    display: block !important;
    position: static !important;
    background: none !important;
    box-shadow: none !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .editor-styles-wrapper .wp-block-navigation__container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  .editor-styles-wrapper .wp-block-navigation__responsive-container-open {
    display: none !important;
  }
}

/****************************************************************************
  16) FADE EFFECT OVERLAY
****************************************************************************/
/* For page transition fade effect */
.wp-block-navigation__responsive-container,
.wp-block-navigation__container {
  transition: all 0.3s ease;
}
#transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff; 
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9999;
}
#transition-overlay:not(.active) {
  opacity: 0;
}

/****************************************************************************
  17) SHOW SCROLL BUTTON IN GUTENBERG EDITOR
****************************************************************************/
.editor-styles-wrapper .scroll-popup-button {
    opacity: 1 !important;
    pointer-events: auto !important;
    bottom: 20px !important;
}

