/* =========================================================
 * FRONTEND CSS - TRIP LOG PRO
 * ========================================================= */

/* --- 1. HERO GALLERY (Single Image) --- */
.tlp-hero-single {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0; /* Hapus spasi di bawah gambar */
}

.tlp-main-image {
    width: 100%;
    height: auto;
    display: block;
}

/* --- 2. TRIP DETAILS CARD --- */
.tlp-trip-details {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tlp-trip-details h2 {
    margin-top: 0;
    font-size: 20px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: inline-block;
}

.tlp-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.tlp-detail-item {
    display: flex;
    flex-direction: column;
}

.tlp-detail-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 700;
}

.tlp-detail-value {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* --- 3. MANUAL DESCRIPTION --- */
.tlp-manual-description-block {
    background: #f8f9fa;
    border-left: 5px solid #0073aa;
    padding: 20px 25px;
    margin-bottom: 30px;
    border-radius: 4px;
    font-style: italic;
    color: #555;
}

/* --- 4. CONTENT WRAPPER --- */
.tlp-main-content {
    margin-bottom: 40px;
    line-height: 1.6;
}

/* --- 5. DOCUMENTATION (SLIDER & GRID) --- */
.tlp-documentation {
    margin: 40px 0;
}

.tlp-documentation h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

/* Default Grid Layout */
.tlp-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.tlp-doc-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.tlp-doc-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.tlp-doc-item a:hover img {
    transform: scale(1.05);
}

/* Slider Layout */
.tlp-doc-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 0 50px; /* Ruang untuk panah navigasi */
    min-height: 300px;
    background: #f0f0f1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tlp-doc-slider .tlp-doc-item {
    display: block; /* Override grid */
    width: 100%;
    text-align: center;
}

.tlp-doc-slider .tlp-doc-item img {
    max-height: 500px;
    height: auto;
    width: auto;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tlp-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
}

.tlp-slider-nav:hover {
    background: #212121;
    transform: translateY(-50%) scale(1.1);
}

.tlp-slider-nav.tlp-prev { left: 10px; }
.tlp-slider-nav.tlp-next { right: 10px; }

/* --- 6. RELATED TRIPS (Card Style - No Hover) --- */
.tlp-related-trips {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.tlp-related-trips h2 {
    font-size: 22px;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
}

/* Grid untuk Related Trips dengan Card */
.tlp-related-grid-card {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.tlp-related-card-item {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
}

.tlp-related-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tlp-related-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #e0e0e0;
}

.tlp-related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tlp-related-card-content {
    padding: 18px 20px;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
    border-top: 1px solid #e8e8e8;
}

.tlp-related-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    text-align: center;
}

/* Legacy Related Grid (untuk kompatibilitas) */
.tlp-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.tlp-related-item {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
}

.tlp-related-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.tlp-related-item h3 {
    font-size: 16px;
    margin: 15px 20px;
    margin-bottom: 15px;
}

.tlp-related-item h3 a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
}

.tlp-related-meta {
    padding: 0 20px 20px;
    font-size: 13px;
    color: #777;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Responsive untuk Related Trips Card */
@media (max-width: 768px) {
    .tlp-related-grid-card {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .tlp-related-card-image {
        height: 160px;
    }
    
    .tlp-related-card-content {
        padding: 14px 15px;
    }
    
    .tlp-related-card-title {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .tlp-related-grid-card {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tlp-related-card-image {
        height: 180px;
    }
}

/* --- 7. SHORTCODE GRID --- */
.tlp-shortcode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.tlp-shortcode-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.tlp-item-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.tlp-item-content {
    padding: 20px;
}

.tlp-item-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.tlp-item-content h3 a {
    text-decoration: none;
    color: #0073aa;
}

.tlp-item-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    display: block;
}

.tlp-item-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* --- 8. LIGHTBOX (Overlay) --- */
/* Catatan: Sebagian besar style ada di inline JS,
   ini tambahan untuk responsivitas dan animasi halus */
#tlp-custom-overlay {
    backdrop-filter: blur(5px); /* Efek blur background */
    -webkit-backdrop-filter: blur(5px);
}

#tlp-overlay-img {
    transition: transform 0.3s ease;
}

/* Responsive Mobile Fixes */
@media (max-width: 768px) {
    .tlp-details-grid {
        grid-template-columns: 1fr;
    }

    .tlp-doc-slider {
        padding: 0 35px;
        min-height: 200px;
    }

    .tlp-slider-nav {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    #tlp-overlay-img {
        max-width: 95% !important;
        max-height: 80% !important;
    }
}
