:root {
    --primary: #1a5f7a;
    --secondary: #159895;
    --accent: #57C5B6;
    --light: #f8f9fa;
    --dark: #35373a;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    background-color: lab(99.93% -0.32 -0.13);
    color: var(--accent);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles - Compact Height */
header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    font-size: 1.5rem;
}

.logo h1 {
    font-size: 1.3rem;
    margin: 0;
    line-height: 1;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 1.2rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.95rem;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.auth-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn {
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

/* Hero Sections */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.page-hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero h2,
.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p,
.page-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary);
}

.section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--light);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Stats Section */
.stats {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Courses Section */
.courses-section {
    padding: 4rem 0;
    background-color: white;
}

.classes-tabs {
    margin-top: 2rem;
}

.tab-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: var(--light);
    border: 2px solid var(--light);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.course-card {
    background: var(--light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.course-card h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.course-card ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.course-card ul li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.course-card ul li:last-child {
    border-bottom: none;
}

/* Forms */
.admission-form,
.library-section,
.donation-section {
    padding: 4rem 0;
}

.form-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.form-container h3 {
    color: var(--primary);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}

.form-container h3:first-child {
    margin-top: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(87, 197, 182, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 5px;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Donation Styles */
.donation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.donation-option {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.donation-option h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.bank-details p {
    margin-bottom: 0.5rem;
}

.qr-code {
    text-align: center;
    margin: 1rem 0;
}

/* Library Styles */
.library-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--dark);
}

.search-box {
    display: flex;
    gap: 0;
    margin-left: auto;
}

.search-box input {
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.search-box button {
    border-radius: 0 4px 4px 0;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.material-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.material-card:hover {
    transform: translateY(-5px);
}

.material-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.material-card h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.material-meta {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #666;
}

.material-actions {
    display: flex;
    gap: 0.5rem;
}

.material-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.upload-section {
    background: var(--light);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 3rem;
}

.upload-section h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.upload-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent);
}

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

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

.social-links a:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive - Mobile Menu */
@media (max-width: 768px) {
    /* Show hamburger menu button */
    .mobile-menu-toggle {
        display: block;
    }

    /* Header adjustments */
    .header-content {
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    /* Logo stays on left */
    .logo {
        flex: 0 0 auto;
    }

    .logo h1 {
        font-size: 1.1rem;
    }

    .logo i {
        font-size: 1.3rem;
    }

    /* Hide navigation by default on mobile */
    nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        padding: 20px 0;
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }

    nav.active {
        left: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        margin: 0;
    }

    nav ul li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    nav ul li a {
        display: block;
        padding: 15px 20px;
        font-size: 1rem;
        border-radius: 0;
    }

    nav ul li a:hover,
    nav ul li a.active {
        background-color: rgba(255, 255, 255, 0.15);
    }

    /* Auth buttons in mobile menu */
    .auth-buttons {
        position: fixed;
        bottom: 0;
        left: -100%;
        width: 280px;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        transition: left 0.3s ease;
        z-index: 999;
        border-top: 1px solid rgba(255,255,255,0.2);
    }

    .auth-buttons.active {
        left: 0;
    }

    .auth-buttons .btn {
        width: 100%;
        text-align: center;
        padding: 10px;
    }

    /* Overlay when menu is open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }
    
    .hero h2,
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .library-filters {
        flex-direction: column;
    }
    
    .search-box {
        margin-left: 0;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .donation-options {
        grid-template-columns: 1fr;
    }

    .tab-content {
    display: none;
    }

    .tab-content.active {
    display: block !important;
    }

    /* Center the login section vertically and horizontally */
    .auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;          /* Full screen height */
    background-color: #f5f7fa;  /* Soft background */
    padding: 40px 0;
    }

    /* Limit width of the container */
    .auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1000px;   /* Maximum width of section */
    margin: 0 auto;      /* Center horizontally */
    gap: 30px;
    }

    /* Main login card */
    .auth-card {
    background: #fff;
    width: 400px;          /* Fixed width for login box */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    /* Optional: Align features beside or below depending on screen size */
    .auth-features {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    }
    

    @media (max-width: 992px) {
    .auth-container {
        flex-direction: column; /* Stack on small screens */
    }
    }
}
    /* ========================================= */
    /*         GLOBAL HERO SLIDER CSS            */
    /* ========================================= */

.hero-slider {
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: 520px;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    opacity: 0;
    animation: slideAnimation 30s infinite;
    transition: opacity 1s ease-in-out;
}

    .hero-slide:nth-child(1) { animation-delay: 0s; }
    .hero-slide:nth-child(2) { animation-delay: 5s; }
    .hero-slide:nth-child(3) { animation-delay: 10s; }
    .hero-slide:nth-child(4) { animation-delay: 15s; }
    .hero-slide:nth-child(5) { animation-delay: 20s; }
    .hero-slide:nth-child(6) { animation-delay: 25s; }

    @keyframes slideAnimation {
        0% { opacity: 0; }
        5% { opacity: 1; }
        25% { opacity: 1; }
        30% { opacity: 0; }
        100% { opacity: 0; }
    }

.hero-text {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    color: white;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-subtext {
    font-size: 1.25rem;
    max-width: 750px;
    line-height: 1.5;
    margin-bottom: 22px;
}

/* Mobile hero adjustments */
@media (max-width: 768px) {
    .hero-slider {
        height: 450px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtext {
        font-size: 1rem;
        padding: 0 10px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* Donation Section Grid Responsive */
.donation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

.donation-hadees {
    text-align: left;
}

.donation-hadees h3,
.donation-bank h3 {
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    padding-bottom: 5px;
}

.donation-qr {
    text-align: center;
}

.donation-qr img {
    width: 160px;
    height: 160px;
    border-radius: 10px;
    margin-bottom: 15px;
    background: #fff;
    padding: 8px;
}

.donate-btn {
    background: #ffffff;
    color: #0b63d3;
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    display: inline-block;
}

/* Mobile - Donation Section */
@media (max-width: 768px) {
    .donation-grid {
        grid-template-columns: 1fr !important;
        gap: 25px;
    }

    .donation-hadees,
    .donation-bank,
    .donation-qr {
        text-align: center;
    }

    .donation-qr img {
        width: 180px;
        height: 180px;
    }

    /* Stats grid - donation box full width */
    .stats-grid .stat-item[style*="grid-column: span 4"] {
        grid-column: span 1 !important;
    }
}
