/* ===== CSS RESET & GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2E7D32;
    --secondary-color: #4CAF50;
    --accent-color: #FF9800;
    --light-color: #F1F8E9;
    --dark-color: #1B5E20;
    --text-color: #333;
    --text-light: #777;
    --white: #FFFFFF;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    color: var(--dark-color);
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.section {
    padding: 4rem 0;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
    background-color: #F57C00;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* ===== ACCESSIBILITY UTILITIES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 1001;
    transition: top 0.3s;
    border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
    top: 0;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
}
.section-title {
    font-size: 2.2rem;
}


.logo i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    font-weight: 600;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
    background: none;
    border: none;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('https://images.unsplash.com/photo-1578301978693-85fa9c0320b9?ixlib=rb-4.0.3&auto=format&fit=crop&w=1771&q=80') center/cover no-repeat;
    color: var(--white);
    text-align: center;
    padding: 8rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    color: var(--white);
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: #f0f0f0;
}

/* ===== FEATURES SECTION ===== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

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

/* ===== LEARNING RESOURCES PAGE ===== */
.page-header {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.page-header h1 {
    color: var(--white);
    font-size: 2.5rem;
}

.page-header p {
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
}

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

.topic-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.topic-img {
    height: 200px;
    overflow: hidden;
}

.topic-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.topic-content {
    padding: 1.5rem;
}

.topic-content h3 {
    color: var(--dark-color);
    margin-bottom: 0.8rem;
}

/* ===== MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--white);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--dark-color);
    background-color: rgba(0, 0, 0, 0.05);
}

.modal-content img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

/* ===== QUIZ PAGE STYLES ===== */
.quiz-section {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.progress-bar {
    flex-grow: 1;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.5s ease;
}

.question-container {
    margin-bottom: 2rem;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option {
    padding: 1rem 1.5rem;
    background-color: var(--light-color);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.option:hover {
    background-color: #E8F5E9;
}

.option.selected {
    border-color: var(--primary-color);
    background-color: #E8F5E9;
}

.option.correct {
    border-color: #4CAF50;
    background-color: #E8F5E9;
}

.option.incorrect {
    border-color: #F44336;
    background-color: #FFEBEE;
}

.quiz-feedback {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: none;
}

.quiz-feedback.correct {
    background-color: #E8F5E9;
    color: #2E7D32;
    border-left: 4px solid #4CAF50;
}

.quiz-feedback.incorrect {
    background-color: #FFEBEE;
    color: #C62828;
    border-left: 4px solid #F44336;
}

.score-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-top: 2rem;
}

.quiz-navigation {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== CONTACT PAGE STYLES ===== */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1rem;
    margin-top: 0.2rem;
}

.contact-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

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

.error-message {
    color: #F44336;
    font-size: 0.9rem;
    margin-top: 0.3rem;
    display: none;
}

.form-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* ===== FOOTER STYLES ===== */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

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

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.footer-logo i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

.footer-links h3,
.footer-social h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

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

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

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }

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

    .nav-links li {
        margin: 1rem 0;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .hero {
        padding: 6rem 0;
    }

    .section {
        padding: 3rem 0;
    }
    
    .quiz-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.7rem 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .quiz-navigation {
        flex-direction: column;
    }
    
    .quiz-navigation .btn {
        width: 100%;
    }
}