/* WiskundeSprank - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Inter:wght@400;500&display=swap');

:root {
    --primary: #6366F1;
    --secondary: #EC4899;
    --accent: #10B981;
    --dark: #1E293B;
    --light-bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --text: #334155;
    --text-light: #64748B;
    --border: #E2E8F0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--light-bg);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    line-height: 1.2;
}

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

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.nav {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 15px 0;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

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

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

.nav-links a {
    font-weight: 500;
    color: var(--text);
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: 0.3s;
}

/* Mobile Menu */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        display: flex;
    }
}

/* Hero */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-math {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8rem;
    opacity: 0.1;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

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

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

.btn-secondary:hover {
    background: #d946ef;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

/* Sections */
.section {
    padding: 80px 0;
}

.section-light {
    background: white;
}

.section-dark {
    background: var(--dark);
    color: white;
}

.section-dark h2 {
    color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border);
}

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

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Game Cards */
.game-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border);
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.game-card-image {
    height: 150px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.game-card-content {
    padding: 20px;
}

.game-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.game-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--light-bg);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 10px;
}

.game-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Difficulty Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-easy {
    background: #D1FAE5;
    color: #059669;
}

.badge-medium {
    background: #FEF3C7;
    color: #D97706;
}

.badge-hard {
    background: #FEE2E2;
    color: #DC2626;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

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

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-light);
    margin-top: 5px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-math {
        display: none;
    }
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
    padding: 60px 0;
    color: white;
}

.newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.newsletter h2 {
    color: white;
    font-size: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
}

.newsletter-form button {
    padding: 12px 25px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: #d946ef;
}

@media (max-width: 768px) {
    .newsletter-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .newsletter-form {
        width: 100%;
    }
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 15px;
}

.footer-brand h3 span {
    color: var(--secondary);
}

.footer-brand p {
    color: #94A3B8;
    margin-bottom: 20px;
}

.footer-links h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 20px;
}

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

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

.footer-links a {
    color: #94A3B8;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 30px;
    text-align: center;
    color: #94A3B8;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.search-box {
    flex: 1;
    min-width: 200px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 25px;
    font-size: 1rem;
}

/* Article Cards */
.article-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.article-card-image {
    height: 200px;
    background: var(--primary);
    position: relative;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    background: var(--secondary);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.article-card-content {
    padding: 25px;
}

.article-card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.article-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.article-card h3 a:hover {
    color: var(--primary);
}

.article-card p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Featured Article */
.featured-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 50px;
}

.featured-article-image {
    height: 350px;
}

.featured-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-article-content {
    padding: 40px;
}

.featured-article-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .featured-article {
        grid-template-columns: 1fr;
    }
}

/* Article Page */
.article-page {
    padding: 40px 0;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 50px;
}

.article-main {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.article-hero {
    height: 400px;
    position: relative;
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    padding: 40px;
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.article-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
}

.article-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.toc {
    background: white;
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
}

.toc h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 10px;
}

.toc a {
    color: var(--text-light);
    font-size: 0.9rem;
    transition: color 0.3s;
}

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

@media (max-width: 768px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        position: static;
    }
}

/* Related Articles */
.related-articles {
    margin-top: 50px;
    padding-top: 50px;
    border-top: 1px solid var(--border);
}

.related-articles h3 {
    margin-bottom: 25px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.3s;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.facebook { background: #1877F2; }
.share-btn.twitter { background: #1DA1F2; }
.share-btn.linkedin { background: #0A66C2; }
.share-btn.whatsapp { background: #25D366; }

/* Game Page */
.game-page {
    padding: 40px 0;
}

.game-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.game-main {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h1 {
    margin-bottom: 10px;
}

.game-instructions {
    background: var(--light-bg);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.difficulty-selector {
    display: flex;
    gap: 10px;
}

.difficulty-btn {
    padding: 8px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.difficulty-btn:hover,
.difficulty-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.game-area {
    background: var(--light-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-score {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.game-feedback {
    padding: 15px 25px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 600;
}

.game-feedback.correct {
    background: #D1FAE5;
    color: #059669;
}

.game-feedback.incorrect {
    background: #FEE2E2;
    color: #DC2626;
}

.game-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.game-sidebar-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.game-sidebar-card h3 {
    margin-bottom: 15px;
    font-size: 1rem;
}

.related-game-item {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

.related-game-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.related-game-item h4 {
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.related-game-item span {
    font-size: 0.8rem;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
    
    .game-sidebar {
        position: static;
    }
}

/* Contact Form */
.contact-form {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

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

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

/* FAQ */
.faq-item {
    background: white;
    border-radius: var(--radius);
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.faq-question {
    padding: 20px 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item.active .faq-answer {
    padding: 0 25px 20px;
    max-height: 500px;
}

/* 404 Page */
.error-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-content h1 {
    font-size: 8rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.error-content h2 {
    margin-bottom: 15px;
}

.error-content p {
    color: var(--text-light);
    margin-bottom: 30px;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-pulse {
    animation: pulse 0.5s ease-out;
}

.animate-shake {
    animation: shake 0.3s ease-out;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}
