﻿/* =============================================
   Gallery Detail Pages Styles
   Author: Denny A Devassy
   Date: 2025-10-12
   Note: Also includes styles for Home Page Media Tabs
   ============================================= */

/* =============================================
   HOME PAGE MEDIA TABS - Photo Gallery Grid
   ============================================= */
.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Photo Card for Home Page Tabs */
.photo-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 320px;
}

    .photo-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    }

    .photo-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .photo-card:hover img {
        transform: scale(1.1);
    }

/*.photo-count {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(10px);
}*/

    .photo-count i {
        font-size: 0.85rem;
    }

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.photo-card:hover .photo-overlay {
    transform: translateY(0);
    opacity: 1;
}

.photo-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

 

.photo-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 500;
}

.photo-card h3 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.photo-link {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

    .photo-link::after {
        content: '→';
        transition: transform 0.3s ease;
    }

    .photo-link:hover {
        gap: 0.75rem;
    }

        .photo-link:hover::after {
            transform: translateX(4px);
        }

/* =============================================
   HOME PAGE MEDIA TABS - Video Gallery Grid
   ============================================= */
.videos-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Video Card for Home Page Tabs */
.video-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

    .video-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    }

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #000;
}

    .video-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease, opacity 0.3s ease;
    }

.video-card:hover .video-thumbnail img {
    transform: scale(1.1);
    opacity: 0.8;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

    .video-play-button i {
        color: #c41e3a;
        font-size: 1.5rem;
        margin-left: 4px;
    }

.video-card:hover .video-play-button {
    transform: translate(-50%, -50%) scale(1.15);
    background: #fff;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

    .video-card:hover .video-play-button i {
        color: #0056b3;
    }

.video-duration {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.video-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.video-date {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
}

.video-card h3 {
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.3rem;
    transition: color 0.3s ease;
}

.video-card:hover h3 {
    color: #c41e3a;
}

.video-link {
    color: #c41e3a;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

    .video-link::after {
        content: '→';
        transition: transform 0.3s ease;
    }

    .video-link:hover {
        gap: 0.75rem;
        color: #0056b3;
    }

        .video-link:hover::after {
            transform: translateX(4px);
        }

/* =============================================
   Loading Spinner (Shared)
   ============================================= */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    gap: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #c41e3a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =============================================
   No Content State (Shared)
   ============================================= */
.no-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    gap: 1rem;
    color: #666;
    text-align: center;
}

    .no-content i {
        font-size: 4rem;
        color: #ddd;
    }

    .no-content p {
        font-size: 1.1rem;
        color: #999;
        margin: 0;
    }

/* =============================================
   Responsive - Home Page Tabs
   ============================================= */
@media (max-width: 768px) {
    .photo-gallery-grid,
    .videos-gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .photo-card {
        height: 280px;
    }

    .video-thumbnail {
        height: 200px;
    }

    .video-play-button {
        width: 60px;
        height: 60px;
    }

        .video-play-button i {
            font-size: 1.3rem;
        }
}

@media (max-width: 480px) {
    .photo-card {
        height: 260px;
    }

    .video-thumbnail {
        height: 180px;
    }

    .video-play-button {
        width: 50px;
        height: 50px;
    }

        .video-play-button i {
            font-size: 1.1rem;
        }

    .video-duration {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

/* =============================================
   Detail Section
   ============================================= */
.gallery-detail-section,
.video-detail-section {
    padding:0px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.detail-title-group {
    flex: 1;
}

    .detail-title-group h1 {
        color: #1a1a1a;
        font-size: 2.5rem;
        font-weight: 700;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

.detail-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.detail-date,
.detail-duration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

    .detail-date i,
    .detail-duration i {
        color: #c41e3a;
        font-size: 1rem;
    }

/* =============================================
   Action Buttons
   ============================================= */
.detail-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #c41e3a;
    background: transparent;
    color: #c41e3a;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .action-btn:hover {
        background: #c41e3a;
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    }

    .action-btn i {
        font-size: 1rem;
    }

/* =============================================
   Description
   ============================================= */
.detail-description {
    margin-bottom: 3rem;
    line-height: 1.8;
    color: #444;
    font-size: 1.05rem;
}

    .detail-description p {
        margin-bottom: 1rem;
    }

/* =============================================
   Photo Gallery Container
   ============================================= */
.photo-gallery-container {
    margin-bottom: 4rem;
}

.main-photo-display {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.main-photo-wrapper {
    position: relative;
    width: 100%;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-photo {
    width: 100%;
    height: auto;
    max-height: 700px;
    object-fit: contain;
    display: block;
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    color: #fff;
    padding: 2rem 2rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* =============================================
   Gallery Navigation Arrows
   ============================================= */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

    .gallery-nav:hover:not(:disabled) {
        background: #fff;
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

    .gallery-nav:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

    .gallery-nav.prev {
        left: 1.5rem;
    }

    .gallery-nav.next {
        right: 1.5rem;
    }

    .gallery-nav i {
        color: #c41e3a;
        font-size: 1.2rem;
    }

/* =============================================
   Image Counter
   ============================================= */
.image-counter {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* =============================================
   Thumbnail Gallery
   ============================================= */
.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.thumbnail {
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

    .thumbnail::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .thumbnail:hover::after {
        opacity: 1;
    }

    .thumbnail.active {
        border-color: #c41e3a;
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
    }

        .thumbnail.active::after {
            opacity: 0;
        }

    .thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .thumbnail:hover img {
        transform: scale(1.05);
    }

/* =============================================
   Video Player Container
   ============================================= */
.video-player-container {
    margin-bottom: 3rem;
}

.video-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

    .video-responsive iframe,
    .video-responsive video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

    .video-responsive video {
        background: #000;
    }

/* =============================================
   Related Section
   ============================================= */
 
.related-section {
    margin-bottom:80px;
    background: #f8f9fa;
}

.location-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Optional: Add hover effect */
.location-item:hover .location-icon img {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* RTL Support */
[dir="rtl"] .location-item {
    flex-direction: row-reverse;
}

/*
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0px 0px 40px 0px;
}

    .section-header h2 {
        color: #1a1a1a;
        
        margin: 0;
    }*/

.view-all-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #000000;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

    .view-all-link:hover {
        gap: 0.75rem;
        color: #0056b3;
    }

    .view-all-link i {
        font-size: 0.9rem;
        transition: transform 0.3s ease;
    }

    .view-all-link:hover i {
        transform: translateX(4px);
    }

/* =============================================
   Related Gallery Grid
   ============================================= */
.related-gallery-grid,
.related-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom:150px;
}

/* =============================================
   Related Card (Photos)
   ============================================= */
.related-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

    .related-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    }

.related-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

    .related-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.related-card:hover .related-image img {
    transform: scale(1.1);
}

.related-photo-count {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.5);
    color: rgba(0, 0, 0, 0.75);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.related-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.related-date {
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
}

.related-card h3 {
    color: #1a1a1a;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.related-card:hover h3 {
    color: #c41e3a;
}

.related-link {
    color: #c41e3a;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

    .related-link::after {
        content: '→';
        transition: transform 0.3s ease;
    }

    .related-link:hover {
        gap: 0.75rem;
    }

        .related-link:hover::after {
            transform: translateX(4px);
        }

/* =============================================
   Related Video Card
   ============================================= */
.related-video-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

    .related-video-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    }

.related-video-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #000;
}

    .related-video-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease, opacity 0.3s ease;
    }

.related-video-card:hover .related-video-thumbnail img {
    transform: scale(1.1);
    opacity: 0.8;
}

.related-video-thumbnail .video-play-button {
    width: 50px;
    height: 50px;
}

    .related-video-thumbnail .video-play-button i {
        font-size: 1.2rem;
    }

.related-video-thumbnail .video-duration {
    bottom: 0.75rem;
    right: 0.75rem;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

/* =============================================
   Not Found State
   ============================================= */
.not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 0;
    gap: 1.5rem;
    text-align: center;
}

    .not-found i {
        font-size: 5rem;
        color: #ddd;
    }

    .not-found h2 {
        color: #666;
        font-size: 1.8rem;
        font-weight: 600;
        margin: 0;
    }

.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background: #c41e3a;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        background: #0056b3;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    }

/* =============================================
   No Images State
   ============================================= */
.no-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    gap: 1rem;
    color: #666;
}

    .no-images i {
        font-size: 4rem;
        color: #ddd;
    }

/* =============================================
   Print Styles
   ============================================= */
@media print {
    .detail-actions,
    .gallery-nav,
    .breadcrumb,
    .related-section {
        display: none !important;
    }

    .main-photo-wrapper {
        min-height: auto;
    }

    .detail-header {
        border-bottom: 2px solid #000;
    }
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 1024px) {
    .related-gallery-grid,
    .related-videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .thumbnail-gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 768px) {
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-title-group h1 {
        font-size: 2rem;
    }

    .detail-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .main-photo-wrapper {
        min-height: 400px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
    }

        .gallery-nav.prev {
            left: 1rem;
        }

        .gallery-nav.next {
            right: 1rem;
        }

    .thumbnail-gallery {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.75rem;
    }

    .related-gallery-grid,
    .related-videos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

        .section-header h2 {
            font-size: 1.5rem;
        }
}

@media (max-width: 480px) {
    .detail-title-group h1 {
        font-size: 1.5rem;
    }

    .detail-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .main-photo-wrapper {
        min-height: 300px;
    }

    .gallery-nav {
        width: 35px;
        height: 35px;
    }

        .gallery-nav i {
            font-size: 1rem;
        }

    .thumbnail-gallery {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }

    .photo-caption {
        padding: 1.5rem 1rem 1rem;
        font-size: 0.85rem;
    }
}
