/* ==========================================================================
   HEADER / NAVIGATION – BEM
   Matching Figma design exactly for Desktop, Tablet, Mobile
   ========================================================================== */

/* --- Header Container --- */
.ck-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--color-bg-superlight);
}

.ck-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 150px;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* Spacer to push content below fixed header */
.ck-header-spacer {
    /*height: 150px;*/
}

/* --- Logo --- */
.ck-header__logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    padding-right: 0;
    flex-shrink: 0;
    padding-top: 8px;
    padding-bottom: 8px;
}

.ck-header__logo-link {
    display: block;
    line-height: 0;
    text-decoration: none;
}

.ck-header__logo-img,
.ck-header__logo .custom-logo {
    /* width: 200px;
    height: 71px;*/
    object-fit: cover;
    display: block;
    max-height: none !important;
    height: 100%;
}

@media (max-width: 1439px) {

    .ck-header__logo-img,
    .ck-header__logo .custom-logo {
        /*max-height: 70px !important;
        width: auto !important;
        height: auto !important;*/
    }
}

/* WP Custom Logo support */
.ck-header__logo .custom-logo-link {
    display: block;
    line-height: 0;
    text-decoration: none;
    height: 100%;
}

/* --- Desktop Navigation --- */
.ck-header__nav {
    display: flex;
    align-items: center;
}

.ck-header__menu {
    display: flex;
    align-items: center;
    gap: 50px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ck-header__menu>li {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.ck-header__menu>li>a {
    font-family: var(--font-family);
    font-size: var(--nav-size);
    font-weight: var(--nav-weight);
    line-height: var(--nav-lh);
    letter-spacing: var(--nav-ls);
    text-transform: uppercase;
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
    display: inline-block;
    padding-bottom: 4px;
}

/* Hover state */
.ck-header__menu>li>a:hover {
    color: var(--color-primary);
}

/* Active / current page item: red dashed underline */
.ck-header__menu>li.current-menu-item>a,
.ck-header__menu>li.current_page_item>a,
.ck-header__menu>li.current-menu-parent:not(.menu-item-243)>a {
    color: var(--color-dark);
    border-bottom: 2px dashed #c0392b;
    padding-bottom: 4px;
}

/* --- Dropdown Submenu --- */
.ck-header__menu>li>.sub-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    right: auto;
    min-width: 220px;
    background-color: #5a6b32;
    border-radius: 8px;
    padding: 24px 28px;
    list-style: none;
    margin: 0;
    z-index: 1100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    /* Fade-in animation */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
}

/* Invisible bridge to keep hover state across the 14px gap */
.ck-header__menu>li>.sub-menu::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
    pointer-events: auto;
    /* Must be explicit – the sub-menu inherits pointer-events:none when hidden */
}

/* Show submenu on hover */
.ck-header__menu>li:hover>.sub-menu,
.ck-header__menu>li:focus-within>.sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.ck-header__menu>li>.sub-menu>li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ck-header__menu>li>.sub-menu>li+li {
    margin-top: 16px;
}

.ck-header__menu>li>.sub-menu>li>a {
    font-family: var(--font-family);
    font-size: var(--nav-size);
    font-weight: 700;
    line-height: var(--nav-lh);
    letter-spacing: var(--nav-ls);
    text-transform: uppercase;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s ease;
    display: block;
}

.ck-header__menu>li>.sub-menu>li>a:hover {
    opacity: 0.8;
    color: #ffffff;
}

/* --- Mobile Toggle (hidden on desktop) --- */
.ck-header__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 45px;
    height: 45px;
    position: relative;
    flex-shrink: 0;
}

/* Hamburger icon lines */
.ck-header__toggle-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    position: relative;
}

