/* ======================================================
   PROJECT: Atelier de Monistique
   VERSION: 1.7.14 - CONTACT LAYOUT HERSTELD & KNOP MIDDEN
   ====================================================== */

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

html, body {
    overflow-x: hidden; 
}

body { 
    min-height: 100vh;
    min-height: 100dvh; 
    display: flex; 
    flex-direction: column; 
    font-family: 'Montserrat', sans-serif;
    color: #1a1a1a;
    background-color: #ffffff;
    
    padding-top: 130px; 
}

h1, h2 { font-family: 'Playfair Display', serif; text-transform: uppercase; letter-spacing: 3px; }

/* --- BEVEILIGING AFBEELDINGEN & MEDIA --- */
img, video {
    -webkit-touch-callout: none; 
    -webkit-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
    -webkit-user-drag: none; 
}

img { pointer-events: none; }

/* --- HEADER (GECENTREERD) --- */
header {
    position: fixed; top: 0; left: 0; width: 100%; height: 130px; 
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 10px 0; background: #ffffff; z-index: 1000; border-bottom: 1px solid #f0f0f0;
}

.logo-link { display: flex; align-items: center; text-decoration: none; margin-bottom: 5px; pointer-events: auto; }
.site-logo { width: 55px; height: 55px; border-radius: 50%; border: 1.5px solid #ffffff; object-fit: cover; background-color: #fff; }

nav ul { display: flex; list-style: none; gap: 25px; }
nav ul li a { text-decoration: none; color: #1a1a1a; font-size: 0.7rem; letter-spacing: 2px; }
nav ul li a:hover, nav ul li a.active { color: #b08d57; }

/* --- MAIN LAYOUT (Standaard voor alle pagina's) --- */
main { 
    flex: 1; 
    padding: 20px 8%; 
    display: flex; flex-direction: column; justify-content: center; align-items: center; 
}

/* --- PAGINA SPECIFIEKE LAYOUTS --- */
.portfolio-body main { padding-top: 10px; justify-content: flex-start; align-items: stretch; }

.over-body main { padding: 20px 4%; }
.over-body .page-split-container { gap: 25px; }
.over-body .page-text-content { flex: 1; }
.over-body .page-image-content { flex: 0 0 auto; }

/* --- SPLIT LAYOUT (Standaard) --- */
.page-split-container { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 40px; text-align: left; }
.page-text-content { flex: 1.2; }
.page-image-content { flex: 0.8; display: flex; justify-content: flex-end; }
.index-title { font-size: 5rem; line-height: 0.95; margin-bottom: 15px; }

/* --- STYLED FRAME --- */
.styled-frame { 
    width: 420px; aspect-ratio: 1/1; border: 1px solid #1a1a1a; 
    background: #ffffff; padding: 15px; display: flex; align-items: center; justify-content: center; 
}

.styled-frame.portrait { width: 310px; aspect-ratio: 3/4; }

.styled-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- PORTFOLIO TABS & GRID --- */
.portfolio-tabs { display: flex; width: 100%; border-bottom: 1px solid #f0f0f0; margin-bottom: 25px; margin-top: 10px; }
.tab-button { flex: 1; background: none; border: none; padding: 12px; font-family: 'Montserrat', sans-serif; font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; color: #666; position: relative; text-align: center; }
.tab-button.active { color: #1a1a1a; font-weight: bold; }
.tab-button.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 3px; background: #b08d57; }
.tab-content { display: none; }
.tab-content.active { display: grid; }
.portfolio-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; width: 100%; padding-bottom: 40px; }

.portfolio-item { display: flex; flex-direction: column; align-items: center; width: 100%; position: relative; }
.art-frame { width: 100%; aspect-ratio: 1/1; background: #ffffff; border: 1px solid #1a1a1a; padding: 15px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; cursor: zoom-in; }
.art-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-info { text-align: center; width: 100%; }
.art-title { font-weight: bold; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }

/* --- VIDEO TAB BUTTON --- */
.video-tab-btn { position: absolute; top: -12px; left: 20px; background-color: #ffffff; border: 1px solid #1a1a1a; color: #b08d57; padding: 3px 12px; font-family: 'Montserrat', sans-serif; font-size: 0.65rem; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; z-index: 10; transition: 0.3s; pointer-events: auto; }
.video-tab-btn:hover { background-color: #b08d57; color: #ffffff; border-color: #b08d57; }

/* --- POPUP OVERLAYS --- */
.image-popup-overlay { visibility: hidden; opacity: 0; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2000; background: #ffffff; padding: 20px; border: 1px solid #1a1a1a; box-shadow: 0 10px 40px rgba(0,0,0,0.3); max-width: 90vw; max-height: 90vh; pointer-events: none; transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; }
.image-popup-overlay.show { visibility: visible; opacity: 1; }
.image-popup-overlay img { max-width: 100%; max-height: calc(90vh - 40px); object-fit: contain; display: block; }

.video-popup-overlay { visibility: hidden; opacity: 0; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2000; background: #ffffff; padding: 35px 20px 20px 20px; border: 1px solid #1a1a1a; box-shadow: 0 10px 40px rgba(0,0,0,0.3); max-width: 90vw; max-height: 90vh; pointer-events: auto; transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; }
.video-popup-overlay.show { visibility: visible; opacity: 1; }
.video-popup-overlay video { max-width: 100%; max-height: calc(90vh - 55px); display: block; background: #000; }
.close-video { position: absolute; top: 8px; right: 12px; font-size: 1.5rem; cursor: pointer; color: #999; font-weight: bold; line-height: 1; transition: 0.3s; }

/* --- CONTACT FORM (Oude formulier opmaak) --- */
.contact-container { width: 100%; max-width: 550px; text-align: center; display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px; }
.contact-form { display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; border: 1px solid #1a1a1a; font-family: 'Montserrat', sans-serif; font-size: 0.85rem; background-color: #f9f9f9; pointer-events: auto; }
.contact-form textarea { height: 130px; resize: none; }
.contact-form button { padding: 18px; background: #1a1a1a; color: #fff; border: none; cursor: pointer; font-family: 'Montserrat', sans-serif; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; transition: 0.3s; pointer-events: auto; }
.contact-form button:hover { background: #b08d57; }

/* --- CONTACT KNOP --- */
.mail-button {
    display: inline-block;
    margin-top: 15px;
    margin-bottom: 25px; /* Toegevoegd zodat de tekst er mooi onder valt */
    padding: 15px 35px;
    background-color: #1a1a1a;
    color: #ffffff !important;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: 0.3s ease;
    border: 1px solid #1a1a1a;
    pointer-events: auto;
}

.mail-button:hover {
    background-color: #b08d57;
    border-color: #b08d57;
    color: #ffffff !important;
}

/* --- FOOTER --- */
footer { 
    flex-shrink: 0; min-height: 50px; padding: 15px 5%; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 0.7rem; color: #555; border-top: 1px solid #f0f0f0; 
    background: #fff; text-align: center; 
}
footer p { line-height: 1.6; }
footer a { color: #b08d57; text-decoration: none; font-weight: bold; transition: 0.3s; pointer-events: auto; }
footer a:hover { color: #1a1a1a; }

/* --- MOBILE INSTRUCTIE --- */
.mobile-tap-hint { display: none; }
.mobile-break { display: none; }

/* --- MOBILE OPTIMALISATIE --- */
@media (max-width: 768px) {
    body { padding-top: 0; }
    
    header { height: auto; padding: 15px 5%; position: relative; }
    
    nav ul { 
        max-width: 250px; margin: 0 auto; flex-wrap: wrap; 
        justify-content: center; column-gap: 18px; row-gap: 8px; 
    }
    
    main, .over-body main { margin-top: 0; padding: 15px 5%; justify-content: flex-start; }
    
    /* Standaard staat de foto bovenaan (column-reverse) - Nu weer consistent voor alle pagina's! */
    .page-split-container, .over-body .page-split-container { flex-direction: column-reverse; text-align: center; gap: 15px; }
    
    .portfolio-body h2 { text-align: center; }
    
    .mobile-tap-hint { 
        display: block; 
        text-align: center; 
        font-size: 0.75rem; 
        color: #888; 
        font-style: italic; 
        margin-top: 5px; 
    }

    .styled-frame { width: 100%; max-width: 260px; height: auto; aspect-ratio: 1/1; }
    
    .styled-frame.portrait { 
        max-height: 38vh; width: auto; max-width: 100%; aspect-ratio: 3/4; 
    }
    
    .index-title { font-size: 2.5rem; margin-bottom: 5px; line-height: 1; }
    .portfolio-grid { grid-template-columns: 1fr; }
    
    .contact-container { gap: 15px; }
    .contact-form { gap: 15px; }
    .contact-form input { padding: 15px; }
    .contact-form textarea { height: 110px; padding: 15px; }
    
    .image-popup-overlay { pointer-events: auto; cursor: zoom-out; width: 95vw; padding: 10px; }
    .video-popup-overlay { width: 95vw; padding: 30px 10px 10px 10px; }

    .mail-button { width: 100%; text-align: center; }

    /* Footer mobiele break */
    .mobile-break { display: block; height: 0; }
    .footer-divider-first { display: none; }
}