/*
Theme Name: Hof van Paen
Theme URI: https://hofvanpaen.nl
Author: Hof van Paen
Description: Interactief WordPress thema voor Hof van Paen woningproject in Oisterwijk met kavelkaart, woningtypes en contactformulier.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: hofvanpaen
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --hvp-primary: #0f1c3f;
    --hvp-primary-light: #1a2d5a;
    --hvp-secondary: #c4a07c;
    --hvp-secondary-light: #d4b896;
    --hvp-accent: #b4917b;
    --hvp-cream: #f5efe8;
    --hvp-white: #ffffff;
    --hvp-gray-600: #6c757d;
    --hvp-gray-700: #495057;
    --hvp-font-display: 'joly-display', Georgia, serif;
    --hvp-font-body: 'Krub', -apple-system, sans-serif;
    --hvp-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --hvp-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --hvp-transition: 300ms ease;
}

/* ==========================================================================
   Fonts
   ========================================================================== */
@font-face {
    font-family: 'Amarillo';
    src: url('assets/fonts/Amarillo.otf') format('opentype');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Krub';
    src: url('assets/fonts/Krub.ttc') format('truetype-collection');
    font-weight: 200 700;
    font-display: swap;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--hvp-font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--hvp-gray-700);
    background: var(--hvp-white);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--hvp-font-display);
    color: var(--hvp-primary);
    line-height: 1.3;
    margin: 0 0 0.75em;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.section-subtitle {
    font-family: var(--hvp-font-body);
    font-size: 1.125rem;
    color: var(--hvp-accent);
    margin-bottom: 2rem;
    margin-top: 0;
}

a { color: var(--hvp-secondary); text-decoration: none; transition: color var(--hvp-transition); }
a:hover { color: var(--hvp-primary); }

img { max-width: 100%; height: auto; }

/* ==========================================================================
   Backgrounds
   ========================================================================== */
.bg-cream { background-color: var(--hvp-cream); }
.bg-primary { background-color: var(--hvp-primary) !important; color: var(--hvp-white); }
.bg-secondary { background-color: var(--hvp-secondary) !important; }

/* Achtergrond met motief */
.bg-pattern {
    background-image: url('assets/images/achtergrond.jpg');
    background-size: 800px auto;
    background-position: center;
    background-repeat: repeat;
}

.bg-pattern-light {
    position: relative;
    background-color: var(--hvp-cream);
}

.bg-pattern-light::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('assets/images/achtergrond.jpg');
    background-size: 800px auto;
    background-position: center;
    background-repeat: repeat;
    opacity: 0.5;
    z-index: 0;
}

.bg-pattern-light > * {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 5rem 0; }
.section-lg { padding: 7rem 0; }

/* ==========================================================================
   Custom Grid Layouts (niet afhankelijk van Bootstrap breakpoints)
   ========================================================================== */

/* Intro Grid: tekst links, afbeelding rechts */
#intro {
    background-image: url('assets/images/achtergrond.jpg');
    background-size: 800px auto;
    background-position: center;
    background-repeat: repeat;
}

#intro .section-title {
    color: var(--hvp-white);
    margin-bottom: 0.5rem;
}

#intro p,
#intro .lead {
    color: var(--hvp-white);
}

#intro .btn-primary {
    background: var(--hvp-primary);
    border-color: var(--hvp-primary);
}

#intro .btn-primary:hover {
    background: var(--hvp-primary-light);
    border-color: var(--hvp-primary-light);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
}

.intro-image {
    width: 100%;
}

.intro-image img {
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    width: 100%;
    height: auto;
    display: block;
    max-width: none;
}

@media (max-width: 767px) {
    .intro-grid {
        grid-template-columns: 1fr;
    }
    .intro-image {
        order: -1;
    }
}

/* Woningtypes Grid: 4 kolommen */
.woningtypes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 991px) {
    .woningtypes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .woningtypes-grid {
        grid-template-columns: 1fr;
    }
}

/* Locatie Grid: tekst links, kaart rechts */
#locatie .section-title {
    color: var(--hvp-white);
    margin-bottom: 0.5rem;
}

#locatie .lead,
#locatie p {
    color: var(--hvp-white);
}

#locatie .locatie-feature-content h4 {
    color: var(--hvp-white);
}

#locatie .locatie-feature-content p {
    color: var(--hvp-white);
}

.locatie-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.locatie-map-wrapper {
    order: 2;
}

.locatie-text {
    order: 1;
}

