@import url('https://fonts.googleapis.com/css2?family=Hind+Vadodara:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

/* =========================================================
   GLOBAL VARIABLES
========================================================= */

:root {
    --navy: #14213d;
    --blue: #3563e9;
    --purple: #7657e8;
    --ink: #182338;
    --muted: #718096;
    --line: #e8edf5;
    --bg: #f5f7fc;
}

/* =========================================================
   RESET & GLOBAL
========================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, 'Hind Vadodara', sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

.wrap {
    width: min(1120px, calc(100% - 32px));
    margin: auto;
}

/* =========================================================
   LEGACY / OTHER PAGE NAVIGATION
   These styles do not affect .sq-header
========================================================= */

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 5;
}

.nav {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    gap: 11px;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
}

.brand small {
    display: block;
    font-size: 9px;
    letter-spacing: 1.3px;
    color: var(--muted);
    margin-top: 3px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 22px;
}

.nav nav {
    display: flex;
    gap: 24px;
    color: #536078;
    font-size: 14px;
    font-weight: 600;
}

.nav nav a:hover {
    color: var(--blue);
}

/* =========================================================
   MAIN CONTENT
========================================================= */

.main {
    min-height: 75vh;
    padding-top: 30px;
    padding-bottom: 50px;
}

/* =========================================================
   HERO
========================================================= */

.hero {
    background: linear-gradient(120deg, #172c57, #315de0 65%, #7657e8);
    color: #fff;
    border-radius: 24px;
    padding: 44px;
    position: relative;
    overflow: hidden;
}

.hero:after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border: 1px solid #ffffff30;
    border-radius: 50%;
    right: -65px;
    top: -110px;
    box-shadow: 0 0 0 35px #ffffff0c, 0 0 0 70px #ffffff08;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 1.5px;
    font-weight: 800;
    color: #d9e3ff;
}

.hero h1 {
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.15;
    margin: 13px 0;
}

.hero p {
    color: #e1e8ff;
    max-width: 600px;
    line-height: 1.7;
}

/* =========================================================
   BUTTONS
========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue);
    color: #fff;
    border: 0;
    border-radius: 11px;
    padding: 13px 19px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}

.hero .btn {
    background: #fff;
    color: #2449bd;
    margin-top: 12px;
}

.btn.secondary {
    background: #edf2ff;
    color: #3157cb;
}

/* =========================================================
   SECTION HEADINGS
========================================================= */

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 32px 0 16px;
}

.section-head h2 {
    font-size: 22px;
    margin: 0;
}

.muted {
    color: var(--muted);
}

/* =========================================================
   GRID & CARDS
========================================================= */

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 17px;
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 17px;
    padding: 21px;
    box-shadow: 0 5px 20px #1b2c5010;
}

.card h3 {
    margin: 10px 0 7px;
    font-size: 17px;
}

.card p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.tag {
    display: inline-block;
    background: #edf2ff;
    color: #3559c7;
    padding: 6px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
}

.meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
    margin: 14px 0;
}

.empty {
    background: #fff;
    border: 1px dashed #cbd5e1;
    padding: 30px;
    text-align: center;
    border-radius: 16px;
    color: var(--muted);
}

/* =========================================================
   PAGE TITLE
========================================================= */

.page-title {
    margin: 4px 0 22px;
}

.page-title h1 {
    margin: 0 0 8px;
    font-size: 30px;
}

/* =========================================================
   EXAM LAYOUT
========================================================= */

.exam-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
}

.exam-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.timer {
    background: #fff1e8;
    color: #c35a17;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 800;
}

.question {
    font-size: 20px;
    line-height: 1.55;
    font-weight: 700;
    margin: 14px 0 22px;
}

.option {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin: 10px 0;
    background: #fff;
    cursor: pointer;
}

.option:has(input:checked) {
    border-color: var(--blue);
    background: #f2f5ff;
}

.option input {
    margin-top: 4px;
    accent-color: var(--blue);
}

.actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 22px;
}

