/**
 * Kiren Fragman Photography Site
 * WHITE MUSEUM AESTHETIC
 * Clean, minimal, professional
 */

/* =====================================================
   RESET & BASE STYLES
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #FFFFFF;
    color: #000000;
    line-height: 1.6;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */

h1 {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

h2 {
    font-size: 1.5em;
    font-weight: normal;
    margin-bottom: 30px;
    letter-spacing: 0.3px;
}

h3 {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

a {
    color: #000000;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.6;
}

/* =====================================================
   HEADER & NAVIGATION
   ===================================================== */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #000000;
    flex-wrap: nowrap;
}

/* Logo - left aligned, scales with viewport */
.header-logo {
    flex-shrink: 0;
    display: block;
    line-height: 0;
    transition: opacity 0.3s ease;
}

.header-logo:hover {
    opacity: 0.7;
}

.header-logo img {
    /* Fluid logo: min 45px, scales with viewport, max 90px */
    height: clamp(45px, 6vw, 90px);
    width: auto;
    display: block;
    object-fit: contain;
}

/* Navigation - right aligned, items scale to fit */
.main-nav {
    display: flex;
    align-items: center;
    gap: clamp(4px, 1vw, 12px);
    flex-shrink: 1;
    flex-wrap: nowrap;
}



.main-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 1px solid #000000;
    background-color: #FFFFFF;
    color: #000000;
    font-weight: normal;
    text-align: center;
    min-width: 120px;
    min-height: 48px;
    height: 48px;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
}

.main-nav a:hover {
    background-color: #000000;
    color: #FFFFFF;
    opacity: 1;
}

.main-nav a.two-line {
    line-height: 1.3;
    padding: 12px 20px;
    min-width: 120px;
    min-height: 48px;
    height: 48px;
}

/* Image Navigation Buttons - Dynamic Scaling */
.main-nav a.nav-img-btn {
    display: inline-block !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    min-width: auto !important;
    min-height: auto !important;
    height: auto !important;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.main-nav a.nav-img-btn:hover {
    background: transparent !important;
    transform: translateY(-2px);
    opacity: 0.8;
}

.main-nav a.nav-img-btn img {
    /* Fluid scaling: min 45px, scales with viewport, max 90px */
    height: clamp(45px, 6vw, 90px);
    width: auto;
    display: block;
    object-fit: contain;
}



.subtitle {
    font-weight: normal;
    margin-bottom: 15px;
    text-align: center;
    line-height: 0;
    width: 100%;
}

.subtitle img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Responsive scaling for subtitle image */
@media (max-width: 767px) {
    .subtitle img {
        width: 100%;
    }
}

/* =====================================================
   LAYOUT CONTAINER (Responsive)
   ===================================================== */

.layout-container {
    display: flex;
    gap: 30px;
    align-items: stretch;
    /* Make aside match slideshow height */
}

/* Mobile: Stack vertically */
@media (max-width: 767px) {
    .layout-container {
        flex-direction: column;
    }
}

/* Desktop: Slideshow left, room nav right */
@media (min-width: 768px) {
    .layout-container {
        flex-direction: row;
    }

    .slideshow-container {
        flex: 3;
        /* Takes ~75% of space */
    }

    .room-navigation {
        flex: 1;
        /* Takes ~25% of space, grows to fill */
        min-width: 150px;
        display: flex;
        flex-direction: column;
    }
}

.slideshow-container {
    width: 100%;
    max-width: 1000px;
}

/* =====================================================
   SLIDESHOW
   ===================================================== */

.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    background-color: #FFFFFF;
    /* Fixed height container - width adjusts based on photo */
    height: 600px;
    max-height: 80vh;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 0s linear 1s;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1s ease-in-out, visibility 0s linear 0s;
    pointer-events: auto;
}

.slide img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
    /* Hide image until loaded, then fade in */
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
    /* NO BORDERS - let photos speak for themselves */
    /* Fixed height, width adjusts to maintain aspect ratio */
}

/* Show image once loaded */
.slide img.loaded {
    opacity: 1;
}

.slide-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 15px;
    font-size: 0.9em;
    border: 1px solid #000000;
    font-weight: normal;
}

/* Timer line - subtle minimalist countdown */
.slide-timer {
    position: absolute;
    bottom: -6px;
    left: 0;
    height: 2px;
    background-color: rgba(0, 0, 0, 0.2);
    width: 100%;
    z-index: 5;
    display: none;
}