@media (max-width: 767px) {
    .locatie-grid {
        grid-template-columns: 1fr;
    }
    .locatie-map-wrapper {
        order: 1;
    }
    .locatie-text {
        order: 2;
    }
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar-hvp {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all var(--hvp-transition);
    background: transparent;
}

.navbar-hvp.scrolled {
    background: var(--hvp-white);
    box-shadow: var(--hvp-shadow-lg);
    padding: 1rem 0;
}

.navbar-hvp .navbar-brand {
    font-family: var(--hvp-font-display);
    font-size: 1.5rem;
    color: var(--hvp-white);
    text-decoration: none;
}

.navbar-hvp .navbar-brand .logo-text {
    font-family: var(--hvp-font-display);
    font-size: 1.75rem;
    letter-spacing: 0.02em;
}

.navbar-hvp .navbar-brand .logo-img {
    height: 75px;
    max-height: 75px;
    width: auto;
    transition: all var(--hvp-transition);
}

.navbar-hvp .navbar-brand .logo-white {
    display: block;
}

.navbar-hvp .navbar-brand .logo-color {
    display: none;
}

.navbar-hvp.scrolled .navbar-brand .logo-img {
    height: 75px;
    max-height: 75px;
}

@media (max-width: 991.98px) {
    .navbar-hvp .navbar-brand .logo-img {
        height: 50px;
        max-height: 50px;
    }
    .navbar-hvp.scrolled .navbar-brand .logo-img {
        height: 50px;
        max-height: 50px;
    }
}

.navbar-hvp.scrolled .navbar-brand .logo-white {
    display: none;
}

.navbar-hvp.scrolled .navbar-brand .logo-color {
    display: block;
}

.navbar-hvp.scrolled .navbar-brand,
.navbar-hvp.scrolled .navbar-brand .logo-text { color: var(--hvp-primary); }

.navbar-hvp .nav-link {
    color: var(--hvp-white);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem !important;
}

.navbar-hvp.scrolled .nav-link { color: var(--hvp-primary); }
.navbar-hvp .nav-link:hover { color: var(--hvp-secondary); }

.navbar-hvp .navbar-toggler { border: none; }
.navbar-hvp .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-hvp.scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230f1c3f' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--hvp-primary);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15,28,63,0.7), rgba(15,28,63,0.5), rgba(15,28,63,0.7));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
}

.hero-logo {
    max-width: 300px;
    margin-bottom: 2rem;
}

.hero-beeldmerk {
    max-width: 250px;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-pretitle {
    font-family: var(--hvp-font-display);
    font-size: 2rem;
    color: var(--hvp-cream);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-title {
    font-size: 3.5rem;
    color: var(--hvp-white);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--hvp-cream);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.hero-stat { text-align: center; }

.hero-stat-number {
    font-family: var(--hvp-font-display);
    font-size: 3.5rem;
    color: var(--hvp-secondary);
    display: block;
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.75rem;
    color: var(--hvp-cream);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--hvp-white);
    animation: bounce 2s infinite;
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    font-family: var(--hvp-font-body);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 2rem;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: all var(--hvp-transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--hvp-secondary);
    border-color: var(--hvp-secondary);
    color: var(--hvp-white);
}

.btn-primary:hover {
    background: var(--hvp-primary);
    border-color: var(--hvp-primary);
    color: var(--hvp-white);
}

.btn-outline-light {
    background: transparent;
    border-color: var(--hvp-white);
    color: var(--hvp-white);
}

.btn-outline-light:hover {
    background: var(--hvp-white);
    color: var(--hvp-primary);
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--hvp-primary);
    color: var(--hvp-primary);
}

.btn-outline-primary:hover {
    background: var(--hvp-primary);
    color: var(--hvp-white);
}

.btn-lg { padding: 1.25rem 2.5rem; font-size: 1rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.75rem; }

/* ==========================================================================
   Woningtype Cards
   ========================================================================== */
.woningtype-card {
    position: relative;
    background: var(--hvp-white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--hvp-shadow-lg);
    transition: all var(--hvp-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.woningtype-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hvp-shadow-xl);
    text-decoration: none;
    color: inherit;
}

.woningtype-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--hvp-secondary);
    color: var(--hvp-white);
    padding: 0.25rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 1;
}

.woningtype-image {
    background: #f8f9fa;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.woningtype-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.woningtype-card:hover .woningtype-image img {
    transform: scale(1.08);
}

.woningtype-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.woningtype-header {
}

.woningtype-title {
    font-size: 1.575rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.woningtype-type {
    font-family: var(--hvp-font-body);
    font-size: 0.7rem;
    color: var(--hvp-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    margin-top: 0;
}

@media (max-width: 1199px) and (min-width: 992px) {
    .woningtype-title { font-size: 1.575rem; }
    .woningtype-header { min-height: 4rem; }
}

.woningtype-description {
    color: var(--hvp-gray-600);
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.woningtype-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
    margin-top: auto;
}

.woningtype-spec { text-align: center; }

.woningtype-spec-value {
    font-family: var(--hvp-font-body);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--hvp-primary);
    display: block;
    line-height: 1.2;
}

.woningtype-spec-label {
    font-size: 0.7rem;
    color: var(--hvp-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Interactive Situatie Map
   ========================================================================== */
.situatie-section {
    background: var(--hvp-cream);
    padding: 5rem 0;
}

.situatie-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.situatie-filter {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--hvp-primary);
    background: transparent;
    color: var(--hvp-primary);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--hvp-transition);
}

.situatie-filter:hover,
.situatie-filter.active {
    background: var(--hvp-primary);
    color: var(--hvp-white);
}

.situatie-map-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--hvp-shadow-xl);
    max-width: 1000px;
}

.situatie-map-container {
    text-align: center;
}

.situatie-map-image {
    display: block;
    width: 100%;
    height: auto;
}

#kavelHotspots {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Kavel Hotspots */
.kavel-hotspot {
    position: absolute;
    width: 28px;
    height: 28px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
}

.kavel-hotspot-inner {
    width: 100%;
    height: 100%;
    background: var(--hvp-primary);
    border: 2px solid var(--hvp-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--hvp-white);
    box-shadow: var(--hvp-shadow-lg);
    transition: all var(--hvp-transition);
}

.kavel-hotspot:hover .kavel-hotspot-inner {
    transform: scale(1.15);
}

.kavel-hotspot.active .kavel-hotspot-inner {
    background: var(--hvp-secondary);
    transform: scale(1.2);
}

.kavel-hotspot[data-status="optie"] .kavel-hotspot-inner { background: var(--hvp-secondary); }
.kavel-hotspot[data-status="verkocht"] .kavel-hotspot-inner { background: var(--hvp-gray-600); cursor: default; }

