/* Gallery Page Styles - Modular Version */

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb-link {
    color: #014385;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: #D4A017;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #999;
}

.breadcrumb-current {
    color: #666;
    font-weight: 500;
}

/* Gallery Header */
.gallery-header {
    background: linear-gradient(135deg, #014385 0%, #0A5CAA 100%);
    color: white;
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.gallery-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.gallery-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.inline-link {
    color: white;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all 0.3s ease;
}

.inline-link:hover {
    color: #FFB627;
    text-decoration-thickness: 2px;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.trust-badges span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

/* Gallery Container */
.gallery-container {
    min-height: 200px;
}

/* Carousel Wrapper */
.gallery-carousel-wrapper {
    max-width: 1400px;
    margin: 0 auto 0;
    position: relative;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Horizontal Scrolling Carousel - 2 Row Layout */
.gallery-carousel {
    display: grid;
    grid-template-rows: repeat(2, 240px);
    grid-auto-flow: column;
    grid-auto-columns: 320px;
    gap: 1.5rem 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #D4A017 #e0e0e0;
    -webkit-overflow-scrolling: touch;
    padding: 0 0.5rem;
}

.gallery-carousel::-webkit-scrollbar {
    height: 8px;
}

.gallery-carousel::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
    margin: 0 1rem;
}

.gallery-carousel::-webkit-scrollbar-thumb {
    background: #D4A017;
    border-radius: 4px;
}

.gallery-carousel::-webkit-scrollbar-thumb:hover {
    background: #FFB627;
}

/* Carousel Item Styling */
.gallery-item-carousel {
    width: 320px;
    height: 240px;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

/* Zigzag Pattern: Alternate Rows */
.gallery-item-carousel:nth-child(odd) {
    grid-row: 1;
}

.gallery-item-carousel:nth-child(even) {
    grid-row: 2;
}

/* Carousel Navigation Arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gallery-carousel-wrapper:hover .carousel-nav {
    opacity: 1;
}

.carousel-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    border-color: #D4A017;
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.5);
}

.carousel-nav-prev {
    left: -25px;
}

.carousel-nav-next {
    right: -25px;
}

.carousel-nav i {
    font-size: 1.5rem;
    color: #014385;
}

/* Gradient Fade Effects */
.carousel-fade-left,
.carousel-fade-right {
    position: absolute;
    top: 2rem;
    bottom: 50px;
    width: 80px;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.carousel-fade-left {
    left: 0;
    background: linear-gradient(to right, #f8f9fa, transparent);
    border-radius: 12px 0 0 12px;
}

.carousel-fade-right {
    right: 0;
    background: linear-gradient(to left, #f8f9fa, transparent);
    border-radius: 0 12px 12px 0;
}

.carousel-fade-left.hidden,
.carousel-fade-right.hidden {
    opacity: 0;
}

/* Progress Indicator */
.carousel-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-bottom: 0.5rem;
}

.carousel-progress-counter {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.carousel-progress-dots {
    display: flex;
    gap: 0.5rem;
}

.carousel-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    padding: 0;
}

.carousel-progress-dot.active {
    background: #D4A017;
    width: 24px;
    border-radius: 4px;
}

.carousel-progress-dot:hover:not(.active) {
    background: #999;
    transform: scale(1.2);
}

/* Service Section */
.service-section {
    padding: 3rem 2rem 2rem;
    border-top: 1px solid #e0e0e0;
}

.service-section:first-of-type {
    border-top: none;
}

.service-header {
    max-width: 1400px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.service-header-content {
    flex: 1;
    min-width: 300px;
}

.service-header h2 {
    color: #014385;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-header h2 i {
    color: #D4A017;
    font-size: 1.8rem;
}

.service-header p {
    color: #666;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Service Header Actions */
.service-header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
}

.browse-more-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #014385;
    border: 2px solid #014385;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.browse-more-btn:hover {
    background: #014385;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(1,67,133,0.2);
}

.see-all-btn {
    padding: 0.75rem 1.5rem;
    background: #D4A017;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.see-all-btn:hover {
    background: #FFB627;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212,160,23,0.3);
}

/* Gallery Grid (legacy - for non-carousel items if needed) */
.gallery-grid {
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.service-cta-btn:hover {
    background: #D4A017;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 67, 133, 0.2);
}

/* Gallery Grid */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 1.5rem 1rem 1rem;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    transform: translateY(0);
}

.gallery-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.gallery-item-category {
    font-size: 0.9rem;
    opacity: 0.9;
}

.location-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(212, 160, 23, 0.95);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.project-details {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.detail-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: white;
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: #f0f0f0;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.3);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.5);
}

.lightbox-prev { left: -70px; }
.lightbox-next { right: -70px; }

.lightbox-caption {
    text-align: center;
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading i {
    font-size: 3rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* CTA Section */
.gallery-cta {
    background: linear-gradient(135deg, #014385 0%, #0A5CAA 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 3rem;
}

.gallery-cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.gallery-cta p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.cta-btn-primary {
    background: #D4A017;
    color: #014385;
}

.cta-btn-primary:hover {
    background: #FFB627;
    transform: translateY(-2px);
}

.cta-btn-secondary {
    background: white;
    color: #014385;
}

.cta-btn-secondary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* FAQ Section */
.gallery-faq {
    background: #f8f9fa;
    padding: 3rem 2rem;
}

.faq-container {
    max-width: 1200px;
    margin: 0 auto;
}

.faq-container h2 {
    text-align: center;
    color: #014385;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.faq-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #D4A017;
}

.faq-item h3 {
    color: #014385;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.faq-item h3 i {
    color: #D4A017;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.faq-item p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.faq-item a {
    color: #014385;
    text-decoration: none;
    font-weight: 600;
}

.faq-item a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Carousel: Single Row Layout on Mobile */
    .gallery-carousel {
        grid-template-rows: 210px;
        grid-auto-columns: 280px;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .gallery-item-carousel {
        width: 280px;
        height: 210px;
        grid-row: 1 !important; /* Override zigzag pattern */
    }
    
    /* Hide arrow buttons on mobile (gesture-based scrolling) */
    .carousel-nav {
        display: none;
    }
    
    /* Adjust carousel wrapper */
    .gallery-carousel-wrapper {
        padding: 1.5rem 0.75rem;
        border-radius: 8px;
    }
    
    /* Larger progress dots for touch */
    .carousel-progress-dot {
        width: 10px;
        height: 10px;
    }
    
    .carousel-progress-dot.active {
        width: 10px;
        transform: scale(1.3);
    }
    
    .carousel-progress-counter {
        font-size: 0.85rem;
    }
    
    /* Fade overlays narrower */
    .carousel-fade-left,
    .carousel-fade-right {
        width: 40px;
    }
    
    /* Service Header Stacking */
    .service-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .service-header-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .browse-more-btn,
    .see-all-btn {
        width: 100%;
        justify-content: center;
        font-size: 0.95rem;
        padding: 0.75rem 1.25rem;
    }
    
    .service-header h2 {
        font-size: 1.6rem;
    }
    
    .service-header p {
        font-size: 1rem;
    }
    
    /* Other Mobile Adjustments */
    .breadcrumb-nav {
        padding: 0.75rem 1rem;
    }
    
    .breadcrumb-container {
        font-size: 0.85rem;
    }
    
    .gallery-header {
        padding: 2rem 1rem 1.5rem;
    }
    
    .gallery-header h1 {
        font-size: 1.6rem;
    }
    
    .gallery-header p {
        font-size: 1rem;
    }
    
    .trust-badges {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    .gallery-cta h2 {
        font-size: 1.5rem;
    }
    
    .cta-btn {
        font-size: 1rem;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-container h2 {
        font-size: 1.5rem;
    }
    
    .service-section {
        padding: 2rem 1rem;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .gallery-carousel {
        scroll-behavior: auto;
    }
    
    .carousel-nav,
    .gallery-item,
    .gallery-item-carousel,
    .browse-more-btn,
    .see-all-btn {
        transition: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .carousel-nav {
        border: 3px solid currentColor;
    }
    
    .carousel-progress-dot {
        border: 2px solid currentColor;
    }
    
    .carousel-progress-dot.active {
        background: currentColor;
    }
}
