/*
 * Home CSS for Journal24 Custom Theme
 */

/* Top Row */
.journal-top-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.journal-top-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.journal-top-card-img-wrap img, .journal-top-card-img-wrap .journal-img-placeholder {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.journal-top-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.25) 30%, transparent 60%);
    color: #fff;
}

.journal-top-card-title {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.journal-top-card-category {
    background: var(--journal-primary, #e60000);
    padding: 2px 6px;
    font-size: 0.7rem;
    border-radius: 2px;
}

/* Hero Section (Desktop) */
.journal-hero-wrap {
    display: grid;
    grid-template-columns: 65fr 35fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: start;
}

.journal-hero-slider.j24-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--j24-radius-md, 12px);
    background: var(--j24-dark, #1a1a2e);
    height: 480px;
}

.journal-hero-slider .j24-slides-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.journal-hero-slider .j24-slide {
    flex: 0 0 100%;
    position: relative;
    height: 100%;
}

.journal-hero-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hero-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Slider */
.journal-slider {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 4px;
}

.journal-slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.journal-slide.active {
    opacity: 1;
    z-index: 1;
}

.journal-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.journal-slide-title {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    z-index: 2;
}

.journal-slide-title h2 {
    margin: 0;
}

.journal-slider-prev, .journal-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 3;
}

.journal-slider-prev { right: 10px; }
.journal-slider-next { left: 10px; }

.journal-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.journal-dot {
    display: inline-block;
    width: 10px; height: 10px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
}

.journal-dot.active {
    background: var(--journal-primary, #e60000);
}

/* Sections */
.journal-sections-with-sidebar {
    display: flex;
    gap: 30px;
}

.journal-sections-main {
    flex: 1;
}

.journal-sticky-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.journal-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    margin-bottom: 15px;
}

.journal-section-title {
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--journal-primary, #e60000);
    margin-bottom: -2px;
}

.journal-section-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.journal-section-main {
    flex: 1;
}

.journal-section-main-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 4px;
}

.journal-section-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.journal-section-list-item {
    display: flex;
    gap: 10px;
}

.journal-section-list-img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

/* Video Grid */
.journal-video-grid-container {
    background: #111;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.journal-video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.journal-video-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.journal-video-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.journal-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    opacity: 0.8;
}

.journal-video-card:hover .journal-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    transition: 0.3s;
}

.journal-hscroll-content {
    padding: 10px;
    background: #222;
    color: #fff;
}

.journal-hscroll-title-card {
    margin: 0;
    font-size: 0.9rem;
    color: #fff;
}

/* Unified Section Header Styling (Journal TV Style) */
.j24-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
}

.j24-section-title {
    margin: 0;
    padding-bottom: 10px;
    margin-bottom: -2px;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.2;
}

.j24-section-title a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.j24-section-title a:hover {
    opacity: 0.85;
}

.j24-section-more-link {
    font-weight: 700;
    color: #64748b !important;
    font-size: 0.9rem;
    text-decoration: none !important;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.j24-section-more-link:hover {
    color: var(--j24-primary, #c0392b) !important;
    transform: translateX(-3px);
}

html[dir="ltr"] .j24-section-more-link:hover,
body:not(.rtl) .j24-section-more-link:hover {
    transform: translateX(3px);
}

/* ==========================================================================
   Dual Category Grid & Category Columns (Attaqah / CNN style)
   ========================================================================== */
.j24-dual-sections-wrap {
    margin-bottom: 50px;
}

.j24-dual-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
}

.j24-cat-column-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Column Header */
.j24-cat-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 2px solid #e2e8f0;
}

.j24-cat-col-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.j24-cat-col-title a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.j24-cat-col-title a:hover {
    color: var(--j24-primary, #c0392b);
}

.j24-cat-brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    color: #ffffff;
    flex-shrink: 0;
}

html[dir="rtl"] .j24-cat-brand-badge svg,
body.rtl .j24-cat-brand-badge svg {
    transform: rotate(180deg);
}

.j24-cat-col-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--j24-primary, #c0392b);
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.j24-cat-col-more:hover {
    opacity: 0.85;
    transform: translateX(-3px);
}

html[dir="ltr"] .j24-cat-col-more:hover,
body:not(.rtl) .j24-cat-col-more:hover {
    transform: translateX(3px);
}

/* 1. Featured Top Card */
.j24-cat-col-featured {
    margin-bottom: 20px;
}

.j24-cat-col-img-wrap {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    aspect-ratio: 16 / 9;
    background-color: #f1f5f9;
}

.j24-cat-col-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.j24-cat-col-img-wrap:hover img {
    transform: scale(1.04);
}

/* Top Corner Tag Overlay Badge */
.j24-badge-tag-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--j24-primary, #c0392b);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 2;
    pointer-events: none;
    line-height: 1.3;
}

html[dir="ltr"] .j24-badge-tag-overlay,
body:not(.rtl) .j24-badge-tag-overlay {
    right: auto;
    left: 10px;
}

/* Meta Row */
.j24-cat-col-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.j24-cat-col-catname {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
}

html[dir="rtl"] .j24-cat-col-catname svg,
body.rtl .j24-cat-col-catname svg {
    transform: rotate(180deg);
}

