/* 
 * GLOBAL SECTION STYLING
 */
.top-categories-section {
    width: 100%;
    margin: 20px 0;
    padding: 0;
}


/* 
 * CATEGORY HEADERS (Title & Navigation)
 */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #242424;
    padding: 20px 0 10px;
}

body.dark .category-header {
    border-bottom: 1px solid #F5F5F5;
}

.category-block {
    padding-bottom: 20px;
}

.category-title-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-icon {
    font-size: 32px;
    color: var(--brand-color, #E67E22);
}

.category-name {
    font-size: 38px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

body.dark .category-name {
    color: #f7fafc;
}

.view-all-link {
    font-size: 18px;
    color: var(--brand-color, #E67E22);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
}

.view-all-link:hover {
    transform: translateX(5px);
}

.view-all-icon {
    font-size: 14px;
}

/* 
 * EDITORIAL LAYOUT ENGINE
 */
.editorial-layout-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 1. HERO SPLIT: 50/50 Large Visual layout */
.hero-split-item {
    display: flex;
    gap: 30px;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.hero-split-img-wrapper {
    flex: 1;
    min-width: 0;
}

.hero-split-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hero-img-container {
    width: fit-content;
    max-width: 100%;
    height: auto;
    max-height: 400px;
    background: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

body.dark .hero-img-container {
    background: #1a202c;
}

.hero-img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: block;
}

.hero-split-item:hover .hero-img {
    transform: scale(1.04);
}

.hero-split-title {
    font-size: 34px;
    line-height: 1.3;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    transition: color 0.3s;
}

body.dark .hero-split-title {
    color: #f7fafc;
}

.hero-split-item:hover .hero-split-title {
    color: #e47200;
}

.hero-split-desc {
    font-size: 18px;
    color: #4a5568;
    line-height: 1.5;
    max-height: 4.5em;
    /* Constrain to 3 lines */
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.dark .hero-split-desc {
    color: #a0aec0;
}

/* 2. SECONDARY GRID: Balanced 3-Column Headlines */
.secondary-editorial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2424;
}

body.dark .secondary-editorial-grid {
    border-bottom: 1px solid #2d3748;
}

.editorial-grid-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    padding-bottom: 8px;
    text-align: center;

}

.card-img-container {
    /*width: fit-content;*/
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    height: auto;
    max-height: 200px;
    flex-shrink: 0;
    background: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

body.dark .card-img-container {
    background: #1a202c;
}

.card-img {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: block;
}

.card-title {
    font-size: 18px;
    line-height: 1.4;
    font-weight: 500;
    color: #2d3748;
    margin: 0;
    padding-top: 5px;
    transition: color 0.2s;
}

body.dark .card-title {
    color: #cbd5e0;
}

.editorial-grid-card:hover .card-title {
    color: var(--brand-color, #E67E22);
}

/* 
 * HORIZONTAL SCROLLER LAYOUT (For Odd Indices)
 */
.scroller-wrapper {
    position: relative;
    width: 100%;
    margin-top: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2424;
}

body.dark .scroller-wrapper {
    border-bottom: 1px solid #2d3748;
}

.horizontal-scroller-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0 10px;
    cursor: pointer;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality if desired, or keep our custom one */
.horizontal-scroller-container::-webkit-scrollbar {
    height: 6px;
}

.horizontal-scroller-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.horizontal-scroller-container::-webkit-scrollbar-thumb {
    background: var(--brand-color, #E67E22);
    border-radius: 10px;
}

body.dark .horizontal-scroller-container::-webkit-scrollbar-track {
    background: #2d3748;
}

/* Navigation Buttons */
.scroller-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid #edf2f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    color: #1a202c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.scroller-wrapper:hover .scroller-nav-btn {
    opacity: 1;
    visibility: visible;
}

body.dark .scroller-nav-btn {
    background: rgba(45, 55, 72, 0.9);
    border-color: #4a5568;
    color: #f7fafc;
}

.scroller-nav-btn:hover {
    background: var(--brand-color, #E67E22);
    color: white;
    border-color: var(--brand-color, #E67E22);
    transform: translateY(-50%) scale(1.1);
}

.scroller-nav-btn.prev {
    left: -22px;
}

.scroller-nav-btn.next {
    right: -22px;
}

.scroller-card {
    flex: 0 0 300px;
    /* Fixed width for scroller items */
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease;
}

.scroller-card:hover {
    transform: translateY(-5px);
}

.scroller-img-container {
    width: 100%;
    height: 180px;
    background: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

body.dark .scroller-img-container {
    background: #1a202c;
}

.scroller-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scroller-title {
    font-size: 18px;
    text-align: center;
    line-height: 1.4;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}

body.dark .scroller-title {
    color: #cbd5e0;
}

.scroller-card:hover .scroller-title {
    color: var(--brand-color, #E67E22);
}


/* 
 * RESPONSIVE BREAKPOINTS
 */
@media (max-width: 1100px) {
    .secondary-editorial-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .scroller-card {
        flex: 0 0 260px;
    }
}

@media (max-width: 768px) {
    .hero-split-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .secondary-editorial-grid {
        grid-template-columns: 1fr;
    }

    .hero-split-title {
        font-size: 28px;
    }

    .hero-img-container {
        width: 100%;
        max-height: 300px;
    }

    .hero-img {
        max-height: 300px;
    }

    .scroller-card {
        flex: 0 0 85%;
    }
}