/*
Theme Name: ELC Maths Academy
Theme URI: https://www.elcmathsacademy.lk
Author: ELC MATHS ACADEMY
Author URI: https://www.elcmathsacademy.lk
Description: A professional mathematics academy theme for Sri Lankan students from grade 6 to 11 with online learning capabilities
Version: 1.0.0
License: GPL v2 or later
Text Domain: elcmathsacademy
*/

/* CSS Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;
    --dark-bg: #34495e;
    --text-color: #333;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

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

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-bg));
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
}

.logo span {
    color: var(--secondary-color);
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation ul li {
    margin-left: 2rem;
    position: relative;
}

.main-navigation ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.main-navigation ul li a:hover {
    color: var(--secondary-color);
}

.main-navigation ul li.current-menu-item a {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(52, 73, 94, 0.9)), url('images/math-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.3s both;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

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

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

.btn-secondary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* Grades Grid */
.grades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.grade-card {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

.grade-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.grade-card .grade-number {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.grade-card .btn {
    margin-top: 20px;
}

/* Terms Section */
.terms-container {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.term-card {
    flex: 1;
    min-width: 200px;
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: var(--white);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.term-card h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

/* Lessons List */
.lessons-list {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.lesson-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s ease;
}

.lesson-item:hover {
    background: #f8f9fa;
}

.lesson-item:last-child {
    border-bottom: none;
}

.lesson-info h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.lesson-meta {
    display: flex;
    gap: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.lesson-actions {
    display: flex;
    gap: 10px;
}

/* Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* File Download */
.file-download {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
}

.file-download a {
    color: var(--secondary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-download a:hover {
    color: var(--primary-color);
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-color);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* Student Dashboard */
.dashboard-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin: 40px 0;
}

.dashboard-sidebar {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.dashboard-sidebar ul {
    list-style: none;
}

.dashboard-sidebar ul li {
    margin-bottom: 10px;
}

.dashboard-sidebar ul li a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.dashboard-sidebar ul li a:hover,
.dashboard-sidebar ul li.active a {
    background: var(--secondary-color);
    color: var(--white);
}

.dashboard-content {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Ratings & Reviews */
.reviews-section {
    margin: 40px 0;
}

.review-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.rating-stars {
    display: flex;
    gap: 5px;
    margin: 10px 0;
    font-size: 1.5rem;
    color: #ffc107;
    cursor: pointer;
}

.review-item {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.review-author {
    font-weight: bold;
    color: var(--primary-color);
}

.review-rating {
    color: #ffc107;
}

.review-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, var(--dark-bg), var(--primary-color));
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 60px;
}

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

.footer-widget h4 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

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

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

.footer-widget ul li a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-widget ul li a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        padding: 20px;
    }

    .main-navigation ul.show {
        display: flex;
    }

    .main-navigation ul li {
        margin: 10px 0;
    }

    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

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

    .terms-container {
        flex-direction: column;
    }

    .lesson-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .lesson-actions {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .btn,
    .video-container,
    .lesson-actions {
        display: none;
    }
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}
/* ========== ANIMATED HOME PAGE STYLES ========== */

/* Hero Section with Animated Background */
.hero-section {
    background: linear-gradient(-45deg, #2c3e50, #3498db, #e74c3c, #2c3e50);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--white);
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><path d="M20 20 L80 20 L80 80 L20 80 Z" fill="none" stroke="white" stroke-width="2"/><circle cx="50" cy="50" r="20" fill="none" stroke="white" stroke-width="2"/></svg>');
    background-size: 100px 100px;
    animation: movePattern 20s linear infinite;
}

@keyframes movePattern {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(100px) translateY(100px); }
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease, float 3s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.3s both;
}

/* Animated Feature Cards */
.features-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

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

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s ease infinite;
    display: inline-block;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Animated Grade Cards */
.grades-section {
    padding: 80px 0;
    background: white;
}

.grades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.grade-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.5s ease;
    animation-fill-mode: both;
}

.grade-card:nth-child(1) { animation-delay: 0.1s; }
.grade-card:nth-child(2) { animation-delay: 0.2s; }
.grade-card:nth-child(3) { animation-delay: 0.3s; }
.grade-card:nth-child(4) { animation-delay: 0.4s; }
.grade-card:nth-child(5) { animation-delay: 0.5s; }
.grade-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.grade-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.grade-card:hover::after {
    width: 300px;
    height: 300px;
}

.grade-number {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Steps Section */
.how-it-works {
    padding: 80px 0;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.step-card {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 auto 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
    70% { box-shadow: 0 0 0 20px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* Testimonials */
.testimonials {
    padding: 80px 0;
    background: white;
}

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

.testimonial-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    position: relative;
    animation: slideInLeft 0.5s ease;
    animation-fill-mode: both;
}

.testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.testimonial-card:nth-child(2) { animation-delay: 0.2s; }
.testimonial-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 8rem;
    color: rgba(255,255,255,0.2);
    font-family: serif;
}

.testimonial-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
}

.testimonial-author strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.testimonial-author span {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ========== ANIMATED FOOTER STYLES ========== */

.site-footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 80px 0 20px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), var(--accent-color), var(--secondary-color), transparent);
    animation: slideBorder 3s linear infinite;
}

@keyframes slideBorder {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.footer-widget {
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.footer-widget:nth-child(1) { animation-delay: 0.1s; }
.footer-widget:nth-child(2) { animation-delay: 0.2s; }
.footer-widget:nth-child(3) { animation-delay: 0.3s; }
.footer-widget:nth-child(4) { animation-delay: 0.4s; }

.footer-widget h4 {
    color: var(--secondary-color);
    margin-bottom: 25px;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    animation: expandWidth 2s ease-in-out infinite;
}

@keyframes expandWidth {
    0% { width: 50px; }
    50% { width: 100px; }
    100% { width: 50px; }
}

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

.footer-widget ul li {
    margin-bottom: 12px;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.footer-widget ul li:hover {
    transform: translateX(10px);
}

.footer-widget ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-widget ul li a:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

/* Social Links Animation */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.4s ease;
    z-index: -1;
}

.social-links a:hover {
    transform: translateY(-5px) rotate(360deg);
    color: white;
}

.social-links a:hover::before {
    transform: scale(1);
}

/* Contact Info Animation */
.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.5s ease;
    animation-fill-mode: both;
}

.contact-info li:nth-child(1) { animation-delay: 0.1s; }
.contact-info li:nth-child(2) { animation-delay: 0.2s; }
.contact-info li:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.contact-info .dashicons {
    color: var(--secondary-color);
    animation: bounce 2s ease infinite;
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 1;
    animation: fadeIn 1s ease;
}

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

.footer-bottom p {
    color: rgba(255,255,255,0.6);
}

.footer-bottom a {
    color: var(--secondary-color);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.footer-bottom a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

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

.footer-bottom a:hover::after {
    width: 100%;
}

/* Floating Particles Animation */
.site-footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><circle cx="20" cy="20" r="2" fill="white"/><circle cx="80" cy="40" r="2" fill="white"/><circle cx="40" cy="80" r="2" fill="white"/><circle cx="60" cy="60" r="2" fill="white"/><circle cx="10" cy="70" r="2" fill="white"/></svg>');
    background-size: 200px 200px;
    animation: floatParticles 20s linear infinite;
    pointer-events: none;
}

@keyframes floatParticles {
    0% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(0) translateX(20px); }
    75% { transform: translateY(20px) translateX(10px); }
    100% { transform: translateY(0) translateX(0); }
}

/* Responsive Animations */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .feature-card:hover {
        transform: translateY(-10px) scale(1.01);
    }
    
    .footer-widget {
        text-align: center;
    }
    
    .footer-widget h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact-info li {
        justify-content: center;
    }
}
/* Video container styling */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin: 30px 0;
    animation: fadeIn 1s ease;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

/* No video message */
.no-video-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px;
    text-align: center;
    border-radius: 15px;
    margin: 30px 0;
    animation: pulse 2s infinite;
}

/* Video badges */
.video-badge {
    background: #ff0000;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
    animation: glow 2s ease-in-out infinite;
}

.duration {
    background: var(--secondary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px #ff0000; }
    50% { box-shadow: 0 0 20px #ff0000; }
}
/* ========== GRADES SECTION - LIGHT GREY BACKGROUND ========== */
.grades-section {
    padding: 80px 0;
    background: #f5f5f5;  /* Light Grey Background */
    position: relative;
}

/* Optional: Add subtle pattern */
.grades-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(52,152,219,0.02) 2px, transparent 2px);
    background-size: 30px 30px;
    pointer-events: none;
}

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

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #e67e22);
    border-radius: 2px;
    animation: expandWidth 2s ease-in-out infinite;
}

@keyframes expandWidth {
    0%, 100% { width: 80px; }
    50% { width: 120px; }
}

.grades-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.grade-card {
    background: white;
    padding: 35px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.5s ease;
    animation-fill-mode: both;
    text-decoration: none;
    display: block;
    color: inherit;
    border: 1px solid rgba(0,0,0,0.03);
}

.grade-card:nth-child(1) { animation-delay: 0.1s; }
.grade-card:nth-child(2) { animation-delay: 0.2s; }
.grade-card:nth-child(3) { animation-delay: 0.3s; }
.grade-card:nth-child(4) { animation-delay: 0.4s; }
.grade-card:nth-child(5) { animation-delay: 0.5s; }
.grade-card:nth-child(6) { animation-delay: 0.6s; }

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

.grade-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: transparent;
}

/* Colorful bottom border for each card */
.grade-card[style*="border-bottom"] {
    border-bottom-width: 4px !important;
    border-bottom-style: solid !important;
}

.grade-number {
    font-size: 4.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    transition: all 0.3s ease;
}

.grade-card:hover .grade-number {
    transform: scale(1.1);
}

.grade-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.grade-card:hover h3 {
    color: #3498db;
}

.grade-card p {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.grade-icon {
    font-size: 2.5rem;
    margin-top: 15px;
    opacity: 0.7;
    transition: all 0.3s ease;
    display: inline-block;
}

.grade-card:hover .grade-icon {
    opacity: 1;
    transform: scale(1.2) rotate(5deg);
}

/* Hover effect - shiny overlay */
.grade-hover-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.grade-card:hover .grade-hover-effect {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .grades-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .grades-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .grade-number {
        font-size: 3.5rem;
    }
    
    .grade-card {
        padding: 25px 15px;
    }
}

@media (max-width: 480px) {
    .grade-number {
        font-size: 3rem;
    }
    
    .grade-card h3 {
        font-size: 1.3rem;
    }
}