/**
 * News Hero Styles
 * Artsy, innovative news display
 *
 * Brand:
 *   Primary: #632DE9 | Secondary: #39AF91 | Text: #0F3737
 *   Accent: #FAB295 | Interactive: #A7E8DB
 *   Fonts: Josefin Sans (headings), Lato (body), Poppins (accent)
 */

/* Variables */
:root {
    --news-primary: #632DE9;
    --news-secondary: #39AF91;
    --news-text: #0F3737;
    --news-accent: #FAB295;
    --news-interactive: #A7E8DB;
    --news-bg-light: #F1F0F6;
    --news-bg-muted: #BDB6D9;
}

/* =====================
   BASE STYLES
   ===================== */
.news-hero {
    display: grid;
    gap: 1.5rem;
}

.news-hero__card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease;
}

a.news-hero__card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 40px rgba(99, 45, 233, 0.15);
}

/* Image */
.news-hero__image {
    position: relative;
    overflow: hidden;
}

.news-hero__image-inner {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
}

.news-hero__image-inner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

a.news-hero__card:hover .news-hero__image-inner img {
    transform: scale(1.08);
}

/* Gradient overlay */
.news-hero__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(15, 55, 55, 0.9) 0%, transparent 100%);
    pointer-events: none;
}

/* Content */
.news-hero__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-grow: 1;
}

/* Category badge */
.news-hero__category {
    display: inline-block;
    align-self: flex-start;
    padding: 0.35rem 0.85rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(135deg, var(--news-primary), var(--news-secondary));
    border-radius: 20px;
}

/* Title */
.news-hero__title {
    margin: 0;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--news-text);
}

a.news-hero__card:hover .news-hero__title {
    color: var(--news-primary);
}

/* Excerpt */
.news-hero__excerpt {
    margin: 0;
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #5a6b6b;
}

/* Date */
.news-hero__date {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: var(--news-secondary);
    font-weight: 500;
    margin-top: auto;
}

/* =====================
   LAYOUT: HERO
   Featured + secondary cards
   ===================== */
.news-hero--hero {
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: auto auto;
}

/* Single post - full width prominent display */
.news-hero--hero.news-hero--single {
    grid-template-columns: 1fr;
}

.news-hero--hero.news-hero--single .news-hero__card {
    min-height: 500px;
}

.news-hero--hero.news-hero--single .news-hero__image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.news-hero--hero.news-hero--single .news-hero__image-inner {
    padding-top: 0;
    height: 100%;
}

.news-hero--hero.news-hero--single .news-hero__overlay {
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(99, 45, 233, 0.75) 0%,
        rgba(57, 175, 145, 0.6) 50%,
        rgba(15, 55, 55, 0.8) 100%
    );
}

.news-hero--hero.news-hero--single .news-hero__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    z-index: 2;
    max-width: 800px;
}

