/* =========================================== */
/* DCN FOTO GALLERY STYLES - 880px CONTAINER  */
/* =========================================== */

/* Gallery Section Container - Match site width */
.dcn-gallery-section {
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 3px solid var(--dcn-green, #5b991e);
    border-bottom: 3px solid var(--dcn-blue, #2c6ca4);
    margin: 40px auto;
    max-width: 880px;
    border-radius: 8px;
    box-shadow: var(--dcn-shadow, 0 4px 12px rgba(0, 0, 0, 0.08));
}

.dcn-gallery-section .container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.dcn-gallery-section h2 {
    text-align: center;
    color: var(--dcn-blue, #2c6ca4);
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.dcn-gallery-section h2 i {
    margin-right: 10px;
}

.dcn-gallery-section > .container > p {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
}

/* Gallery Container & Navigation */
.dcn-gallery-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    max-width: 820px;
    margin: 0 auto;
}

.gallery-viewport {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--dcn-shadow, 0 4px 12px rgba(0, 0, 0, 0.08));
    flex: 1;
    background: white;
    min-height: 250px;
    max-width: 740px;
}

.gallery-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
}

/* Gallery Items */
.gallery-item {
    flex: 0 0 50%;
    padding: 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid white;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.gallery-item img:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 12px rgba(0,0,0,0.15);
}

.gallery-item-caption {
    margin-top: 10px;
    text-align: center;
    font-size: 0.85rem;
    color: #555;
    padding: 0 8px;
    line-height: 1.3;
    max-height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Navigation Buttons */
.gallery-nav-btn {
    background: var(--dcn-blue, #2c6ca4);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(44, 108, 164, 0.3);
    flex-shrink: 0;
}

.gallery-nav-btn:hover {
    background: var(--dcn-green, #5b991e);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(91, 153, 30, 0.4);
}

.gallery-nav-btn:active {
    transform: translateY(0);
}

.gallery-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

/* Photo Counter */
.photo-counter {
    text-align: center;
    margin-top: 15px;
    color: var(--dcn-green, #5b991e);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Thumbnail Dots */
.thumbnail-dots {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.thumbnail-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s;
}

.thumbnail-dot.active {
    background: var(--dcn-orange, #e67e22);
    transform: scale(1.2);
}

/* =========================================== */
/* LIGHTBOX STYLES (reused from repaircafe)   */
/* =========================================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.lightbox-caption {
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px;
    border-radius: 0 0 8px 8px;
    margin-top: -5px;
    font-size: 1rem;
    text-align: center;
}

.lightbox-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: background 0.3s;
}

.lightbox-close:hover {
    background: var(--dcn-orange, #e67e22);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1001;
}

.lightbox-nav:hover {
    background: var(--dcn-orange, #e67e22);
}

.prev-lightbox {
    left: 15px;
}

.next-lightbox {
    right: 15px;
}

/* =========================================== */
/* RESPONSIVE DESIGN                          */
/* =========================================== */

/* Tablet & Mobile */
@media (max-width: 768px) {
    .dcn-gallery-section {
        max-width: 95%;
        padding: 30px 15px;
        margin: 30px auto;
    }
    
    .dcn-gallery-container {
        gap: 8px;
        max-width: 100%;
    }
    
    .gallery-item {
        flex: 0 0 100%;
    }
    
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        position: absolute;
        z-index: 10;
    }
    
    .prev-btn {
        left: 5px;
    }
    
    .next-btn {
        right: 5px;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    .thumbnail-dots {
        display: flex !important;
    }
    
    .photo-counter {
        margin-top: 35px;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .prev-lightbox {
        left: 10px;
    }
    
    .next-lightbox {
        right: 10px;
    }
}

/* Desktop (2 photos) */
@media (min-width: 769px) and (max-width: 920px) {
    .dcn-gallery-container {
        max-width: 850px;
    }
    
    .gallery-viewport {
        max-width: 770px;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Print Styles */
@media print {
    .dcn-gallery-section {
        break-inside: avoid;
        border: 1px solid #ddd;
        background: white !important;
    }
    
    .gallery-nav-btn,
    .thumbnail-dots,
    .lightbox {
        display: none !important;
    }
}