@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;600;700&display=swap');

:root {
    --primary: #5b9bd5;
    --primary-dark: #4a7db5;
    --accent: #ce371b;
    --bg-color: #f8faff;
    --text-color: #2d3436;
    --text-light: #636e72;
    --white: #ffffff;
    --light-bg: #fdfdfd;
    --border-color: #e0e0e0;
    --secondary: #737373;
    --glass: rgba(255, 255, 255, 0.85);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    font-size: 14px;
}

body {
    font-family: 'Raleway', sans-serif;
    background: #fff;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.page-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    background: var(--white);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Header (Top Bar Only) */
header {
    width: 100%;
    z-index: 1000;
    background: var(--white);
}

.top-bar {
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
    color: var(--white);
    text-align: center;
    padding: 12px 0;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Navigation (Below Hero) */
nav {
    background: linear-gradient(180deg, #5b9bd5 0%, #4a7db5 100%);
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

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

.nav-links a {
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 8px 15px;
    border-radius: 4px;
}

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

/* Burger Menu */
.burger {
    display: none;
    cursor: pointer;
    z-index: 10;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 5px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media screen and (max-width: 900px) {
    nav {
        justify-content: flex-end;
        padding: 10px 20px;
    }

    .burger {
        display: block;
    }

    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 60%;
        max-width: 300px;
        background: linear-gradient(180deg, #4a7db5 0%, #3a6da5 100%);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        transform: translateX(100%);
        transition: transform 0.4s ease-in;
        z-index: 100;
        padding: 2rem 0;
    }

    .nav-links.nav-active {
        transform: translateX(0);
    }

    .nav-links li {
        opacity: 0;
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 14px 20px;
        font-size: 1rem;
        border-radius: 0;
    }

    .burger.toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .burger.toggle .line2 {
        opacity: 0;
    }

    .burger.toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* Hero Section */
.hero {
    width: 100%;
    height: 450px;
    position: relative;
    overflow: hidden;
}

.hero-slider {
    height: 100%;
    width: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center top;
}

.hero-slide.active {
    opacity: 1;
}

/* Grid Layout for Index */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.sidebar {
    border-left: 1px solid #eee;
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media screen and (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .sidebar {
        border-left: none;
        border-top: 1px solid #eee;
        padding-left: 0;
        padding-top: 2rem;
    }
}

/* Responsive Grid Utilities */
.responsive-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

/* Grid Layouts */
.content-grid-projecten {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 1.5rem;
}

@media screen and (max-width: 900px) {
    .content-grid-projecten {
        grid-template-columns: 1fr;
    }
}

.responsive-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

@media screen and (max-width: 1024px) {
    .responsive-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {

    .responsive-grid-2,
    .responsive-grid-3 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Force ALL inline 2-col and 3-col grids to stack on mobile */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    /* General mobile typography & layout */
    .page-wrapper {
        box-shadow: none;
    }

    .section {
        padding: 2rem 1rem;
    }

    .hero {
        height: 250px;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Projecten sidebar */
    .content-grid-projecten {
        grid-template-columns: 1fr;
    }

    .projecten-sidebar {
        border-left: none;
        padding-left: 0;
        margin-top: 2rem;
    }

    /* Footer tweaks */
    .footer-left,
    .footer-videos {
        max-width: 100%;
    }
}

.sidebar-box {
    background: #fdfdfd;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sidebar-box img {
    width: 100%;
    margin-bottom: 1rem;
}

.sidebar-box h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Accordion Styles */
.accordion {
    margin-bottom: 2rem;
}

.accordion-item {
    margin-bottom: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.accordion-header {
    background: linear-gradient(to bottom, #6F8FD6, #5F7FCF);
    color: white;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.accordion-header:hover {
    background: linear-gradient(to bottom, #5F7FCF, #4F6FBF);
}

.accordion-header::after {
    content: '\25BC';
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.accordion-item.active .accordion-header::after {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    background: white;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    /* Large enough to fit content */
    padding: 2rem;
    border-top: 1px solid #ddd;
}

.accordion-content p {
    font-size: 0.95rem;
    line-height: 1.7;
}

.highlight-red {
    color: #ce371b;
    font-weight: 700;
}

/* Accordion Plus Variant (for Behoeftes section) */
.accordion-plus .accordion-item {
    border: none;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    margin-bottom: 0;
}

.accordion-plus .accordion-header {
    background: transparent;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.8rem 0;
}

.accordion-plus .accordion-header:hover {
    background: transparent;
    color: var(--primary);
}

.accordion-plus .accordion-header::after {
    content: '+';
    font-size: 1.2rem;
    font-weight: 700;
    transition: transform 0.3s;
    transform: none;
}

.accordion-plus .accordion-item.active .accordion-header::after {
    content: '−';
    transform: none;
}

.accordion-plus .accordion-item.active .accordion-content {
    padding: 1rem 0;
}

/* Bottom Slider Styles */
.bottom-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
}

.bottom-slide.active {
    opacity: 1;
}

/* Slider Controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.slider-btn.prev {
    left: 1rem;
}

.slider-btn.next {
    right: 1rem;
}

.slider-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: white;
    width: 12px;
    height: 12px;
}

/* Video Hero & Slideshow Section */
.jw-slideshow {
    position: relative;
    width: 100%;
    margin-bottom: 3rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.jw-slideshow-title {
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image Text Component */
.jw-element-imagetext-text {
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1.1rem;
}

.jw-element-imagetext-text p {
    margin-bottom: 1.5rem;
}

.jw-element-imagetext-text strong {
    color: var(--primary);
}

/* Photo Gallery Section */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    /* Reduced gap slightly to help fit */
    margin-top: 1rem;
    width: 100%;
    max-width: 1200px;
    /* Aligns with content-grid-projecten if applicable */
    margin-left: auto;
    margin-right: auto;
}


.gallery-item {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    /* Ensure all boxes in a row are same height */
    transition: var(--transition);
}

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

.gallery-link {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #f0f0f0;
    /* Fallback for loading */
}

.gallery-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* This is key for alignment */
    display: block;
    transition: transform 0.5s ease;
}

.gallery-link:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
    text-align: left;
    flex-grow: 1;
    /* Pushes content to fill box */
    display: flex;
    align-items: center;
    /* Center text vertically in the description area */
    background: #fff;
}

@media screen and (max-width: 1024px) {
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .photo-gallery {
        grid-template-columns: 1fr;
    }
}