.news-hero--hero.news-hero--single .news-hero__category {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

.news-hero--hero.news-hero--single .news-hero__title {
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.news-hero--hero.news-hero--single .news-hero__excerpt {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
}

.news-hero--hero.news-hero--single .news-hero__date {
    font-size: 0.9rem;
    color: var(--news-interactive);
}

a.news-hero--hero.news-hero--single .news-hero__card:hover {
    transform: scale(1.01);
}

a.news-hero--hero.news-hero--single .news-hero__card:hover .news-hero__title {
    color: var(--news-interactive);
}

@media (max-width: 768px) {
    .news-hero--hero.news-hero--single .news-hero__card {
        min-height: 400px;
    }

    .news-hero--hero.news-hero--single .news-hero__content {
        padding: 2rem;
    }

    .news-hero--hero.news-hero--single .news-hero__title {
        font-size: 2rem;
    }

    .news-hero--hero.news-hero--single .news-hero__excerpt {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .news-hero--hero.news-hero--single .news-hero__card {
        min-height: 320px;
    }

    .news-hero--hero.news-hero--single .news-hero__content {
        padding: 1.5rem;
    }

    .news-hero--hero.news-hero--single .news-hero__title {
        font-size: 1.5rem;
    }
}

.news-hero--hero .news-hero__card--featured {
    grid-row: span 2;
}

.news-hero--hero .news-hero__card--featured .news-hero__image-inner {
    padding-top: 75%; /* Taller aspect ratio */
}

.news-hero--hero .news-hero__card--featured .news-hero__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 2;
}

.news-hero--hero .news-hero__card--featured .news-hero__title {
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.news-hero--hero .news-hero__card--featured .news-hero__excerpt {
    color: rgba(255, 255, 255, 0.9);
}

.news-hero--hero .news-hero__card--featured .news-hero__date {
    color: var(--news-interactive);
}

.news-hero--hero .news-hero__card--featured:hover .news-hero__title {
    color: var(--news-interactive);
}

/* Secondary cards in hero layout */
.news-hero--hero .news-hero__card:not(.news-hero__card--featured) {
    flex-direction: row;
    align-items: stretch;
}

.news-hero--hero .news-hero__card:not(.news-hero__card--featured) .news-hero__image {
    width: 40%;
    flex-shrink: 0;
}

.news-hero--hero .news-hero__card:not(.news-hero__card--featured) .news-hero__image-inner {
    padding-top: 100%;
}

.news-hero--hero .news-hero__card:not(.news-hero__card--featured) .news-hero__content {
    justify-content: center;
}

.news-hero--hero .news-hero__card:not(.news-hero__card--featured) .news-hero__title {
    font-size: 1.1rem;
}

.news-hero--hero .news-hero__card:not(.news-hero__card--featured) .news-hero__excerpt {
    display: none;
}

/* =====================
   LAYOUT: MAGAZINE
   Asymmetric artistic grid
   ===================== */
.news-hero--magazine {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 1rem;
}

.news-hero--magazine .news-hero__card--large {
    grid-column: span 2;
    grid-row: span 2;
}

.news-hero--magazine .news-hero__card--large .news-hero__image-inner {
    padding-top: 80%;
}

.news-hero--magazine .news-hero__card--large .news-hero__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 2;
}

.news-hero--magazine .news-hero__card--large .news-hero__title {
    font-size: 1.75rem;
    color: #fff;
}

.news-hero--magazine .news-hero__card--large .news-hero__excerpt,
.news-hero--magazine .news-hero__card--large .news-hero__date {
    color: rgba(255, 255, 255, 0.85);
}

.news-hero--magazine .news-hero__card--medium {
    grid-column: span 2;
}

.news-hero--magazine .news-hero__card--medium .news-hero__image-inner {
    padding-top: 50%;
}

.news-hero--magazine .news-hero__card--small {
    grid-column: span 1;
}

.news-hero--magazine .news-hero__card--small .news-hero__image-inner {
    padding-top: 70%;
}

.news-hero--magazine .news-hero__card--small .news-hero__title {
    font-size: 1rem;
}

.news-hero--magazine .news-hero__card--small .news-hero__excerpt {
    display: none;
}

/* =====================
   LAYOUT: GRID
   Equal-size cards
   ===================== */
.news-hero--grid.news-hero--cols-2 { grid-template-columns: repeat(2, 1fr); }
.news-hero--grid.news-hero--cols-3 { grid-template-columns: repeat(3, 1fr); }
.news-hero--grid.news-hero--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* =====================
   LAYOUT: MINIMAL
   Text-focused, elegant list
   ===================== */
.news-hero--minimal {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-hero--minimal .news-hero__card {
    flex-direction: row;
    align-items: center;
    padding: 1.25rem 0;
    background: transparent;
    border-radius: 0;
    border-bottom: 1px solid var(--news-bg-light);
}

.news-hero--minimal .news-hero__card:last-child {
    border-bottom: none;
}

.news-hero--minimal .news-hero__image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin-right: 1.25rem;
    border-radius: 12px;
    overflow: hidden;
}

.news-hero--minimal .news-hero__image-inner {
    padding-top: 100%;
}

.news-hero--minimal .news-hero__overlay {
    display: none;
}

.news-hero--minimal .news-hero__content {
    padding: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.news-hero--minimal .news-hero__category {
    order: 1;
    padding: 0.25rem 0.6rem;
    font-size: 0.65rem;
}

.news-hero--minimal .news-hero__title {
    order: 0;
    width: 100%;
    font-size: 1.1rem;
}

.news-hero--minimal .news-hero__excerpt {
    display: none;
}

.news-hero--minimal .news-hero__date {
    order: 2;
    margin-top: 0;
}

a.news-hero--minimal .news-hero__card:hover {
    transform: translateX(8px);
    box-shadow: none;
}

/* =====================
   LAYOUT: TICKER
   Horizontal scroll headlines
   ===================== */
.news-hero--ticker {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 1rem 0;
}

.news-hero--ticker::-webkit-scrollbar {
    height: 6px;
}

.news-hero--ticker::-webkit-scrollbar-track {
    background: var(--news-bg-light);
    border-radius: 3px;
}

.news-hero--ticker::-webkit-scrollbar-thumb {
    background: var(--news-secondary);
    border-radius: 3px;
}

.news-hero--ticker .news-hero__card {
    flex: 0 0 280px;
    scroll-snap-align: start;
}

.news-hero--ticker .news-hero__image-inner {
    padding-top: 60%;
}

.news-hero--ticker .news-hero__content {
    padding: 1rem;
}

.news-hero--ticker .news-hero__title {
    font-size: 1rem;
}

.news-hero--ticker .news-hero__excerpt {
    display: none;
}

/* =====================
   LAYOUT: SPOTLIGHT
   Single featured article
   ===================== */
.news-hero--spotlight {
    display: block;
}

.news-hero--spotlight .news-hero__card--spotlight {
    position: relative;
    min-height: 450px;
}

.news-hero--spotlight .news-hero__image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.news-hero--spotlight .news-hero__image-inner {
    padding-top: 0;
    height: 100%;
}

.news-hero--spotlight .news-hero__overlay {
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 45, 233, 0.85) 0%, rgba(57, 175, 145, 0.7) 100%);
}

.news-hero--spotlight .news-hero__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    z-index: 2;
    max-width: 700px;
}

