/**
 * Hero Section Component
 */

.hero-section {
    padding: 30px 0 0 0;
    background-color: var(--color-bg);
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 315px;
    gap: 10px;
    margin-bottom: 30px;
}

/* ==================== HERO STORY (Large - Left Most) ==================== */

#hero-story-container {
    grid-column: 1 / 2;
    grid-row: 1;
    height: 340px;
    /* Fixed height */
    display: flex;
    flex-direction: column;
}

.hero-story-card {
    display: flex;
    flex-direction: column;
    height: 310px;
    text-decoration: none;
    color: inherit;
}

.hero-story-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.1;
    margin: 0 0 15px 0;
    order: 1;
}

.hero-story-image-wrapper {
    position: relative;
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    order: 2;
}

.hero-story-card .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hero-story-card .just-in-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #FF0000;
    color: white;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* ==================== GRID STORIES (2x2 Grid - Center) ==================== */

#hero-grid-container {
    grid-column: 2 / 3;
    grid-row: 1;
    height: 315px;
    /* Match hero height */
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
}

.grid-story-card {
    display: block;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.grid-story-card .grid-image-wrapper {
    width: 100%;
    height: 105px;
    overflow: hidden;
    background: #f0f0f0;
}

.grid-story-card .grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-story-card .grid-content {
    padding-top: 5px;
}

.grid-story-card .grid-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grid-story-card .grid-description {
    font-family: var(--font-body);
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== BREAKING NEWS ROW ==================== */

#breaking-news-container {
    grid-column: 1 / 3;
    /* Spans first 2 columns */
    grid-row: 2;
    /* Second row */
    height: 190px;
}

.breaking-news-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.breaking-news-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    padding-left: 10px;
    border-left: 3px solid #FF5722;
    display: inline-block;
}

.breaking-news-cards {
    display: flex;
    gap: 10px;
    flex: 1;
}

.breaking-news-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.breaking-news-card .breaking-image {
    width: 100%;
    height: 95px;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

.breaking-news-card .breaking-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 5px;
}

.breaking-news-card .breaking-content {
    padding-top: 0;
    flex: 1;
    display: flex;
    align-items: center;
}

.breaking-news-card .breaking-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Breaking News Skeleton */
.breaking-skeleton {
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

/* ==================== VIDEO SIDEBAR (Right Most) ==================== */

.hero-sidebar {
    grid-column: 3 / 4;
    height: 700px;
    grid-row: 1 / 3;
    /* Fixed height to match left side */
}

/* ==================== LOADING SKELETONS ==================== */

.hero-skeleton {
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

.grid-skeleton {
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1200px) {
    .hero-layout {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    #hero-story-container {
        grid-column: 1 / 2;
        grid-row: 1;
        height: 300px;
    }

    .hero-story-card {
        height: 300px;
    }

    #hero-grid-container {
        grid-column: 2 / 3;
        grid-row: 1;
        height: 300px;
    }

    #breaking-news-container {
        grid-column: 1 / 3;
        grid-row: 2;
        height: auto;
    }

    .breaking-news-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .breaking-news-card {
        flex: none;
    }

    .hero-sidebar {
        grid-column: 1 / 3;
        grid-row: 3;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    #hero-story-container {
        grid-column: 1;
        grid-row: 1;
        height: 300px;
    }

    .hero-story-card {
        height: 300px;
    }

    .hero-story-title {
        font-size: 20px;
    }

    #hero-grid-container {
        grid-column: 1;
        grid-row: 2;
        height: auto;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    #breaking-news-container {
        grid-column: 1;
        grid-row: 3;
        height: auto;
    }

    .breaking-news-wrapper {
        height: auto;
    }

    .breaking-news-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .breaking-news-card {
        flex: none;
    }

    /* Removed: .breaking-news-card:last-child rule */

    .breaking-news-card .breaking-image {
        height: 120px;
    }

    .hero-sidebar {
        grid-column: 1;
        grid-row: 4;
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    #hero-story-container {
        height: 250px;
    }

    .hero-story-card {
        height: 250px;
    }

    .hero-story-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
/* 
    #hero-grid-container {
        grid-template-columns: 1fr;
    } */

    .grid-story-card .grid-image-wrapper {
        height: 150px;
    }

    .breaking-news-title {
        font-size: 16px;
    }

    /* .breaking-news-cards {
        grid-template-columns: 1fr;
    } */

    /* Single column on very small screens */

    .breaking-news-card .breaking-image {
        height: 150px;
    }
}