.palette {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.palette a {
    display: grid;
    place-items: center;
    background: #f0f3f9;
    border-radius: 8px;
    height: 36px;
    font-size: 12px;
    font-weight: 700;
}

.palette a.answered {
    background: #dff7eb;
    color: #137b4c;
}

/* =========================================================
   RESULT & STATISTICS
========================================================= */

.result-score {
    font-size: 48px;
    font-weight: 800;
    color: var(--blue);
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.stat {
    background: #fff;
    border: 1px solid var(--line);
    padding: 17px;
    border-radius: 14px;
}

.stat strong {
    display: block;
    font-size: 23px;
    margin-bottom: 5px;
}

.review {
    background: #fff;
    border: 1px solid var(--line);
    padding: 17px;
    border-radius: 13px;
    margin: 12px 0;
}

.correct {
    color: #168451;
}

.wrong {
    color: #c43b48;
}

/* =========================================================
   FOOTER
========================================================= */

.footer {
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 22px 0;
    color: var(--muted);
    font-size: 12px;
}

/* =========================================================
   FORMS & NOTICES
========================================================= */

.form-control {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
}

.notice {
    padding: 13px 16px;
    background: #fff8e6;
    border: 1px solid #f5dfa4;
    border-radius: 12px;
    color: #805b13;
    margin: 15px 0;
}

/* =========================================================
   SOCIO QUIZ PRO - SHARED HEADER
   Dedicated styles to prevent legacy CSS conflicts
========================================================= */

.sq-header {
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid #e5eaf2;
    box-shadow: 0 3px 15px rgba(15, 35, 70, .055);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.sq-header,
.sq-header * {
    box-sizing: border-box;
}

.sq-nav-wrap {
    width: 100%;
    max-width: 1440px;
    min-height: 78px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sq-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    min-width: 0;
    color: #14213d;
    text-decoration: none;
}

.sq-brand-mark {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 15px;
    color: #fff;
    font-size: 25px;
    font-weight: 800;
    background: linear-gradient(135deg, #0866f2, #6045d8);
    box-shadow: 0 5px 13px rgba(8, 102, 242, .23);
}

.sq-brand-name {
    display: block;
    color: #14213d;
    font-family: 'Anek Gujarati', 'Hind Vadodara', sans-serif;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.4px;
}

.sq-brand-name b {
    color: #0866f2;
}

.sq-brand-tagline {
    display: block;
    margin-top: 4px;
    color: #8290a5;
    font-family: Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

/* DESKTOP MENU */

.sq-nav-menu {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}

.sq-nav-menu > a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 9px 9px;
    border-radius: 10px;
    color: #43516a;
    font-family: 'Anek Gujarati', 'Hind Vadodara', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.sq-nav-menu > a:not(.sq-nav-highlight):hover {
    color: #0866f2;
    background: #edf4ff;
    transform: translateY(-1px);
}

.sq-nav-menu > a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* START TEST BUTTON */

.sq-nav-menu > a.sq-nav-highlight {
    min-height: 44px;
    padding: 10px 14px;
    margin-left: 3px;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #0866f2, #315fe5);
    box-shadow: 0 5px 13px rgba(8, 102, 242, .20);
    font-weight: 800;
}

.sq-nav-menu > a.sq-nav-highlight:hover {
    color: #fff;
    background: linear-gradient(135deg, #0b52c4, #4b3bcb);
    box-shadow: 0 7px 17px rgba(8, 102, 242, .27);
    transform: translateY(-2px);
}

/* STUDENT NAME */

.sq-nav-student {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 5px 9px 5px 6px;
    margin-left: 3px;
    border: 1px solid #dce7f2;
    border-radius: 12px;
    background: #f7faff;
    transition: .2s ease;
}

.sq-nav-student:hover {
    border-color: #a9c8fa;
    background: #edf4ff;
}

.sq-nav-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #0866f2, #6045d8);
}

.sq-nav-avatar svg {
    width: 19px;
    height: 19px;
}

.sq-nav-student-info {
    min-width: 0;
    max-width: 100px;
}

.sq-nav-student-info strong {
    display: block;
    overflow: hidden;
    color: #14213d;
    font-size: 13px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sq-nav-student-info small {
    display: block;
    color: #07834d;
    font-size: 10px;
    font-weight: 700;
}

/* DASHBOARD / REGISTER */

.sq-nav-menu > a.sq-nav-dashboard {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 43px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #fff !important;
    background: linear-gradient(135deg, #0866f2, #315fe5);
    box-shadow: 0 4px 12px rgba(8, 102, 242, .18);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.sq-nav-menu > a.sq-nav-dashboard:hover {
    color: #fff !important;
    background: #0b52c4 !important;
    transform: translateY(-1px);
}

/* LOGIN */

.sq-nav-menu > a[href*="login.php"] {
    border: 1px solid #dce7f2;
    background: #fff;
    color: #0866f2;
    font-weight: 700;
}

.sq-nav-menu > a[href*="login.php"]:hover {
    background: #edf4ff;
    border-color: #a9c8fa;
}

/* HAMBURGER */

.sq-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #dce5f1;
    border-radius: 12px;
    background: #f5f8fd;
    color: #14213d;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sq-menu-toggle svg {
    width: 23px;
    height: 23px;
}

.sq-menu-toggle:active {
    transform: scale(.95);
}

.sq-menu-overlay {
    display: none;
}

/* HEADER MAIN CONTENT */

.sq-main {
    min-height: 65vh;
}

/* HEADER FOOTER */

.sq-footer {
    margin-top: 45px;
    padding: 25px 15px;
    text-align: center;
    color: #718096;
    background: #f5f8fc;
    border-top: 1px solid #e5eaf2;
    font-size: 14px;
}

/* MOBILE BOTTOM NAV */

.sq-mobile-bottom {
    display: none;
}

/* =========================================================
   TABLET DESKTOP HEADER
========================================================= */

@media (min-width: 769px) and (max-width: 1250px) {

    .sq-nav-wrap {
        padding-left: 14px;
        padding-right: 14px;
        gap: 9px;
    }

    .sq-brand-name {
        font-size: 18px;
    }

    .sq-brand-mark {
        width: 42px;
        height: 42px;
    }

    .sq-brand-tagline {
        font-size: 8px;
        letter-spacing: .7px;
    }

    .sq-nav-menu {
        gap: 2px;
    }

    .sq-nav-menu > a {
        padding: 8px 6px;
        font-size: 12px;
    }

    .sq-nav-menu > a.sq-nav-highlight,
    .sq-nav-menu > a.sq-nav-dashboard {
        padding: 9px;
        font-size: 12px;
    }

    .sq-nav-student-info {
        max-width: 75px;
    }
}

/* =========================================================
   TABLET / MOBILE
========================================================= */

@media (max-width: 768px) {

    .sq-nav-wrap {
        min-height: 66px;
        padding: 0 15px;
    }

    .sq-brand-mark {
        width: 41px;
        height: 41px;
        border-radius: 12px;
        font-size: 22px;
    }

    .sq-brand-name {
        font-size: 20px;
    }

    .sq-menu-toggle {
        display: inline-flex;
    }

    .sq-nav-menu {
        display: flex;
        position: absolute;
        top: calc(100% + 8px);
        left: 12px;
        right: 12px;
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 5px;
        background: #fff;
        border: 1px solid #e1e8f1;
        border-radius: 16px;
        box-shadow: 0 18px 40px rgba(15, 35, 70, .16);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px) scale(.98);
        transform-origin: top center;
        transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        z-index: 1001;
    }

    .sq-nav-menu.sq-menu-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .sq-nav-menu > a {
        width: 100%;
        min-height: 47px;
        justify-content: flex-start;
        padding: 11px 13px;
        font-size: 16px;
        border-radius: 10px;
        white-space: normal;
    }

    .sq-nav-menu > a.sq-nav-highlight {
        justify-content: center;
        margin-top: 5px;
    }

    .sq-nav-student {
        width: 100%;
        box-sizing: border-box;
        margin: 5px 0;
        padding: 10px;
        border-radius: 12px;
    }

    .sq-nav-student-info {
        max-width: none;
        flex: 1;
    }

    .sq-nav-menu > a.sq-nav-dashboard {
        width: 100%;
        box-sizing: border-box;
        min-height: 46px;
        margin-top: 4px;
    }

    .sq-menu-overlay {
        display: block;
        position: fixed;
        inset: 66px 0 0;
        z-index: 997;
        background: rgba(10, 25, 50, .28);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: .2s ease;
    }

    .sq-menu-overlay.sq-overlay-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .sq-header {
        z-index: 1000;
    }

    .sq-main {
        min-height: 60vh;
    }

    /* MOBILE BOTTOM NAV */

    .sq-mobile-bottom {
        position: fixed;
        z-index: 990;
        left: 0;
        right: 0;
        bottom: 0;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 3px;
        padding: 8px 7px calc(8px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .97);
        border-top: 1px solid #dce7f2;
        box-shadow: 0 -5px 20px rgba(15, 35, 70, .08);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .sq-mobile-bottom a {
        min-width: 0;
        min-height: 51px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: #74839a;
        text-decoration: none;
        font-size: 11px;
        font-weight: 700;
        border-radius: 10px;
        transition: .18s ease;
    }

    .sq-mobile-bottom a svg {
        width: 21px;
        height: 21px;
    }

    .sq-mobile-bottom a.active {
        color: #0866f2;
        background: #eaf2ff;
    }

    .sq-mobile-bottom a:active {
        transform: scale(.95);
    }

    body {
        padding-bottom: 76px;
    }

    .sq-footer {
        margin-bottom: 0;
    }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 390px) {

    .nav nav {
        gap: 8px;
    }

    .nav nav a {
        font-size: 11px;
    }

    .sq-brand-name {
        font-size: 18px;
    }

    .sq-brand-tagline {
        font-size: 8px;
        letter-spacing: .7px;
    }

    .sq-nav-wrap {
        padding: 0 11px;
    }
}

/* =========================================================
   ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .sq-header *,
    .sq-mobile-bottom *,
    .sq-menu-overlay {
        transition: none !important;
        animation: none !important;
    }
}