/* ============================================
   CUSTOM HEADER NAVIGATION SYSTEM
   Uses wp_nav_menu() with deterministic PHP markup
   No Navigation block dependencies
   ============================================ */


/* ============================================
   RESPONSIVE BREAKPOINTS DOCUMENTATION
   ============================================
   
   LAYOUT DISTINCTION:
   - HOME PAGE: Transparent overlay header positioned over hero slider
   - OTHER PAGES: Standard static header with normal flow
   
   BREAKPOINTS:
   
   0px - 600px (MOBILE)
   - Top bar: Fixed position
   - Contact info: Only clock/hours visible, centered
   - Hamburger: Visible in top bar (left, 50px width)
   - Icons: Right side (50px width)
   - Social links: Hidden | Search bar: Hidden (search icon shown)
   
   601px - 782px (LARGE MOBILE / SMALL TABLET)
   - Top bar: Fixed position
   - Contact info: Centered
   - Hamburger: Visible in top bar
   - Admin bar adjustments for WordPress
   
   783px - 900px (TABLET)
   - Top bar: Fixed position
   - Similar to mobile, slightly larger spacing
   
   901px - 1024px (LARGE TABLET)
   - Top bar: Fixed position
   - Hamburger: Visible in top bar
   - Contact info: Flex layout, centered, all items visible
   
   1025px - 1339px (SMALL DESKTOP)
   - Top bar: Relative position
   - Hamburger: Visible in top bar (50px width)
   - Contact info: Full details, centered (flex: 1)
   - Icons: Right aligned (50px width)
   - Top bar search: Hidden (appears at 1340px+)
   
   1340px - 1494px (DESKTOP)
   - Top bar: Contact info, search, social links only
   - Top bar hamburger: HIDDEN
   - Header navigation: Full desktop menu visible
   - No duplication
   
   1495px+ (LARGE DESKTOP)
   - Full desktop layout
   - Wide navigation menu
   
   KEY BREAKPOINTS: 600 | 782 | 900 | 1024 | 1339/1340 | 1495
   
   ============================================ */


/* Top Info Bar */

.wp-block-template-part:has(.top-info-bar) {
    position: relative;
    overflow: visible !important;
}

.top-info-bar {
    background: #2c3e50;
    color: #ffffff;
    font-family: 'Quicksand', 'Arial', sans-serif;
    font-size: 0.875rem;
    height: 46px;
    position: sticky;
    top: 0;
    z-index: 5000;
    width: 100%;
}


/* On non-home pages, ensure bars are static (no positioning) - REMOVED, use fixed for all */

.top-info-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 3rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    flex: 1;
}

.top-bar-icons {
    display: flex;
    align-items: end;
    gap: 0.75rem;
    margin-left: auto;
    padding-right: 0.75rem;
}

.mobile-phone-menu {
    display: flex;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
}

.contact-item a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: #37bd9f;
}

.contact-item i {
    font-size: 0.875rem;
}

.social-links {
    display: none;
    gap: 1rem;
}

.social-links a {
    color: #ffffff;
    font-size: 1.125rem;
    transition: color 0.2s ease;
}

.social-links a:hover {
    color: #37bd9f;
}

.search-icon {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: color 0.2s ease;
    padding: 0;
}

.search-icon:hover {
    color: #37bd9f;
}


/* Top bar search form - desktop only */

.top-bar-search {
    display: none;
    margin-left: auto;
    margin-right: 1.5rem;
}

.top-bar-search .wp-block-search {
    margin: 0;
}