.j24-cat-col-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-weight: 500;
}

/* Titles */
.j24-cat-col-featured-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.4;
}

.j24-cat-col-featured-title a,
.j24-cat-col-subcard-title a,
.j24-cat-col-bottom-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.j24-cat-col-featured-title a:hover,
.j24-cat-col-subcard-title a:hover,
.j24-cat-col-bottom-title a:hover {
    color: var(--j24-primary, #c0392b);
}

/* 2. Middle Grid (2 Posts side-by-side) */
.j24-cat-col-middle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.j24-cat-col-subcard {
    display: flex;
    flex-direction: column;
}

.j24-subcard-img-wrap {
    aspect-ratio: 16 / 9;
    margin-bottom: 10px;
}

.j24-cat-col-subcard-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;
}

/* 3. Bottom Text Item */
.j24-cat-col-bottom-item {
    border-top: 1px solid #e2e8f0;
    padding-top: 14px;
    margin-top: 5px;
}

.j24-cat-col-bottom-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
}

/* Dark Mode Overrides */
body.dark-mode .j24-cat-col-header,
.dark .j24-cat-col-header {
    border-bottom-color: #2a2a40;
}

body.dark-mode .j24-cat-col-title a,
.dark .j24-cat-col-title a,
body.dark-mode .j24-cat-col-featured-title a,
.dark .j24-cat-col-featured-title a,
body.dark-mode .j24-cat-col-subcard-title a,
.dark .j24-cat-col-subcard-title a,
body.dark-mode .j24-cat-col-bottom-title a,
.dark .j24-cat-col-bottom-title a {
    color: #f8fafc;
}

body.dark-mode .j24-cat-col-img-wrap,
.dark .j24-cat-col-img-wrap {
    background-color: #1e293b;
}

body.dark-mode .j24-cat-col-time,
.dark .j24-cat-col-time {
    color: #94a3b8;
}

body.dark-mode .j24-cat-col-bottom-item,
.dark .j24-cat-col-bottom-item {
    border-top-color: #2a2a40;
}

/* Responsive Queries */
@media (max-width: 991px) {
    .j24-dual-grid-row {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 576px) {
    .j24-cat-col-middle-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .j24-cat-col-featured-title {
        font-size: 1.15rem;
    }
}

/* ==========================================================================
   Overlay Section Grid (Sports Highlight Style)
   ========================================================================== */
.j24-overlay-section-wrap {
    margin-bottom: 50px;
}

.j24-overlay-grid-container {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 18px;
}

.j24-overlay-big-col {
    width: 100%;
    height: 100%;
}

.j24-overlay-small-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
}

.j24-overlay-card {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    height: 100%;
    background-color: #0f172a;
}

.j24-overlay-card-big {
    min-height: 440px;
}

.j24-overlay-card-small {
    height: 212px;
}

.j24-overlay-card-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    color: #ffffff !important;
    text-decoration: none !important;
}

.j24-overlay-img-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.j24-overlay-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.j24-overlay-card:hover .j24-overlay-img {
    transform: scale(1.06);
}

.j24-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0) 55%);
    transition: background 0.3s ease;
}

.j24-overlay-card:hover .j24-overlay-gradient {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.4) 30%, rgba(0, 0, 0, 0) 60%);
}

.j24-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 3;
}

.j24-overlay-card-big .j24-overlay-content {
    padding: 22px;
}

.j24-overlay-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.j24-overlay-title {
    margin: 0;
    color: #ffffff !important;
    font-weight: 800;
    line-height: 1.35;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
    transition: color 0.2s ease;
}

.j24-overlay-title-big {
    font-size: 1.55rem;
}

.j24-overlay-title-small {
    font-size: 0.98rem;
}

.j24-overlay-card:hover .j24-overlay-title {
    color: #f1f5f9 !important;
}

/* Responsive for Overlay Grid */
@media (max-width: 991px) {
    .j24-overlay-grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .j24-overlay-card-big {
        min-height: 350px;
    }
}

@media (max-width: 576px) {
    .j24-overlay-small-cols {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .j24-overlay-card-small {
        height: 180px;
    }
    .j24-overlay-title-big {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Modular Multi-Column Grid System (1, 2, 3, 4 Columns per Row)
   ========================================================================== */
.j24-cols-grid {
    display: grid;
    gap: 30px;
}

.j24-cols-grid-1 {
    grid-template-columns: 1fr;
}

.j24-cols-grid-2 {
    grid-template-columns: 1fr 1fr;
}

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

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

.j24-col-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Responsive grid breakdown */
@media (max-width: 1200px) {
    .j24-cols-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 991px) {
    .j24-cols-grid-3,
    .j24-cols-grid-2 {
        grid-template-columns: 1fr;
        gap: 35px;
    }
}

@media (max-width: 576px) {
    .j24-cols-grid-4 {
        grid-template-columns: 1fr;
        gap: 35px;
    }
}

/* Hero Slider Video Play Button */
.j24-slide:hover .j24-slider-play-btn,
.j24-slider-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.15) !important;
    background-color: var(--j24-primary, #c0392b) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.5) !important;
}




