/* Telegram Stream Styles */
.telegram-stream {
    padding: 5rem 0;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.telegram-stream::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 9c-1.4-3.3-4.7-5.5-8.5-5.5-5.2 0-9.5 4.3-9.5 9.5s4.3 9.5 9.5 9.5c3.8 0 7.1-2.2 8.5-5.5 1.4 3.3 4.7 5.5 8.5 5.5 5.2 0 9.5-4.3 9.5-9.5s-4.3-9.5-9.5-9.5c-3.8 0-7.1 2.2-8.5 5.5z' fill='rgba(241, 131, 52, 0.1)' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
}

/* Stream Section Styles */
.stream-section {
    padding: 4rem 0;
    background: var(--background, #f8f9fa);
}

.stream-section h2 {
    text-align: center;
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.stream-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.stream-container {
    position: relative;
    width: 100%;
    padding: 1rem 0;
}

.stream-gallery {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 1rem;
    width: 100%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
}

.stream-gallery::-webkit-scrollbar {
    display: none;
}

.stream-item {
    flex: 0 0 300px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #fff;
    transition: transform 0.3s ease;
    aspect-ratio: 1;
    scroll-snap-align: start;
}

.stream-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.stream-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.stream-item:hover img {
    transform: scale(1.05);
}

.stream-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.stream-item:hover .caption {
    opacity: 1;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

/* Navigation arrows */
.stream-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 2;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.stream-nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    background: var(--primary-dark, #e67423);
}

.stream-nav.prev {
    left: 0;
}

.stream-nav.next {
    right: 0;
}

/* Stream-specific error and loading states */
.stream-error {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Custom lightbox styling for daily stories */
.lb-data .lb-caption {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    padding: 15px !important;
    color: white !important;
    text-align: left !important;
    margin: 0 !important;
    background: rgba(0, 0, 0, 0.9) !important;
}

.lb-data .lb-details {
    width: 100% !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(0, 0, 0, 0.9) !important;
}

.lb-dataContainer {
    position: relative !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

/* Make sure navigation arrows are clearly visible */
.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    opacity: 0.8 !important;
}

.lb-nav a.lb-prev:hover,
.lb-nav a.lb-next:hover {
    opacity: 1 !important;
}

@media (max-width: 768px) {
    .stream-wrapper {
        padding: 0 20px;
    }
    
    .stream-item {
        flex: 0 0 250px;
    }
}

@media (max-width: 480px) {
    .stream-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
    }
}