.top-bar-search .wp-block-search__inside-wrapper {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.top-bar-search .wp-block-search__input {
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    background: transparent;
    color: #ffffff;
    font-size: 0.875rem;
    width: 180px;
    height: auto;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.top-bar-search .wp-block-search__input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.top-bar-search .wp-block-search__input:focus {
    outline: none;
    background: transparent;
    border-color: #37bd9f;
    box-shadow: none;
}

.top-bar-search .wp-block-search__button {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.4rem;
    transition: color 0.2s ease;
}

.top-bar-search .wp-block-search__button:hover {
    color: #37bd9f;
}

.top-bar-search .wp-block-search__button svg {
    fill: currentColor;
    width: 1rem;
    height: 1rem;
}


/* Desktop 1340px+: Top bar search + full header nav, no hamburger */

@media (min-width: 1400px) {
    .social-links {
        display: flex;
    }
}

@media (min-width: 1340px) {
    /* Top bar: contact info, search, social links visible; hamburger hidden */
    .top-bar-search {
        display: block;
    }
    .mobile-phone-menu,
    .search-icon {
        display: none !important;
    }
    /* Navigation in header, not top bar; hamburger hidden */
    .top-info-container .wp-block-navigation {
        display: none !important;
    }
    .site-header .wp-block-navigation {
        display: flex !important;
    }
    .wp-block-navigation__responsive-container-open {
        display: none !important;
    }
    .wp-block-navigation__responsive-container:not(.is-menu-open) {
        display: flex !important;
    }
    .wp-block-navigation__responsive-container {
        display: block !important;
    }
}

@media (max-width: 1024px) {
    .wp-block-navigation__responsive-container-open {
        position: static !important;
        left: auto !important;
        top: auto !important;
        z-index: auto !important;
        background: transparent !important;
        padding: 0.3rem !important;
        order: -2;
        flex: 0;
    }
    .top-info-container {
        padding: 0 1rem;
        justify-content: space-between;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .wp-block-navigation__responsive-container-open {
        flex: 0 0 50px;
    }
    .contact-info {
        gap: 1rem;
        font-size: 0.8125rem;
        justify-content: center;
        flex: 1;
        display: flex;
        align-items: center;
    }
    .top-bar-icons {
        flex: 0 0 50px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
}


/* 900px and up: Hide mobile phone menu (use contact info in bar instead) */

@media (min-width: 900px) {
    .mobile-phone-menu {
        display: none !important;
    }
}


/* 901px - 1199px: Hide email in top bar */

@media (min-width: 901px) and (max-width: 1199px) {
    .contact-info .contact-item:has(.fa-envelope) {
        display: none !important;
    }
}


/* ============================================
   TABLET/MOBILE: 1339px and below
   ============================================ */

@media (max-width: 1339px) {
    /* --- TOP BAR LAYOUT --- */
    .top-info-bar {
        position: relative;
    }
    .top-info-container {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    .contact-info {
        flex: 1;
        justify-content: center;
        display: flex;
        align-items: center;
    }
    .top-bar-icons {
        flex: 0 0 50px;
        margin-left: 0;
        justify-content: flex-end;
    }
    /* --- WORDPRESS BLOCK NAVIGATION --- */
    /* Navigation moved to top bar */
    .top-info-container .wp-block-navigation {
        order: -1;
        margin-right: auto;
    }
    /* Hide site-header navigation to prevent duplicates */
    .site-header .wp-block-navigation__responsive-container-open,
    .site-header .wp-block-navigation__responsive-container {
        display: none !important;
    }
    /* Hamburger button styling - white background, dark icon on dark top bar */
    .top-info-bar .wp-block-navigation__responsive-container-open {
        position: static !important;
        left: auto !important;
        top: auto !important;
        z-index: auto !important;
        display: flex !important;
        padding: 0.5rem !important;
        margin: 0 !important;
        background: #ffffff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        border-radius: 4px;
        order: -2;
        color: #2c3e50 !important;
    }
    .top-info-bar .wp-block-navigation__responsive-container-open svg {
        fill: #2c3e50 !important;
    }
    /* Hide the full navigation menu when closed */
    .wp-block-navigation__responsive-container:not(.is-menu-open) {
        display: none !important;
    }
    /* Mobile menu overlay styling */
    .wp-block-navigation__responsive-container.is-menu-open {
        max-width: 400px !important;
        z-index: 6000 !important;
    }
    .wp-block-navigation__responsive-container-content {
        max-width: 400px !important;
        width: 100% !important;
    }
    /* Mobile menu customization */
    .mobile-menu-header {
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid #e0e0e0;
        width: 100%;
        order: -1;
    }
    .mobile-menu-footer {
        padding: 1.5rem 1rem;
        border-top: 1px solid #e0e0e0;
        margin-top: auto;
        width: 100%;
    }
    .mobile-contact-info {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    .mobile-contact-info a {
        color: #2c3e50;
        text-decoration: none;
        font-family: 'Quicksand', 'Arial', sans-serif;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
    }
    .mobile-contact-info a:hover {
        color: #37bd9f;
    }
    .mobile-contact-info i {
        width: 20px;
        text-align: center;
        flex-shrink: 0;
    }
    /* Remove default margin from responsive dialog */
    .wp-block-navigation__responsive-dialog {
        margin-top: 0 !important;
    }
    .has-modal-open .admin-bar .is-menu-open .wp-block-navigation__responsive-dialog {
        margin-top: 0 !important;
    }
    /* WordPress Block Navigation submenu alignment */
    .wp-block-navigation__responsive-container .wp-block-navigation__submenu-container,
    .wp-block-navigation__responsive-container .wp-block-navigation-item__content {
        text-align: left !important;
    }
    .wp-block-navigation__responsive-container .wp-block-navigation__submenu-container {
        padding-left: 1.5rem !important;
    }
    .wp-block-navigation__responsive-container .wp-block-navigation-item {
        text-align: left !important;
    }
    .wp-block-navigation__responsive-container .wp-block-navigation-item .wp-block-navigation-item {
        margin-left: 1.5rem !important;
    }
    /* Reduce top padding to move logo up */
    .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
        padding-top: 10px !important;
    }
    /* Add bottom padding to navigation container */
    .wp-block-navigation__responsive-container.is-menu-open.has-modal-open .wp-block-navigation__container {
        padding-bottom: 20px !important;
    }
    /* Full width submenu containers */
    .wp-block-navigation .has-child .wp-block-navigation-submenu__toggle[aria-expanded=true]~.wp-block-navigation__submenu-container,
    .wp-block-navigation .has-child:not(.open-on-click):hover>.wp-block-navigation__submenu-container,
    .wp-block-navigation .has-child:not(.open-on-click):not(.open-on-hover-click):focus-within>.wp-block-navigation__submenu-container {
        width: 100% !important;
        padding: 0px 10px !important;
    }
    /* --- LEGACY MENU SYSTEM (if still in use) --- */
    .site-header-custom {
        background: #ffffff !important;
        border-bottom: none !important;
    }
    .menu-toggle {
        display: block !important;
        position: fixed !important;
        left: 1rem !important;
        top: 56px !important;
        z-index: 99999 !important;
        background: #ffffff !important;
        padding: 0.75rem !important;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        transform: none !important;
    }
    /* Hide navigation by default */
    .primary-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        height: 100vh;
        background: white;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
        z-index: 1002;
        padding-top: 92px;
    }
    /* Admin bar compensation for mobile menu */
    body.admin-bar .primary-navigation {
        padding-top: 138px;
    }
    @media screen and (max-width: 782px) {
        body.admin-bar .primary-navigation {
            padding-top: 152px;
        }
    }
    /* Show navigation when open */
    .primary-navigation.is-open {
        transform: translateX(0);
        align-items: start;
        padding-top: 120px;
    }
    body.admin-bar .primary-navigation.is-open {
        transform: translateX(0);
    }
    @media screen and (max-width: 782px) {
        body.admin-bar .primary-navigation.is-open {
            transform: translateX(0);
        }
    }
    /* Mobile menu layout - vertical stack */
    .main-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    .main-menu>li {
        border-bottom: 1px solid #f0f0f0;
    }
    /* --- HEADER CONTAINER & LOGO --- */
    .header-container {
        padding: 1rem 1.5rem;
        justify-content: center;
        position: relative;
    }
    .header-logo {
        order: 0;
        text-align: center;
    }
    .header-logo img,
    .header-logo .custom-logo {
        max-height: 80px;
    }
}

@media (max-width: 900px) {
    /* Mobile/Tablet - FIXED position from  600px to 1339px */
    body:not(.home) .top-info-bar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 5000 !important;
    }
    body:not(.home).admin-bar .top-info-bar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 5000 !important;
    }
    /* Margin to account for fixed top bar */
    body:not(.home):not(.admin-bar) .site-header,
    body:not(.home):not(.admin-bar) .page-header {
        margin-top: 46px;
    }
    body:not(.home).admin-bar .site-header,
    body:not(.home).admin-bar .page-header {
        margin-top: 46px;
    }
    /* Home page: fixed at top on mobile */
    body.home .top-info-bar,
    body.front-page .top-info-bar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 5000 !important;
    }
    /* Only show hours + icons on mobile */
    .top-info-container {
        justify-content: space-between;
        gap: 0;
        padding: 0 1rem;
        display: flex;
        align-items: center;
    }
    .contact-info {
        flex: 1;
        justify-content: center;
        gap: 0;
        display: flex;
        align-items: center;
        margin: 0 auto;
    }
    .contact-info .contact-item {
        display: none;
    }
    /* Show only hours on mobile */
    .contact-info .time-item {
        display: flex !important;
        color: #ffffff;
        margin: 0;
        justify-content: center;
        align-items: center;
    }
    .top-bar-search {
        display: none !important;
    }
    .social-links {
        display: none !important;
    }
    /* Hamburger as flex item on left */
    .wp-block-navigation__responsive-container-open {
        position: static !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        z-index: auto !important;
        background: transparent !important;
        padding: 0.3rem !important;
        order: -2;
        flex: 0 0 50px !important;
        display: flex !important;
    }
    /* Icons aligned to right on mobile */
    .top-bar-icons {
        position: static;
        right: auto;
        top: auto;
        transform: none;
        margin-left: 0;
        display: flex;
        align-items: center;
        flex: 0 0 50px;
        justify-content: flex-end;
    }
}


/* Mobile search overlay (1339px and below) */

.mobile-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 7000;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 1rem 1rem;
    box-sizing: border-box;
}