/* Pulse animation */
.kavel-hotspot::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hvp-primary);
    border-radius: 50%;
    opacity: 0;
    animation: pulse 2s ease-out infinite;
}

.kavel-hotspot[data-status="verkocht"]::before { animation: none; }

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(2); opacity: 0; }
}

/* Legend */
.situatie-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--hvp-gray-700);
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--hvp-white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.legend-dot.beschikbaar { background: var(--hvp-primary); }
.legend-dot.optie { background: var(--hvp-secondary); }
.legend-dot.verkocht { background: var(--hvp-gray-600); }

/* ==========================================================================
   Kavel Popover Modal
   ========================================================================== */
.kavel-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,28,63,0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--hvp-transition);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.kavel-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.kavel-modal {
    background: var(--hvp-white);
    border-radius: 1.5rem;
    max-width: 900px;
    width: 100%;
    height: 88vh;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.kavel-modal-overlay.active .kavel-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.kavel-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--hvp-white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--hvp-primary);
    transition: all var(--hvp-transition);
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.kavel-modal-close:hover {
    background: var(--hvp-cream);
    transform: rotate(90deg);
}

.kavel-modal-content {
    display: flex;
    flex-direction: column;
    height: 88vh;
    overflow: hidden;
}

/* ── Info panel (boven) — scrollbaar ────────────── */
.kavel-info {
    padding: 1.75rem 2rem 1.25rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Two-column features layout */
.kavel-features-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ── Info panel styles ──────────────────────────── */
.kavel-info-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e9ecef;
}

.kavel-info-number {
    font-family: var(--hvp-font-display);
    font-size: 2rem;
    color: var(--hvp-primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.kavel-info-type {
    font-family: var(--hvp-font-body);
    font-size: 0.8rem;
    color: var(--hvp-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.kavel-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.kavel-spec-box {
    background: var(--hvp-cream);
    padding: 0.875rem;
    border-radius: 0.75rem;
    text-align: center;
}

.kavel-spec-box-value {
    font-family: var(--hvp-font-body);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--hvp-primary);
    display: block;
    line-height: 1.2;
}

.kavel-spec-box-label {
    font-size: 0.65rem;
    color: var(--hvp-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.kavel-features {
    margin-bottom: 0;
}

.kavel-features-title {
    font-family: var(--hvp-font-body);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    color: var(--hvp-primary);
}

.kavel-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kavel-features-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--hvp-gray-700);
}

.kavel-features-list li:last-child { border-bottom: none; }

.kavel-features-list li i {
    color: var(--hvp-accent);
    font-size: 1rem;
    flex-shrink: 0;
}

.kavel-actions {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ── Gallery (onder) ────────────────────────────── */
/* ── Gallery strip (onder) ───────────────────────── */
.kavel-gallery {
    flex-shrink: 0;
    background: #fff;
    border-top: 3px solid var(--hvp-secondary);
    overflow: hidden;
}

/* Swipeable strip: toont 3,5 afbeeldingen */
.kavel-gallery-strip {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    height: 200px;
    padding-right: 5px;
    cursor: grab;
}
.kavel-gallery-strip:active { cursor: grabbing; }
.kavel-gallery-strip::-webkit-scrollbar { display: none; }

.kavel-gallery-item {
    flex: 0 0 calc(100% / 3.5);
    height: 100%;
    scroll-snap-align: start;
    overflow: hidden;
    cursor: pointer;
    background: #f8f6f2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kavel-gallery-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s;
}
.kavel-gallery-item:hover img { opacity: 0.82; }

@media (max-width: 767.98px) {
    .kavel-gallery-strip { height: 150px; }
    .kavel-gallery-item { flex: 0 0 calc(100% / 2.5); }
}

/* Vergroot-overlay */
.kavel-gallery-zoom {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(15,28,63,0.96);
    z-index: 20;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.kavel-gallery-zoom.active { display: flex; }

.kavel-gallery-zoom-img {
    max-width: calc(100% - 120px);
    max-height: calc(100% - 60px);
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

.kavel-gallery-zoom-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.kavel-gallery-zoom-close:hover { background: rgba(255,255,255,0.3); }


.kavel-gallery-zoom-counter {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 767.98px) {
    .kavel-modal {
        height: 95vh;
        max-height: 95vh;
        margin: 0.5rem;
        border-radius: 1rem;
    }

    .kavel-modal-content {
        height: 95vh;
    }

    .kavel-info {
        padding: 1.25rem;
    }

    .kavel-features-columns {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   USP Section
   ========================================================================== */
.usp-section {
    background: var(--hvp-primary);
    color: var(--hvp-white);
    padding: 5rem 0;
}

.usp-main-title {
    font-family: var(--hvp-font-display);
    font-size: 2.5rem;
    color: var(--hvp-white);
    margin-bottom: 1rem;
}

.usp-lead {
    font-size: 1.25rem;
    color: var(--hvp-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.usp-text {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.usp-feature {
    background: rgba(255,255,255,0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    height: 100%;
}

.usp-afbeelding-wrap {
    height: 100%;
    min-height: 320px;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.usp-afbeelding {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
    display: block;
}

.usp-feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.25rem;
    color: var(--hvp-accent);
}

.usp-feature h4 {
    font-size: 1rem;
    color: var(--hvp-white);
    margin-bottom: 0.5rem;
}

.usp-feature p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    margin: 0;
    line-height: 1.5;
}

/* Legacy USP styles */
.usp-item {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
}

.usp-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--hvp-accent);
}

.usp-title {
    font-size: 1.25rem;
    color: var(--hvp-white);
    margin-bottom: 1rem;
}

/* ==========================================================================
   Brochure Section - Flipbook
   ========================================================================== */
.brochure-section {
    background: var(--hvp-cream);
}

.brochure-viewer {
    max-width: 1100px;
    margin: 0 auto;
}

/* Flipbook Container */
.flipbook-wrapper {
    background: var(--hvp-white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--hvp-shadow-xl);
    position: relative;
}

.flipbook-wrapper:fullscreen {
    background: #1a1a1a;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flipbook-wrapper:fullscreen .flipbook-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading State */
.flipbook-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--hvp-white);
    z-index: 10;
}

.flipbook-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--hvp-cream);
    border-top-color: var(--hvp-primary);
    border-radius: 50%;
    animation: flipbook-spin 1s linear infinite;
}

.flipbook-spinner-small {
    width: 30px;
    height: 30px;
    border: 3px solid var(--hvp-cream);
    border-top-color: var(--hvp-primary);
    border-radius: 50%;
    animation: flipbook-spin 1s linear infinite;
}

@keyframes flipbook-spin {
    to { transform: rotate(360deg); }
}

.flipbook-loading p,
.flipbook-error p {
    margin-top: 1rem;
    color: var(--hvp-gray-600);
}

.flipbook-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hvp-white);
    z-index: 10;
}

.flipbook-page-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    width: 100%;
}

/* Viewport */
.flipbook-viewport {
    position: relative;
    min-height: 550px;
    overflow: hidden;
    cursor: pointer;
    background: #f0f0f0;
}

.flipbook-zoom-container {
    width: 100%;
    height: 100%;
    transition: transform 0.2s ease;
    transform-origin: center center;
}

.flipbook-book {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Navigation Hints */
.flipbook-nav-hint {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.03);
    color: rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 5;
}

.flipbook-nav-hint:hover {
    background: rgba(0,0,0,0.08);
    color: rgba(0,0,0,0.5);
}

.flipbook-nav-hint-left {
    left: 0;
    border-radius: 0 8px 8px 0;
}

.flipbook-nav-hint-right {
    right: 0;
    border-radius: 8px 0 0 8px;
}

/* Pages */
.flipbook-pages {
    perspective: 2500px;
    width: 100%;
    max-width: 950px;
    position: relative;
}

.flipbook-spread {
    display: flex;
    justify-content: center;
    gap: 2px;
    transform-style: preserve-3d;
}

.flipbook-spread-single {
    justify-content: center;
}

.flipbook-spread-single .flipbook-page {
    max-width: 450px;
}

.flipbook-page {
    flex: 1;
    max-width: 50%;
    background: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    position: relative;
}

.flipbook-page canvas,
.flipbook-page img {
    width: 100%;
    height: auto;
    display: block;
}

.flipbook-page-left {
    transform-origin: right center;
    border-radius: 4px 0 0 4px;
}

.flipbook-page-right {
    transform-origin: left center;
    border-radius: 0 4px 4px 0;
}

/* Empty page (for cover spread) */
.flipbook-page-empty {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.flipbook-page-empty::after,
.flipbook-page-empty::before {
    display: none;
}

/* Page shadow/fold effect */
.flipbook-page-left::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to left, rgba(0,0,0,0.12), transparent);
    pointer-events: none;
}

.flipbook-page-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.12), transparent);
    pointer-events: none;
}