.news-hero--spotlight .news-hero__category {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

.news-hero--spotlight .news-hero__title {
    font-size: 2.5rem;
    color: #fff;
}

.news-hero--spotlight .news-hero__excerpt {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.news-hero--spotlight .news-hero__date {
    color: var(--news-interactive);
}

a.news-hero--spotlight .news-hero__card:hover .news-hero__title {
    color: var(--news-interactive);
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1024px) {
    .news-hero--hero {
        grid-template-columns: 1fr;
    }

    .news-hero--hero .news-hero__card--featured {
        grid-row: span 1;
    }

    .news-hero--hero .news-hero__card--featured .news-hero__title {
        font-size: 1.5rem;
    }

    .news-hero--magazine {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-hero--magazine .news-hero__card--large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .news-hero--magazine .news-hero__card--medium,
    .news-hero--magazine .news-hero__card--small {
        grid-column: span 1;
    }

    .news-hero--grid.news-hero--cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .news-hero--hero .news-hero__card:not(.news-hero__card--featured) {
        flex-direction: column;
    }

    .news-hero--hero .news-hero__card:not(.news-hero__card--featured) .news-hero__image {
        width: 100%;
    }

    .news-hero--magazine {
        grid-template-columns: 1fr;
    }

    .news-hero--magazine .news-hero__card--large,
    .news-hero--magazine .news-hero__card--medium,
    .news-hero--magazine .news-hero__card--small {
        grid-column: span 1;
    }

    .news-hero--grid.news-hero--cols-3,
    .news-hero--grid.news-hero--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-hero--spotlight .news-hero__card--spotlight {
        min-height: 350px;
    }

    .news-hero--spotlight .news-hero__content {
        padding: 2rem;
    }

    .news-hero--spotlight .news-hero__title {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .news-hero--grid.news-hero--cols-2,
    .news-hero--grid.news-hero--cols-3,
    .news-hero--grid.news-hero--cols-4 {
        grid-template-columns: 1fr;
    }

    .news-hero--minimal .news-hero__image {
        width: 60px;
        height: 60px;
    }

    .news-hero--ticker .news-hero__card {
        flex: 0 0 240px;
    }

    .news-hero--spotlight .news-hero__card--spotlight {
        min-height: 280px;
    }

    .news-hero--spotlight .news-hero__content {
        padding: 1.5rem;
    }

    .news-hero--spotlight .news-hero__title {
        font-size: 1.35rem;
    }

    .news-hero__title {
        font-size: 1.1rem;
    }

    .news-hero__content {
        padding: 1rem;
    }
}

/* =====================
   EMPTY STATE
   ===================== */
.news-hero-empty {
    text-align: center;
    padding: 3rem;
    font-family: 'Lato', sans-serif;
    color: var(--news-text);
    background: var(--news-bg-light);
    border-radius: 16px;
}

/* =====================
   DECORATIVE ACCENTS
   ===================== */
.news-hero--accent-line .news-hero__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--news-primary), var(--news-secondary));
    z-index: 3;
}

.news-hero--accent-corner .news-hero__card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 40px 40px 0;
    border-color: transparent var(--news-accent) transparent transparent;
}