.mobile-search-overlay.is-open {
    display: flex;
}

.mobile-search-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.mobile-search-overlay-panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
    z-index: 1;
}

.mobile-search-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0;
}

.mobile-search-overlay-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
    color: #2c3e50;
}

.mobile-search-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f0f2f4;
    border: 1px solid #d0d5db;
    color: #2c3e50;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
    line-height: 1;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.mobile-search-close:hover {
    color: #fff;
    background: #2c3e50;
    border-color: #2c3e50;
}

.mobile-search-close .fa-times {
    font-size: 1rem;
}

.mobile-search-close .mobile-search-close-text {
    font-size: 0.875rem;
}

.mobile-search-overlay-form {
    margin-top: 20px;
    padding-right: 0;
}

.mobile-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.mobile-search-input {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 1rem;
    border: 2px solid #c5d0d9;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    color: #2c3e50;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mobile-search-input::placeholder {
    color: #7a8a99;
}

.mobile-search-input:focus {
    border-color: #37bd9f;
    outline: none;
    box-shadow: 0 0 0 3px rgba(55, 189, 159, 0.25);
}

.mobile-search-submit {
    padding: 0.65rem 1.25rem;
    background: #2c3e50;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(44, 62, 58, 0.2);
}

.mobile-search-submit:hover {
    background: #37bd9f;
    color: #fff !important;
}

