/**
 * News Banner Component
 * Displays latest news and announcements with auto-scrolling ticker and gallery preview
 */

/* News Section */
.news-section {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    padding: var(--spacing-2xl) 0;
    position: relative;
    overflow: hidden;
}

.news-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>') repeat;
    pointer-events: none;
}

/* News Banner - Two Column Layout */
.news-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    background: rgba(255, 255, 255, 0.95);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

/* News Main Content */
.news-banner__main {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.news-banner__header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* News Icon */
.news-banner__icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.news-icon {
    font-size: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* News Title */
.news-banner__title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--primary);
    margin: 0;
}

/* News Ticker */
.news-ticker {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.news-ticker__wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
}

.news-ticker__item {
    background: var(--color-background);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    color: var(--color-text);
    font-size: var(--font-size-base);
    line-height: 1.6;
    border: 1px solid var(--color-gray-200);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-fast);
}

.news-ticker__item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.news-ticker__item strong {
    color: var(--primary);
    margin-inline-end: var(--spacing-xs);
    font-weight: var(--font-weight-bold);
}

/* Removed News Actions section - no longer needed */

/* ============================================
   Gallery Preview
   ============================================ */

.news-banner__gallery {
    display: flex;
    flex-direction: column;
}

.gallery-preview {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.gallery-preview__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0;
}

.gallery-preview__grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-md);
    flex: 1;
}

.gallery-preview__item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--color-gray-100);
    transition: all var(--transition-base);
    display: block;
}

.gallery-preview__item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.gallery-preview__item--main {
    grid-row: 1 / 3;
    position: relative;
}

.gallery-preview__item--main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery-preview__item--main:hover::after {
    opacity: 1;
}

.gallery-preview__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-preview__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.9);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery-preview__item--main:hover .gallery-preview__overlay {
    opacity: 1;
}

.gallery-preview__icon {
    font-size: 3rem;
    color: white;
    animation: zoom-in 0.3s ease-out;
}

@keyframes zoom-in {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.gallery-preview__thumbnails {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.gallery-preview__thumbnails .gallery-preview__item {
    aspect-ratio: 1;
}

.gallery-preview__link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    background: #8BC53F;
    border-radius: var(--radius-md);
    color: white;
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-fast);
    border: 2px solid #8BC53F;
}

.gallery-preview__link:hover {
    background: #7AB02F;
    border-color: #7AB02F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 197, 63, 0.4);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .news-banner {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .gallery-preview__grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-preview__item--main {
        grid-row: auto;
        grid-column: 1 / -1;
        aspect-ratio: 16/9;
    }

    .gallery-preview__thumbnails {
        grid-column: 1 / -1;
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .news-section {
        padding: var(--spacing-lg) 0;
    }

    .news-banner {
        padding: var(--spacing-lg);
    }

    .news-banner__header {
        flex-direction: column;
        text-align: center;
    }

    .news-banner__icon {
        width: 45px;
        height: 45px;
    }

    .news-icon {
        font-size: 1.25rem;
    }

    .news-banner__title {
        font-size: var(--font-size-lg);
    }

    .news-ticker__item {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }

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

    .gallery-preview__thumbnails {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-preview__icon {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .news-section {
        padding: var(--spacing-md) 0;
    }

    .news-banner {
        padding: var(--spacing-md);
        gap: var(--spacing-md);
    }

    .news-banner__title {
        font-size: var(--font-size-base);
    }

    .news-ticker__item {
        font-size: var(--font-size-sm);
    }

    .gallery-preview__title {
        font-size: var(--font-size-base);
    }

    .gallery-preview__grid {
        gap: var(--spacing-sm);
    }

    .gallery-preview__thumbnails {
        gap: var(--spacing-xs);
    }

    .gallery-preview__link {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
}