/* Page Turn Animation - Realistic Book Flip */
/* ==========================================================================
   Page Turn Animation — 2D scaleX fold (browser-proof, no backface issues)
   The animation is driven entirely by JS; these classes provide base styles.
   ========================================================================== */

/* The folding page element — JS adds/removes transition & transform inline */
.flipbook-fold-page {
    overflow: hidden;
    background: white;
    position: absolute;
    top: 0;
    height: 100%;
    /* Shadow on the folding edge */
    box-shadow: 0 0 24px rgba(0,0,0,0.18);
    z-index: 10;
}

.flipbook-fold-page img {
    width: 100%;
    height: auto;
    display: block;
    /* pointer-events off so it can't intercept clicks mid-animation */
    pointer-events: none;
}

/* Spine shadow overlay rendered during fold (JS toggles opacity) */
.flipbook-fold-page::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.flipbook-fold-page.folding::after {
    opacity: 1;
}
/* For right→left fold: shadow grows from the right edge (spine side) */
.flipbook-fold-page.fold-right::after {
    background: linear-gradient(to left, rgba(0,0,0,0.22) 0%, transparent 60%);
}
/* For left→right fold: shadow grows from the left edge */
.flipbook-fold-page.fold-left::after {
    background: linear-gradient(to right, rgba(0,0,0,0.22) 0%, transparent 60%);
}

/* Controls */
.flipbook-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--hvp-secondary);
    color: white;
    flex-wrap: wrap;
}

.flipbook-btn {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255,255,255,0.3);
    background: transparent;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.flipbook-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.15);
    border-color: white;
}

.flipbook-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.flipbook-page-info {
    font-size: 1rem;
    min-width: 70px;
    text-align: center;
}

/* Zoom Controls */
.flipbook-zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255,255,255,0.2);
}

.flipbook-zoom-controls .flipbook-btn {
    width: 36px;
    height: 36px;
}

.flipbook-zoom-level {
    font-size: 0.85rem;
    min-width: 45px;
    text-align: center;
}

/* Swiper Thumbnails */
.flipbook-thumbnails {
    background: #f0f0f0;
    padding: 0.75rem 2.5rem;
    position: relative;
}

