@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,700;1,400&display=swap');

/* --- Constants --- */
:root {
    --num-slides: 4;
    --slide-duration: 7s;
    --total-duration: calc(var(--num-slides) * var(--slide-duration));
}

body {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    background-color: #f4f3ef;
    color: #333;
    overflow: hidden;
}

a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

a:hover {
    color: #000;
}

.site-header,
.site-footer {
    position: fixed;
    width: 100%;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 100;
}

.site-header {
    top: 0;
}

.site-footer {
    bottom: 0;
    font-size: 0.9rem;
}

.logo img {
    height: 40px;
    width: auto;
    vertical-align: middle;
}

.main-nav-desktop {
    display: flex;
    align-items: center;
}

.main-nav-desktop a,
.footer-links a {
    margin-left: 30px;
    font-size: 1rem;
}

/* --- DESKTOP BUTTON STYLES --- */
.main-nav-desktop a {
    padding: 10px 20px;
    background-color: #4a5c43;
    color: #fff;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

.main-nav-desktop a:hover {
    background-color: #d8e0d5;
    color: #000;
}

/* --- DEFAULT: Hide mobile button elements on Desktop --- */
.mobile-header-btns,
.overlay-header-btns {
    display: none;
}

/* --- Slideshow --- */
.slideshow-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70vw;
    aspect-ratio: 16 / 9;
    max-height: 80vh;
    max-width: 1200px;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: image-cycle var(--total-duration) linear infinite;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-duration: var(--total-duration);
}

.slide:nth-child(odd) img {
    animation-name: ken-burns-out;
}

.slide:nth-child(even) img {
    animation-name: ken-burns-in;
}

.slide:nth-child(1),
.slide:nth-child(1) img {
    animation-delay: calc(-1 * var(--slide-duration));
}

.slide:nth-child(2),
.slide:nth-child(2) img {
    animation-delay: 0s;
}

.slide:nth-child(3),
.slide:nth-child(3) img {
    animation-delay: var(--slide-duration);
}

.slide:nth-child(4),
.slide:nth-child(4) img {
    animation-delay: calc(2 * var(--slide-duration));
}

@keyframes image-cycle {
    0% { opacity: 0; }
    2% { opacity: 1; }
    23% { opacity: 1; }
    25% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes ken-burns-out {
    0% { transform: scale(1.1); }
    25% { transform: scale(1); }
    100% { transform: scale(1); }
}

@keyframes ken-burns-in {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    100% { transform: scale(1.1); }
}

/* --- Overlays (Policies, Contact) --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.overlay.visible {
    opacity: 1;
    visibility: visible;
}

.overlay-content {
    position: relative;
    background-color: #f4f3ef;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    padding: 30px 50px;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    color: #333;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.5rem;
    font-weight: 300;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    z-index: 1100;
}

.close-btn:hover {
    color: #000;
}

.overlay-content h1 {
    font-size: 3rem;
    font-weight: 400;
    color: #4a5c43;
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
}

.policy-text h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 10px;
}

.policy-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 25px;
    margin-bottom: 5px;
}

.policy-text p,
.contact-section p {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.policies-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.policy-btn {
    font-family: 'Cormorant Garamond', serif;
    background-color: transparent;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 8px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.policy-btn:hover {
    background-color: #e9e8e2;
    border-color: #aaa;
}

.policy-btn.active {
    background-color: #4a5c43;
    color: #fff;
    border-color: #4a5c43;
}

.policy-text hr {
    border: 0;
    height: 1px;
    background-color: #ddd;
    margin: 40px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.contact-section h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 15px;
}

.contact-section a {
    text-decoration: underline;
    text-decoration-color: #ccc;
    text-underline-offset: 3px;
    transition: all 0.3s ease;
}

.contact-section a:hover {
    color: #4a5c43;
    text-decoration-color: #4a5c43;
}

/* --- Hamburger Menu & Mobile Nav Overlay --- */
.hamburger-menu {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #333;
    margin: 5px 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.hamburger-menu.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.is-active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f4f3ef;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-nav-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-overlay .close-btn {
    color: #8c7851;
}

.mobile-nav-overlay .close-btn:hover {
    color: #4a5c43;
}

.mobile-nav-overlay .copyright {
    display: none;
    position: absolute;
    bottom: 30px;
    font-size: 0.9rem;
    color: #888;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.mobile-nav-links a {
    font-size: 1.8rem;
    color: #8c7851;
    font-weight: 400;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.mobile-nav-links a:hover {
    color: #4a5c43;
    letter-spacing: 1px;
}

/* --- MOBILE STYLES (MODIFIED BREAKPOINT) --- */
@media (max-width: 1200px) {
    .site-header {
        padding: 15px 20px;
        justify-content: space-between;
        gap: 10px;
    }

    .logo img {
        height: 35px;
    }

    .main-nav-desktop,
    .site-footer {
        display: none;
    }

    /* --- 1. HEADER BUTTONS (Visible when menu closed) --- */
    /* HORIZONTAL (Side-by-Side) */
    .mobile-header-btns {
        display: flex;
        margin-left: auto;
        margin-right: 10px;
        gap: 8px; /* Space between buttons */
    }

    .mobile-header-btns a {
        background-color: #4a5c43;
        color: #fff;
        padding: 8px 14px;
        border-radius: 20px;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        white-space: nowrap;
        backdrop-filter: blur(5px);
        transition: background-color 0.3s ease;
    }

    .mobile-header-btns a:hover {
        background-color: #d8e0d5;
        color: #000;
    }

    /* --- 2. OVERLAY BUTTONS (Visible when menu open) --- */
    /* VERTICAL (Stacked) with LARGER TEXT */
    .overlay-header-btns {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin-bottom: 40px;
        width: 100%;
    }

    .overlay-header-btns a {
        background-color: #4a5c43;
        color: #fff;
        padding: 15px 0; /* Increased padding for bigger text */
        width: 80%;
        max-width: 300px;
        text-align: center;
        border-radius: 30px;
        font-size: 1.6rem; /* Increased from 1rem to match the 1.8rem menu links */
        text-transform: none; /* Removed uppercase to match Title Case links */
        letter-spacing: 0.5px;
        white-space: nowrap;
        transition: background-color 0.3s ease;
    }

    .overlay-header-btns a:hover {
        background-color: #d8e0d5;
        color: #000;
    }

    /* --- 3. HIDE DUPLICATES IN TEXT LIST --- */
    .mobile-nav-links .hidden-on-mobile-menu {
        display: none;
    }

    .hamburger-menu {
        display: block;
        position: relative;
        top: auto;
        right: auto;
        padding: 0;
    }

    .mobile-nav-overlay .copyright {
        display: block;
    }

    .slideshow-container {
        width: 90vw;
        aspect-ratio: 4 / 3;
        max-height: 60vh;
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    }

    .overlay-content {
        padding: 20px 25px;
        height: 90vh;
        width: 90%;
    }
}

@media (max-width: 380px) {
    .mobile-header-btns a {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .site-header {
        padding: 15px 10px;
    }
}