/* =========================================
   SPBRA Content Display Styles
   Add this to your existing stylesheet
   ========================================= */

/* =========================================
   IMAGE GALLERY STYLES
   ========================================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    background: #fff;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,146,144,0.3);
}

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
    display: block;
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-caption {
    padding: 15px;
    background: white;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-align: center;
}

/* =========================================
   SLIDESHOW STYLES
   ========================================= */

.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.slideshow-slides {
    position: relative;
    height: 500px;
}

.slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: fadeIn 0.5s;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px 20px 20px;
    font-size: 18px;
    text-align: center;
}

.slide-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,146,144,0.8);
    color: white;
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10;
}

.slide-control:hover {
    background: rgba(0,146,144,1);
}

.slide-control.prev {
    left: 10px;
    border-radius: 0 8px 8px 0;
}

.slide-control.next {
    right: 10px;
    border-radius: 8px 0 0 8px;
}

.slide-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot:hover {
    background: rgba(255,255,255,0.8);
}

.dot.active {
    background: #009290;
    width: 30px;
    border-radius: 6px;
}

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

/* =========================================
   LIGHTBOX STYLES
   ========================================= */

.spbra-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #009290;
}

.lightbox-caption {
    color: white;
    margin-top: 20px;
    font-size: 18px;
    text-align: center;
    max-width: 600px;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,146,144,0.8);
    color: white;
    border: none;
    font-size: 30px;
    padding: 20px 25px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 8px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0,146,144,1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0,0,0,0.5);
    padding: 8px 20px;
    border-radius: 20px;
}

/* =========================================
   RESPONSIVE ADJUSTMENTS
   ========================================= */

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .gallery-image {
        height: 150px;
    }
    
    .slideshow-slides {
        height: 300px;
    }
    
    .slide-control {
        padding: 10px 15px;
        font-size: 18px;
    }
    
    .slide-caption {
        font-size: 14px;
        padding: 20px 15px 15px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        padding: 15px 20px;
        font-size: 24px;
    }
    
    .lightbox-close {
        font-size: 32px;
        top: -40px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .slideshow-slides {
        height: 250px;
    }
    
    .slide-control.prev {
        left: 5px;
    }
    
    .slide-control.next {
        right: 5px;
    }
}

/* =========================================
   CONTENT SECTIONS
   ========================================= */

[data-content] {
    /* Add transition for smooth content updates */
    transition: opacity 0.3s;
}

[data-content].loading {
    opacity: 0.5;
}

/* Single image displays */
[data-image-tag] img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* =========================================
   UTILITY CLASSES
   ========================================= */

.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}