.flipbook-swiper {
    overflow: hidden;
}

.flipbook-swiper .swiper-wrapper {
    align-items: center;
}

.flipbook-thumb {
    width: 60px !important;
    height: 80px;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
    opacity: 0.5;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flipbook-thumb:hover {
    opacity: 0.8;
    border-color: var(--hvp-secondary);
}

.flipbook-thumb.active {
    opacity: 1;
    border-color: var(--hvp-primary);
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.flipbook-thumb canvas,
.flipbook-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.flipbook-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 25%, #f5f5f5 50%, #e0e0e0 75%);
    background-size: 200% 200%;
    animation: flipbook-shimmer 1.5s ease infinite;
}

@keyframes flipbook-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Swiper Navigation */
.flipbook-swiper-prev,
.flipbook-swiper-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: var(--hvp-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.flipbook-swiper-prev:hover,
.flipbook-swiper-next:hover {
    background: var(--hvp-secondary);
}

.flipbook-swiper-prev {
    left: 0.5rem;
}

.flipbook-swiper-next {
    right: 0.5rem;
}

.flipbook-swiper-prev.swiper-button-disabled,
.flipbook-swiper-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 991px) {
    .flipbook-viewport {
        min-height: 450px;
    }
    .flipbook-book {
        padding: 1rem;
    }
    .flipbook-thumb {
        width: 50px !important;
        height: 65px;
    }
    .flipbook-zoom-controls {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }
    .flipbook-nav-hint {
        width: 40px;
    }
}

/* Mobiel: één pagina per spread, vult volledige breedte */
@media (max-width: 768px) {
    .flipbook-viewport {
        min-height: 200px;
    }
    .flipbook-book {
        padding: 0.5rem;
    }
    /* Spread: één pagina gecentreerd, geen flex-direction:column meer */
    .flipbook-spread {
        flex-direction: row;
        justify-content: center;
        gap: 0;
    }
    /* Enkele pagina vult volledige breedte */
    .flipbook-page {
        max-width: 100%;
        flex: 0 0 100%;
        border-radius: 4px;
    }
    /* Verberg centerschaduw op mobiel */
    .flipbook-page-left::after,
    .flipbook-page-right::before {
        display: none;
    }
    /* Thumbnails kleiner */
    .flipbook-thumbnails {
        padding: 0.5rem 2rem;
    }
    .flipbook-thumb {
        width: 40px !important;
        height: 52px;
    }
    
    .flipbook-controls {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .flipbook-btn {
        width: 38px;
        height: 38px;
    }
    
    .flipbook-zoom-controls {
        order: 10;
        width: 100%;
        justify-content: center;
        margin: 0.5rem 0 0 0;
        padding: 0.5rem 0 0 0;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
    
    .flipbook-nav-hint {
        display: none;
    }
}

/* Fallback embed styles */
.brochure-embed {
    background: var(--hvp-white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--hvp-shadow-xl);
}

.brochure-embed iframe {
    display: block;
    width: 100%;
    min-height: 700px;
    border: none;
}

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.1); }

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15,28,63,0);
    transition: background var(--hvp-transition);
}

.gallery-item:hover::after { background: rgba(15,28,63,0.3); }

/* ==========================================================================
   Location
   ========================================================================== */
.locatie-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.locatie-feature-icon {
    width: 50px;
    height: 50px;
    background: var(--hvp-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hvp-white);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.locatie-feature-content h4 {
    font-family: var(--hvp-font-body);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    margin-top: 0;
    color: var(--hvp-primary);
}

.locatie-feature-content p {
    font-size: 0.875rem;
    color: var(--hvp-gray-600);
    margin: 0;
    line-height: 1.5;
}

.locatie-map {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--hvp-shadow-lg);
}

.locatie-map iframe {
    width: 100%;
    height: 400px;
    border: none;
}

/* ==========================================================================
   Contact Form
   ========================================================================== */
.contact-form {
    background: var(--hvp-white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--hvp-shadow-lg);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hvp-primary);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all var(--hvp-transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--hvp-secondary);
    box-shadow: 0 0 0 3px rgba(196,160,124,0.2);
    outline: none;
}

.form-check-input:checked {
    background-color: var(--hvp-secondary);
    border-color: var(--hvp-secondary);
}

/* ==========================================================================
   Makelaars Section
   ========================================================================== */
.makelaars-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 767px) {
    .makelaars-grid {
        grid-template-columns: 1fr;
    }
}

.makelaar-card {
    background: var(--hvp-white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--hvp-shadow-lg);
}

.makelaar-header {
    background: var(--hvp-cream);
    padding: 1.5rem;
    text-align: center;
}

.makelaar-name {
    font-family: var(--hvp-font-display);
    font-size: 1.5rem;
    color: var(--hvp-primary);
    margin-bottom: 0.25rem;
}