.mobile-search-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(55, 189, 159, 0.35);
}

.mobile-search-submit i {
    margin-right: 0.35rem;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}


/* Fallback for wp-block-search if block is used */

.mobile-search-overlay-form .wp-block-search__input {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
}

.mobile-search-overlay-form .wp-block-search__input:focus {
    border-color: #37bd9f;
    outline: none;
    box-shadow: 0 0 0 2px rgba(55, 189, 159, 0.2);
}


/* Mobile phone quick menu */

.mobile-phone-menu {
    display: flex;
    position: relative;
}

.mobile-phone-toggle {
    background: transparent;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.mobile-phone-toggle:hover {
    color: #37bd9f;
}

.mobile-phone-toggle.is-open {
    color: #37bd9f;
}

.mobile-phone-panel {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 220px;
    z-index: 8000;
}

.mobile-phone-panel.is-open {
    display: block;
}

.mobile-phone-panel a {
    display: block;
    padding: 0.65rem 1rem;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.mobile-phone-panel a i {
    margin-right: 0.5rem;
    color: #37bd9f;
}

.mobile-phone-panel a:hover {
    background: #f7f9f9;
}


/* Header Container */

.site-header-custom {
    position: relative;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #eaeaea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}


/* Compensate for WordPress admin bar - ONLY on home page */

.home.admin-bar .top-info-bar {
    top: 0px !important;
}

@media screen and (max-width: 782px) {
    .home.admin-bar .top-info-bar {
        top: 0px !important;
    }
}


/* Header Layout Container */

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}


/* Add vertical padding only on home page */

.home .header-container {
    padding: 1.5rem 3rem;
}

@media (max-width: 600px) {
    .header-logo img,
    .header-logo .custom-logo {
        max-height: 80px !important;
    }
}

@media (min-width: 701px) and (max-width: 850px) {
    .header-logo img,
    .header-logo .custom-logo {
        max-height: 140px !important;
    }
}


/* Logo Section */

.header-logo {
    flex-shrink: 0;
    z-index: 100;
}

.header-logo a {
    display: block;
    text-decoration: none;
    padding: 1rem 0;
}

.header-logo img,
.header-logo .custom-logo {
    display: block;
    max-height: 180px;
    width: auto;
    height: auto;
}

.header-logo .smarttalk-logo {
    padding: 1rem 0;
    max-height: 120px;
    width: auto;
    height: auto;
}


/* Logo adjustments for tablets and mobile */

@media (max-width: 768px) {
    .header-logo a {
        padding: 0.75rem 0;
    }
    .header-logo .smarttalk-logo {
        padding: 0.75rem 0;
        max-height: 100px;
    }
}

.header-logo .site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
}


/* Hamburger Toggle Button - OLD CUSTOM MENU (NOT USED, USING BLOCK NAVIGATION) */

.menu-toggle {
    display: none !important;
    /* Force hide old hamburger */
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1003;
    position: absolute;
}

.hamburger-icon {
    display: none !important;
    /* Force hide old hamburger */
    flex-direction: column;
    gap: 4px;
    width: 24px;
}

.hamburger-icon .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #2c3e50;
    transition: all 0.3s ease;
    border-radius: 2px;
}


