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

:root {
    /* --- VARIABLES --- */
    --color-primary: #494855;       /* Dark Blue */
    --color-bg-cream: #ece9e4;      /* Cream */

    --color-text-main: #4a5568;
    --color-text-muted: #666666;
    --color-text-light: #ffffff;

    --color-white: #ffffff;
    --color-form-bg: #f9f9f9;
    --color-form-border: #cccccc;

    --color-overlay-dark: rgba(73, 72, 85, 0.85);

    --font-primary: 'Europa', sans-serif;
    --font-headings: 'Europa', sans-serif;

    --container-width: 1200px;
    --header-height: 80px;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;

    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-card: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    /* CRITICAL FIX: Stop horizontal scroll at the root level */
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text-main);
    line-height: 1.6;
    background-color: var(--color-white);
    /* CRITICAL FIX: Ensure body never exceeds screen width */
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

h1, h2, h3 {
    font-family: var(--font-headings);
    color: var(--color-primary);
    font-weight: 700;
    /* Prevent massive headlines from breaking mobile */
    word-wrap: break-word;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border: 1px solid var(--color-primary);
}
.btn-primary:hover { opacity: 0.9; }

.btn-outline {
    background-color: transparent;
    color: var(--color-text-light);
    border: 1px solid var(--color-text-light);
}
.btn-outline:hover { background-color: var(--color-white); color: var(--color-primary); }

.btn-white {
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 1px solid var(--color-white);
}

.section-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    margin-bottom: 10px;
    display: block;
}

/* --- NAVIGATION (Transparent to Sticky) --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;

    /* Fixed at top */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    /* DEFAULT STATE (Top of page) */
    background: transparent;
    box-shadow: none;
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

/* Links and Icons Default (White) */
.nav-links a {
    color: var(--color-white);
    font-weight: 500;
    font-size: 1rem; /* Make text slightly bigger */
}

.menu-toggle {
    color: var(--color-white);
}

/* --- LOGO STYLES --- */
.logo {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.logo img {
    height: 80px;
    width: auto;

    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

nav.scrolled .logo img {
    filter: brightness(0);
}

.nav-links {
    display: flex;
    gap: 50px; /* INCREASED SPACE between items */
    align-items: center;
}

/* --- THE SCROLLED STATE (White Background) --- */
nav.scrolled {
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    padding: 10px 40px;
}

/* Change Links to Blue when scrolled */
nav.scrolled .nav-links a {
    color: var(--color-primary);
}

/* Change Menu Icon to Blue */
nav.scrolled .menu-toggle {
    color: var(--color-primary);
}

/* --- BUTTON FIXES --- */

/* 1. Default Button (at top of page) - White Border, White Text */
nav .nav-links .btn-primary {
    background: transparent;
    border: 1px solid var(--color-white);
    color: var(--color-white);
}

/* 2. Scrolled Button - Blue Background, WHITE TEXT */
nav.scrolled .nav-links .btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white) !important; /* Forces text to stay white */
}

/* --- MOBILE MENU ADJUSTMENTS --- */
@media (max-width: 900px) {
    .nav-links {
        background-color: var(--color-white);
        gap: 25px; /* Smaller gap on mobile vertical list */
    }

    /* When opening menu on mobile, force links to be blue */
    .nav-links a {
        color: var(--color-primary);
    }

    /* Fix mobile button to look solid blue */
    nav .nav-links .btn-primary {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: var(--color-white);
    }
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(var(--color-overlay-dark), var(--color-overlay-dark)),
    url('header_with_plan.webp');
    background-size: cover;
    background-position: center;
    text-align: center;
    color: var(--color-text-light);
    padding-top: 60px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--color-text-light);
    margin: 20px 0;
}
.hero h1 span { font-style: italic; }
.hero p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* --- HERO SECTION - SCROLL INDICATOR --- */
.scroll-indicator {
    position: absolute;
    bottom: 5px;        /* Distance from bottom */
    left: 50%;           /* Center horizontally */
    transform: translateX(-50%); /* Perfect centering fix */

    color: var(--color-white);
    font-size: 2.5rem;   /* Icon size */
    opacity: 0.7;
    animation: bounce 2s infinite; /* The bouncing magic */
    cursor: pointer;
    z-index: 10;
}