.makelaar-company {
    font-size: 0.875rem;
    color: var(--hvp-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.makelaar-content {
    padding: 1.5rem;
}

.makelaar-quote {
    font-family: var(--hvp-font-display);
    font-size: 1.25rem;
    color: var(--hvp-primary);
    margin-bottom: 1rem;
    font-style: italic;
}

.makelaar-text {
    font-size: 0.9rem;
    color: var(--hvp-gray-600);
    line-height: 1.7;
}

.makelaar-contact {
    padding: 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.makelaar-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.makelaar-contact-item:last-child {
    margin-bottom: 0;
}

.makelaar-contact-item i {
    color: var(--hvp-accent);
    width: 20px;
    text-align: center;
}

.makelaar-contact-item a {
    color: var(--hvp-primary);
}

.makelaar-contact-item a:hover {
    color: var(--hvp-secondary);
}

/* Partners */
.partners-section {
    border-top: 1px solid #e9ecef;
}

.partner-label {
    font-size: 0.75rem;
    color: var(--hvp-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.partner-name {
    font-family: var(--hvp-font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--hvp-primary);
    margin: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--hvp-primary);
    color: var(--hvp-white);
    padding: 5rem 0 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('assets/images/beeldmerk.svg');
    background-size: 500px 500px;
    background-position: bottom right;
    background-repeat: no-repeat;
    opacity: 0.03;
}

.footer-logo { max-width: 180px; margin-bottom: 1.5rem; }

.footer-logo-text {
    font-family: var(--hvp-font-display);
    font-size: 2rem;
    color: var(--hvp-white);
    margin-bottom: 1.5rem;
}

.footer-text {
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    line-height: 1.7;
}

.footer-title {
    font-family: var(--hvp-font-body);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--hvp-secondary);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: 0.5rem; }

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
}

.footer-links a:hover { color: var(--hvp-white); }

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
}

.footer-contact-item i { color: var(--hvp-secondary); margin-top: 3px; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
}

.footer-credits {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    margin-top: 0.5rem;
}

.footer-credits a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color var(--hvp-transition);
}

.footer-credits a:hover {
    color: var(--hvp-white);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--hvp-transition);
}

.lightbox.active { opacity: 1; visibility: visible; }

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 2px solid var(--hvp-white);
    border-radius: 50%;
    color: var(--hvp-white);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--hvp-transition);
}

.lightbox-close:hover {
    background: var(--hvp-white);
    color: var(--hvp-primary);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991.98px) {
    .hero-title { font-size: 3rem; }
    .hero-stats { gap: 2rem; }
    
    .navbar-hvp .navbar-collapse {
        background: var(--hvp-white);
        padding: 1.5rem;
        margin-top: 1rem;
        border-radius: 0.5rem;
        box-shadow: var(--hvp-shadow-lg);
    }
    
    .navbar-hvp .nav-link { color: var(--hvp-primary) !important; }
    
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-item:first-child { grid-column: span 2; grid-row: span 1; }
}

