/*
      ( (
       ) )
     ........
     |      |]
     \      /
      `----'
   This CSS is by Didier Nicolas and it is "Powered by Coffee" Jawaddedadde.
*/

/* --- VARIABLES & RESET --- */
:root {
    --primary: #4cc9f0;   /* Blauw */
    --secondary: #4361ee; /* Donkerblauw */
    --pink: #f72585;      /* Roze */
    --green: #06d6a0;     /* Groen */
    --yellow: #ffd166;    /* Geel */
    --orange: #ff9f1c;    /* Oranje */
    --bg-color: #f0f7ff;
    --font-head: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    /* Speelse stippen achtergrond */
    background-image: radial-gradient(var(--primary) 2px, transparent 2px), radial-gradient(var(--pink) 2px, transparent 2px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    color: #2b2d42;
    line-height: 1.6;
    display: flex; flex-direction: column; min-height: 100vh;
}

h1, h2, h3 { font-family: var(--font-head); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; flex: 1; width: 100%; }

/* --- NAVBAR --- */
.navbar {
    background: white; 
    border-bottom: 5px solid var(--yellow);
    padding: 15px 0;
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.logo { 
    font-family: var(--font-head); font-weight: 700; font-size: 1.8rem; 
    text-decoration: none; text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}
/* Logo kleuren */
.l-1 { color: var(--pink); } .l-2 { color: var(--primary); } 
.l-3 { color: var(--green); } .l-4 { color: var(--yellow); } .l-5 { color: var(--orange); } 
.l-ext { color: #333; }

.nav-links { display: flex; gap: 15px; }
.nav-btn {
    text-decoration: none; font-weight: 800; font-family: var(--font-head);
    padding: 8px 15px; border-radius: 12px; transition: transform 0.2s;
    color: white; border-bottom: 4px solid rgba(0,0,0,0.2);
}
.nav-btn:hover { transform: translateY(-2px); }
.nav-btn:active { transform: translateY(1px); border-bottom-width: 0; margin-top: 4px; }

.btn-game { background-color: var(--green); }
.btn-work { background-color: var(--primary); }
.btn-info { background-color: var(--pink); }
.btn-active { filter: brightness(1.1); transform: scale(1.05); }

/* --- HERO SECTION --- */
.hero-wrapper {
    text-align: center; padding: 50px 20px;
    margin-bottom: 30px; border-radius: 0 0 40px 40px;
    color: white; box-shadow: 0 10px 0 rgba(0,0,0,0.1);
}
.hero-home { background: linear-gradient(135deg, var(--green), var(--primary)); }
.hero-worksheet { background: linear-gradient(135deg, var(--orange), var(--pink)); }
.hero-info { background: linear-gradient(135deg, var(--secondary), var(--primary)); }

.hero-content h1 { font-size: 2.8rem; margin-bottom: 10px; text-shadow: 3px 3px 0 rgba(0,0,0,0.2); }
.hero-content p { font-size: 1.3rem; font-weight: 600; }

/* --- TOPSCORE BAR --- */
.topscore-container {
    background: white; border-radius: 50px; display: inline-flex;
    align-items: center; padding: 10px 30px; margin-bottom: 20px;
    box-shadow: 0 5px 0 #ddd; border: 2px solid var(--yellow);
    font-family: var(--font-head); font-size: 1.2rem; color: var(--secondary);
}
.topscore-number {
    font-size: 1.5rem; color: var(--pink); font-weight: bold; margin-left: 10px;
}

/* --- FILTERS --- */
.filter-section {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 10px;
    margin: 20px 0 40px 0;

}
.filter-btn {
    background: white; border: 2px solid #eee; padding: 10px 20px;
    border-radius: 20px; cursor: pointer; font-family: var(--font-head);
    font-weight: bold; color: #555; transition: all 0.2s;
    box-shadow: 0 4px 0 #ddd;

}
.filter-btn:hover { transform: translateY(-2px); }
.filter-btn.active { background: var(--yellow); color: #333; border-color: var(--yellow); box-shadow: 0 4px 0 #d4a017; }

/* --- GRID & CARDS --- */
.grid-4-col {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px; margin-bottom: 60px;
}

.card {
    background: white; border-radius: 25px; padding: 25px; text-align: center;
    position: relative; transition: transform 0.3s;
    border: 3px solid transparent;
    box-shadow: 0 8px 0 rgba(0,0,0,0.05);
    display: flex; flex-direction: column; justify-content: space-between;
}
.card:hover { transform: translateY(-8px); }

/* Kleurvariaties */
.card:nth-child(4n+1) { border-color: var(--pink); }
.card:nth-child(4n+2) { border-color: var(--primary); }
.card:nth-child(4n+3) { border-color: var(--green); }
.card:nth-child(4n+4) { border-color: var(--orange); }

.card-badge {
    position: absolute; top: -15px; right: -10px;
    background: var(--yellow); color: #333; padding: 5px 15px;
    border-radius: 20px; font-weight: bold; font-size: 0.8rem;
    box-shadow: 0 3px 0 rgba(0,0,0,0.1); transform: rotate(5deg);
}

.card-icon-wrapper {
    width: 70px; height: 70px; margin: 0 auto 15px;
    background: #f9f9f9; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
}
.card:nth-child(4n+1) .card-icon-wrapper { background: rgba(247, 37, 133, 0.1); }
.card:nth-child(4n+2) .card-icon-wrapper { background: rgba(76, 201, 240, 0.1); }
.card:nth-child(4n+3) .card-icon-wrapper { background: rgba(6, 214, 160, 0.1); }
.card:nth-child(4n+4) .card-icon-wrapper { background: rgba(255, 159, 28, 0.1); }

.card h3 { font-size: 1.2rem; margin-bottom: 10px; color: #333; }
.card p { color: #666; font-size: 0.9rem; margin-bottom: 15px; }

.card-btn {
    width: 100%; padding: 12px; border: none; border-radius: 15px;
    color: white; font-weight: 800; font-family: var(--font-head); font-size: 1rem;
    cursor: pointer; transition: filter 0.2s;
}
.card:nth-child(4n+1) .card-btn { background: var(--pink); }
.card:nth-child(4n+2) .card-btn { background: var(--primary); }
.card:nth-child(4n+3) .card-btn { background: var(--green); }
.card:nth-child(4n+4) .card-btn { background: var(--orange); }
.card-btn:hover { filter: brightness(1.1); }

/* --- MODAL --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 2000;
    display: none; justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
}
.modal-content {
    background: white; padding: 30px; border-radius: 30px; width: 95%; max-width: 500px;
    text-align: center; position: relative; border: 8px solid var(--yellow);
    box-shadow: 0 20px 0 rgba(0,0,0,0.2);
    animation: bounceIn 0.5s;
}
.close-modal {
    position: absolute; top: 10px; right: 15px; font-size: 2.5rem;
    cursor: pointer; color: #aaa; line-height: 0.8;
}
.question-box {
    background: #f0f7ff; padding: 25px; font-size: 2.5rem; margin: 20px 0;
    border-radius: 20px; font-family: var(--font-head); color: var(--secondary);
    border: 3px dashed var(--primary);
}
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.option-btn {
    background: white; border: 3px solid var(--bg-color); padding: 15px;
    font-size: 1.5rem; border-radius: 20px; cursor: pointer;
    font-family: var(--font-head); font-weight: bold; color: #555;
}
.option-btn:hover { border-color: var(--primary); transform: translateY(-3px); }

/* --- FOOTER --- */
footer { background: #333; color: white; text-align: center; margin-top: auto; }
.footer-wave svg { display: block; height: 50px; width: 100%; }
.footer-inner { padding: 40px 20px; }
.footer-inner p { color: white; }
.footer-inner a { color: white; text-decoration: none; font-weight: bold; }
.footer-inner a:hover { color: var(--yellow); text-decoration: underline; }

/* --- ANIMATIONS --- */
@keyframes bounceIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- PRINT --- */
@media print {
    body { background: white; background-image: none; }
    .navbar, .hero-wrapper, .filter-section, .container, footer, .modal-overlay { display: none !important; }
    #printable-area { display: block !important; position: absolute; top: 0; left: 0; width: 100%; background: white; z-index: 9999; padding: 20px; }
    .sheet-header { border-bottom: 2px solid black; margin-bottom: 20px; padding-bottom: 20px; display: flex; justify-content: space-between; }
    .sheet-header h1 { font-size: 20pt; margin: 0; }
    .sums-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; row-gap: 12px; }
    .sum-item { font-size: 14pt; padding: 8px 0; border-bottom: 1px dotted #ccc; display: flex; justify-content: space-between; }
}

/* ============================================
   HAMBURGER MENU STYLES
   ============================================ */

/* Hamburger Button - Hidden on Desktop */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
    transition: transform 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger:focus {
    outline: 2px solid var(--primary-color, #007bff);
    outline-offset: 4px;
}

/* Hamburger Lines */
.hamburger__line {
    width: 100%;
    height: 3px;
    background-color: var(--text-color, #333);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animated Hamburger to X transformation */
.hamburger[aria-expanded="true"] .hamburger__line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger__line:nth-child(2) {
    opacity: 0;
    transform: translateX(-100%);
}

.hamburger[aria-expanded="true"] .hamburger__line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   MOBILE RESPONSIVE NAVIGATION
   ============================================ */

@media screen and (max-width: 768px) {
    /* Show Hamburger Menu */
    .hamburger {
        display: flex;
    }

    /* Navigation Container Adjustments */
    .nav-container {
        position: relative;
    }

    /* Hide Nav Links by Default on Mobile */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        max-width: 80vw;
        
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        
        background-color: var(--bg-color, #ffffff);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        
        padding: 5rem 2rem 2rem;
        
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 1000;
        overflow-y: auto;
    }

    /* Show Nav Links when Menu is Open */
    .nav-links.is-active {
        right: 0;
    }

    /* Mobile Nav Button Styling */
    .nav-links .nav-btn {
        width: 100%;
        text-align: left;
        padding: 1.25rem 1.5rem;
        margin: 0;
        border-radius: 8px;
        font-size: 1.125rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-links .nav-btn:last-child {
        border-bottom: none;
    }

    /* Mobile Overlay for Background Click */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 999;
    }

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

    /* Prevent Body Scroll when Menu is Open */
    body.menu-open {
        overflow: hidden;
    }
}

/* ============================================
   TABLET BREAKPOINT (Optional)
   ============================================ */

@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* Keep desktop navigation but adjust spacing */
    .nav-links {
        gap: 1rem;
    }
    
    .nav-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Reduce Motion for Users with Preferences */
@media (prefers-reduced-motion: reduce) {
    .hamburger,
    .hamburger__line,
    .nav-links,
    .nav-overlay {
        transition: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hamburger__line {
        background-color: currentColor;
    }
    
    .hamburger:focus {
        outline-width: 3px;
    }
}