.slide-timer.active {
    display: block;
}

.slide-timer-progress {
    height: 100%;
    background-color: #000000;
    width: 0%;
    transition: width 0.1s linear;
}

.no-photos {
    padding: 60px 20px;
    text-align: center;
    font-size: 1.1em;
    color: #666666;
}

/* =====================================================
   PHOTO INFO POPUP (NEW!)
   ===================================================== */

.photo-info-popup {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.85);
    color: #FFFFFF;
    padding: 20px;
    border-radius: 4px;
    z-index: 10;
}

.photo-info-popup h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    font-weight: bold;
}

.photo-info-popup p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.slide:hover .photo-info-popup,
.slide.show-info .photo-info-popup {
    display: block;
}

/* Mobile: Make popup more prominent */
@media (max-width: 767px) {
    .photo-info-popup {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 15px;
    }

    .photo-info-popup h3 {
        font-size: 1.1em;
    }

    .photo-info-popup p {
        font-size: 0.9em;
    }
}

/* =====================================================
   SLIDESHOW CONTROLS (NEW!)
   ===================================================== */

.slideshow-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 20;
}

.slideshow-controls button {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #000000;
    color: #000000;
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.slideshow-controls button:hover {
    background-color: #000000;
    color: #FFFFFF;
}

.slideshow-controls button:active {
    transform: scale(0.95);
}

/* Mobile: Larger touch targets */
@media (max-width: 767px) {
    .slideshow-controls {
        top: 10px;
        right: 10px;
    }

    .slideshow-controls button {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }
}

/* =====================================================
   ROOM NAVIGATION (Zaal Buttons)
   ===================================================== */

.room-navigation {
    width: 220px;
    flex-shrink: 0;
}

.room-navigation a {
    display: block;
    margin-bottom: 15px;
    border: 1px solid #000000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.room-navigation a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 1;
}

.room-navigation img {
    width: 100%;
    height: auto;
    display: block;
}

.room-navigation-grid {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Spread buttons top, middle, bottom */
    height: 100%;
    gap: 15px;
}

/* Mobile: Horizontal layout for room buttons */
@media (max-width: 767px) {
    .room-navigation {
        width: 100%;
        margin-top: 20px;
    }

    .room-navigation-grid {
        flex-direction: row;
        gap: 10px;
        justify-content: center;
    }

    .room-navigation-grid a {
        flex: 1;
        margin-bottom: 0;
    }
}

/* =====================================================
   STATIC PAGES (Over, Contact, Giftshop)
   ===================================================== */

.content-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: #FAFAFA;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
}

.content-page h2 {
    margin-bottom: 30px;
    font-size: 2em;
}

.content-page p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.content-page ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.content-page li {
    margin-bottom: 10px;
}

.contact-info {
    margin-top: 40px;
    padding: 30px;
    border: 1px solid #000000;
    background-color: #FFFFFF;
}

.contact-info a {
    text-decoration: underline;
}

.contact-info a:hover {
    opacity: 0.6;
}

/* =====================================================
   ADMIN PANEL STYLES
   ===================================================== */

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #000000;
}

.admin-header h1 {
    margin: 0;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #FFFFFF;
    color: #000000;
    border: 1px solid #000000;
    text-decoration: none;
    font-weight: normal;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1em;
}

.btn:hover {
    background-color: #000000;
    color: #FFFFFF;
    opacity: 1;
}

.btn-danger {
    background-color: #FFFFFF;
    border-color: #CC0000;
    color: #CC0000;
}

.btn-danger:hover {
    background-color: #CC0000;
    color: #FFFFFF;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

/* Login Form */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    border: 1px solid #000000;
    background-color: #FFFFFF;
}

.login-container h1 {
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #000000;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1em;
    background-color: #FFFFFF;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Upload Form */
.upload-form {
    max-width: 600px;
    margin: 0 auto 40px;
    padding: 30px;
    border: 1px solid #000000;
}

.file-upload-area {
    border: 2px dashed #000000;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.file-upload-area:hover {
    background-color: #F5F5F5;
}

.file-upload-area.drag-over {
    background-color: #E8E8E8;
}

/* Photo Grid (Admin Dashboard) */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.photo-card {
    border: 1px solid #000000;
    padding: 15px;
    background-color: #FFFFFF;
}

.photo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
}

.photo-card-info {
    font-size: 0.9em;
}

.photo-card-info p {
    margin-bottom: 8px;
}

.photo-card-info strong {
    font-weight: bold;
}

