/* assets/css/section-models.css */

.section-models-max {
    position: relative;
    width: 100%;
    min-height: 900px;
    background-color: var(--color-white);
    padding: 100px 0;
    overflow: hidden;
}

/* --- DECORATION --- */
.models-bg-decor {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

.decor-circle {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 60vw;
    height: 60vw;
    border: 1px solid rgba(0,0,0,0.03);
    border-radius: 50%;
}

.decor-line {
    position: absolute;
    top: 20%;
    left: 10%;
    width: 1px;
    height: 60%;
    background: linear-gradient(to bottom, transparent, var(--color-gold), transparent);
    opacity: 0.3;
}

.models-container {
    position: relative;
    z-index: 2;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- TABS --- */
.model-tabs {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 60px;
    border-bottom: 1px solid var(--color-platinum);
    padding-bottom: 20px;
}

.model-tab {
    background: none;
    border: none;
    cursor: pointer;
    text-align: center;
    padding: 10px 20px;
    opacity: 0.5;
    transition: all 0.3s ease;
    position: relative;
}

.model-tab:hover,
.model-tab.active {
    opacity: 1;
}

.model-tab.active::after {
    content: '';
    position: absolute;
    bottom: -21px; /* Op de rand van de border-bottom */
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-gold);
}

.tab-sub {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-gold);
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.tab-main {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-main);
}

/* --- THE STAGE --- */
.models-stage {
    position: relative;
    min-height: 600px;
}

.model-panel {
    display: none; /* Hidden by default */
    animation: fadeInPanel 0.8s ease forwards;
}

.model-panel.active {
    display: block;
}

@keyframes fadeInPanel {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.model-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Info smaller, Visual bigger */
    gap: 60px;
    align-items: center;
}

/* INFO COLUMN */
.model-big-title {
    font-size: 4.5rem;
    line-height: 1;
    margin: 0 0 30px 0;
    color: var(--color-text-main);
}

.model-big-title .text-gold {
    color: var(--color-gold);
    font-family: serif;
    font-style: italic;
}

.model-desc {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text-light);
    margin-bottom: 40px;
    max-width: 400px;
}

/* Circular Specs */
.specs-circles {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.spec-circle {
    width: 100px;
    height: 100px;
    position: relative;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
}

.circular-chart.gold .circle { stroke: var(--color-gold); }

@keyframes progress {
    0% { stroke-dasharray: 0 100; }
}

.circle-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.cc-val {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1;
}

.cc-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.spec-list-minimal {
    border-left: 1px solid var(--color-platinum);
    padding-left: 20px;
}

.sl-item {
    font-size: 0.9rem;
    color: var(--color-text-main);
    margin-bottom: 5px;
}

.btn-model-max {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--color-text-main);
    color: var(--color-white);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn-model-max:hover {
    background-color: var(--color-gold);
    transform: translateX(5px);
}

/* --- X-RAY VISUAL COLUMN --- */
.xray-wrapper {
    position: relative;
    width: 100%;
    height: 500px; /* Vaste hoogte */
    overflow: hidden;
    cursor: ew-resize; /* Laat zien dat je kan slepen */
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    border: 1px solid var(--color-platinum);
}

.xray-layer {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    overflow: hidden;
}

.xray-layer.bottom {
    width: 100%;
    background: #f0f0f0; /* Fallback */
}

.xray-layer.top {
    z-index: 2;
    border-right: 2px solid var(--color-gold); /* De snijlijn */
}

.xray-layer img {
    position: absolute; /* Belangrijk voor uitlijning */
    top: 0; left: 0;
    width: auto;
    height: 100%;
    max-width: none; /* Voorkom dat image responsive wordt binnen de container */
    /* Hier is de truc: De afbeelding moet even groot zijn als de container 
       ook als de div kleiner wordt. Dus we zetten width op container width via JS 
       of gebruiken object-fit cover op full width */
    width: 100%; /* In dit geval: Zorg dat de afbeeldingen even groot zijn */
    object-fit: cover;
}

/* Omdat top layer width verandert, moet de image daarin NIET mee schalen.
   We moeten de breedte van de image forceren naar de breedte van de wrapper */
.xray-wrapper img {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    object-position: center;
}
/* Voor de Top layer moet de image width vast blijven staan */
.xray-layer.top img {
    width: 100%; /* Relatief aan wrapper? Nee. */
    /* Hack: we gebruiken een iets andere techniek in CSS voor de slider */
}

/* Betere X-Ray CSS fix */
.xray-wrapper {
    position: relative;
}
.xray-layer.bottom img,
.xray-layer.top img {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    display: block;
}

/* De Top layer is de "container" die kleiner wordt. 
   De image daarin moet even breed blijven als de parent (.xray-wrapper). 
   Dat kan met min-width */
.xray-layer.top img {
    min-width: 100%; 
    width: auto;
}
/* Wacht, min-width 100% relateert aan de .top div. 
   We moeten de breedte van de image vastzetten op de breedte van de wrapper.
   JavaScript update is het veiligst, maar we proberen: */
.xray-wrapper {
    /* Zorg dat de wrapper een vaste width heeft in pixels of % */
}
/* In de JS update ik straks de breedte van de afbeelding NIET, 
   maar de afbeelding in .top moet gewoon full width blijven ten opzichte van de wrapper. 
   Oplossing: Stel de image in .top in op de breedte van de .visual-col */

.layer-label {
    position: absolute;
    bottom: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--color-white);
    background: rgba(0,0,0,0.5);
    padding: 5px 10px;
    backdrop-filter: blur(5px);
    pointer-events: none;
}
.bottom .layer-label { right: 20px; }
.top .layer-label { left: 20px; }

/* The Handle */
.xray-handle {
    position: absolute;
    top: 0; bottom: 0;
    width: 40px;
    margin-left: -20px; /* Centreren */
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Klikken gaat door naar wrapper */
}

.handle-line {
    width: 2px;
    height: 100%;
    background: var(--color-gold);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.handle-circle {
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    background: var(--color-gold);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .model-grid {
        grid-template-columns: 1fr;
    }
    .model-info-col {
        order: -1;
        text-align: center;
    }
    .specs-circles {
        justify-content: center;
    }
    .spec-list-minimal {
        text-align: left;
    }
}