/* Main CSS - Non-critical styles loaded after page render */

/* Mobile Navigation Details */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-nav-links li {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.mobile-nav.active .mobile-nav-links li {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav.active .mobile-nav-links li:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.active .mobile-nav-links li:nth-child(2) { transition-delay: 0.2s; }
.mobile-nav.active .mobile-nav-links li:nth-child(3) { transition-delay: 0.3s; }
.mobile-nav.active .mobile-nav-links li:nth-child(4) { transition-delay: 0.4s; }
.mobile-nav.active .mobile-nav-links li:nth-child(5) { transition-delay: 0.5s; }

.mobile-nav-links a {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 1rem 2rem;
    border-radius: 8px;
    display: block;
    text-align: center;
}

.mobile-nav-links a:hover {
    color: #3498db;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Section Styles */
.section {
    padding: 5rem 0;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #3498db;
}

/* About Section */
.about {
    background: #f8f9fa;
}

.about-content {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Programs Section - UPDATED FOR BUTTON ALIGNMENT */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    align-items: stretch; /* Make all cards same height */
}

.program-card {
    background: white;
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    /* UPDATED: Flexbox for equal heights */
    display: flex;
    flex-direction: column;
    height: 100%; /* Full height of grid cell */
}

.program-card-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0; /* Don't shrink image */
}

.program-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.program-card:hover .program-card-image img {
    transform: scale(1.05);
}

.program-card-content {
    padding: 2rem;
    text-align: center;
    /* UPDATED: Flex properties for button alignment */
    flex-grow: 1; /* Take up remaining space */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Space content evenly */
}

.program-card-content .text-content {
    flex-grow: 1; /* Push button to bottom */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #3498db, #e74c3c);
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.program-card h3,
.program-card-content h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-align: center;
}

.program-card p,
.program-card-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Scholarship/Learn More Button Styling - NEW */
.scholarship-button {
    background: #e74c3c;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: auto; /* Push to bottom */
    align-self: center; /* Center the button */
    white-space: nowrap; /* Prevent text wrapping */
    min-width: 120px; /* Ensure consistent button width */
}

.scholarship-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Gallery Section */
.gallery {
    background: #f8f9fa;
}

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

.gallery-item {
    position: relative;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

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

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gallery-item:hover::before {
    opacity: 0.5;
}

.gallery-caption {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    color: white;
    font-weight: bold;
    z-index: 3;
}

/* Impact Section */
.impact {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    text-align: center;
}

.impact-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #e74c3c;
    transition: all 0.3s ease;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Contact Section */
.contact {
    background: #f8f9fa;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 1rem;
    color: #666;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.submit-btn {
    background: #3498db;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 3rem 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

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

.social-links a:hover {
    background: #3498db;
    transform: translateY(-2px);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .logo img {
        height: 45px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .social-links {
        gap: 0.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .programs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .program-card-content {
        padding: 1.5rem;
    }
    
    .scholarship-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .impact-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .tagline {
        font-size: 1rem;
    }
    
    .program-card-content {
        padding: 1.25rem;
    }
    
    .scholarship-button {
        padding: 8px 16px;
        font-size: 0.85rem;
        min-width: 100px;
    }
    
    .impact-stats {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* Loading states and animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Print styles */
@media print {
    .hero {
        height: auto;
        padding: 2rem 0;
    }
    
    nav, .mobile-nav, .cta-button {
        display: none;
    }
    
    .section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }
}