/* TRAVEL-GALLERY.CSS - Styles for individual travel gallery pages (China, Europe, etc.) */

/* ==================== BACK LINK ==================== */

.back-link {
    margin-bottom: 40px;
}

.back-link a {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.back-link a:hover {
    color: #000;
}


/* ==================== GALLERY HEADER ==================== */

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-title {
    font-size: 3.5rem;
    font-weight: 300;
    color: #000;
    margin-bottom: 15px;
}

.gallery-subtitle {
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
}


/* ==================== TRAVELS GRID ==================== */

.travels-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}


/* ==================== TRAVEL ITEMS ==================== */

.travel-item {
    position: relative;
}

.travel-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
}

.travel-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}


/* ==================== CLICK TO EXPAND EFFECT ==================== */

/* Darken other images when one is expanded */
.travels-grid.has-expanded .travel-item:not(.expanded) .travel-image-wrapper {
    opacity: 0.4;
}

/* Expanded image properties */
.travel-item.expanded {
    z-index: 100;
}

.travel-item.expanded .travel-image-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1400px;
    height: auto;
    padding-bottom: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    z-index: 102;
    cursor: pointer;
}

.travel-item.expanded .travel-image-wrapper img {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    transform: scale(1);
}

/* Dark overlay behind expanded image */
.travel-item.expanded::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 101;
    animation: fadeIn 0.3s ease;
}

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

/* Caption below expanded image */
.travel-item.expanded .travel-caption {
    position: fixed;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.2rem;
    z-index: 103;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 12px 24px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Hover effect on thumbnails */
.travel-item:not(.expanded):hover .travel-image-wrapper {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}


/* ==================== TRAVEL CAPTIONS ==================== */

.travel-caption {
    padding: 15px 0;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.3px;
}


/* ==================== RESPONSIVE - TABLET ==================== */

@media (min-width: 768px) and (max-width: 1023px) {
    .travels-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .gallery-title {
        font-size: 3rem;
    }
}


/* ==================== RESPONSIVE - MOBILE ==================== */

@media (max-width: 767px) {
    .gallery-title {
        font-size: 2rem;
    }
    
    .gallery-subtitle {
        font-size: 1rem;
    }
    
    .travels-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