.photo-card-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* Messages */
.message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid #000000;
}

.message.success {
    background-color: #E8F5E9;
    border-color: #4CAF50;
    color: #2E7D32;
}

.message.error {
    background-color: #FFEBEE;
    border-color: #F44336;
    color: #C62828;
}

.message.info {
    background-color: #E3F2FD;
    border-color: #2196F3;
    color: #1565C0;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 30px;
    border: 1px solid #000000;
    text-align: center;
}

.stat-card .number {
    font-size: 3em;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.stat-card .label {
    font-size: 1em;
    color: #666666;
}

/* =====================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================== */

@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    h1 {
        font-size: 1.6em;
    }

    h2 {
        font-size: 1.3em;
    }

    /* Keep header side-by-side at all widths */
    header {
        flex-direction: row;
        align-items: center;
    }

    .main-nav {
        gap: 6px;
    }

    /* Only apply to text nav buttons, NOT image buttons */
    .main-nav a:not(.nav-img-btn) {
        padding: 10px 15px;
        min-width: 80px;
        font-size: 0.9em;
    }

    .photo-grid {
        grid-template-columns: 1fr;
    }

    /* Adjust slideshow container for mobile */
    .slideshow-container {
        height: 400px;
        max-height: 70vh;
    }
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}

/* =====================================================
   CMS CONTENT: Responsive Images & Tables
   ===================================================== */

/* Base: all content images are responsive */
.content-page img {
    max-width: 100%;
    height: auto;
}

/* Image size classes (set by TinyMCE editor) */
/* Scoped under .content-page img to beat the base .content-page img rule (specificity 0,2,1 > 0,1,1) */
.content-page img.img-responsive {
    display: block;
    width: 100%;
    height: auto;
    margin: 10px 0;
}

.content-page img.img-medium {
    display: block;
    width: 50%;
    height: auto;
    margin: 10px auto;
}

.content-page img.img-small {
    display: block;
    width: 25%;
    height: auto;
    margin: 10px auto;
}

.content-page img.img-left {
    float: left;
    max-width: 40%;
    margin: 0 15px 10px 0;
    height: auto;
}

.content-page img.img-right {
    float: right;
    max-width: 40%;
    margin: 0 0 10px 15px;
    height: auto;
}

/* Mobile: stacked images instead of floats */
@media (max-width: 600px) {

    .img-medium,
    .img-small {
        width: 100%;
    }

    .img-left,
    .img-right {
        float: none;
        display: block;
        max-width: 100%;
        margin: 10px 0;
    }
}

/* Tables from CMS content */
.content-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.95em;
}

.content-page th,
.content-page td {
    border: 1px solid #ccc;
    padding: 10px 12px;
    text-align: left;
}

.content-page th {
    background-color: #f5f5f5;
    font-weight: bold;
}

/* Images inside table cells: auto-fit to cell */
.content-page td img,
.content-page th img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    float: none;
}

.content-page tr:nth-child(even) {
    background-color: #fafafa;
}

/* Mobile: scrollable tables */
@media (max-width: 600px) {
    .content-page table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content-page th,
    .content-page td {
        padding: 8px;
        font-size: 0.9em;
        white-space: nowrap;
    }
}

/* =====================================================
   GIFTSHOP
   ===================================================== */

.giftshop-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

.giftshop-item {
    display: grid;
    grid-template-columns: 200px 1fr 150px;
    /* Foto | Tekst | Prijs */
    gap: 20px;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* Responsief maken voor telefoons */
@media (max-width: 767px) {
    .giftshop-item {
        grid-template-columns: 1fr;
        /* Alles onder elkaar op mobiel */
        text-align: center;
    }
}

/* =====================================================
   WEB-EXPO BUTTON AFFICHE (Zaal 0)
   ===================================================== */

.affiche-web-expo-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Zorgt voor exact centreren */
    z-index: 30;
    /* Zorgt dat hij boven de foto en animaties ligt */

    display: block;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    text-decoration: none;

    /* Zorg dat de knop niet per ongeluk buiten beeld valt */
    max-width: 90%;
}

.affiche-web-expo-btn img {
    display: block;
    width: clamp(80px, 15vw, 120px);
    height: auto;
    object-fit: contain;
    opacity: 1 !important;
    /* Always visible, overrides .slide img { opacity: 0; } */
    transition: none;
    /* overrides .slide img fade */
}

.affiche-web-expo-btn:hover {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 0.9;
}