:root {
    /* Responsive Padding Variable */
    --paddingSize: clamp(20px, 8vw, 180px);

    --GreenColor: #6B8B5A;
    --BlueColor: #162D40;
    --LightBg: #F5F5F5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    line-height: 1.6;
    color: #ffffff;
    background-color: var(--GreenColor);
    font-family: "DM Sans", sans-serif;
    overflow-x: hidden;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0;
    width: 100%;
    height: 70px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--paddingSize);
    background-color: rgba(107, 139, 90, 0.92);
    backdrop-filter: blur(10px);
}

/* Mobile Menu Dark Backdrop Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 999; /* Below header (1000), above page content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.Logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.Logo img {
    max-height: 45px;
    width: auto;
    display: block;
}

.HeaderElements {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}

.Headerhead a {
    text-decoration: none;
    color: #ffffff;
    font-size: 18px;
    font-family: "DM Sans", sans-serif;
    transition: opacity 0.2s ease;
}

.Headerhead a:hover {
    opacity: 0.8;
}

.HeaderheadContact a {
    text-decoration: none;
    color: #ffffff;
    font-size: 18px;
    font-family: "DM Mono", monospace;
    background-color: var(--BlueColor);
    padding: 6px 18px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.HeaderheadContact a:hover {
    background-color: #0f202e;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 26px;
    cursor: pointer;
}

/* Home Section */
.homePage {
    min-height: 100vh;
    padding: 120px var(--paddingSize) 60px var(--paddingSize);
    background-image: 
        linear-gradient(
            to bottom, 
            rgba(0, 0, 0, 0.2) 0%, 
            transparent 60%, 
            var(--GreenColor) 100%
        ),
        url('HomePageBackgroundImage.jpeg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 40px;
    position: relative;
}

.MainText {
    font-family: "Playfair Display", serif;
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    line-height: 1.1em;
    letter-spacing: 1px;
    font-weight: 500;
}

.mainTextColor {
    font-style: italic;
    color: var(--BlueColor);
    font-weight: 800;
}

.SmallText {
    max-width: 550px;
    align-self: flex-end;
    text-align: right;
    font-family: "DM Mono", monospace;
    font-weight: 400;
    line-height: 1.4em;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    font-size: clamp(14px, 1.2vw, 16px);
}

/* About Section */
.aboutPage {
    background-color: var(--GreenColor);
    min-height: 80vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 80px var(--paddingSize);
    gap: 40px;
}

.aboutImage {
    width: 45%;
    display: flex;
    justify-content: center;
}

.aboutImage img {
    width: 100%;
    max-width: 420px;
    height: auto;
    border-radius: 30px;
    object-fit: cover;
    display: block;
}

.textAbout {
    width: 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.aboutTitle {
    font-family: "Playfair Display", serif;
    font-size: clamp(2.2rem, 3.8vw, 4rem);
    line-height: 1.2em;
    font-weight: 500;
}

.aboutTitleBlue {
    color: var(--BlueColor);
}

.aboutInfo {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    margin-top: 30px;
    font-family: "DM Sans", sans-serif;
    line-height: 1.5em;
}

/* Diensten Section */
.dienstenPage {
    min-height: 90vh;
    background: linear-gradient(180deg, rgba(107, 139, 90, 1) 0%, rgba(203, 219, 189, 1) 50%, rgba(203, 219, 189, 1) 100%);
    padding: 100px var(--paddingSize);
}

.miniTitle {
    font-size: 24px;
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    color: var(--BlueColor);
    font-weight: bold;
}

.miniTitle img {
    max-height: 35px;
    width: auto;
    margin-right: 15px;
}

.dienstenContent {
    display: flex;
    flex-direction: row;
    gap: 30px;
}

.Cards {
    flex: 0.9;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card01 {
    background-color: var(--GreenColor);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card01.active {
    background-color: #2d371e;
    color: #ffffff;
}

.cardTitle {
    font-size: 24px;
    font-family: "Playfair Display", serif;
    font-weight: 600;
}

.cardUitleg {
    font-size: 16px;
    margin-top: 6px;
    font-family: "DM Sans", sans-serif;
    line-height: 1.3em;
}

.imageDiensten {
    flex: 1.1;
    border-radius: 25px;
    min-height: 450px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.4s ease-in-out;
}

/* Projecten Section */
.projectenPage {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--LightBg);
    padding: 80px var(--paddingSize);
}

.projectenTitle {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-family: "Playfair Display", serif;
    font-weight: 600;
    color: #363638;
    margin-bottom: 20px;
    text-align: center;
}

.container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Maximum 3 items per row on desktop */
    gap: 30px;
    width: 100%;
}

.item {
    position: relative;
    height: 380px; /* Increased height so larger cards maintain nice proportions */
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.item:hover img {
    opacity: 0.85;
    transform: scale(1.05);
}

.text {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 2;
}

.text h3 {
    color: #ffffff;
    font-size: 1.3rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

/* Modal Popup */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #F5F5F5;
    width: 100%;
    max-width: 650px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: scaleUp 0.3s ease-out forwards;
}

@keyframes scaleUp {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

#details {
    padding: 25px;
    color: #333;
    position: relative;
}

#details h3 {
    font-family: "Playfair Display", serif;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

#details p {
    color: #555;
    margin-bottom: 20px;
}

#details .button {
    display: inline-block;
    background-color: var(--BlueColor);
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

#details .button:hover {
    background-color: #0d1e2b;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #ffffff;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.close:hover {
    color: #ddd;
}

/* Contact Section */
.contactPage {
    padding: 80px var(--paddingSize);
    background-color: rgba(203, 219, 189, 1);
}

.contactTitle {
    color: #111;
    font-family: "Playfair Display", serif;
    font-size: clamp(2rem, 3.5vw, 3rem);
    margin-bottom: 40px;
}

.contactContent {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.HulpNodig {
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    line-height: 1.1em;
    color: #111111;
    font-family: "Playfair Display", serif;
}

.contactenTekstje {
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    margin-top: 20px;
    color: #444444;
}

.contactenRight {
    background-color: var(--GreenColor);
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    gap: 25px;
}

.contactRightTekst {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    line-height: 1.2em;
    color: #ffffff;
}

.buttonMail, .buttonPhone {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    gap: 10px;
}

.buttonMailLeft {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: var(--BlueColor);
    padding: 14px 20px;
    border-radius: 30px 10px 10px 30px;
    color: #ffffff;
    font-size: clamp(13px, 1.1vw, 16px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.buttonMailRight {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 14px 20px;
    border-radius: 10px 30px 30px 10px;
    color: #ffffff;
    font-size: 18px;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: var(--GreenColor);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES (Breakpoints)
   ========================================== */

@media (max-width: 992px) {
    .aboutPage {
        flex-direction: column;
        text-align: center;
    }

    .aboutImage, .textAbout {
        width: 100%;
    }

    .dienstenContent {
        flex-direction: column;
    }

    .imageDiensten {
        min-height: 350px;
    }

    .contactContent {
        grid-template-columns: 1fr;
    }
    .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    /* Floating Card Mobile Menu */
    .HeaderElements {
        position: fixed;
        top: 80px; /* Leaves a 10px gap below the 70px header */
        left: 15px;
        right: 15px;
        width: auto; /* Pulls in from left and right edges */
        background-color: rgba(107, 139, 90, 0.8);
        backdrop-filter: blur(20px);
        border-radius: 20px; /* Rounded floating card shape */
        flex-direction: column;
        align-items: center;
        padding: 30px 20px;
        gap: 25px;
        
        /* Smooth fade & slide transition */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-15px);
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        
        /* Deeper shadow to elevate it off the content */
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    }

    .container {
        grid-template-columns: 1fr;
    }
    
    .item {
        height: 300px; /* Scales down card height for smaller mobile screens */
    }

    .HeaderElements.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .SmallText {
        align-self: flex-start;
        text-align: left;
    }

    .contactenRight {
        padding: 25px;
    }
}