/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Poppins:wght@300;400;600;700&display=swap');

/* =========================
   1. RESET & BASIS
   ========================= */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    min-height: 100vh; 
    overflow-x: hidden; 
    background-image: url('background.jpg'); 
    background-size: cover; 
    background-position: center center; 
    background-attachment: fixed; 
    font-family: 'Poppins', sans-serif; 
    color: white; 
}

/* =========================
   2. NAVBAR & NAVIGATION
   ========================= */
.navbar { 
    position: fixed; 
    top: 0; 
    width: 100%; 
    padding: 20px 60px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: rgba(0, 0, 0, 0.2); 
    backdrop-filter: blur(15px); 
    z-index: 1000; 
}

.nav-brand { 
    font-family: 'Playfair Display', serif; 
    font-size: 1.7em; 
    font-weight: 600; 
    color: white; 
    text-decoration: none; 
    transition: 0.3s; 
}

.nav-brand:hover { 
    text-shadow: 0 0 15px white, 0 0 30px rgba(255,255,255,0.5); 
}

.nav-links { list-style: none; display: flex; gap: 40px; }
.nav-links a { text-decoration: none; color: white; transition: 0.3s; }
.nav-links a:hover { 
    text-shadow: 0 0 10px white, 0 0 20px rgba(255,255,255,0.5); 
}

/* =========================
   3. BACK BUTTON (Detail Pages)
   ========================= */
.back-button {
    position: fixed;
    top: 100px;
    left: 60px;
    z-index: 1001;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s ease;
}

.back-button .arrow { font-size: 1.2rem; transition: 0.3s ease; }
.back-button:hover { color: white; text-shadow: 0 0 10px white; }
.back-button:hover .arrow { transform: translateX(-5px); }

/* =========================
   4. HOME PAGE: HERO & CAROUSEL
   ========================= */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.main-title-text { display: flex; flex-direction: column; align-items: center; font-family: 'Playfair Display', serif; font-size: 7vw; font-weight: 600; line-height: 1.05; z-index: 2; }
.flicker-letter { display: inline-block; animation: individualFlicker 4s linear infinite; text-shadow: 0 0 15px rgba(255,255,255,0.8); }

@keyframes individualFlicker { 
    0%, 10%, 90%, 100% { opacity: 1; filter: blur(0px); } 
    5% { opacity: 0.4; filter: blur(1px); } 
}

.ellipse-orbit { position: absolute; left: 50%; top: 50%; width: 500px; height: 160px; transform: translate(-52%, -42%) rotate(-20deg); z-index: 1; pointer-events: none; }
.ellipse-border { position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(255,255,255,0.6); }
.ellipse-star { position: absolute; width: 16px; height: 16px; background: white; clip-path: polygon(50% 0%, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0% 50%, 35% 35%); transform: translate(-50%, -50%); box-shadow: 0 0 16px white; }

