/* ---
   1. Variabelen & Globale Reset
   --- */
:root {
    --primary-color: #1A2A4C;   /* Donkerblauw */
    --secondary-color: #FF6B00; /* Energie Oranje */
    --background-color: #F8F9FA; /* Gebroken Wit */
    --text-color: #333333;      /* Donkergrijs */
    --success-color: #28a745;   /* Groen */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --container-width: 1140px;
    --border-radius: 8px;
    --transition-speed: 0.5s;
}

html { scroll-behavior: smooth; }
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---
   2. Typografie
   --- */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.5em 0;
}
h1 { font-size: 2.5rem; line-height: 1.2; } /* 40px */
h2 { font-size: 2rem; line-height: 1.3; }   /* 32px */
h3 { font-size: 1.5rem; line-height: 1.4; } /* 24px */
p { margin: 0 0 1em 0; }
a { color: var(--primary-color); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--secondary-color); text-decoration: none; }

/* ---
   3. Layout & Globale Stijlen
   --- */
section { padding: 60px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.wysiwyg-content { max-width: 720px; margin: 0 auto; text-align: center; }
.wysiwyg-content p { font-size: 1.125rem; } /* 18px */

/* ---
   4. Knoppen
   --- */
.button-primary, .button-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    font-weight: 700;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    transform: translateY(0);
}
.button-primary { background-color: var(--primary-color); color: #FFFFFF; border-color: var(--primary-color); }
.button-primary:hover { background-color: #2a4275; border-color: #2a4275; transform: translateY(-3px); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.button-secondary { background-color: var(--secondary-color); color: #FFFFFF; border-color: var(--secondary-color); }
.button-secondary:hover { background-color: #e65c00; border-color: #e65c00; transform: translateY(-3px); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }

/* ---
   5. Animaties
   --- */
.animated-section .section-title,
.animated-section .section-subtitle,
.animated-section .intro-content,
.animated-section .cta-button,
.animated-section .articles-grid {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animated-section.in-view .section-title { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.animated-section.in-view .section-subtitle { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.animated-section.in-view .intro-content { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.animated-section.in-view .cta-button { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.animated-section.in-view .articles-grid { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }

/* ---
   6. Header (Volledig Vernieuwd)
   --- */
.site-header {
    padding: 20px 0;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Scrolled state: wordt toegevoegd via JavaScript */
.site-header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding .site-logo {
    max-height: 75px; /* Pas dit aan naar de gewenste hoogte */
    width: auto;
    display: block;
    transition: max-height 0.3s ease;
}

.site-header.scrolled .site-logo {
    max-height: 40px; /* Kleinere logo hoogte na scrollen */
}

/* --- Navigatie Desktop --- */
.main-navigation ul.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    width: 100%;
}
.main-navigation ul.nav-menu li {
    margin: 0 5px;
}
.main-navigation ul.nav-menu a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-color);
    padding: 10px 15px;
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
}
.main-navigation ul.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 3px;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.main-navigation ul.nav-menu a:hover {
    color: var(--primary-color);
}
/* DEFINITIEVE FIX: Toont nu ook de underline voor de actieve pagina in de header */
.main-navigation ul.nav-menu .current-menu-item > a,
.main-navigation ul.nav-menu a:hover {
    color: var(--primary-color);
}
.main-navigation ul.nav-menu .current-menu-item > a::after,
.main-navigation ul.nav-menu a:hover::after {
    transform: scaleX(1);
}

/* --- Mobiele Menu Knop (Hamburger) --- */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010; /* Hoger dan de header */
}

.mobile-menu-toggle .line {
    width: 28px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    transform-origin: center;
}

/* Animatie naar 'X' */
.toggled .line:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}
.toggled .line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.toggled .line:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* --- Responsive Gedrag --- */

/* Tablet & Desktop (vanaf 769px) */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
    .main-navigation ul.nav-menu {
        display: flex;
    }
}

/* Mobiel (tot 768px) */
@media (max-width: 768px) {
    /* Body class om scrollen te blokkeren */
    body.mobile-menu-open {
        overflow: hidden;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(26, 42, 76, 0.98); /* Donkerblauw overlay */
        display: flex;
        justify-content: center;
        align-items: center;
        
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
    }

    .main-navigation.toggled {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-navigation ul.nav-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
    }
    
    .main-navigation ul.nav-menu li {
        margin: 0;
        width: 100%;
        text-align: center;
        transform: translateY(20px);
        opacity: 0;
        transition: transform 0.5s ease, opacity 0.5s ease;
    }

    /* Gestaffelde animatie voor menu-items */
    .main-navigation.toggled ul.nav-menu li {
        transform: translateY(0);
        opacity: 1;
    }
    .main-navigation.toggled ul.nav-menu li:nth-child(1) { transition-delay: 0.1s; }
    .main-navigation.toggled ul.nav-menu li:nth-child(2) { transition-delay: 0.2s; }
    .main-navigation.toggled ul.nav-menu li:nth-child(3) { transition-delay: 0.3s; }
    .main-navigation.toggled ul.nav-menu li:nth-child(4) { transition-delay: 0.4s; }
    
    .main-navigation ul.nav-menu a {
        display: block;
        padding: 15px 20px;
        width: 100%;
        font-size: 1.5rem; /* Grotere tekst voor mobiel menu */
        color: #FFFFFF;
    }

    .main-navigation ul.nav-menu a::after {
        display: none; /* Geen underline effect op mobiel */
    }

    /* Kleur van de 'X' in het mobiele menu */
    .mobile-menu-toggle.toggled .line {
        background-color: #FFFFFF;
    }
}

/* --- Simpele Logo Hover Animatie --- */
.site-branding .site-logo {
    display: block; /* Zorgt voor correcte positionering */
    transition: transform 0.3s ease-in-out;
}

.site-branding a:hover .site-logo {
    transform: scale(1.1); /* Vergroot het logo naar 110% */
}

/* ---
   7. Hero Sectie
   --- */
.hero { padding: 100px 0; position: relative; text-align: center; color: #fff; background-size: cover; background-position: center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(26, 42, 76, 0.85) 0%, rgba(26, 42, 76, 0.65) 100%); }
.hero-content { position: relative; z-index: 2; }
.hero-title, .hero-subtitle, .hero-button {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}
.hero-title { animation-delay: 0.2s; }
.hero-subtitle { animation-delay: 0.4s; font-size: 1.125rem; max-width: 600px; margin: 0 auto 30px; }
.hero-button { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ---
   8. Artikelen Grid & Cards
   --- */
.articles-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.grid-item { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.grid-item:hover { transform: translateY(-8px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); }
.card-content { background: #fff; border-radius: var(--border-radius); box-shadow: 0 4px 15px rgba(0,0,0,0.05); overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.card-thumbnail img { display: block; width: 100%; height: auto; transition: transform 0.5s ease; }
.grid-item:hover .card-thumbnail img { transform: scale(1.05); }
.card-text { padding: 20px; text-align: center; }
.read-more { color: var(--secondary-color); font-weight: 700; }

/* ---
   9. CTA Sectie
   --- */
.cta { background-color: var(--primary-color); color: #fff; }
.cta h3 { color: #fff; }

/* ---
   10. Responsive Design
   --- */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    body { font-size: 18px; }
    h1 { font-size: 3rem; }   /* 48px */
    h2 { font-size: 2.25rem; } /* 36px */
    h3 { font-size: 1.75rem; } /* 28px */
    section { padding: 80px 0; }
    .hero { padding: 140px 0; }
    .hero-subtitle { font-size: 1.25rem; }
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    h1 { font-size: 3.5rem; } /* 56px */
    section { padding: 100px 0; }
    .articles-grid { grid-template-columns: repeat(3, 1fr); }
    .card-text { padding: 30px; text-align: left; }
}

/* --- X. Footer (Volledig Vernieuwd & Gecorrigeerd) --- */
.site-footer {
    background-color: var(--primary-color);
    color: #a9b3ce;
    padding-top: 60px;
    font-size: 0.95rem;
}
.footer-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 50px;
}
.footer-widget {
    text-align: center;
}
/* DEFINITIEVE FIX: Centreert het logo correct op mobiel */
.footer-widget.footer-about {
    display: flex;
    flex-direction: column;
    align-items: center; 
}
.footer-logo-link {
    display: inline-block;
}
.widget-title {
    font-family: var(--font-heading);
    color: #FFFFFF;
    font-size: 1.2rem;
    margin-bottom: 15px;
}
.footer-logo {
    max-width: 180px;
    margin-bottom: 15px;
    transition: transform 0.3s ease-in-out;
}
.footer-logo-link:hover .footer-logo {
    transform: scale(1.1);
}
.footer-about p {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}
.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-nav ul li {
    margin-bottom: 5px;
}
.footer-nav ul a {
    color: #a9b3ce;
    text-decoration: none;
    padding: 10px 5px;
    position: relative;
    transition: color 0.3s ease;
}
.footer-nav ul a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5px;
    right: 5px;
    height: 3px;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.footer-nav ul a:hover {
    color: #FFFFFF;
}
.footer-nav ul a:hover::after,
.footer-nav .current-menu-item > a::after {
    transform: scaleX(1);
}
.footer-nav .current-menu-item > a {
    color: #FFFFFF;
}
.footer-nav .menu-item-account {
    display: none;
}
.footer-cta .button-secondary:hover {
    color: #FFFFFF;
}
.footer-bottom {
    background-color: #111e36;
    color: #888;
    padding: 20px 0;
    text-align: center;
    font-size: 0.875rem;
}
.footer-bottom .container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.footer-bottom p { margin: 0; }
.footer-bottom a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-bottom a:hover {
    color: var(--secondary-color);
}
@media (min-width: 768px) {
    .footer-main {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
    }
    .footer-widget.footer-about {
        align-items: flex-start;
    }
    .footer-about p {
        margin-left: 0;
        margin-right: 0;
    }
    .footer-bottom .container {
        flex-direction: row;
    }
}