/* =============================================================================
   News, Events & Official Statements Components
   Site: Trinidad & Tobago Meteorological Service
   Accent color: maroon #4d0000 | Info blue: #2196F3
   ============================================================================= */


/* =============================================================================
   OFFICIAL STATEMENTS SECTION
   ============================================================================= */

.official-statements-section {
    background-color: #e8f4fd;
    border-left: 4px solid #2196F3;
    padding: 1.5rem 1.75rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 2rem;
}

.official-statement-banner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.875rem 1rem;
    margin-bottom: 0.75rem;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.official-statement-banner:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
}

.official-statement-banner:last-child {
    margin-bottom: 0;
}

.statement-icon {
    color: #2196F3;
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.statement-content {
    flex: 1;
    min-width: 0;
}

.statement-headline {
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0;
    line-height: 1.4;
}

.statement-date {
    color: #6c757d;
    font-size: 0.8rem;
    margin-left: auto;
    flex-shrink: 0;
    padding-left: 1rem;
    white-space: nowrap;
    align-self: center;
}


/* =============================================================================
   NEWS & EVENTS CAROUSEL SECTION
   ============================================================================= */

.news-events-carousel {
    position: relative;
    width: 100%;
}

.news-events-swiper {
    padding: 0 2rem 3rem;
    position: relative;
}

.news-events-swiper .swiper-slide {
    height: auto;
}


/* =============================================================================
   NEWS & EVENT CARD (carousel / grid)
   ============================================================================= */

.news-event-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Card icon / cover block */
.news-event-card-icon {
    position: relative;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-event-card-icon i,
.news-event-card-icon .bi {
    font-size: 4rem;
    color: #ffffff;
    opacity: 0.9;
}

/* Type-specific backgrounds */
.news-event-card-icon.type-news {
    background-color: #2f3a42;
}

.news-event-card-icon.type-event {
    background-color: #4d0000;
}

.news-event-card-icon.type-announcement {
    background-color: #2196F3;
}

/* Badge overlaid on the card icon */
.news-event-type-badge {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Card body */
.news-event-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-event-date {
    display: block;
    font-size: 0.78rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.news-event-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.news-event-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.15s ease;
}

.news-event-title a:hover {
    color: #4d0000;
    text-decoration: underline;
}

.news-event-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.news-event-readmore {
    color: #4d0000;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.15s ease, color 0.15s ease;
    margin-top: auto;
}

/* Arrow is provided by <i class="bi bi-arrow-right"> in HTML */

.news-event-readmore:hover {
    color: #660000;
    gap: 0.55rem;
    text-decoration: none;
}


/* =============================================================================
   FILTER BUTTON GROUP
   ============================================================================= */

.news-events-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.news-events-filter .btn-group,
.news-events-filter .filter-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.news-events-filter .btn-filter {
    border-radius: 20px !important;
    padding: 0.375rem 1.1rem !important;
    font-size: 0.875rem !important;
    font-weight: 500;
    color: #4d0000;
    background: transparent;
    border: 1.5px solid #4d0000;
    cursor: pointer;
    line-height: 1.5;
    display: inline-block;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.news-events-filter .btn-filter:hover {
    background: rgba(77, 0, 0, 0.08);
    color: #4d0000;
}

.news-events-filter .btn-filter.active,
.news-events-filter .btn-filter:focus.active {
    background: #4d0000 !important;
    color: #ffffff !important;
    border-color: #4d0000 !important;
    box-shadow: none !important;
}


/* =============================================================================
   NEWS & EVENT LIST ITEMS (listing / archive page)
   ============================================================================= */

.news-events-listing,
.announcements-listing {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

/* Announcements listing: badge column auto-sizes to fit "OFFICIAL STATEMENT" text */
.announcements-listing .list-item-badge {
    width: auto;
}

.page-hero-image {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
}

.news-event-list-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.125rem 0;
    border-bottom: 1px solid #e9ecef;
}

.news-event-list-item:last-child {
    border-bottom: none;
}

/* Fixed-width badge column */
.list-item-badge {
    flex-shrink: 0;
    width: 110px;
    display: flex;
    align-items: flex-start;
    padding-top: 0.125rem;
}

.type-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    color: #ffffff;
    white-space: nowrap;
}

.type-badge.badge-news {
    background-color: #2f3a42;
}

.type-badge.badge-event {
    background-color: #4d0000;
}

.type-badge.badge-announcement {
    background-color: #2196F3;
}

/* Content column */
.list-item-content {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.list-item-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.list-item-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.15s ease;
}

.list-item-title a:hover {
    color: #4d0000;
    text-decoration: underline;
}

.list-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: #6c757d;
    margin-bottom: 0.4rem;
}

.list-item-meta i,
.list-item-meta .bi {
    margin-right: 0.25rem;
}

.list-item-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.55;
    margin-bottom: 0;
}


/* =============================================================================
   DETAIL PAGE
   ============================================================================= */

.news-event-detail {
    padding: 2rem 0;
    text-align: left;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.detail-headline {
    font-size: 1.15rem;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.detail-meta {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #dee2e6;
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.detail-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.75;
    color: #333333;
}

.detail-content p {
    margin-bottom: 1.25rem;
}

.detail-content h2,
.detail-content h3,
.detail-content h4 {
    color: #1a1a1a;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.detail-author-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border-left: 4px solid #4d0000;
    border-radius: 0 6px 6px 0;
    margin-top: 2.5rem;
}

.detail-author-block .author-name {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.detail-author-block .author-role {
    font-size: 0.8rem;
    color: #6c757d;
}


/* =============================================================================
   SWIPER OVERRIDES
   ============================================================================= */

.news-events-swiper .swiper-button-next,
.news-events-swiper .swiper-button-prev {
    color: #4d0000;
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, color 0.2s ease;
}

.news-events-swiper .swiper-button-prev {
    left: -10px;
}

.news-events-swiper .swiper-button-next {
    right: -10px;
}

.news-events-swiper .swiper-button-next:hover,
.news-events-swiper .swiper-button-prev:hover {
    background: #4d0000;
    color: #fff;
    width: 40px;
}

/* Hide theme's Material Icons arrow (::before) — keep only Swiper v11's ::after */
.news-events-swiper .swiper-button-next::before,
.news-events-swiper .swiper-button-prev::before {
    display: none !important;
    content: none !important;
}

.news-events-swiper .swiper-button-next::after,
.news-events-swiper .swiper-button-prev::after {
    font-size: 1rem;
    font-weight: 700;
}

.news-events-swiper .swiper-pagination-bullet-active {
    background: #4d0000;
}

.news-events-swiper .swiper-pagination-bullet {
    transition: background 0.2s ease;
}


/* =============================================================================
   RESPONSIVE — max-width: 768px
   ============================================================================= */

@media (max-width: 768px) {
    /* Official statement banners stack vertically */
    .official-statement-banner {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .statement-date {
        margin-left: 0;
        padding-left: 0;
        align-self: flex-start;
    }

    /* Reduce section padding */
    .official-statements-section {
        padding: 1rem;
    }

    /* Card icon height reduced */
    .news-event-card-icon {
        height: 140px;
    }

    .news-event-card-icon i,
    .news-event-card-icon .bi {
        font-size: 3rem;
    }

    /* Card body padding reduced */
    .news-event-card-body {
        padding: 1rem;
    }

    /* Detail title smaller */
    .detail-title {
        font-size: 1.5rem;
    }

    .detail-headline {
        font-size: 1rem;
    }

    /* Detail content full width */
    .detail-content {
        max-width: 100%;
    }

    /* Filter buttons adjust */
    .btn-filter {
        font-size: 0.8rem;
        padding: 0.3rem 0.9rem;
    }
}


/* =============================================================================
   RESPONSIVE — max-width: 576px
   ============================================================================= */

@media (max-width: 576px) {
    /* Listing items stack vertically */
    .news-event-list-item {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem 0;
    }

    .list-item-badge {
        width: auto;
    }

    /* Shrink news-event-card-icon further */
    .news-event-card-icon {
        height: 120px;
    }

    .news-event-card-icon i,
    .news-event-card-icon .bi {
        font-size: 2.5rem;
    }

    /* Detail meta wraps tightly */
    .detail-meta {
        gap: 0.75rem;
    }

    /* Detail author block tighter */
    .detail-author-block {
        padding: 1rem;
    }
}