.carousel-track-wrapper { overflow: hidden; padding: 40px 0; width: 100%; }
.carousel-track { display: flex; width: max-content; animation: scroll-loop 30s linear infinite; }
@keyframes scroll-loop { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.carousel-item { width: 300px; height: 180px; margin-right: 30px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.carousel-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* =========================
   5. OVERVIEW: MONASTERY GRID
   ========================= */
.projects-page-content { padding-top: 150px; }
.projects-grid-container { max-width: 1200px; margin: 0 auto; padding: 0 40px 100px; }
.projects-grid { column-count: 3; column-gap: 30px; display: block; }

.project-card { 
    display: block; break-inside: avoid; margin-bottom: 30px; 
    text-decoration: none; color: inherit; background: rgba(255,255,255,0.05); 
    border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; overflow: hidden; 
    transition: 0.4s ease; backdrop-filter: blur(10px); width: 100%; 
}

.project-card .project-image img, 
.project-card .project-video { 
    width: 100% !important; 
    height: auto !important; 
    display: block; 
}

.project-info { padding: 20px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.project-info h3 { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: rgba(255, 255, 255, 0.7); transition: 0.3s; }
.project-card:hover { transform: translateY(-10px); border-color: rgba(255,255,255,0.6); box-shadow: 0 15px 35px rgba(0,0,0,0.6); }

/* =========================
   6. SECTIONS & FORMS (HOME)
   ========================= */
.section { 
    padding: 120px 0; 
    min-height: 80vh; 
    position: relative; 
    z-index: 10; 
}

#projects, .projects-section, 
#contact, .contact-section { 
    background-color: rgba(0, 0, 0, 0.6); 
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
}

.section-title { font-size: 3em; text-align: center; margin-bottom: 60px; font-family: 'Playfair Display', serif; }
.contact-container { max-width: 1100px; margin: 0 auto; padding: 0 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-form { display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form textarea { padding: 15px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.2); color: white; border-radius: 8px; font-family: 'Poppins', sans-serif; }
.contact-form button { padding: 15px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.4); color: white; cursor: pointer; transition: 0.3s; border-radius: 8px; }
.contact-form button:hover { background: white; color: black; box-shadow: 0 0 20px white; }

.all-projects-wrapper { display: flex; justify-content: center; margin-top: 40px; }
.all-projects-btn { padding: 12px 32px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.6); background: rgba(0,0,0,0.4); color: white; text-decoration: none; transition: 0.3s; }

/* =========================
   7. PROJECT DETAIL PAGE
   ========================= */
.project-detail-page .project-detail-content { padding-top: 150px; max-width: 1200px; margin: 0 auto; }

.project-description {
    max-width: 650px; margin: -40px auto 60px auto; text-align: center;
    font-size: 1.1rem; line-height: 1.7; color: rgba(255, 255, 255, 0.7); font-weight: 300;
}

.project-gallery { padding: 0 40px 100px; display: flex; flex-direction: column; align-items: center; gap: 50px; }
.gallery-main.cover-view { width: 100%; display: flex; justify-content: center; }

/* Cursor op zoom-in voor klikbare items */
.image-wrapper, .detail-item { 
    cursor: zoom-in; 
}

.image-wrapper { width: 60%; max-width: 800px; line-height: 0; }
.gallery-details { display: flex; flex-wrap: wrap; gap: 40px; justify-content: center; align-items: flex-start; width: 100%; }

.detail-item.small { width: 250px; }
.detail-item.large-detail { width: 450px; }
.detail-item.half { width: 400px; }

.project-detail-page img { 
    width: 100% !important; 
    height: auto !important; 
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: none !important; 
    transform: none !important;
}

.project-detail-page .image-wrapper img {
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.project-detail-page .detail-item img {
    border-radius: 10px;
}

/* --- LIGHTBOX STYLING --- */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 3000;
    cursor: zoom-out;
}

.lightbox-overlay img {
    width: auto !important; 
    height: auto !important;
    max-width: 90vw !important;
    max-height: 85vh !important;
    object-fit: contain !important; /* Voorkomt stretchen */
    border: none !important;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0,0,0,1);
}

.lightbox-overlay.active { display: flex; }

/* =========================
   8. RESPONSIVE DESIGN
   ========================= */
@media (max-width: 900px) { 
    .projects-grid { column-count: 2; } 
    .contact-container { grid-template-columns: 1fr; } 
}

@media (max-width: 768px) {
    .image-wrapper, .detail-item.small, .detail-item.large-detail, .detail-item.half { width: 100% !important; max-width: 100%; }
    .projects-grid { column-count: 1; }
    .back-button { left: 30px; top: 90px; }
    .navbar { padding: 20px 30px; }
}
/* Mobiele aanpassingen (Schermen kleiner dan 768px) */
@media (max-width: 768px) {
    
    /* Maak de titels kleiner zodat ze niet buiten het beeld vallen */
    .main-title-text {
        font-size: 3rem; /* Iets kleiner dan op desktop */
    }

    /* Zet elementen onder elkaar in plaats van naast elkaar */
    .contact-container, 
    .about-content {
        flex-direction: column;
        padding: 20px;
    }

    /* Zorg dat afbeeldingen nooit breder zijn dan het scherm */
    img, video {
        max-width: 100%;
        height: auto;
    }

    /* Pas de navigatie aan (simpele oplossing) */
    .nav-links {
        gap: 15px;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 2rem;
    }
}