/* Academics Pages Styles */
.academic-header {
    background: linear-gradient(rgba(27, 48, 88, 0.9), rgba(27, 48, 88, 0.9)), url('../images/academic-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 80px; /* Add margin to prevent overlap with navbar */
}

.academic-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: slideDown 0.8s ease-out;
}

.academic-header p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 1s ease-out;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.subject-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: scaleIn 0.5s ease-out;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.subject-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.subject-content {
    padding: 1.5rem;
}

.subject-content h3 {
    color: #1B3058;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.subject-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.subject-content ul {
    list-style: none;
    padding: 0;
}

.subject-content li {
    padding: 0.5rem 0;
    color: #444;
    display: flex;
    align-items: center;
}

.subject-content li:before {
    content: '•';
    color: #FFB400;
    font-weight: bold;
    margin-right: 0.5rem;
}

.performance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 2rem;
    background: #f8f9fa;
}

.stat-card {
    background: rgb(34, 30, 87);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: scaleIn 0.5s ease-out;
}

.stat-number {
    font-size: 2.5rem;
    color: #1B3058;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 1.1rem;
}

.science-club {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #1B3058 0%, #2a4681 100%);
    color: white;
    text-align: center;
}

.science-club h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.club-activities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.activity-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

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

/* Main Content Styles */
main {
    padding-top: 0; /* Remove default padding as we're using margin-top on academic-header */
    min-height: calc(100vh - 80px); /* Ensure minimum height accounting for navbar */
    position: relative;
    z-index: 1; /* Ensure main content stays below navbar */
}

/* Loading Animation Styles */
.loading-animation {
    position: fixed;
    top: 80px; /* Position below navbar */
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .academic-header {
        padding: 3rem 1rem;
    }

    .academic-header h1 {
        font-size: 2rem;
    }

    .subjects-grid {
        padding: 2rem 1rem;
    }

    .performance-stats {
        padding: 2rem 1rem;
    }

    .science-club {
        padding: 3rem 1rem;
    }
}

/* Loading Animation */
.loading-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeOut 0.5s ease-out forwards;
    animation-delay: 1s;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1B3058;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Patron Section Styles */
.patron-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(27, 48, 88, 0.05) 0%, rgba(42, 70, 129, 0.1) 100%);
    position: relative;
    overflow: hidden;
}

.patron-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #1B3058, transparent);
}

.patron-section h2 {
    text-align: center;
    color: #1B3058;
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.patron-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #FFB400;
}

.patron-card {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(27, 48, 88, 0.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 2.5rem;
    gap: 3rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.patron-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(27, 48, 88, 0.15);
}

.patron-card img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #1B3058;
    box-shadow: 0 5px 15px rgba(27, 48, 88, 0.2);
    transition: transform 0.3s ease;
}

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

.patron-info {
    flex: 1;
}

.patron-info h3 {
    color: #333;
    margin-bottom: 1rem;
}

.patron-info p {
    color: #666;
    line-height: 1.6;
}

/* Achievements Gallery Styles */
.achievements-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #1B3058 0%, #2a4681 100%);
    color: white;
    position: relative;
}

.achievements-section h2 {
    text-align: center;
    color: white;
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.achievements-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #FFB400;
}

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

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(27, 48, 88, 0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .patron-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .patron-card img {
        width: 150px;
        height: 150px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .gallery-item img {
        height: 200px;
    }
}