.scroll-indicator:hover {
    opacity: 1;
}

/* Scroll indicator animation Keyframes */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-20px);
    }
    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* --- ABOUT SECTION --- */
.about {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
    background-color: var(--color-bg-cream);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-img img {
    width: 100%;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
}

.about h2 { font-size: 2.5rem; margin-bottom: 20px; }
.about h2 span { font-style: italic; }

.check-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.check-list i { color: var(--color-primary); }

/* --- SERVICES SECTION --- */
.services {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
    background-color: #f0efe9;
    text-align: center;
}

.services h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.section-subtitle {
    max-width: 700px;
    margin: 0 auto 60px auto;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: left;
}

.service-card {
    background: var(--color-white);
    padding: 40px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s;
}
.service-card:hover { transform: translateY(-5px); }

.service-icon {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 20px;
}
.service-card h3 { font-size: 1.2rem; margin-bottom: 10px; font-family: var(--font-primary); font-weight: bold;}

/* --- REALISATIES SECTION --- */
.realisaties {
    padding: 80px 0;
    /* Use a white background to contrast with the cream 'About' section */
    background-color: var(--color-white);
}

.realisaties-grid {
    display: grid;
    /* 2 columns by default */
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

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

.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    overflow: hidden;
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
}

/* Ensure the image inside fills that slot perfectly */
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* Prevents stretching */
    object-position: bottom;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05); /* Subtle zoom effect on hover */
}

.project-info {
    padding: 20px;
    text-align: left;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 5px;
    color: var(--color-primary);
}

.project-info p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* --- CONTACT SECTION --- */
.contact {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact h2 { color: var(--color-text-light); font-size: 3rem; margin-bottom: 20px; }
.contact h2 span { font-style: italic; }

.contact-info-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.contact-info-boxes .info-box:last-child {
    grid-column: span 2;
    text-align: center;
}

/* Ensure it goes back to normal on mobile */
@media (max-width: 900px) {
    .contact-info-boxes .info-box:last-child {
        grid-column: span 1;
        text-align: left;
    }
}

.info-box {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: var(--border-radius-sm);
    /* Prevent long emails from breaking layout */
    word-break: break-word;
}
.info-box i { font-size: 1.5rem; margin-bottom: 10px; display: block;}
.info-box small { opacity: 0.7; display: block; margin-bottom: 5px;}

/* --- FORM --- */
.contact-form {
    background: var(--color-white);
    padding: 40px;
    border-radius: var(--border-radius-md);
    color: var(--color-primary);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group { width: 100%; margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    background: var(--color-form-bg);
    color: var(--color-primary);
    border: 1px solid var(--color-form-border);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
}

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

/* FOOTER */
footer {
    background: #1a2634;
    color: var(--color-text-light);
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
}

/* --- MOBILE RESPONSIVE --- */

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--color-white);
    transition: color 0.3s ease;
}

@media (max-width: 900px) {
    /* Prevent Nav from pushing width */
    nav { padding: 15px 20px; }
    .menu-toggle { display: block; }

    /* Menu Dropdown */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
        box-shadow: var(--shadow-sm);
        gap: 25px;
    }
    .nav-links.active { display: flex; }

    /* Text & Layout Fixes */
    .hero h1 { font-size: 2.2rem; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn { width: 100%; text-align: center; }

    /* SWITCH TO FLEXBOX (Safer than Grid on mobile) */
    .about-grid,
    .contact-grid,
    .contact-info-boxes,
    .services-grid,
    .realisaties-grid,
    .form-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 40px;
    }

    /* SECTIONS HEIGHT FIX */

    /* Let these sections grow naturally based on text */
    .about, .services, .contact {
        min-height: auto;
        height: auto;
        display: block;
        padding: 80px 0 60px 0;
    }

    /* Force HERO to remain full screen height */
    .hero {
        min-height: 100vh; /* Full Height */
        display: flex;     /* Keep centering enabled */
        align-items: center;
        padding: 80px 20px; /* Top padding for header, side padding for edges */
    }

    /* Form Padding Adjustment */
    .contact-form {
        padding: 25px;
    }

    .about-text, .contact-left { text-align: center; }
    .contact-info-boxes { text-align: left; }
    .form-row { gap: 0; }
}