@media (max-width: 767.98px) {
    .section { padding: 3rem 0; }
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-stats { flex-direction: column; gap: 1rem; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; }
    .kavel-panel { max-width: 100%; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item:first-child { grid-column: span 1; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   WordPress Admin Bar Fix
   ========================================================================== */
body.admin-bar .navbar-hvp { top: 32px; }

@media (max-width: 782px) {
    body.admin-bar .navbar-hvp { top: 46px; }
}

/* Screen Reader */
.screen-reader-text {
    clip: rect(1px,1px,1px,1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
}

/* Utilities */
.text-center { text-align: center; }
.img-fluid { max-width: 100%; height: auto; }
.rounded-lg { border-radius: 1rem; }
.shadow-xl { box-shadow: var(--hvp-shadow-xl); }
.w-100 { width: 100%; }
.mb-0 { margin-bottom: 0 !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.g-4 { gap: 1.5rem; }
.g-5 { gap: 3rem; }

/* ==========================================================================
   Contact Form
   ========================================================================== */
.contact-form-section {
    border-top: 1px solid #e9ecef;
}

.contact-form-card {
    background: var(--hvp-white);
    border-radius: 1rem;
    box-shadow: var(--hvp-shadow-lg);
    overflow: hidden;
}

.contact-form-header {
    background: var(--hvp-cream);
    padding: 2rem;
    text-align: center;
}

.contact-form-header h3 {
    font-family: var(--hvp-font-display);
    font-size: 1.75rem;
    color: var(--hvp-primary);
    margin-bottom: 0.5rem;
}

.contact-form-header p {
    color: var(--hvp-gray-600);
    margin: 0;
}

.contact-form {
    padding: 2rem;
}

.contact-form .form-label {
    font-weight: 500;
    color: var(--hvp-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.contact-form .form-control,
.contact-form .form-select {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: border-color var(--hvp-transition), box-shadow var(--hvp-transition);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--hvp-secondary);
    box-shadow: 0 0 0 3px rgba(196, 160, 124, 0.15);
    outline: none;
}

.contact-form .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    border: 1px solid #dee2e6;
}

.contact-form .form-check-input:checked {
    background-color: var(--hvp-secondary);
    border-color: var(--hvp-secondary);
}

.contact-form .form-check-label {
    font-size: 0.875rem;
    color: var(--hvp-gray-600);
    padding-left: 0.5rem;
}

.contact-form .form-check-label a {
    color: var(--hvp-secondary);
    text-decoration: underline;
}

.contact-form .form-message {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
}

.contact-form .form-message.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.contact-form .form-message.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.contact-form .btn-primary {
    padding: 0.875rem 2rem;
}

@media (max-width: 767px) {
    .contact-form-header,
    .contact-form {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Aanmelden Sectie (screenshot-layout)
   ========================================================================== */
.hvp-aanmelden {
    background: var(--hvp-cream);
    padding: 80px 0 100px;
}

.hvp-aanmelden-header { margin-bottom: 2rem; }

.hvp-aanmelden-header h2 {
    font-family: var(--hvp-font-display);
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 600;
    color: var(--hvp-primary);
    margin-bottom: 0.4rem;
}

.hvp-aanmelden-accent {
    width: 40px;
    height: 3px;
    background: var(--hvp-secondary);
    border-radius: 2px;
    margin-bottom: 1rem;
}

.hvp-aanmelden-header p {
    font-size: 1rem;
    color: var(--hvp-primary);
    line-height: 1.6;
    margin: 0;
}

.hvp-aanmelden-grid {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.hvp-aanmelden-form { flex: 1; min-width: 0; }

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

.hvp-form-group {
    flex: 1;
    margin-bottom: 14px;
    min-width: 0;
}

.hvp-form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hvp-primary);
    margin-bottom: 5px;
}

.hvp-form-group input,
.hvp-form-group textarea,
.hvp-form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 6px;
    font-family: var(--hvp-font-body);
    font-size: 0.9375rem;
    color: var(--hvp-primary);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.hvp-form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230f1c3f' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.hvp-form-group textarea { resize: vertical; min-height: 160px; }

.hvp-form-group input:focus,
.hvp-form-group textarea:focus,
.hvp-form-group select:focus {
    outline: none;
    border-color: var(--hvp-secondary);
    box-shadow: 0 0 0 3px rgba(196, 160, 124, 0.12);
}

.hvp-form-disclaimer {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hvp-primary);
    margin-bottom: 1rem;
}

.hvp-btn-aanmelden {
    display: inline-block;
    padding: 14px 40px;
    background: var(--hvp-secondary);
    color: #fff;
    font-family: var(--hvp-font-body);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 200px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
}

.hvp-btn-aanmelden:hover {
    background: var(--hvp-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(196,160,124,0.35);
}

.hvp-form-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9375rem;
    display: none;
}

.hvp-form-message.success { background: rgba(40,167,69,0.1); color: #1a5c2a; border: 1px solid rgba(40,167,69,0.2); }
.hvp-form-message.error   { background: rgba(220,53,69,0.08); color: #842029; border: 1px solid rgba(220,53,69,0.15); }

/* Makelaarskaart (rechts van formulier) */
.hvp-makelaar-kaart {
    width: 280px;
    flex-shrink: 0;
    background: var(--hvp-primary);
    border-radius: 10px;
    padding: 30px 26px;
    color: #fff;
    align-self: flex-start;
    border-top: 3px solid var(--hvp-secondary);
    box-shadow: 0 8px 30px rgba(15,28,63,0.2);
}

.hvp-makelaar-kaart-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 16px;
}

.hvp-makelaar-kaart img {
    max-width: 100%;
    width: 100%;
    margin-bottom: 20px;
    display: block;
}

.hvp-makelaar-kaart p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.8);
    margin-bottom: 3px;
}

.hvp-makelaar-kaart a { color: rgba(255,255,255,0.8); text-decoration: none; }
.hvp-makelaar-kaart a:hover { color: var(--hvp-secondary); }

/* ==========================================================================
   Footer (screenshot-layout: lichte achtergrond, 3 kolommen)
   ========================================================================== */
.hvp-footer-nieuw {
    background: #fff;
    padding: 50px 0 0;
    position: relative;
}

.hvp-footer-nieuw .container { position: relative; z-index: 1; }

.hvp-footer-nieuw-grid {
    display: flex;
    gap: 0;
    padding-bottom: 50px;
    align-items: flex-start;
}

.hvp-footer-nieuw-col {
    padding: 0 40px;
}

/* Kolom 1: Verkoop */
.hvp-footer-nieuw-col:first-child {
    flex: 0 0 auto;
    width: 25%;
    padding-left: 0;
    border-right: 1px solid rgba(0,0,0,0.12);
}

/* Kolom 2: Partners */
.hvp-footer-nieuw-col:nth-child(2) {
    flex: 0 0 auto;
    width: 25%;
    border-right: 1px solid rgba(0,0,0,0.12);
}

/* Kolom 3: Disclaimer */
.hvp-footer-nieuw-col:last-child {
    flex: 1 1 auto;
    padding-right: 0;
}

.hvp-footer-nieuw-col h6 {
    font-family: var(--hvp-font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--hvp-primary);
    margin-bottom: 4px;
}

.hvp-footer-nieuw-col p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--hvp-primary);
    margin-bottom: 2px;
}

.hvp-footer-nieuw-col a { color: var(--hvp-primary); text-decoration: none; }
.hvp-footer-nieuw-col a:hover { color: var(--hvp-secondary); }

.hvp-footer-nieuw-col .hvp-disclaimer-text {
    font-size: 0.8125rem !important;
    line-height: 1.65 !important;
    opacity: 0.8;
}

.hvp-footer-nieuw-bottom {
    border-top: 1px solid rgba(0,0,0,0.08);
    padding: 18px 0;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--hvp-primary);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hvp-footer-nieuw-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.hvp-footer-nieuw-bottom a {
    color: var(--hvp-primary);
    text-decoration: none;
}
.hvp-footer-nieuw-bottom a:hover { color: var(--hvp-secondary); }
.hvp-footer-nieuw-credits { opacity: 0.55; }
.hvp-footer-nieuw-credits a { margin-left: 0; }
.hvp-footer-nieuw-bottom > div:last-child a { margin-left: 1rem; }

@media (max-width: 768px) {
    .hvp-aanmelden-grid { flex-direction: column; }
    .hvp-form-row { flex-direction: column; gap: 0; }
    .hvp-makelaar-kaart { width: 100%; }

    .hvp-footer-nieuw { padding: 40px 0 0; }
    .hvp-footer-nieuw-grid { flex-direction: column; gap: 0; }

    /* Reset alle kolommen volledig op mobiel */
    .hvp-footer-nieuw-col,
    .hvp-footer-nieuw-col:first-child,
    .hvp-footer-nieuw-col:nth-child(2),
    .hvp-footer-nieuw-col:last-child {
        width: 100%;
        flex: 0 0 100%;
        padding: 0 0 24px 0;
        border-right: none;
        border-left: none;
    }
    /* Scheidingslijn tussen kolommen */
    .hvp-footer-nieuw-col + .hvp-footer-nieuw-col {
        border-top: 1px solid rgba(0,0,0,0.1);
        padding-top: 24px;
    }
    .hvp-footer-nieuw-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 16px 0;
    }
    .hvp-footer-nieuw-left { justify-content: center; flex-direction: column; gap: 0.2rem; }
    .hvp-footer-nieuw-credits { display: block; }
    .hvp-footer-nieuw-bottom > div:last-child a { margin-left: 0.5rem; }
}

/* ==========================================================================
   Brochure Gate
   ========================================================================== */
.brochure-gate {
    max-width: 760px;
    margin: 0 auto 2rem;
}

.brochure-gate-inner {
    background: #fff;
    border-radius: 1.25rem;
    padding: 3rem 2.5rem;
    text-align: center;
    box-shadow: 0 20px 50px rgba(15,28,63,.12);
    border: 1px solid rgba(196,160,124,.2);
    position: relative;
    overflow: hidden;
}

.brochure-gate-inner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--hvp-secondary), var(--hvp-primary));
}

