/* ---
   Specifieke Stylesheet voor de Route Detailpagina (route.php)
   --- */

/* --- Sectie Layouts --- */
.route-content-wrapper {
    position: relative;
    background-color: var(--color-bg);
}
.route-detail__section {
    width: 100%;
    padding: 5rem 3rem;
}
.route-detail__section--primary {
    padding: 6rem 3rem;
    background-color: var(--color-primary);
    color: var(--color-text-light);
}
.route-detail__section--primary h2 {
    color: var(--color-text-light);
}
.route-detail__section--surface {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
}
.route-detail__section--surface h2 {
    color: var(--color-text-light);
}
.route-detail__section--map {
    padding: 0;
}
.route-detail__section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

/* --- Route Parameters --- */
.parameters-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
}
.parameter-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5rem;
}
.parameter-item {
    display: flex;
    align-items: center;
    gap: 20px;
}
.parameter-item--full-width {
    width: 100%;
    justify-content: center;
}
.parameter-item img {
    width: 72px;
    height: 72px;
}
.parameter-item__text h4 {
    margin: 0;
    color: var(--color-accent);
    font-size: 1.1rem;
    text-transform: uppercase;
    opacity: 0.9;
}
.parameter-item__text span {
    font-size: 2rem;
    font-weight: 600;
}
.parameter-item__text .adres {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.8;
    display: block;
}
.download-wrapper {
    text-align: center;
    margin-top: 4rem;
}

/* --- Kaart & Hoogteprofiel --- */
#map {
    height: 60vh;
    width: 100%;
}
#elevation-summary {
    background-color: #f8f9fa;
    padding: 10px 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.9rem;
    color: #555;
    border-top: 1px solid #ddd;
}
#elevation-summary span {
    font-weight: bold;
    color: #000;
}

/* --- Fotogalerij --- */
.photo-gallery-section {
    background-color: var(--color-secondary);
}
.photo-gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}
.photo-gallery-container h2 {
    color: var(--color-text-light);
}
.photo-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}
.gallery-thumbnail {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    position: relative;
    cursor: pointer;
    width: 320px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.gallery-thumbnail:nth-child(5n+1) { transform: rotate(-3deg) translateY(10px); }
.gallery-thumbnail:nth-child(5n+2) { transform: rotate(2deg) translateY(-8px); }
.gallery-thumbnail:nth-child(5n+3) { transform: rotate(3.5deg) translateY(12px); }
.gallery-thumbnail:nth-child(5n+4) { transform: rotate(-2.5deg) translateY(-5px); }
.gallery-thumbnail:hover {
    transform: scale(1.08) rotate(0deg) !important;
    z-index: 10;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}
.gallery-thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; visibility: hidden; opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox:target { visibility: visible; opacity: 1; }
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.lightbox:target .lightbox-content { animation: fadeInScale 0.3s ease; }
.lightbox-content { position: relative; max-width: 90vw; max-height: 90vh; }
.lightbox-content img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }

/* --- BIJGEWERKT: Lightbox Knoppen met nieuwe positie kruisje --- */
.lightbox-close, .lightbox-nav {
    position: absolute;
    z-index: 10000;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    transition: background-color 0.2s ease;
}
.lightbox-close:hover, .lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.6);
}
/* Grote schermen */
.lightbox-close {
    top: -22px; /* AANGEPAST: Positie boven de foto */
    right: -22px; /* AANGEPAST: Positie boven de foto */
    width: 44px;
    height: 44px;
}
.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
/* Iconen in de knoppen */
.lightbox-close img {
    width: 28px;  /* AANGEPAST: Icoon groter gemaakt */
    height: 28px; /* AANGEPAST: Icoon groter gemaakt */
}
.lightbox-nav img {
    width: 24px;
    height: 24px;
}


/* --- Beoordelingen --- */
.reviews-wrapper {
    background-color: var(--color-primary);
}
.reviews-container {
    max-width: 900px;
    margin: 0 auto;
}
.reviews-container h2 {
    color: var(--color-text-light);
}
.review-item {
    background-color: #40a0a0;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #FFFFFF;
}
.review-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}
.review-header strong {
    color: #FFFFFF;
    font-size: 1.4rem;
}
.review-body {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.review-main-content {
    flex: 1;
}
.review-ratings-table {
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 400px;
    border-collapse: collapse;
}
.review-ratings-table td {
    padding: 8px 0;
    vertical-align: middle;
    font-size: 1.1rem;
}
.review-ratings-table td:first-child {
    padding-right: 2rem;
    font-weight: 600;
}
.review-stars {
    color: var(--color-accent);
    font-size: 1.3rem;
    letter-spacing: 3px;
}
.review-comment {
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.7;
}
.review-photos {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 220px;
    flex-shrink: 0;
}
.review-photos a {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.review-photos img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.review-photos a:hover img {
    transform: scale(1.1);
}

/* --- GPX Disclaimer --- */
.disclaimer-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s 0.3s; }
.disclaimer-overlay.is-visible { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }
.disclaimer-popup { background-color: var(--color-secondary); color: var(--color-text-light); padding: 2rem; border-radius: 10px; max-width: 500px; width: 90%; box-shadow: 0 10px 30px rgba(0,0,0,0.4); transform: scale(0.9); transition: transform 0.3s ease; }
.disclaimer-overlay.is-visible .disclaimer-popup { transform: scale(1); }
.disclaimer-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 1.5rem; }
.disclaimer-btn { padding: 10px 20px; font-size: 1rem; }
.disclaimer-btn--cancel { background-color: #d3d3d3; color: #333; box-shadow: 0 4px #b0b0b0; }
.disclaimer-btn--cancel:hover { background-color: #e0e0e0; }
.disclaimer-btn--cancel:active { transform: translateY(2px) scale(0.98); box-shadow: 0 2px #b0b0b0; }

/* --- Responsive Aanpassingen --- */
@media (max-width: 768px) {
    .review-body { flex-direction: column; }
    .review-photos { width: 100%; }

    /* AANGEPAST: Correcte stijlen voor lightbox-knoppen op mobiel */
    .lightbox-close {
        top: -19px; /* AANGEPAST: Positie boven de foto */
        right: -19px; /* AANGEPAST: Positie boven de foto */
        width: 38px;
        height: 38px;
    }
    .lightbox-nav {
        width: 44px;
        height: 44px;
    }
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
    
    .lightbox-close img {
        width: 22px; /* AANGEPAST: Icoon groter gemaakt */
        height: 22px; /* AANGEPAST: Icoon groter gemaakt */
    }
    .lightbox-nav img {
        width: 20px;
        height: 20px;
    }
    /* --- Einde aanpassing lightbox-knoppen --- */

    .parameter-group {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .parameters-container {
        display: flex;
        flex-direction: column;
    }
}