:root {
    /* Color Palette - Reverted to Professional Medical Blue (Option 2) */
    --primary-color: #0d5a8c;
    --primary-light: #45c4e5;
    --primary-dark: #0d4d73;
    --secondary-color: #299dd8;
    --accent-color: #87d4fb;
    --text-main: #313131;
    --text-muted: #666666;
    --bg-light: #f8fbfe;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-light);
    overflow-x: hidden;
    width: 100%;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 65px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.cta-button {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(21, 112, 166, 0.2);
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 112, 166, 0.3);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    z-index: 2000;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Mobile Active State */
.nav-toggle.toggle-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.toggle-active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.toggle-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%;
        /* Full width for better centering */
        background: rgba(13, 77, 115, 0.98);
        /* Professional dark blue with transparency */
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        padding: 2rem;
        z-index: 1500;
    }

    .nav-links.nav-active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        color: var(--white);
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
    }

    .nav-links.nav-active a {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered animation for links */
    .nav-links.nav-active a:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.nav-active a:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav-links.nav-active a:nth-child(3) {
        transition-delay: 0.3s;
    }

    .nav-links.nav-active a:nth-child(4) {
        transition-delay: 0.4s;
    }

    .nav-links.nav-active a:nth-child(5) {
        transition-delay: 0.5s;
    }

    .nav-links.nav-active a:nth-child(6) {
        transition-delay: 0.6s;
    }

    .nav-links.nav-active .nav-contact {
        transition-delay: 0.7s;
    }

    .logo img {
        height: 50px;
    }
}

/* Quick Contact Section in Mobile Menu */
.nav-contact {
    display: none;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 250px;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.nav-links.nav-active .nav-contact {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: transform 0.3s;
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.contact-icon svg {
    width: 20px;
    height: 20px;
}

/* Footer Icon Fix */
.footer-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
}

.footer-icon svg {
    width: 100%;
    height: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 7rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h2 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    padding: 0 15px;
    flex: 1;
}

.four {
    flex: 0 0 33.333%;
}

.six {
    flex: 0 0 50%;
}

.eight {
    flex: 0 0 66.666%;
}

.twelve {
    flex: 0 0 100%;
}

@media (max-width: 768px) {

    .four,
    .six,
    .eight {
        flex: 0 0 100%;
        margin-bottom: 2.5rem;
    }
}

/* Cards */
.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.section-padding {
    padding: 6rem 0;
}

/* Footer */
footer {
    background: #1a2a3a;
    color: #f1f3f5;
    padding: 5rem 0 2rem;
}

footer h3 {
    color: var(--accent-color);
    margin-bottom: 1.8rem;
    font-size: 1.4rem;
}

footer ul {
    list-style: none;
}

footer ul li {
    margin-bottom: 1rem;
}

footer a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 4rem;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #a0aec0;
}

/* Mutuas logos adjustments for professional look */
.mutuas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    align-items: center;
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.mutua-logo {
    max-width: 140px;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s ease;
}

.mutua-logo:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.05);
}

/* === Standardized Language Selector === */
.language-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main, #1e293b);
    padding: 8px 12px;
    line-height: 1;
    border-radius: var(--radius-sm, 8px);
    transition: all 0.2s;
}

.lang-btn:hover {
    background: rgba(13, 90, 140, 0.05);
    color: var(--primary-color, #1570a6);
}

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    min-width: 160px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border-radius: 12px;
    padding: 0.5rem 0;
    z-index: 9999;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transform-origin: top right;
}

.lang-menu.open {
    display: block;
    animation: fadeInDown 0.2s ease-out;
}

.lang-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.7rem 1.25rem;
    color: var(--text-main, #1e293b);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    font-weight: 500;
}

.lang-menu a:hover {
    background: #f0f7ff;
    color: var(--primary-color);
}

.lang-menu a.lang-active {
    color: var(--primary-color, #1570a6);
    font-weight: 700;
    background: #f0f7ff;
}

.flag-icon {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.lang-arrow {
    width: 12px;
    height: 12px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-muted);
}

.lang-btn.open .lang-arrow {
    transform: rotate(180deg);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .nav-links .language-dropdown {
        margin: 1rem 0 !important;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
        transition-delay: 0.7s;
    }

    .nav-links.nav-active .language-dropdown {
        opacity: 1;
        transform: translateY(0);
    }

    .lang-btn {
        color: var(--white);
        font-size: 1.1rem;
        padding: 10px 25px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .lang-btn .lang-arrow {
        color: var(--white);
    }

    .lang-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        min-width: 100%;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
        border: none;
    }

    .lang-menu a {
        padding: 1.25rem 2.5rem;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .lang-menu a:last-child {
        border-bottom: none;
        padding-bottom: 2rem;
    }
}