/*
================================================
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 {
    /* Clean & Minimalist Palette */
    --primary-color: #4f46e5; /* Indigo 600 */
    --primary-dark: #3730a3;  /* Indigo 800 */
    
    --bg-body: #f9fafb;    /* Slate 50 */
    --bg-surface: #ffffff;
    --bg-subtle: #f3f4f6;  /* Slate 100 */
    
    /* High Legibility Text */
    --text-main: #111827;   /* Slate 900 */
    --text-muted: #6b7280;  /* Slate 500 */
    --text-light: #f9fafb;
    
    /* Subtle Borders */
    --border-color: #e5e7eb; /* Slate 200 */
    --border-light: #f3f4f6;

    /* Minimalist Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05);

    /* Layout & Spacing */
    --container-width: 1100px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --header-height: 70px;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Simple Transitions */
    --transition: 0.2s ease;
}

/* Dark Theme Variables */
body.dark-theme {
    --primary-color: #818cf8; /* Indigo 400 */
    --primary-dark: #6366f1;  /* Indigo 500 */
    --primary-glow: rgba(129, 140, 248, 0.3);

    --bg-body: #020617;    /* Slate 950 */
    --bg-surface: #0f172a; /* Slate 900 */
    --bg-subtle: #1e293b;  /* Slate 800 */
    --bg-glass: rgba(15, 23, 42, 0.8);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #020617;

    --border-color: #1e293b;
    --border-light: rgba(30, 41, 59, 0.5);

    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* --- 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;
    transition: background-color var(--transition), color var(--transition);
    overflow-x: hidden;
}

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 for clean heading style */
.heading-accent {
    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: 1000;
    transition: var(--transition);
}

header.scrolled {
    height: 60px;
    box-shadow: var(--shadow-sm);
}

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);
    flex-shrink: 0;
}

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

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

/* Desktop Navigation Container */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: flex-end;
}

.desktop-nav nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.desktop-nav a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 0.5rem 0.25rem;
    transition: color 0.2s ease;
}

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

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

.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);
}

/* Theme Toggle Button */
#theme-toggle {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-main);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

#theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(15deg) scale(1.1);
    box-shadow: var(--shadow-glow);
}

#theme-toggle i {
    transition: transform 0.3s ease;
}

body.dark-theme #theme-toggle i.fa-sun {
    display: inline-block;
}

body.dark-theme #theme-toggle i.fa-moon {
    display: none;
}

body:not(.dark-theme) #theme-toggle i.fa-sun {
    display: none;
}

body:not(.dark-theme) #theme-toggle i.fa-moon {
    display: inline-block;
}

/* --- 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-md);
    padding: 1.5rem;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
}

/* 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 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
}

.hero .tagline {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero .btn-primary {
    padding: 1rem 2rem;
}

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

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

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 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: 7rem;
    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: var(--bg-surface);
    margin: 5% auto;
    padding: 2rem;
    max-width: 500px;
    border-radius: var(--radius-md);
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.modal.show .modal-content {
    opacity: 1;
}

.modal-content h2 {
    color: var(--text-main);
}

.modal-content p,
.modal-content ul {
    color: var(--text-muted);
}

.modal-content li {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.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: 6rem 0 3rem;
    margin-top: 8rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr repeat(2, 1fr);
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.footer-brand p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 350px;
}

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

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: var(--transition);
}

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

.footer-links-group h4 {
    color: var(--text-main);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

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

.footer-links-group li {
    margin-bottom: 0.75rem;
}

.footer-links-group a {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links-group a i {
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-links-group a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .footer-brand p {
        margin-left: auto;
        margin-right: auto;
    }

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

    .footer-links-group a:hover {
        padding-left: 0;
    }

    .footer-links-group a {
        justify-content: center;
    }
}

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

    #menu-toggle {
        display: block;
    }

    .controls {
        gap: 0.5rem;
    }

    .role-switch {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .switch {
        width: 32px;
        height: 18px;
    }

    .slider:before {
        height: 14px;
        width: 14px;
    }

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

    #theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

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

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .modal-content {
        margin: 20% auto;
        padding: 1.5rem;
        max-width: 90%;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

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

@media (max-width: 600px) {
    .hero h2 {
        font-size: 1.75rem;
    }

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

    .grid-4 {
        gap: 1rem;
    }

    .card {
        padding: 1.25rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .instruction-container {
        bottom: 6rem;
        right: 1rem;
    }

    #instruction-button {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
}

/* Mobile Nav Slider */
.nav-slider {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-surface);
    z-index: 2001;
    transition: var(--transition);
    padding: 1.5rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

