/* ============================================
   Al-Falah Public School - Modern Design
   Color Scheme: Green, White, Black
   ============================================ */

:root {
    --primary-blue: #22c55e;
    --primary-blue-dark: #16a34a;
    --primary-blue-light: #dcfce7;
    --secondary-blue: #15803d;
    --black: #1a1a1a;
    --black-light: #333333;
    --gray-dark: #666666;
    --gray: #999999;
    --gray-light: #f5f5f5;
    --white: #ffffff;
    --white-off: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--black);
    background-color: var(--white);
}

a {
    color: var(--primary-blue);
    text-decoration: underline;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-blue-dark);
}

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

/* ============================================
   Header
   ============================================ */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

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

.logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.85rem;
    color: var(--gray-dark);
}

/* Navigation */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 5px;
}

.nav-link {
    display: block;
    padding: 10px 16px;
    color: var(--black);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-blue);
    background: var(--primary-blue-light);
}

.nav-link.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    text-decoration: none;
    margin-left: 10px;
}

.nav-link.btn-primary:hover {
    background: var(--primary-blue-dark);
    color: var(--white);
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    list-style: none;
    padding: 8px 0;
    z-index: 100;
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 10px 20px;
    color: var(--black-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.dropdown li a:hover {
    color: var(--primary-blue);
    background: var(--primary-blue-light);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--black);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.hero-slider {
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    background-size: cover;
    background-position: center;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.slide .hero-content {
    position: relative;
    z-index: 1;
}

.slide.active {
    opacity: 1;
}

.hero-content {
    text-align: center;
    color: var(--white);
    max-width: 700px;
    padding: 20px;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-nav button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--white);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}

.slider-nav button.active,
.slider-nav button:hover {
    background: var(--white);
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: var(--primary-blue);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    border: 2px solid var(--primary-blue);
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    display: inline-block;
    padding: 12px 28px;
    background: transparent;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    border: 2px solid var(--primary-blue);
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
    text-decoration: none;
}

/* ============================================
   Section Titles
   ============================================ */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-blue);
    border-radius: 2px;
}

/* ============================================
   Welcome Section
   ============================================ */
.welcome-section {
    padding: 80px 0;
    background: var(--white);
}

.welcome-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.welcome-content p {
    margin-bottom: 20px;
    color: var(--gray-dark);
    font-size: 1.05rem;
}

.welcome-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.feature-card {
    background: var(--white-off);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-blue);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--gray-dark);
    margin: 0;
}

/* ============================================
   Quick Links
   ============================================ */
.quick-links {
    padding: 60px 0;
    background: var(--primary-blue-light);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
    background: var(--white);
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-blue);
}

.link-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.quick-link-card span:last-child {
    color: var(--black);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

.quick-link-card:hover span:last-child {
    color: var(--primary-blue);
}

/* ============================================
   Gallery Section
   ============================================ */
.gallery-section {
    padding: 80px 0;
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-cta {
    text-align: center;
}

/* ============================================
   News Section
   ============================================ */
.news-section {
    padding: 80px 0;
    background: var(--white-off);
}

.news-grid {
    display: flex;
    gap: 40px;
    align-items: stretch;
}

.news-card,
.blog-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-blue);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card .section-title,
.blog-card .section-title {
    margin-bottom: 20px;
}

.news-card .section-title::after,
.blog-card .section-title::after {
    left: 0;
    transform: none;
}

.news-date {
    display: inline-block;
    background: var(--primary-blue);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.news-card h3,
.blog-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 12px;
}

.news-card p,
.blog-card p {
    color: var(--gray-dark);
    margin-bottom: 20px;
}

.news-link {
    color: var(--primary-blue);
    text-decoration: underline;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: auto;
}

.news-link:hover {
    color: var(--primary-blue-dark);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--white);
}

.footer-col h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--white);
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 2px;
}

.footer-col p {
    color: var(--gray);
    font-size: 0.95rem;
}

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

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

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid var(--black-light);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.footer-bottom a {
    color: var(--primary-blue);
    text-decoration: underline;
}

.footer-bottom a:hover {
    color: var(--white);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 998;
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-hover);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 80px;
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
    }
    
    .nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav-link.no-dropdown::after,
    .nav-link:not(.has-dropdown .nav-link)::after {
        display: none;
    }
    
    .has-dropdown > .nav-link::after {
        content: '+';
        font-size: 1.2rem;
        font-weight: bold;
        transition: transform 0.3s ease;
    }
    
    .has-dropdown.active > .nav-link::after {
        content: '-';
        transform: rotate(180deg);
    }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--primary-blue-light);
        display: block;
        padding: 0;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .dropdown li a {
        padding: 12px 30px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        opacity: 0;
        transform: translateX(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
    }
    
    .has-dropdown.active .dropdown {
        max-height: 500px;
        padding: 8px 0;
    }
    
    .has-dropdown.active .dropdown li a {
        opacity: 1;
        transform: translateX(0);
    }
    
    .has-dropdown.active .dropdown li:nth-child(1) a { transition-delay: 0.05s; }
    .has-dropdown.active .dropdown li:nth-child(2) a { transition-delay: 0.1s; }
    .has-dropdown.active .dropdown li:nth-child(3) a { transition-delay: 0.15s; }
    .has-dropdown.active .dropdown li:nth-child(4) a { transition-delay: 0.2s; }
    .has-dropdown.active .dropdown li:nth-child(5) a { transition-delay: 0.25s; }
    .has-dropdown.active .dropdown li:nth-child(6) a { transition-delay: 0.3s; }
    
    .nav-link.btn-primary {
        margin: 15px 20px;
        text-align: center;
        justify-content: center;
    }
    
    .nav-link.btn-primary::after {
        display: none;
    }
}
    }
    
    .header-container {
        padding: 15px 20px;
    }
    
    .logo-text h1 {
        font-size: 1.2rem;
    }
    
    .hero {
        height: 400px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .welcome-grid {
        grid-template-columns: 1fr;
    }
    
    .welcome-features {
        grid-template-columns: 1fr 1fr;
    }
    
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .header-container {
        padding: 12px 15px;
    }
    
    .logo {
        width: 45px;
        height: 45px;
    }
    
    .logo-text h1 {
        font-size: 1rem;
    }
    
    .logo-text p {
        font-size: 0.7rem;
    }
    
    .hero {
        height: 300px;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    .btn-primary {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .welcome-features {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}
