:root {
    --csir-blue: #003e7e;
    --primary-blue: #005aa9;
    --neeri-green: #138a4b;
    --text-dark: #1f2937;
    --text-muted: #31363f;
    --surface: #d1e1f1;
    --border: #b8b8b8;
    --overlay: rgba(15, 23, 42, 0.55);
}

/* ===============================
   Overlay
================================= */

.lang-gate {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--overlay);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.lang-gate--hidden {
    display: none;
}

html.lang-gate-lock-scroll,
html.lang-gate-lock-scroll body {
    overflow: hidden;
}

/* ===============================
   Modal Panel
================================= */

.lang-gate__panel {
    position: relative;
    width: 100%;
    max-width: 640px;
    background: var(--surface);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* ===============================
   Close Button
================================= */

.lang-gate__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: var(--text-dark);
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition:
        background-color 0.25s,
        color 0.25s,
        transform 0.25s,
        box-shadow 0.25s;
}

.lang-gate__close:hover {
    background: #ef4444;
    color: #fff;
    transform: scale(1.05);
}

.lang-gate__close:focus {
    outline: 3px solid var(--csir-blue);
    outline-offset: 2px;
}

/* ===============================
   Branding
================================= */

.lang-gate__notice {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.lang-gate__notice-prompt-en {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-muted);
}

.lang-gate__branding,
.lang-gate__identity,
.lang-gate__language {
    text-align: center;
}

.lang-gate__branding p,
.lang-gate__identity p,
.lang-gate__language p,
.lang-gate__branding h1,
.lang-gate__identity h2 {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.lang-gate__logo {
    display: block;
    max-width: 170px;
    height: auto;
    margin: 0 auto 28px;
}

/* ===============================
   Welcome
================================= */

.lang-gate__welcome-en {
    margin: 0 0 28px;

    font-size: clamp(18px, 3vw, 20px);
    font-weight: 500;

    color: var(--text-dark);
}

.lang-gate__welcome-hi {
    margin: 0 0 8px;

    font-size: clamp(28px, 1.5vw, 34px);
    font-weight: 700;

    color: var(--csir-blue);
}

/* ===============================
   CSIR Name
================================= */

.lang-gate__title-hi {
    margin: 0 0 8px;
    font-size: clamp(20px, 3vw, 24px);
    font-weight: 600;
    color: var(--text-dark);
}

.lang-gate__title-en {
    margin: 0 0 12px;
    font-size: clamp(20px, 3vw, 22px);
    font-weight: 500;
    color: var(--text-dark);
}

/* ===============================
   Ministry
================================= */

.lang-gate__sub-hi,
.lang-gate__sub-en {
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-muted);
}

.lang-gate__sub-en {
    margin-bottom: 28px;
}

/* ===============================
   Divider
================================= */

.lang-gate__identity {
    margin-bottom: 16px;
    /* padding-bottom: 16px; */
    border-bottom: 1px solid var(--border);
}

/* ===============================
   Language Prompt
================================= */

.lang-gate__prompt-en {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-muted);
}

.lang-gate__prompt-hi {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    color: var(--csir-blue);
}

/* ===============================
   Buttons
================================= */

.lang-gate__actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.lang-gate__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    height: 48px;
    padding: 0 32px;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.25s,
        transform 0.25s,
        box-shadow 0.25s;
}

.lang-gate__btn--hindi {
    background: var(--neeri-green);
}

.lang-gate__btn--hindi:hover {
    background: #0e6e3b;
    transform: translateY(-2px);
}

.lang-gate__btn--english {
    background: var(--primary-blue);
}

.lang-gate__btn--english:hover {
    background: #004888;
    transform: translateY(-2px);
}

.lang-gate__btn:focus {
    outline: 3px solid var(--csir-blue);
    outline-offset: 2px;
}

/* ===============================
   Mobile
================================= */

@media (max-width: 768px) {
    .lang-gate__panel {
        max-width: 95%;
        padding: 36px 24px;
    }

    .lang-gate__logo {
        max-width: 140px;
    }

    .lang-gate__actions {
        flex-direction: column;
        gap: 12px;
    }

    .lang-gate__btn {
        width: 100%;
        max-width: 260px;
    }
}

@media (max-width: 480px) {
    .lang-gate__panel {
        padding: 30px 20px;
    }

    .lang-gate__close {
        top: 12px;
        right: 12px;
    }
}

/* ==========================
   FOCUS VISIBLE (accessibility)
========================== */

/* Make buttons look like buttons when focused */
.lang-gate__btn:focus-visible {
    outline: 3px solid #003e7e;
    outline-offset: 2px;
}

.lang-gate__close:focus-visible {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

/* Added subtle fade/scale animation when the modal opens */
.lang-gate {
    animation: fadeIn 0.25s ease;
}

.lang-gate__panel {
    animation: scaleIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
