/* Header Styles */
.header-blur {
    background: #fdf9f4;
    width: 100%;
    z-index: 50;
    transition: all 0.5s ease-in-out;
    padding: 0;
    top: 0;
    left: 0;
    right: 0;
    /* Removed height: 100vh from default state */
}

/* Only add height when mobile menu is active */
.header-blur.mobile-menu-active {
    height: 100vh;
}

.header-blur.header-scrolled {
    /*position: fixed;*/
}

.header-bg {
    position: absolute;
    inset: 0;
    background-color: transparent;
    backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    transition: all 0.5s ease-in-out;
}

.dark .header-bg {
    background-color: transparent;
}

/* Header container with dynamic padding */
.header-container {
    /*    max-width: 1400px;*/
    margin: 0 auto;
    padding: 0 1.5rem;
    transition: all 0.5s ease-in-out;
}

@media (min-width: 1024px) {
    .header-container {
        padding: 0 2rem;
    }
}

@media (max-width: 1024px) {
    .header-container {
        padding: 0rem;
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    transition: all 0.5s ease-in-out;
}

@media (min-width: 1024px) {
    .header-content {
        padding: 1rem 0;
    }
}

/* Scrolled state - thinner header */
.header-scrolled .header-content {
    padding: 0.5rem 0;
}

@media (min-width: 1024px) {
    .header-scrolled .header-content {
        padding: .75rem 0;
    }
}

/* Scrolled state - white background - ALWAYS VISIBLE */
.header-scrolled .header-bg {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(233, 191, 110, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.dark .header-scrolled .header-bg {
    background-color: rgba(32, 27, 29, 0.95);
    border-bottom: 1px solid rgba(233, 191, 110, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Ensure header is always visible */
.header-blur {
    transform: translateY(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.nav-link {
    position: relative;
    font-family: "Inter", sans-serif;
    font-family: "Playfair Display", serif;
    font-weight: 500;
    color: black;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0);
    font-size: 1.15rem;
}

/* Nav links color change on scroll */
.header-scrolled .nav-link {
    color: #201b1d;
    text-shadow: none;
}

.dark .nav-link {
    color: white;
}

.dark .header-scrolled .nav-link {
    color: white;
}

.nav-link:hover {
    color: #e9bf6e;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #e9bf6e;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.logo-container {
    display: block;
}

.logo-content {
    text-align: center;
    transform: scale(1);
    transition: all 0.5s ease-in-out;
}

.logo-container:hover .logo-content {
    transform: scale(1.05);
}

.logo-image {
    height: 80px;
    width: auto;
    margin: 0 auto;
    transition: all 0.5s ease-in-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@media (min-width: 1024px) {
    .logo-image {
        height: 120px;
    }
}

/* Logo gets smaller on scroll */
.header-scrolled .logo-image {
    height: 60px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@media (min-width: 1024px) {
    .header-scrolled .logo-image {
        height: 80px;
        filter: contrast(0);
    }
}

.company-name {
    font-size: 1.5rem;
    font-family: "Playfair Display", serif;
    font-weight: 700;
    color: white;
    letter-spacing: -0.025em;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease-in-out;
}

@media (min-width: 1024px) {
    .company-name {
        font-size: 1.875rem;
    }
}

/* Company name color change on scroll */
.header-scrolled .company-name {
    color: #201b1d;
    text-shadow: none;
    font-size: 1.25rem;
}

@media (min-width: 1024px) {
    .header-scrolled .company-name {
        font-size: 1.5rem;
    }
}

.dark .company-name {
    color: white;
}

.dark .header-scrolled .company-name {
    color: white;
}

.company-tagline {
    font-size: 0.75rem;
    font-family: "Inter", sans-serif;
    color: #e9bf6e;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 0.25rem;
    font-weight: 500;
    transition: all 0.5s ease-in-out;
}

@media (min-width: 1024px) {
    .company-tagline {
        font-size: 0.875rem;
    }
}

/* Tagline gets smaller on scroll */
.header-scrolled .company-tagline {
    font-size: 0.625rem;
    margin-top: 0.125rem;
}

@media (min-width: 1024px) {
    .header-scrolled .company-tagline {
        font-size: 0.75rem;
    }
}

.decorative-line {
    width: 4rem;
    height: 1px;
    background-color: #e9bf6e;
    margin: 0.5rem auto 0;
    opacity: 0.6;
    transition: all 0.5s ease-in-out;
}

/* Decorative line gets smaller on scroll */
.header-scrolled .decorative-line {
    width: 3rem;
    margin-top: 0.25rem;
}

.theme-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    background-color: rgba(248, 246, 243, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
}

/* Theme toggle background change on scroll */
.header-scrolled .theme-toggle {
    background-color: #f8f6f3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark .theme-toggle {
    background-color: rgba(38, 38, 38, 0.3);
}

.dark .header-scrolled .theme-toggle {
    background-color: #262626;
}

.theme-toggle:hover {
    background-color: #e9bf6e;
    color: #201b1d;
    transform: scale(1.05);
}

.theme-toggle i {
    color: #e9bf6e;
    transition: color 0.3s ease;
}

.theme-toggle:hover i {
    color: #201b1d;
}

.cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: #e9bf6e;
    color: #201b1d;
    font-family: "Inter", sans-serif;
    font-weight: 600;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.cta-button-text {
    position: relative;
    z-index: 10;
    transition: color 0.3s ease;
}

.cta-button:hover .cta-button-text {
    color: white;
}

.cta-button-bg {
    position: absolute;
    inset: 0;
    background-color: #201b1d;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.cta-button:hover .cta-button-bg {
    transform: scaleX(1);
}

/* Simplified hamburger menu styles */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: rgba(248, 246, 243, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    position: absolute;
    right: 1.5rem;
    transition: .5s;
}

/* Hide hamburger menu on large screens */
@media (min-width: 1024px) {
    .hamburger-menu {
        display: none !important;
    }
}

.hamburger-menu:hover {
    background-color: rgba(248, 246, 243, 0.9);
    transform: scale(1.05);
}

.hamburger-line {
    display: block;
    width: 1.5rem;
    height: 2px;
    background-color: #201b1d;
    transition: all 0.3s ease;
}

/* Simplified hamburger animation */
.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Simplified mobile menu styles */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: none;
}

@media (min-width: 1024px) {
    .mobile-menu {
        display: none !important;
    }
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-bg {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
}

.dark .mobile-menu-bg {
    background-color: rgba(32, 27, 29, 0.98);
}

.mobile-nav-link {
    font-family: "Inter", sans-serif;
    font-size: 1.125rem;
    color: #201b1d;
    transition: color 0.3s ease;
    text-decoration: none;
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(233, 191, 110, 0.1);
}

.dark .mobile-nav-link {
    color: white;
}

.mobile-nav-link:hover {
    color: #e9bf6e;
}

.mobile-nav-icon {
    color: #e9bf6e;
    transition: transform 0.3s ease;
}

.mobile-nav-link:hover .mobile-nav-icon {
    transform: translateX(5px);
}

.mobile-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1rem;
    background-color: #e9bf6e;
    color: #201b1d;
    font-family: "Inter", sans-serif;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 1rem;
}

.mobile-cta:hover {
    background-color: #201b1d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.header-spacer {
    height: 0;
    transition: height 0.5s ease-in-out;
}

/* Navigation container styles */
.nav-container-left,
.nav-container-right {
    display: none;
    align-items: center;
    gap: 2rem;
    justify-content: space-around;
    flex: 1;
}

@media (min-width: 1024px) {

    .nav-container-left,
    .nav-container-right {
        display: flex;
    }
}

@media (min-width: 1280px) {

    .nav-container-left,
    .nav-container-right {
        gap: 3rem;
    }
}

.header-actions {
    /*display: none;*/
    align-items: center;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .header-actions {
        display: flex;
    }
}

.mobile-menu-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 1.5rem 2rem;
    height: 100vh;
    overflow-y: auto;
}

.mobile-nav-container {
    display: flex;
    flex-direction: column;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-cta-container {
    padding-top: 2rem;
    border-top: 1px solid rgba(233, 191, 110, 0.2);
    margin-top: auto;
}

/* Animation for header elements */
@keyframes headerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-blur {
    animation: headerSlideDown 0.8s ease-out;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .header-content {
        padding: 1rem 0;
    }

    .header-scrolled .header-content {
        padding: 0.5rem 0;
    }

    .logo-image {
        height: 80px;
    }

    .header-scrolled .logo-image {
        height: 45px;
    }

    .company-name {
        font-size: 1.25rem;
    }

    .header-scrolled .company-name {
        font-size: 1rem;
    }

    .company-tagline {
        font-size: 0.625rem;
    }

    .header-scrolled .company-tagline {
        font-size: 0.5rem;
    }
}

/* Focus states for accessibility */
.theme-toggle:focus,
.cta-button:focus,
.hamburger-menu:focus {
    outline: 2px solid #e9bf6e;
    outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add styles for mobile menu close button */
.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.5rem;
    background-color: rgba(248, 246, 243, 0.2);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    z-index: 70;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mobile-menu-close:hover {
    background-color: rgba(248, 246, 243, 0.9);
    transform: scale(1.05);
}

.dark .mobile-menu-close {
    background-color: rgba(38, 38, 38, 0.3);
}

.dark .mobile-menu-close:hover {
    background-color: rgba(38, 38, 38, 0.9);
}

.mobile-menu-close-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #201b1d;
    transition: color 0.3s ease;
}

.dark .mobile-menu-close-icon {
    color: #fff;
}

/* Ensure logo stays visible when mobile menu is open */
.mobile-menu.active ~ .header-container .logo-container {
    z-index: 65;
    position: relative;
}