#close-nav-button {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-main);
    padding: 0;
    line-height: 1;
}

.slider-header h3 {
    margin: 0;
    color: var(--text-main);
}

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

.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 {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: calc(100% - 60px);
    overflow-y: auto;
}

.slider-content nav {
    display: flex;
    flex-direction: column;
}

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

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

.slider-content .controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    margin-left: 0;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.slider-content .role-switch {
    width: 100%;
    justify-content: space-between;
    padding: 0.5rem 1rem;
}

.slider-content #theme-toggle {
    width: 44px;
    height: 44px;
}

/* 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;
}


#bp-web-widget-container {
    z-index: 999999 !important;
}

/* --- 10. Blog Highlight Styles --- */
/* Navigation Blog Link Highlight */
/* Blog Highlight */
.nav-blog-highlight {
    background: #f43f5e !important;
    color: white !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
}

.nav-blog-highlight:hover {
    background: #e11d48 !important;
}

.nav-blog-highlight i {
    font-size: 0.9rem;
}

/* Blog Card Highlight on Homepage */
.blog-card-highlight {
    position: relative;
    background: linear-gradient(135deg, #fdf2f8, #fce7f3) !important;
    border: 2px solid #f43f5e !important;
    overflow: hidden;
}

body.dark-theme .blog-card-highlight {
    background: linear-gradient(135deg, #3f1f2d, #4a1f35) !important;
    border-color: #f43f5e !important;
}

.blog-card-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f43f5e, #ec4899, #f43f5e);
    background-size: 200% 100%;
    animation: gradient-move 3s linear infinite;
}

.blog-card-highlight:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 10px 30px rgba(244, 63, 94, 0.3) !important;
}

.blog-card-highlight i {
    color: #f43f5e !important;
    font-size: 2.5rem !important;
}

/* NEW Badge */
.new-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, #f43f5e, #ec4899);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse-badge 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4);
}

/* Animations */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 2px 10px rgba(244, 63, 94, 0.3);
    }

    50% {
        box-shadow: 0 2px 20px rgba(244, 63, 94, 0.6);
    }
}

@keyframes pulse-badge {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes gradient-move {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* Mobile Adjustments for Blog Highlight */
@media (max-width: 900px) {
    .nav-blog-highlight {
        padding: 0.35rem 0.6rem !important;
        font-size: 0.85rem !important;
    }
}

/* Desktop Navbar Responsive Adjustments */
@media (min-width: 1024px) {
    header .container {
        max-width: 1400px;
        padding: 0 2rem;
    }

    .desktop-nav {
        display: flex;
    }

    .desktop-nav nav {
        gap: 1rem;
    }

    .desktop-nav a {
        font-size: 0.85rem;
    }
}

@media (min-width: 1200px) {
    header .container {
        max-width: 1600px;
    }

    .desktop-nav nav {
        gap: 1.5rem;
    }

    .desktop-nav a {
        font-size: 0.9rem;
    }
}

@media (min-width: 1400px) {
    .desktop-nav nav {
        gap: 2rem;
    }

    .desktop-nav a {
        font-size: 0.95rem;
    }
}

/* Hide desktop nav on smaller screens */
@media (max-width: 1023px) {
    .desktop-nav {
        display: none;
    }

    #menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Slider Content Blog Link */
.slider-content .nav-blog-highlight {
    display: flex !important;
    width: 100%;
    justify-content: flex-start;
    border-radius: 8px !important;
    margin: 0.5rem 0;
}