/* Animated hamburger to X */

.menu-toggle.is-open .hamburger-icon .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open .hamburger-icon .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open .hamburger-icon .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* Primary Navigation */

.primary-navigation {
    display: flex;
    align-items: center;
}


/* Main Menu - Desktop Layout */

.main-menu {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu>li {
    position: relative;
    margin: 0;
    padding: 0;
}

.main-menu>li>a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    color: #555555;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.25s ease;
    white-space: nowrap;
    text-align: center;
}

.main-menu>li>a:hover,
.main-menu>li>a:focus {
    color: #ff6b6b;
}

.main-menu>li.current-menu-item>a,
.main-menu>li.current_page_item>a {
    color: #ff6b6b;
}


/* Desktop Dropdown Submenu */

.main-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 240px;
    list-style: none;
    margin: 0;
    padding: 0.75rem 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-radius: 3px;
    border-top: 2px solid #ff6b6b;
    z-index: 1000;
}

.main-menu>li:hover>.sub-menu,
.main-menu>li:focus-within>.sub-menu {
    display: block;
}

.main-menu .sub-menu li {
    margin: 0;
    padding: 0;
}

.main-menu .sub-menu a {
    display: block;
    padding: 0.7rem 1.5rem;
    color: #555555;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.2px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.main-menu .sub-menu a:hover,
.main-menu .sub-menu a:focus {
    background-color: #fef5f5;
    color: #ff6b6b;
}


/* Ensure page header stays below top bar on desktop */

.page-header,
.site-header {
    position: relative;
    z-index: 100;
}


/* Desktop - Full navigation menu hidden, using hamburger for all screen sizes below 1340px */


/* HOME PAGE HEADER OVERLAY - FINAL */


/* Both bars overlay the hero on home page */

.home-header {
    position: absolute;
    top: 46px;
    left: 0;
    right: 0;
    z-index: 1001;
    background: transparent !important;
    border-bottom: none;
    box-shadow: none;
    margin: 0 !important;
}


/* Ensure block header has no line on home */

.home .site-header,
.front-page .site-header {
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.admin-bar .home-header {
    top: 45px;
}


/* Desktop 1340px-1494px: Home page header layout (stacks logo/nav) */

@media (min-width: 1200px) and (max-width: 1494px) {
    .home-header {
        top: 100px !important;
    }
    .home-header .wp-block-columns {
        flex-wrap: wrap !important;
        justify-content: center !important;
        flex-direction: row !important;
    }
    .home-header .wp-block-column {
        margin: 0 !important;
        padding: 0 !important;
    }
    .home-header .wp-block-column:first-child {
        order: 2 !important;
        flex-basis: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        justify-content: center !important;
    }
    .home-header .wp-block-column:last-child {
        order: 1 !important;
        flex-basis: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        justify-content: center !important;
    }
    .home-header .wp-block-image img {
        max-height: 150px;
    }
}


/* Large Desktop 1495px+: Home page header layout */

@media (min-width: 1495px) {
    .home-header {
        top: 43px !important;
    }
}

.home-header .wp-block-columns,
.home-header .wp-block-group,
.home-header .wp-block-column {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.home-header .wp-block-columns {
    justify-content: center !important;
    gap: 0px;
}

.home-header .wp-block-column {
    display: flex;
    justify-content: center;
}


/* Home logo sizing (block header) */

.home-header .wp-block-image img {
    width: auto;
    height: auto;
    max-height: 140px;
}


/* Non-home page logo sizing - smaller and centered */

.page-header .wp-block-columns {
    justify-content: center !important;
    gap: 0px !important;
}

.page-header .wp-block-column:first-child {
    flex-basis: auto !important;
    width: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

.page-header .wp-block-image {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem !important;
}

.page-header .wp-block-image img {
    max-height: 72px;
    width: auto;
    margin: 0 auto;
    display: block;
}


/* Breadcrumbs styling for page header */

.breadcrumb-container {
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.75rem 0;
}

.page-header .breadcrumbs,
.breadcrumb-container .breadcrumbs {
    font-size: 0.75rem;
    color: #666;
    text-align: left;
    margin: 0;
    font-family: 'Quicksand', sans-serif;
}

.page-header .breadcrumbs a,
.breadcrumb-container .breadcrumbs a {
    color: #2c3e50;
    text-decoration: none;
}

.page-header .breadcrumbs a:hover,
.breadcrumb-container .breadcrumbs a:hover {
    color: #37bd9f;
    text-decoration: underline;
}


/* Hide logo on home page below 1495px */

@media (max-width: 1494px) {
    .home-header .wp-block-image {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .home-header .wp-block-image img {
        margin-top: 0px;
        max-height: 130px;
    }
    /* Give more top space on small mobile screens */
    .home-header {
        top: 56px !important;
    }
    .admin-bar .home-header {
        top: 55px !important;
    }
}


/* Home page slider: sit just below 46px top bar */

.smartslider-home {
    margin-top: 45px !important;
}


/* Home hamburger placement - use standard mobile rules */

@media screen and (max-width: 782px) {
    .home.admin-bar .wp-block-navigation__responsive-container-open,
    .front-page.admin-bar .wp-block-navigation__responsive-container-open {
        top: 7px !important;
    }
}


/* Desktop only - home page absolute positioning */

@media (min-width: 901px) {
    .home .top-info-bar,
    .front-page .top-info-bar {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
    }
    .home .site-header-custom,
    .front-page .site-header-custom {
        position: absolute;
        top: 46px;
        left: 0;
        right: 0;
        z-index: 1001;
        background: transparent !important;
        border-bottom: none;
        box-shadow: none;
    }
}


/* Desktop only - overridden on mobile */

@media (min-width: 901px) {
    .home.admin-bar .top-info-bar,
    .front-page.admin-bar .top-info-bar {
        top: 0px !important;
    }
    .home.admin-bar .site-header-custom,
    .front-page.admin-bar .site-header-custom {
        top: 46px;
    }
}


/* Home page: no padding, let header overlay slider */

.home .wp-site-blocks,
.front-page .wp-site-blocks {
    padding-top: 0;
}