/*
Theme Name: GCT GeneratePress Child
Theme URI: https://globalcyclingtravel.com/
Description: GeneratePress child theme for Global Cycling Travel, including the custom homepage and WooCommerce tour templates.
Author: Global Cycling Travel
Author URI: https://globalcyclingtravel.com/
Template: generatepress
Version: 1.1.0
Text Domain: gct-tour-theme
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/*
 * Global Cycling Travel – GeneratePress header inspired by approved homepage mockup
 * Paste into: Appearance > Customize > Additional CSS
 * Recommended menu CSS class for the final CTA item: menu-cta
 */

/* ---------- Header shell ---------- */
#masthead {
    z-index: 999;
    background: #ffffff;
    transition: box-shadow .2s ease, background-color .2s ease;
}

#masthead .inside-header {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 22px;
    min-height: 76px;
    padding: 0 18px 0 22px;
}

/* Floating header over the homepage hero */
body.home #masthead,
body.page-template-page-global-cycling-home #masthead {
    position: absolute;
    top: 18px;
    right: 0;
    left: 0;
    width: 100%;
    background: transparent;
    box-shadow: none;
}

body.admin-bar.home #masthead,
body.admin-bar.page-template-page-global-cycling-home #masthead {
    top: 50px;
}

body.home #masthead .inside-header,
body.page-template-page-global-cycling-home #masthead .inside-header {
    width: calc(100% - 40px);
    max-width: 1180px;
    margin: 0 auto;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 15px;
    box-shadow: 0 16px 42px rgba(6, 50, 90, .18);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

/* Sticky, compact header on inner pages */
body:not(.home):not(.page-template-page-global-cycling-home) #masthead {
    position: sticky;
    top: 0;
    border-bottom: 1px solid #e3edf3;
    box-shadow: 0 8px 24px rgba(6, 50, 90, .07);
}

body.admin-bar:not(.home):not(.page-template-page-global-cycling-home) #masthead {
    top: 32px;
}

/* ---------- Branding / logo ---------- */
.site-branding,
.site-logo {
    flex: 0 0 auto;
    margin-right: auto;
}

.site-logo img,
.inside-header .site-logo img {
    display: block;
    width: auto;
    max-width: 175px;
    max-height: 52px;
    object-fit: contain;
}

.main-title {
    margin: 0;
}

.main-title a {
    display: block;
    max-width: 220px;
    color: #073b64;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
    text-decoration: none;
}

.main-title a:hover {
    color: #0789c5;
}

/* ---------- Desktop navigation ---------- */
#site-navigation,
#site-navigation .inside-navigation {
    background: transparent;
}

#site-navigation {
    flex: 0 1 auto;
}

#site-navigation .inside-navigation {
    padding: 0;
}

.main-navigation .main-nav > ul {
    display: flex;
    align-items: center;
    gap: 2px;
}

.main-navigation .main-nav > ul > li > a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 12px;
    color: #163b55;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -.005em;
    transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

.main-navigation .main-nav > ul > li > a:hover,
.main-navigation .main-nav > ul > li.sfHover > a,
.main-navigation .main-nav > ul > li.current-menu-item:not(.menu-cta) > a,
.main-navigation .main-nav > ul > li.current-menu-ancestor:not(.menu-cta) > a {
    color: #067eaf;
    background: #eef8fc;
}

.main-navigation .main-nav > ul > li.current-menu-item:not(.menu-cta) > a::after,
.main-navigation .main-nav > ul > li.current-menu-ancestor:not(.menu-cta) > a::after {
    position: absolute;
    right: 12px;
    bottom: 6px;
    left: 12px;
    height: 2px;
    border-radius: 999px;
    background: #0a8dc6;
    content: "";
}

.dropdown-menu-toggle {
    padding-left: 6px;
    color: #66859a;
}

/* Dropdown cards */
.main-navigation ul ul {
    min-width: 235px;
    padding: 9px;
    background: #ffffff;
    border: 1px solid #dfeaf0;
    border-radius: 13px;
    box-shadow: 0 18px 45px rgba(7, 59, 100, .16);
}

.main-navigation ul ul li a {
    padding: 11px 13px;
    color: #24465d;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.35;
}

.main-navigation ul ul li a:hover,
.main-navigation ul ul li.current-menu-item > a {
    color: #067eaf;
    background: #eef8fc;
}

/* Final menu item CTA: add CSS class "menu-cta" in Appearance > Menus */
.main-navigation .main-nav > ul > li.menu-cta {
    margin-left: 7px;
}

