/**
 * NewsRoom Block Styles
 *
 * Newsroom section with:
 * - Header with label, title, subtitle
 * - Post cards carousel with navigation
 * - CTA button with configurable alignment
 *
 * Based on the EverSmith HTML design (home-newsroom section).
 */

/* ============================================================
   Main Block Container
   ============================================================ */

.newsroom-block {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 80px 80px 80px;
    width: 100%;
    box-sizing: border-box;
    background: rgb(233, 247, 248);
}

/* ============================================================
   Section Header
   ============================================================ */

.newsroom-header {
    text-align: center;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Label crown: theme .es-icon-titles */

/* Section label styling - uses shared .home-section-label class */
.newsroom-header .home-section-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.newsroom-header .home-section-label span {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    color: #0097a7;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Card headlines slightly larger than default .es-card-title */
.newsroom-card .es-card-title {
    font-size: 18px;
    line-height: 1.4;
}

/* ============================================================
   Carousel Wrapper
   ============================================================ */

/* Carousel wrapper: clips the track to show only 2 cards at a time */
.newsroom-carousel {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    overflow: hidden;
}

/* Sliding track — JS drives translateX on this element */
.newsroom-carousel-track {
    display: flex;
    gap: 64px;
    transition: transform 0.45s ease;
}

/* ============================================================
   News Card Styles
   ============================================================ */

/* Each card: fixed width so exactly 2 cards fit in the 1280px container with 64px gap */
.newsroom-card {
    flex: 0 0 608px;    /* (1280 - 64) / 2 = 608px per card to show exactly 2 cards */
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

/* Card image */
.newsroom-card-img {
    flex: 1 0 0;
    aspect-ratio: 1/1;  /* Square aspect ratio */
    max-width: 288px;
    object-fit: cover;
    display: block;
}

/* Placeholder for missing images */
.newsroom-card-img--placeholder {
    background: #e0e0e0;
    min-height: 288px;
}

/* Card content area */
.newsroom-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Tags container */
.newsroom-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Tag pill */
.newsroom-tag {
    display: inline-block;
    background: #eee;
    padding: 4px 12px;
    border-radius: 4px;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    color: var(--smith-grey, #404a50);
}

/* Excerpt text */
.newsroom-card-excerpt {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: var(--smith-grey, #404a50);
}

/* "Read More" link */
.newsroom-read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--link-light-rest, #e57440);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
    margin-top: 8px;
}

.newsroom-read-more span {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.newsroom-read-more::after {
    content: "→";
    display: inline-block;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.newsroom-read-more:hover::after {
    transform: translateX(2px);
}

.newsroom-read-more:hover {
    color: var(--link-light-hover, #f26828);
}

.newsroom-read-more:active {
    color: var(--link-light-pressed, #c87400);
}

.newsroom-read-more:focus-visible {
    outline: 2px solid var(--link-light-pressed, #c87400);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ============================================================
   Carousel Controls
   ============================================================ */

.newsroom-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1280px;
    margin: 32px auto 0;
}

/* Dots */
.newsroom-dots {
    display: flex;
    gap: 8px;
}

.newsroom-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease;
}

.newsroom-dot:hover {
    background: #999;
}

.newsroom-dot.active {
    background: var(--orange, #e57440);
}

.newsroom-dot:focus-visible {
    outline: 2px solid var(--orange, #e57440);
    outline-offset: 2px;
}

/* Arrows - matches original home-newsroom-arrow from index.html */
.newsroom-arrows {
    display: flex;
    gap: 12px;
}

.newsroom-arrow {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.newsroom-arrow img {
    width: 15px;
    height: 11px;
}

/* ============================================================
   CTA Button Container
   ============================================================ */

.newsroom-cta-container {
    width: 100%;
    margin-top: 48px;
}

/* Center alignment (default) */
.newsroom-cta-container--center {
    text-align: center;
}

/* Left alignment */
.newsroom-cta-container--left {
    max-width: 1280px;
    align-self: center;
    text-align: left;
}

/* CTA Button */
.home-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 8px 32px;
    border-radius: 8px;
    background-color: #e57440;
    color: #fff;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.home-cta-btn:hover {
    background-color: #f26828;
    box-shadow: 0px 6px 14px rgba(1, 13, 20, 0.1);
}

.home-cta-btn:active {
    background-color: #c87400;
    box-shadow: none;
}

.home-cta-btn:focus-visible {
    outline: 2px solid #c87400;
    outline-offset: 2px;
}

/* ============================================================
   Responsive Styles - Tablet
   ============================================================ */

@media (max-width: 1024px) {
    .newsroom-block {
        padding: 64px 32px 56px;
        gap: 40px;
    }

    .newsroom-header {
        margin-bottom: 0;
    }

    /* Card width = (960 - 64) / 2 = 448px */
    .newsroom-card {
        flex: 0 0 448px;
        flex-direction: row;
        align-items: flex-start;
    }

    .newsroom-card-img {
        flex: 1 0 0;
        max-width: 200px;
    }

    .newsroom-controls {
        margin-top: 24px;
    }

    .newsroom-cta-container {
        margin-top: 8px;
    }
}

/* ============================================================
   Responsive Styles - Mobile
   ============================================================ */

@media (max-width: 768px) {
    .newsroom-block {
        padding: 48px 20px 40px;
        background: rgb(233, 247, 248);
    }

    .newsroom-header {
        gap: 12px;
    }

    /* Show exactly 1 card per slide on mobile */
    .newsroom-card {
        flex: 0 0 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .newsroom-card-img {
        width: 100%;
        aspect-ratio: 16/9;
        max-width: none;
    }

    .newsroom-card-content {
        gap: 8px;
    }

    .newsroom-controls {
        margin-top: 24px;
    }

    .newsroom-cta-container--left {
        text-align: center;
    }

    .home-cta-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ============================================================
   Small Mobile
   ============================================================ */

@media (max-width: 480px) {
    .newsroom-tag {
        font-size: 12px;
    }

    .newsroom-card .es-card-title {
        font-size: 16px;
    }

    .newsroom-card-excerpt {
        font-size: 14px;
    }
}
