/* Layout für Tourdetails */
.tour-details-section {
    padding: 60px 0 100px;
}

.tour-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.tour-main-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.tour-description-box h2,
.tour-gallery-box h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: var(--primary-color, #023e8a);
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

#tour-description-long {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
}

#tour-description-long p {
    margin-bottom: 15px;
}

#tour-description-long ul {
    margin: 15px 0;
    padding-left: 20px;
}

#tour-description-long li {
    margin-bottom: 8px;
}

/* Sidebar Styling */
.tour-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.sidebar-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    color: var(--primary-color, #023e8a);
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.spotlight-card {
    background: linear-gradient(to bottom, #ffffff, #fcfdff);
}

#tour-spotlight {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 25px;
}

#tour-spotlight ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#tour-spotlight li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
}

#tour-spotlight li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2a9d8f;
    font-weight: bold;
}

.booking-action {
    margin-top: 20px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Termine-Karte */
.dates-card {
    background: #fff;
}

.dates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.date-badge {
    background: #e2eafc;
    color: #023e8a;
    padding: 8px 14px;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #b5c99a;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Galerie-Intro */
.gallery-intro {
    font-family: 'Poppins', sans-serif;
    color: #666;
    margin-bottom: 20px;
}

/* Kleiner Hero-Bereich für Unterseiten */
.hero-section-small {
    position: relative;
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text-color);
    margin-top: 80px; /* Platz für den Header */
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2));
}

.hero-text {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-text h1 {
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero-text p {
    font-size: 1.2rem;
    color: #eee;
    margin-bottom: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--light-text-color);
}

.btn-primary:hover {
    background-color: #e67e00;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 10px 26px;
}
.btn-secondary:hover {
    background-color: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Book Album Styling */
.book-album {
    display: flex;
    background: #f4ecd8; /* Warmes Papier-Beige */
    border: 1px solid #d3c2a0;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12), inset 0 0 40px rgba(0,0,0,0.04);
    position: relative;
    margin: 20px auto;
    max-width: 950px;
    overflow: hidden;
}

/* Mittelfalz */
.book-album::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: linear-gradient(to right, rgba(0,0,0,0.15), rgba(255,255,255,0.1) 50%, rgba(0,0,0,0.15));
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    z-index: 10;
}

.book-page {
    width: 50%;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25px;
    position: relative;
}

.book-page.left-page {
    border-right: 1px solid rgba(0,0,0,0.05);
    background: linear-gradient(to right, #f4ecd8 95%, #e2d5b7 100%);
}

.book-page.right-page {
    background: linear-gradient(to left, #f4ecd8 95%, #e2d5b7 100%);
}

/* Versteckte Bilder */
.hidden-images {
    display: none;
}

/* Fotokarte im Buch */
.book-photo-card {
    background: #fff;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border: 1px solid #e2d5b7;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
    display: flex;
    flex-direction: column;
    max-width: 180px;
    width: 100%;
    box-sizing: border-box;
}

.book-photo-card:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    z-index: 5;
}

.gallery-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 2px;
    transition: opacity 0.2s;
}

.gallery-image:hover {
    opacity: 0.95;
}

/* Handschrift-Stil für Bildunterschriften */
.book-photo-caption {
    font-family: 'Caveat', cursive, sans-serif;
    font-size: 1.2rem;
    color: #333;
    margin: 8px 0 0 0;
    text-align: center;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Lightbox overlay */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 90%;
    max-height: 100%;
}

.lightbox-content {
    max-width: 100%;
    max-height: calc(100vh - 150px);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

.lightbox-caption {
    margin-top: 15px;
    color: #ccc;
    text-align: center;
    font-size: 1.1rem;
    padding: 0 20px;
    font-family: 'Poppins', sans-serif;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover {
    color: #ffd700;
}

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    color: white;
    font-weight: bold;
    font-size: 2rem;
    padding: 16px;
    user-select: none;
    transition: 0.3s;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: #ffd700;
}

/* Responsive Anpassungen */
@media (max-width: 992px) {
    .tour-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .tour-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .book-album {
        flex-direction: column;
        max-width: 100vw;
    }

    .book-album::before {
        display: none;
    }

    .book-page {
        width: 100%;
        padding: 15px;
        gap: 15px;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .book-page.left-page {
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .book-photo-card {
        max-width: 45%;
    }

    .gallery-image {
        height: auto;
    }

    .book-photo-caption {
        font-size: 1.1rem;
    }

    .lightbox {
        flex-direction: column;
        justify-content: center;
        padding: 10px;
    }

    .lightbox-content-wrapper {
        max-width: 100%;
        height: 100%;
        justify-content: flex-start;
        padding-top: 60px;
    }

    .lightbox-content {
        height: 60vh !important;
        max-height: 60vh !important;
        width: auto !important;
        max-width: 100% !important;
        object-fit: contain !important;
    }

    .lightbox-caption {
        height: 25vh !important;
        max-height: 25vh !important;
        width: 100% !important;
        margin-top: 10px !important;
        overflow-y: auto !important;
        padding: 10px !important;
        background-color: rgba(0, 0, 0, 0.5) !important;
        border-radius: 8px !important;
        font-size: 0.9rem !important;
        box-sizing: border-box !important;
        text-align: left !important;
    }

    .lightbox-prev, .lightbox-next {
        position: absolute;
        bottom: 20px;
        font-size: 2.5rem;
        padding: 10px 20px;
        background-color: rgba(0, 0, 0, 0.6);
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next {
        right: 20px;
    }
}

/* Responsive Korrekturen für dynamische HTML-Inhalte (Beschreibung lang) */
#tour-description-long {
    word-break: break-word;
    overflow-wrap: break-word;
}

#tour-description-long table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#tour-description-long img {
    max-width: 100% !important;
    height: auto !important;
}

#tour-description-long div, 
#tour-description-long p, 
#tour-description-long section {
    max-width: 100% !important;
    box-sizing: border-box !important;
}