:root {
    --navbar-height: 80px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 1440px;
    width: 81.11%;
    margin: 1em auto;
    background-color: #fff;
    padding: 1.375rem 1.5rem;
    z-index: 999;
    transition: background-color 0.3s ease, transform 0.5s ease-in-out, border-color 0.3s ease;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0);
}

.navbar-container {
    width: 95%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    width: 175px;
    transition: fill 0.3s ease-in-out;
    height: 27.64px;
    position: relative;
    display: block;
}

.navbar-logo .kwbrand-cls-1 {
    fill: #7aaede;
}

.navbar-logo .kwbrand-cls-2 {
    fill: #224141;
}

.navbar-menu {
    display: flex;
    gap: clamp(0rem, 4vw, 7rem);
    list-style: none;
    padding: 0;
    background-color: transparent;
}

.navbar-menu li a {
    font-family: 'Poppins', sans-serif;
    color: #242424;
    text-decoration: none;
    font-size: clamp(0.875rem, 1.2vw, 1rem);
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-menu li a:hover {
    color: #5a8bb0;
}

.navbar-button {
    background-color: #0D3458;
    color: #fff;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.875rem, 1.2vw, 1rem);
    transition: background-color 0.3s ease;
}

.navbar-button a {
    color: var(--color-text);
    text-decoration: none;
}

.navbar-button:hover {
    background-color: #5a8bb0;
}

/* Mobile Hamburger Menu */
.nav-menu {
    display: none;
}

.hamburger {
    stroke: black;
    transition: translate 1s, rotate 1s;
}

.navbar.scrolled .hamburger {
    stroke: black;
}

.nav-menu[aria-expanded="true"] .hamburger {
    rotate: 0.125turn;
}

.nav-menu .line {
    transition: 1s;
    stroke-dasharray: 60 31 60 300;
}

.nav-menu[aria-expanded="true"] .line {
    stroke-dasharray: 60 105 60 300;
    stroke-dashoffset: -90;
}

@media screen and (max-width: 1000px) {
    .navbar {
        width: 100%;
        margin: 0;
        border-radius: 0;
        position: relative;
    }

    .navbar-toggle {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1.5rem;
        z-index: 1100;
    }

    .navbar-button {
        display: none;
    }

    .navbar-menu {
        display: none;
    }

    .nav-menu {
        display: block;
    }

    .mobile-menu {
        margin-left: 0;
        margin-right: 0;
    }
}

/* New styles for opening and closing the mobile menu using keyframes */
@keyframes openMenu {
    0% {
        display: block;
    }

    25% {
        height: 0;
    }

    100% {
        height: 45vh;
    }
}

@keyframes closeMenu {
    0% {
        display: block;
        height: 45vh;
    }

    75% {
        height: 0;
    }

    100% {
        display: none;
    }
}

.openMenu {
    animation: openMenu .5s ease-in-out forwards;
}

.closeMenu {
    animation: closeMenu .5s ease-in-out forwards;
}

.navbar[aria-expanded="true"] {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.2);
}

.mobile-menu {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: 100%;
    height: 0;
    background: white;
    visibility: hidden;
    z-index: 998;
    overflow: hidden;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-container {
    padding: 0 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1em;
}

/* Updated mobile navigation links */
.mobile-nav-links {
    list-style: none;
    padding: 0;
}

.mobile-nav-links li {
    margin: 0.5rem 0;
}

.mobile-nav-links a {
    color: #224141;
    font-size: 1.2rem;
    text-decoration: none;
    display: block;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(13, 52, 88, 0.05);
    font-weight: 500;
}

.mobile-nav-links a:hover {
    background: #0D3458;
    color: white;
    transform: translateX(10px);
}

/* Action Cards */
.mobile-action-cards {
    display: grid;
    gap: 1rem;
    margin-top: auto;
    padding-bottom: 1rem;
}

.action-card {
    background: rgba(13, 52, 88, 0.02);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 1.25rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-card:hover {
    border-color: #0D3458;
    background: rgba(13, 52, 88, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(13, 52, 88, 0.1);
}

.action-card span {
    font-size: 2.5rem;
    color: #0D3458;
    margin-bottom: 1rem;
    display: block;
}

.action-card p {
    font-weight: 600;
    color: #0D3458;
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.action-card small {
    color: #666;
    display: block;
    font-size: 0.9rem;
}

.card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Animation states */
.openMenu {
    visibility: visible;
    height: calc(100vh - var(--navbar-height));
}

.openMenu .menu-container {
    opacity: 1;
}

.closing .menu-container {
    opacity: 0;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 999;
    background: white;
    padding: 0.5rem;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.1);
}

.lang-option {
    display: block;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.lang-option:hover {
    opacity: 1;
    transform: translateX(-3px);
}

.lang-option img {
    display: block;
    width: 40px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
}

.lang-option.active {
    opacity: 1;
    pointer-events: none;
    transform: translateX(-5px);
}

/* Media query for mobile */
@media (max-width: 768px) {
    .language-switcher {
        top: auto;
        bottom: 5rem;
        transform: none;
        border-radius: 8px 0 0 8px;
    }
}

/* Updated CTA button styles */
.cta-button {
    margin-top: 3rem !important;
    padding-left: 0 !important;
}

.menu-cta {
    display: inline-block;
    background: #7aaede;
    color: white !important;
    padding: 1rem 2.5rem !important;
    border-radius: 4px !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 1rem !important;
    border: 2px solid #7aaede;
    transition: all 0.3s ease !important;
}

.menu-cta:hover {
    background: #224141 !important;
    border-color: #224141;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 65, 65, 0.2);
}

.menu-cta::before {
    display: none !important;
}

/* Add this to your existing CSS */
body.menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100%;
    height: 100%;
}

/* Make content more responsive to screen height */
@media screen and (max-height: 700px) {
    .mobile-nav-links a {
        padding: 0.75rem 1.25rem;
        font-size: 1.1rem;
    }

    .action-card {
        padding: 1rem;
    }

    .action-card span {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .action-card p {
        font-size: 1rem;
        margin: 0.25rem 0;
    }

    .action-card small {
        font-size: 0.8rem;
    }

    .mobile-action-cards {
        gap: 0.45rem;
    }
}

/* Even smaller screens like iPhone SE */
@media screen and (max-height: 600px) {
    .mobile-nav-links a {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .action-card {
        padding: 0.75rem;
    }

    .action-card span {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }

    .action-card p {
        font-size: 0.9rem;
    }

    .action-card small {
        font-size: 0.75rem;
    }

    .mobile-action-cards {
        gap: 0.5rem;
    }
}

/* Add these new styles */
.menu-header {
    text-align: left;
    line-height: 1.2;
}

.menu-header h2 {
    color: #0D3458;
    font-size: 1.75rem;
    font-weight: 600;
}

.menu-header p {
    color: #666;
    font-size: 1rem;
}

/* Update nav links to include icons */
.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-nav-links a .material-icons {
    font-size: 1.5rem;
    color: #0D3458;
}

/* Logo animation */
.animate-logo {
    transition: transform 0.3s ease;
}

.animate-logo:hover {
    transform: scale(1.05);
}

@media screen and (max-width: 1000px) {
    .navbar-logo {
        width: 150px;
        /* Slightly smaller on mobile */
    }
}

/* Adjust header for smaller screens */
@media screen and (max-height: 700px) {
    .menu-header {
        margin-bottom: 1rem;
    }

    .menu-header h2 {
        font-size: 1.5rem;
    }
}