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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
    --footer-bg: #2c3e50;
    --max-width: 1200px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

main {
    flex: 1;
    padding: 2rem 0;
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

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

ul, ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

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

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

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

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

.tagline {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.desktop-nav {
    display: flex;
    gap: 1.5rem;
}

.desktop-nav a {
    color: var(--white);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.desktop-nav a:hover {
    border-bottom-color: var(--white);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    transition: 0.3s;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
}

.mobile-nav a {
    color: var(--white);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-nav.active {
    display: flex;
}

/* ===== CAROUSEL ===== */
.carousel-wrapper {
    background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.carousel-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 0;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    animation: scroll 30s linear infinite;
}

.carousel-item {
    white-space: nowrap;
    padding: 0.5rem 1rem;
    background: var(--white);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.carousel-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.carousel-track:hover {
    animation-play-state: paused;
}

/* ===== HERO SECTION ===== */
.hero {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

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

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

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    margin-left: 1rem;
}

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

/* ===== CONTENT CARDS ===== */
.content-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.article-header {
    margin-bottom: 2rem;
}

.article-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--white);
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background: var(--primary-gradient);
    color: var(--white);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background: var(--bg-light);
}

/* ===== QUIZ STYLES ===== */
.quiz-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid var(--primary-color);
}

.quiz-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.quiz-question {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.question-text {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.quiz-options {
    list-style: none;
    padding: 0;
}

.quiz-option {
    margin-bottom: 0.75rem;
}

.quiz-option label {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.quiz-option label:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.quiz-option input[type="radio"] {
    margin-right: 0.75rem;
    cursor: pointer;
}

.quiz-option.correct label {
    background: #d4edda;
    border-left: 4px solid var(--success);
}

.quiz-option.incorrect label {
    background: #f8d7da;
    border-left: 4px solid var(--error);
}

.quiz-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.quiz-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.quiz-input.correct {
    border-color: var(--success);
    background: #d4edda;
}

.quiz-input.incorrect {
    border-color: var(--error);
    background: #f8d7da;
}

.quiz-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.quiz-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    font-size: 1rem;
}

.quiz-btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: var(--shadow);
}

.quiz-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.quiz-btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
}

.quiz-btn-secondary:hover {
    background: #e9ecef;
}

.quiz-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 8px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.quiz-result.excellent {
    color: var(--success);
    border-left: 4px solid var(--success);
}

.quiz-result.good {
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.quiz-result.needs-practice {
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

/* ===== DISCLAIMER BOX ===== */
.disclaimer-box {
    background: #fff3cd;
    border-left: 4px solid var(--warning);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 6px;
}

.disclaimer-box strong {
    color: #856404;
}

/* ===== FAQ SECTION ===== */
.faq-section {
    margin: 2rem 0;
}

.faq-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.faq-question {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.faq-answer {
    color: var(--text-light);
}

/* ===== GRID LAYOUTS ===== */
.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.lesson-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.lesson-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.lesson-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--footer-bg);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-column h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

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

.footer-column p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    font-weight: 600;
    transition: background 0.3s;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn-secondary {
        margin-left: 0;
        margin-top: 1rem;
        display: block;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .quiz-container {
        padding: 1.5rem;
    }
    
    .quiz-buttons {
        flex-direction: column;
    }
    
    .quiz-btn {
        width: 100%;
    }
    
    .lesson-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .content-card {
        padding: 1rem;
    }
    
    .quiz-container {
        padding: 1rem;
    }
}