.main-navigation .main-nav > ul > li.menu-cta > a {
    min-height: 44px;
    padding: 12px 18px;
    color: #ffffff !important;
    background: #0789c5;
    border: 1px solid #0789c5;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(7, 137, 197, .23);
    font-weight: 750;
}

.main-navigation .main-nav > ul > li.menu-cta > a::after {
    display: none;
}

.main-navigation .main-nav > ul > li.menu-cta > a:hover,
.main-navigation .main-nav > ul > li.menu-cta.current-menu-item > a {
    color: #ffffff !important;
    background: #086f9d;
    border-color: #086f9d;
    transform: translateY(-1px);
}

/* Optional search icon/menu item */
.main-navigation .menu-bar-item > a {
    color: #24465d;
}

/* ---------- Tablet tightening ---------- */
@media (max-width: 1080px) and (min-width: 769px) {
    #masthead .inside-header {
        gap: 10px;
        padding-right: 12px;
        padding-left: 16px;
    }

    .main-title a {
        max-width: 165px;
        font-size: 13px;
    }

    .site-logo img,
    .inside-header .site-logo img {
        max-width: 145px;
    }

    .main-navigation .main-nav > ul > li > a {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 12.5px;
    }

    .main-navigation .main-nav > ul > li.menu-cta > a {
        padding-right: 13px;
        padding-left: 13px;
    }
}

/* ---------- Mobile navigation ---------- */
@media (max-width: 768px) {
    body.home #masthead,
    body.page-template-page-global-cycling-home #masthead {
        top: 10px;
    }

    body.admin-bar.home #masthead,
    body.admin-bar.page-template-page-global-cycling-home #masthead {
        top: 56px;
    }

    body.home #masthead .inside-header,
    body.page-template-page-global-cycling-home #masthead .inside-header {
        width: calc(100% - 20px);
        min-height: 64px;
        padding: 8px 10px 8px 14px;
        border-radius: 12px;
    }

    body:not(.home):not(.page-template-page-global-cycling-home) #masthead .inside-header {
        min-height: 64px;
        padding: 8px 12px;
    }

    body.admin-bar:not(.home):not(.page-template-page-global-cycling-home) #masthead {
        top: 46px;
    }

    .site-logo img,
    .inside-header .site-logo img {
        max-width: 145px;
        max-height: 42px;
    }

    .main-title a {
        max-width: 175px;
        font-size: 12.5px;
    }

    #mobile-menu-control-wrapper {
        margin-left: auto;
        background: transparent;
    }

    .menu-toggle,
    #mobile-menu-control-wrapper .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        min-width: 44px;
        height: 44px;
        padding: 0;
        color: #073b64;
        background: #eef8fc;
        border: 1px solid #dcecf4;
        border-radius: 10px;
    }

    .menu-toggle:hover,
    #mobile-menu-control-wrapper .menu-toggle:hover {
        color: #ffffff;
        background: #0789c5;
    }

    #site-navigation {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        background: #ffffff;
        border: 1px solid #dfeaf0;
        border-radius: 14px;
        box-shadow: 0 20px 44px rgba(7, 59, 100, .2);
    }

    #site-navigation .inside-navigation {
        display: block;
        padding: 9px;
    }

    .main-navigation .main-nav > ul {
        display: block;
    }

    .main-navigation .main-nav > ul > li > a {
        min-height: 0;
        padding: 13px 14px;
        border-radius: 9px;
        font-size: 14px;
    }

    .main-navigation .main-nav > ul > li.current-menu-item:not(.menu-cta) > a::after,
    .main-navigation .main-nav > ul > li.current-menu-ancestor:not(.menu-cta) > a::after {
        display: none;
    }

    .main-navigation .main-nav > ul > li.menu-cta {
        margin: 8px 0 0;
    }

    .main-navigation .main-nav > ul > li.menu-cta > a {
        justify-content: center;
        padding: 14px 18px;
    }

    .main-navigation ul ul {
        position: static;
        width: auto;
        min-width: 0;
        margin: 0 10px 8px;
        padding: 5px 0 5px 10px;
        border: 0;
        border-left: 2px solid #0a8dc6;
        border-radius: 0;
        box-shadow: none;
    }

    .main-navigation ul ul li a {
        padding: 10px 12px;
    }
}

/* WordPress admin bar wraps on very narrow screens */
@media (max-width: 600px) {
    body.admin-bar.home #masthead,
    body.admin-bar.page-template-page-global-cycling-home #masthead {
        top: 56px;
    }

    body.admin-bar:not(.home):not(.page-template-page-global-cycling-home) #masthead {
        top: 0;
    }
}
