/*
================================================
SMART CLASSROOM - CLEAN & MODERN THEME
================================================
*/

/* --- 1. Global Styles & Variables --- */
/* Keeping modern fonts but using them in a cleaner way */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

:root {
    /* Simple, High-Contrast Palette */
    --primary-color: #2563eb;
    /* Royal Blue */
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    /* Slate Gray */
    --accent-color: #0ea5e9;
    /* Sky Blue */

    /* Backgrounds */
    --bg-body: #f8fafc;
    /* Very light cool gray */
    --bg-surface: #ffffff;
    --bg-subtle: #f1f5f9;

    /* Text */
    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-light: #f8fafc;

    /* Borders & Lines */
    --border-color: #e2e8f0;

    /* Simple Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

    /* Layout */
    --container-width: 1200px;
    --radius: 12px;
    --header-height: 70px;

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

/* --- 2. Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- 3. Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

h1 {
    font-size: 3rem;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 2.25rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 65ch;
}

/* Utility to replace the complex gradient text */
.gradient-text {
    background: none;
    background-clip: initial;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    color: var(--primary-color);
}

/* Utility to replace glass panels with simple cards */
.glass-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    backdrop-filter: none;
    border-radius: var(--radius);
}

/* --- 4. Header --- */
header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
}

.logo img {
    height: 32px;
    width: auto;
}

.logo span,
.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.desktop-nav nav {
    display: flex;
    gap: 2rem;
}

.desktop-nav a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--primary-color);
}

/* Controls & Toggle */
.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.role-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    background: var(--bg-subtle);
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(16px);
}

#menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* --- 5. Components --- */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: #cbd5e1;
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    transition: 0.2s;
    height: 100%;
}

.card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: inline-block;
}

/* Search Box */
.search-section {
    margin-bottom: 2rem;
    text-align: center;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* --- 6. Sections --- */
/* Hero */
.hero {
    text-align: center;
    padding: 6rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero .tagline {
    font-size: 1.25rem;
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Page Header */
.page-header {
    margin-bottom: 3rem;
    text-align: center;
    padding-top: 3rem;
}

/* Instruction Modal */
.instruction-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 90;
}

#instruction-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: block;
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 2rem;
    max-width: 600px;
    border-radius: var(--radius);
    position: relative;
}

.close-button {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- 7. Footer --- */
footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 5rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.connect-list a {
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.5rem;
}

.connect-list a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-subtle);
    border-radius: 50%;
    color: var(--text-muted);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
}

/* --- 8. Responsive & Mobile --- */
@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }

    #menu-toggle {
        display: block;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

/* Mobile Nav Slider */
.nav-slider {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 2001;
    transition: 0.3s ease;
    padding: 2rem;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
}

.nav-slider.open {
    transform: translateX(-300px);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.nav-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.slider-content nav a {
    display: block;
    padding: 0.75rem 0;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}

/* Animations - Simple Fade */
.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Role Visibility Helpers */
body.role-candidate .student-only {
    display: none !important;
}

body.role-student .candidate-only {
    display: none !important;
}

/* --- 9. Footer --- */
footer {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #e2e8f0;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-brand {
    flex: 1;
    min-width: 200px;
}

.footer-brand h3 {
    font-size: 1.4rem;
    color: white;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-links-group h4 {
    font-size: 1rem;
    color: white;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-links-group ul {
    list-style: none;
}

.footer-links-group li {
    margin-bottom: 10px;
}

.footer-links-group a {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links-group a:hover {
    color: #60a5fa;
}

.footer-links-group a i {
    width: 16px;
    text-align: center;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    transition: all 0.3s;
}

.footer-social a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: #64748b;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        gap: 30px;
    }

    .footer-social {
        justify-content: center;
    }
}