@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

html {
    scroll-behavior: smooth;
}

:root {
    --primary-blue: #0061FF;
    --dark-navy: #16213E;
    --background-light: #F8FAFC;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--background-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Floating Glass Navbar */
nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: 15px 20px;
    padding: 12px 30px;
    border-radius: 50px; /* Capsule Shape */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 15px;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-size: 1.5rem; /* Reduced from 2rem */
    font-weight: 900;
    color: var(--primary-blue);
    line-height: 1;
}

.logo-subtext {
    background: var(--dark-navy);
    color: var(--white);
    padding: 2px 8px; /* Reduced from 4/12 */
    font-size: 0.65rem; /* Reduced from 0.8 */
    margin-top: 3px;
    border-radius: 2px;
    letter-spacing: 0.5px;
}

.hero {
    margin: 30px auto;
    max-width: 1300px;
    padding: 100px 0; /* Reduced from 160px for better fit */
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%), url('bg-1.jpg');
    background-size: cover;
    background-position: center;
    /* Removed background-attachment: fixed to prevent zoom issues */
    border-radius: 60px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    color: var(--white);
    position: relative;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 25px;
    color: var(--white);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#homeBtn {
    background: #64748B; /* Slate Gray for Reset */
    box-shadow: 0 4px 14px rgba(100, 116, 139, 0.4);
}

#homeBtn:hover {
    background: #475569;
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.5);
}

.hero p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(0, 97, 255, 0.4);
    transition: var(--transition);
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 97, 255, 0.5);
}

/* Selection Section */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 50px 0;
}

.card {
    background: rgba(255, 255, 255, 0.85); /* More opaque */
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--dark-navy); /* Dark text for visibility */
}

.card:hover {
    transform: translateY(-15px);
    background: var(--white);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-blue);
}

.card i {
    width: 80px;
    height: 80px;
    line-height: 80px;
    background: #EEF2FF;
    border-radius: 24px;
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 25px;
    transition: var(--transition);
}

.card p {
    color: var(--text-muted); 
    font-size: 0.95rem;
    line-height: 1.5;
}

.card:hover i {
    background: var(--primary-blue);
    color: var(--white);
    transform: rotate(10deg);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Quiz Interface */
.quiz-wrapper {
    display: none;
    max-width: 850px;
    margin: 80px auto;
    background: var(--white); /* Switch to solid white for perfect readability */
    padding: 60px 40px;
    border-radius: 40px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease;
    color: var(--text-main); /* Ensure dark text on white background */
}

.question-text {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 35px;
    color: var(--dark-navy);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #E2E8F0;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-blue);
    width: 0%;
    transition: width 0.3s ease;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.options-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns by default */
    gap: 15px;
}
@media (max-width: 600px) {
    .options-list {
        grid-template-columns: 1fr 1fr; /* Keep 2 columns even on very small screens */
        gap: 10px;
    }
}

.option-item {
    background: var(--background-light);
    margin-bottom: 15px;
    padding: 15px 25px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
}

.option-item:hover {
    background: #EEF2FF;
    border-color: var(--primary-blue);
}

.option-item.selected {
    background: #E0E7FF;
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.option-item.correct {
    background: #DCFCE7;
    border-color: #22C55E;
    color: #166534;
}

.option-item.incorrect {
    background: #FEE2E2;
    border-color: #EF4444;
    color: #991B1B;
}

/* Level Selection Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    text-align: center;
}

.level-btns {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.level-btn {
    padding: 15px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.level-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: #F0F7FF;
}

/* Result Screen */
.result-screen {
    text-align: center;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 10px solid var(--primary-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 30px;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-blue);
}

/* Comprehensive Responsive Design */
@media (max-width: 768px) {
    nav {
        margin: 10px;
        padding: 8px 15px;
    }

    .nav-links {
        gap: 10px !important;
    }

    .nav-links a:not(.btn-primary) {
        display: none; /* Hide text links on very small mobile for clean look */
    }

    .hero {
        margin: 10px;
        padding: 50px 15px; /* Even smaller padding for mobile */
        border-radius: 30px;
        background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4)), url('bg-1.jpg'); /* Lighter overlay on mobile */
        background-size: cover;
        background-position: center;
        min-height: 400px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero h2 {
        font-size: 1.5rem !important;
    }

    .selection-grid { 
        grid-template-columns: 1fr; 
        gap: 20px;
    }

    .quiz-wrapper {
        margin: 20px 10px;
        padding: 30px 20px;
        border-radius: 20px;
    }

    .question-text {
        font-size: 1.4rem;
    }

    .option-item {
        padding: 10px 12px;
        font-size: 0.85rem;
        margin-bottom: 0; /* Let grid handle the gap */
    }

    #contactSection h2 {
        font-size: 2rem !important;
    }

    /* Keep Learning Experience section side-by-side even on mobile */
    section#infoSection > div {
        grid-template-columns: 0.8fr 1fr !important;
        gap: 15px !important;
        align-items: center;
    }

    section#infoSection img {
        height: 180px !important; /* Smaller image to fit */
        border-radius: 20px;
    }

    section#infoSection h2 {
        font-size: 1.2rem !important;
        margin-bottom: 5px !important;
    }

    section#infoSection p {
        font-size: 0.85rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3; /* Standard property for compatibility */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    section#infoSection ul {
        font-size: 0.8rem;
    }
}