.brochure-gate-icon {
    width: 80px; height: 80px;
    background: var(--hvp-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--hvp-secondary);
    font-size: 2rem;
}

.brochure-gate-inner h3 {
    font-family: var(--hvp-font-display);
    color: var(--hvp-primary);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin-bottom: .75rem;
}

.brochure-gate-inner p {
    color: var(--hvp-gray-600, #6c757d);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.brochure-gate-form .form-control {
    border: 2px solid #e8e0d8;
    border-radius: .6rem;
    padding: .75rem 1rem;
}

.brochure-gate-form .form-control:focus {
    border-color: var(--hvp-secondary);
    box-shadow: 0 0 0 3px rgba(196,160,124,.15);
}

.brochure-gate-privacy {
    color: var(--hvp-gray-600, #6c757d);
    font-size: .82rem;
    margin-top: 1rem;
    margin-bottom: 0;
    opacity: .8;
}

.brochure-gate-error {
    color: #dc3545;
    font-size: .9rem;
    margin-top: .75rem;
    padding: .5rem 1rem;
    background: rgba(220,53,69,.08);
    border-radius: .4rem;
    display: inline-block;
}

.brochure-unlocked-notice {
    background: var(--hvp-primary);
    color: #fff;
    border-radius: .75rem;
    padding: .9rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: .95rem;
    text-align: center;
}

.brochure-unlocked-notice .bi-check-circle-fill { color: var(--hvp-secondary); }

@media (max-width: 576px) {
    .brochure-gate-inner { padding: 2rem 1.25rem; }
}

/* ==========================================================================
   Sticky CTA Banner
   ========================================================================== */
.hvp-sticky-cta.modal-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

.hvp-sticky-cta {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: #e15100;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.45s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hvp-sticky-cta.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Navbar omlaag als sticky CTA zichtbaar is */
.hvp-cta-visible .navbar-hvp {
    top: 48px;
}

.hvp-sticky-cta-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 0.65rem 0;
}

.hvp-sticky-cta-text {
    color: rgba(255,255,255,0.9);
    font-size: 0.9375rem;
    line-height: 1.4;
}

.hvp-sticky-cta-text strong {
    color: #fff;
}

.hvp-sticky-cta-btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--hvp-secondary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 200px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.hvp-sticky-cta-btn:hover {
    background: var(--hvp-accent);
    color: #fff;
    transform: translateY(-1px);
}

/* Tablet: CTA past in één rij maar navbar iets omlaag */
@media (max-width: 768px) {
    .hvp-cta-visible .navbar-hvp { top: 50px; }
}

/* Mobiel: CTA gestapeld, navbar verder omlaag */
@media (max-width: 576px) {
    .hvp-sticky-cta-inner { flex-direction: column; align-items: center; text-align: center; gap: 0.4rem; padding: 0.55rem 0; }
    .hvp-sticky-cta-text { font-size: 0.82rem; }
    .hvp-sticky-cta-btn { padding: 0.4rem 1.25rem; font-size: 0.8rem; }
    .hvp-cta-visible .navbar-hvp { top: 84px; }
}

/* ==========================================================================
   Back to top
   ========================================================================== */
#hvp-to-top {
    display: none;
    position: fixed;
    right: 17px;
    bottom: 17px;
    width: 40px;
    height: 40px;
    background-color: var(--hvp-secondary);
    border-radius: 200px;
    color: #fff;
    font-size: 18px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    z-index: 9994;
    transition: background-color 0.2s, transform 0.2s;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(196, 160, 124, 0.3);
}

#hvp-to-top.visible {
    display: block;
}

#hvp-to-top:hover {
    background-color: var(--hvp-accent);
    transform: translateY(-2px);
}

/* ==========================================================================
   Fancybox overrides — kleinere lightbox, niet fullscreen
   ========================================================================== */
.fancybox__container {
    z-index: 99999 !important;
}
.fancybox__backdrop {
    background: rgba(10, 15, 30, 0.88) !important;
}
.fancybox__content {
    max-width: min(85vw, 960px) !important;
    max-height: 80vh !important;
    border-radius: 8px;
    overflow: hidden;
    padding: 0 !important;
}
.fancybox__image {
    object-fit: contain !important;
    max-height: 80vh !important;
}
.fancybox__toolbar {
    background: transparent !important;
}