.ck-header__toggle-icon span {
    display: block;
    width: 100%;
    height: 2.5px;
    background-color: var(--color-dark);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Animate to X when menu is open */
.ck-header.ck-header--open .ck-header__toggle-icon span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.ck-header.ck-header--open .ck-header__toggle-icon span:nth-child(2) {
    opacity: 0;
}

.ck-header.ck-header--open .ck-header__toggle-icon span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* --- Mobile Overlay Menu (hidden by default) --- */
.ck-header__mobile-menu {
    display: none;
    position: fixed;
    top: 120px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-bg-superlight);
    z-index: 999;
    padding: 40px 20px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ck-header.ck-header--open .ck-header__mobile-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.ck-header__mobile-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.ck-header__mobile-list li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ck-header__mobile-list li a {
    font-family: var(--font-family);
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ck-header__mobile-list li a:hover,
.ck-header__mobile-list li.current-menu-item a,
.ck-header__mobile-list li.current_page_item a {
    color: var(--color-primary);
}

/* Mobile submenu within overlay */
.ck-header__mobile-list .sub-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
    margin: 10px 0 0 0;
    padding: 16px 20px;
    background-color: #5a6b32;
    border-radius: 8px;
    align-items: center;
}

.ck-header__mobile-list .sub-menu li a {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1.8px;
}

.ck-header__mobile-list .sub-menu li a:hover {
    opacity: 0.8;
    color: #ffffff;
}

/* ==========================================================================
   FOOTER – BEM (Site-wide)
   ========================================================================== */

.ck-site-footer {
    width: 100%;
    position: relative;
}

.ck-site-footer__main {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 80px var(--section-padding-x) 50px;
}

.ck-site-footer__columns {
    display: flex;
    justify-content: center;
    gap: 150px;
    margin-bottom: 60px;
}

.ck-footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    max-width: 400px;
}

.ck-footer-col__icon {
    margin-bottom: 25px;
}

.ck-footer-col__title {
    font-family: var(--font-family);
    font-size: var(--h3-size);
    font-weight: var(--h3-weight);
    letter-spacing: var(--h3-ls);
    text-transform: uppercase;
    color: var(--color-white);
    margin-bottom: 25px;
}

.ck-footer-col__text {
    font-family: var(--font-family);
    font-size: var(--nav-size);
    line-height: var(--nav-lh);
    color: var(--color-accent);
    /* Gold color for text as in screenshot */
    margin: 0;
}

.ck-footer-col__text p {
    margin: 0 0 5px 0;
}

.ck-footer-col__text a {
    color: var(--color-accent);
    text-decoration: underline;
}

.ck-footer-col__text a:hover {
    color: var(--color-white);
}

.ck-site-footer__divider {
    width: 100%;
    max-width: 800px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
    margin: 0 auto 40px;
}

.ck-site-footer__bottom {
    display: flex;
    justify-content: center;
}

.ck-site-footer__text {
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin: 0;
}

.ck-site-footer__text a {
    color: inherit;
    text-decoration: none;
}

/* --- Back to Top Button --- */
.ck-back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 44px;
    height: 44px;
    background-color: #e67e22;
    /* Specific orange-ish color from screenshot */
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ck-back-to-top:hover {
    transform: translateY(-5px);
}

/* Hide navigation-specific footer text style if it was defined there */
@media (max-width: 767px) {
    .ck-site-footer__columns {
        flex-direction: column;
        gap: 60px;
        align-items: center;
    }

    .ck-site-footer__main {
        padding: 50px 20px 30px;
    }

    .ck-site-footer__columns {
        margin-bottom: 40px;
    }
}

/* ==========================================================================
   Responsive – Tablet (max-width: 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .ck-header__logo {
        padding-right: 80px;
    }
}

/* ==========================================================================
   Responsive – Mobile (max-width: 767px)
   ========================================================================== */

@media (max-width: 767px) {
    .ck-header__inner {
        height: 120px;
        gap: 18px;
        padding: 0 20px;
        justify-content: space-between;
    }

    .ck-header-spacer {
        height: 120px;
    }

    .ck-header__logo {
        padding-right: 0;
        flex-grow: 1;
    }

    .ck-header__logo-img,
    .ck-header__logo .custom-logo {
        /* width: 200px;*/
        height: 71px;
    }

    /* Hide desktop nav, show toggle */
    .ck-header__nav {
        display: none;
    }

    .ck-header__toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Footer mobile */
    .ck-site-footer__inner {
        padding: 50px 10px;
    }

    .ck-site-footer__text {
        text-align: center;
        line-height: 25px;
    }
}

/* --- Prevent scroll when menu is open --- */
body.ck-menu-open {
    overflow: hidden;
}