/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Colors - Design.co.kr Inspired (Minimal & High Contrast) */
    --color-black: #111111;
    --color-dark-gray: #333333;
    --color-gray: #666666;
    --color-light-gray: #999999;
    --color-border: #E5E5E5;
    --color-bg-light: #F9F9F9;
    --color-white: #FFFFFF;
    --color-primary: #556B2F;
    /* Accent Color (Sage Green) */

    /* Typography */
    --font-sans: 'Outfit', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-serif: 'Noto Serif KR', serif;

    /* Layout */
    --container-width: 1200px;
    --header-height-pc: 80px;
    --header-height-mo: 54px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--color-black);
    line-height: 1.6;
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* =========================================
   2. TYPOGRAPHY & UTILITIES
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.section-title {
    font-family: var(--font-sans);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: var(--color-black);
}

.badge-pill {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--color-black);
    color: var(--color-white);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 20px;
}

.desktop-only {
    display: flex !important;
}

.mobile-only {
    display: none !important;
}

/* =========================================
   3. LAYOUT COMPONENTS (DESKTOP FIRST)
   ========================================= */

/* --- Header --- */
/* --- Header --- */
.main-header {
    height: var(--header-height-pc);
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 40px;
}

/* 1. Left: Logo */
.header-left {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 32px;
    /* Slightly larger */
    width: auto;
}

/* 2. Center: Search (Desktop) */
/* 2. Center: Search (Mobile First) */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 10px;
}

.global-search-form {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    height: 48px;
    /* Taller */
    background: #f5f5f5;
    /* Light gray base */
    border: 1px solid transparent;
    border-radius: 24px;
    /* Fully rounded */
    padding: 0 50px 0 20px;
    font-size: 15px;
    color: var(--color-black);
    font-family: var(--font-sans);
    transition: all 0.2s ease;
}

.search-input:focus {
    background: #fff;
    border-color: var(--color-dark-gray);
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
}

.search-btn {
    position: absolute;
    right: 12px;
    height: 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-black);
    cursor: pointer;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.search-btn:hover {
    transform: scale(1.05);
}

/* 3. Right: Navigation (Desktop) */
.header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--color-black);
    position: relative;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link.highlight {
    font-weight: 700;
    color: var(--color-primary);
}

.logout-text {
    font-size: 14px;
    color: var(--color-gray);
}

/* CTA Buttons */
.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    height: 42px;
    background-color: var(--color-black);
    color: var(--color-white);
    font-size: 14px;
    font-weight: 700;
    border-radius: 21px;
    /* Rounded Pill */
    transition: all 0.3s ease;
    border: 1px solid var(--color-black);
}

.btn-cta:hover {
    background-color: transparent;
    color: var(--color-black);
}

.btn-cta.secondary {
    background-color: transparent;
    color: var(--color-black);
    border: 1px solid var(--color-border);
}

.btn-cta.secondary:hover {
    border-color: var(--color-black);
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-dark-gray);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-black);
    font-weight: 700;
}

.nav-link.highlight {
    color: var(--color-primary);
    font-weight: 700;
}

.nav-link.logout-text {
    font-size: 13px;
    color: #999;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    background-color: var(--color-black);
    color: var(--color-white);
    font-weight: 600;
    font-size: 14px;
    border-radius: 2px;
    transition: opacity 0.2s;
}

.btn-cta:hover {
    opacity: 0.8;
}

/* --- Hero Section V5: Horizontal Compact Slider --- */
.hero-compact-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    /* Compact Horizontal Ratio */
    overflow: hidden;
    background: #111;
    margin-bottom: 40px;
}

.hero-slide-h {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(50px);
    /* Start slightly right */
    transition: opacity 0.8s ease, transform 0.8s ease;
    z-index: 1;
}

.hero-slide-h.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.hero-bg-h {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    transition: transform 6s ease;
    /* Slow zoom effect */
}

.hero-slide-h.active .hero-bg-h {
    transform: scale(1.05);
}

.hero-overlay-h {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
    z-index: 2;
}

.hero-content-h {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    z-index: 3;
    text-align: left;
}

.category-badge-h {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    border-radius: 4px;
}

.hero-title-h {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
    line-height: 1.3;
    font-family: var(--font-serif);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    word-break: keep-all;
}

.hero-meta-h {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Indicator V (Vertical on Right) */
.slider-indicator {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

/* Mobile Overrides */
@media (max-width: 900px) {
    .hero-compact-slider {
        aspect-ratio: 16/10;
        max-height: 500px;
        /* Full Width Force */
        margin-left: -16px;
        margin-right: -16px;
        width: calc(100% + 32px);
        border-radius: 0;
    }

    .hero-title-h {
        font-size: 24px;
    }

    .hero-content-h {
        padding-left: 16px;
        /* Restore visual padding since we expanded */
        padding-right: 16px;
    }

    /* Adjust indicator position for full width */
    .slider-indicator {
        right: 10px;
    }
}

@media (max-width: 600px) {
    .hero-compact-slider {
        aspect-ratio: 16/9;
        /* Flatter (User request) */
        min-height: 240px;
        /* Reduced height */
    }

    .hero-title-h {
        font-size: 22px;
        margin-right: 30px;
    }

    .hero-content-h {
        bottom: 20px;
    }
}

/* Mobile Menu Button (Hidden on Desktop) */
.mobile-menu-btn {
    display: none;
    /* Will show in mobile query */
}


/* --- Hero Section --- */
.layout-v5 {
    padding-top: 0;
    /* Request: Remove top padding */
    padding-bottom: 100px;
}

.hero-section {
    margin-bottom: 80px;
    height: auto;
    /* Allow flexible height for grid */
    padding-top: 30px;
    /* Slight internal separation if needed, or 0 */
}

.hero-split-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    /* 2.5 : 1 Ratio */
    gap: 20px;
    height: 480px;
    /* Fixed height for alignment */
}

/* Left: Slider */
.hero-left {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
    /* Consistent radius */
}

.slider-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

/* .slide styles restored */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

/* Gradient overlay for text readability */
.slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.slide-content {
    position: absolute;
    bottom: 50px;
    left: 50px;
    z-index: 2;
    color: white;
}

.slide-content h2 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin: 15px 0;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.slide-content .meta {
    font-size: 15px;
    font-weight: 500;
    opacity: 0.9;
}

/* Slider Controls (Adjusted for inside hero-left) */
.slider-controls {
    position: absolute;
    bottom: 30px;
    right: 30px;
}

/* Right: List */
.hero-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-list-header {
    border-bottom: 2px solid var(--color-black);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.hero-list-header h3 {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-list-items {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    /* Distribute items evenly */
}

.hero-list-item {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.hero-list-item:last-child {
    border-bottom: none;
}

.author-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.profile-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    background: #eee;
}

.profile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-dark-gray);
}

.item-info .category {
    display: block;
    font-size: 11px;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.item-info h4 {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 4px;
    word-break: keep-all;
}

.item-info h4 a {
    color: var(--color-black);
}

.item-info h4 a:hover {
    text-decoration: underline;
}

.item-info .date {
    font-size: 11px;
    color: #888;
}

/* --- Trending Section --- */
.trending-section {
    margin-bottom: 100px;
}

.section-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--color-black);
    /* Strong divider */
    padding-bottom: 15px;
}

.header-group-left {
    display: flex;
    align-items: baseline;
    gap: 30px;
}

.tab-menu {
    display: flex;
    gap: 20px;
}

.tab-btn {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-gray);
    /* Lighter gray */
    position: relative;
    padding-bottom: 8px;
    /* Space for underline */
    transition: all 0.3s;
    background: none;
    border: none;
    cursor: pointer;
}

.tab-btn.active {
    color: var(--color-black);
    font-weight: 800;
}

/* Underline Effect for Active Tab */
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-black);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.4s;
}

/* Grid System (Updated V6) */
/* Grid System (Updated V7: 5 Columns) */
/* List System (V8: List Layout) */
.trending-list-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Responsive Grid Overrides */
@media (max-width: 1200px) {
    .trending-img-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .trending-img-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 Columns Tablet */
    }
}

@media (max-width: 600px) {
    .trending-img-grid {
        grid-template-columns: 1fr;
        /* 1 Column Mobile */
    }
}

/* Author List Scroller (Light Theme Refinement V3 - Tighter) */
.authors-section {
    background-color: #f9f9f9;
    padding: 20px 0;
    /* Minimized vertical padding (was 40) */
    margin-bottom: 0;
    color: var(--color-black);
    width: 100%;
    /* Force full width */
}

.authors-section .section-title {
    color: var(--color-black);
    font-size: 20px;
}

.authors-section .view-all-link {
    color: #666;
    font-size: 13px;
}

.authors-section .section-header-row {
    border-bottom: none;
    margin-bottom: 10px;
    /* Reduced specific header margin */
}

/* Full Width Author Section */
.authors-section {
    background-color: #f9f9f9;
    padding: 10px 0;
    /* Reduced padding (was 20) */
    width: 100%;
}

/* --- Author Marquee Animation --- */
.authors-marquee-container {
    width: 100%;
    overflow-x: auto;
    /* Allow manual scroll */
    background: transparent;
    padding: 2px 0;
    /* Very tight vertical padding */

    /* Hide Scrollbar */
    -ms-overflow-style: none;
    /* IE/Edge */
    scrollbar-width: none;
    /* Firefox */

    /* Fade Masks */
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);

    /* Fixed Height Maintenance */
    min-height: 75px;
    display: flex;
    /* justify-content handled by JS or auto-margin */
}

.authors-marquee-container::-webkit-scrollbar {
    display: none;
}

.authors-marquee-track {
    display: flex;
    gap: 8px;
    /* Further reduced from 15px */
    width: max-content;

    /* Remove CSS Animation */
    /* animation: marquee-scroll 25s linear infinite; */

    padding: 0 5%;
    margin: 0 auto;
}

/* Author Card in Marquee */
.author-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    /* Minimized gap (was 2px) */
    cursor: pointer;
    transition: transform 0.2s;
    width: 50px;
}

.author-card:hover {
    transform: translateY(-3px);
}

.author-profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.author-card-name {
    font-size: 8px;
    /* Reduced to 8px */
    font-weight: 500;
    /* Reduced weight (was 700) */
    color: #111 !important;
    text-align: center;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 1px;
    /* Reduced top margin */
}

margin-top: 2px;
}

.author-card-role {
    display: none;
}



.authors-marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.authors-scroller::-webkit-scrollbar {
    display: none;
}

.author-card {
    flex: 0 0 140px;
    /* Slightly wider */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.author-card:hover {
    transform: translateY(-5px);
}

.author-profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 2px solid #333;
    /* Dark border */
    background: #222;
    transition: border-color 0.3s;
}

.author-card:hover .author-profile-img {
    border-color: var(--color-primary);
}

.author-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 4px;
}

.author-card-role {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* --- Trending List Item --- */
.trend-list-item {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.trend-list-item:last-child {
    border-bottom: none;
}

.trend-list-thumb {
    flex: 0 0 240px;
    /* Fixed width for PC */
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
}

.trend-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.trend-list-item:hover .trend-list-thumb img {
    transform: scale(1.05);
}

.trend-rank {
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    background: var(--color-black);
    color: white;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.trend-list-info {
    flex: 1;
    padding-top: 5px;
}

.trend-cat-name {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.trend-list-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--color-black);
    word-break: keep-all;
}

.trend-list-summary {
    font-size: 14px;
    color: var(--color-gray);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trend-list-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
    font-weight: 500;
}

.trend-list-meta .dot {
    margin: 0 4px;
}

.trend-list-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hash-tag {
    font-size: 11px;
    color: var(--color-dark-gray);
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.hash-tag:hover {
    background: #e0e0e0;
}

/* Mobile Overrides (Trending) */
@media (max-width: 900px) {
    .trend-list-item {
        gap: 15px;
    }

    .trend-list-thumb {
        flex: 0 0 110px;
        /* Smaller thumb */
    }

    .trend-list-title {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .trend-list-summary {
        font-size: 13px;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }

    .trend-list-tags {
        display: none;
        /* Hide tags on mobile if crowded, or limit? User said "Hashtags click" - keep if possible. */
        /* Let's keep them hidden on small mobile to save space, or show? */
        /* Design.co.kr shows tags? I'll hide for now on Small Mobile, show on Tablet */
        display: flex;
    }
}

@media (max-width: 600px) {
    .trend-list-thumb {
        flex: 0 0 100px;
    }

    .trend-list-tags {
        display: none;
        /* Hide on very small screens */
    }
}

/* --- Main Content Tabs (New V5.5) --- */
.main-content-tabs-section {
    margin-bottom: 60px;
}

.content-tabs-nav {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ddd;
    margin-bottom: 30px;
}

.content-tab-btn {
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 700;
    color: #999;
    background: transparent;
    border: none;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.content-tab-btn.active {
    color: var(--color-black);
    background: #f5f5f5;
    /* Light grey background for active */
    /* text-decoration: underline; Optional */
}

.content-tab-btn:hover {
    color: var(--color-black);
}

.content-tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-tab-pane.active {
    display: block;
}

/* Category Quick Grid (Tab 3) */
.category-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.cat-grid-item {
    background: #fff;
    border: 1px solid #eee;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.cat-grid-item:hover {
    border-color: var(--color-black);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.cat-name-en {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-black);
    margin-bottom: 4px;
    font-family: var(--font-sans);
}

.cat-name-kr {
    font-size: 14px;
    color: #888;
}

@media (max-width: 600px) {
    .content-tab-btn {
        flex: 1;
        padding: 14px 0;
        font-size: 15px;
        text-align: center;
    }

    .category-quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Trending List Item Layout (V6 Refined) --- */
.trend-list-item {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
    /* Align top */
    transition: transform 0.2s;
}

.trend-list-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.trend-list-item:hover {
    transform: translateY(-2px);
}

.trend-list-thumb {
    width: 35%;
    /* Increased from ~30% for 1:2 visual balance (approx) */
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    /* Standard thumbnail ratio */
    flex-shrink: 0;
}

.trend-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.trend-list-item:hover .trend-list-thumb img {
    transform: scale(1.05);
}

.trend-rank {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #000;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    z-index: 2;
}

.trend-list-info {
    flex: 1;
    /* Takes remaining space (approx 65%) */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.trend-cat-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.trend-list-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 8px;
    line-height: 1.4;
    word-break: keep-all;
}

.trend-list-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trend-list-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.trend-list-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hash-tag {
    background: #f4f4f4;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #666;
}

@media (max-width: 600px) {
    .trend-list-item {
        gap: 16px;
    }

    .trend-list-thumb {
        width: 100px;
        /* Fixed width on mobile for consistency */
        aspect-ratio: 1/1;
        /* Square on mobile per previous request or keep 4/3? Let's keep 4/3 or square. User said "1:2 ratio". Let's try flexible width */
        width: 32%;
        /* Keep ratio on mobile too? */
    }

    .trend-list-title {
        font-size: 16px;
    }

    .trend-list-summary {
        display: none;
        /* Hide summary on mobile if too cramped, or keep 1 line */
        -webkit-line-clamp: 1;
    }
}

/* --- Latest Content Section (V7) --- */
.latest-content-section {
    margin-bottom: 60px;
}

.latest-header {
    margin-bottom: 24px;
}

.section-title-simple {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--color-black);
}

.category-filter-bar {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 10px;
    /* Space for scrollbar if any */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar IE */
}

.category-filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-btn.active {
    background: var(--color-black);
    color: #fff;
    border-color: var(--color-black);
}

.filter-btn:hover {
    border-color: var(--color-black);
    color: var(--color-black);
}

.btn-cta-outline {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid #ddd;
    border-radius: 30px;
    color: #333;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-cta-outline:hover {
    background: #f9f9f9;
    border-color: #999;
}

/* Mobile Spacing Optimization */
@media (max-width: 600px) {
    .container.layout-v5 {
        padding-left: 8px;
        padding-right: 8px;
    }

    .latest-content-section {
        margin-bottom: 30px;
        padding-top: 0;
    }

    .hero-compact-slider {
        margin-bottom: 16px;
    }

    .latest-header {
        margin-bottom: 12px;
    }

    .section-title-simple {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .category-filter-bar {
        margin-bottom: 16px;
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .trend-list-item {
        margin-bottom: 12px;
        padding-bottom: 12px;
        gap: 12px;
    }
}

/* =========================================
   4. MOBILE RESPONSIVE OVERRIDES
   ========================================= */
@media (max-width: 900px) {

    /* Utility Overrides */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    /* Layout */
    .container {
        padding: 0 16px;
    }

    /* Slightly tighter padding */

    .layout-v5 {
        padding-top: 20px;
        /* Reduced top spacing */
        padding-bottom: 60px;
    }

    /* --- Header (Mobile) --- */
    .main-header {
        height: var(--header-height-mo);
        padding: 0;
    }

    .header-inner {
        padding: 0;
        gap: 10px;
    }

    /* 1. Left: Logo */
    .header-left {
        order: 1;
        flex: 0 0 auto;
    }

    .logo-img {
        height: 20px;
        /* Smaller logic */
    }

    /* 2. Center: Search (Visible on Mobile) */
    .header-center {
        order: 2;
        display: block !important;
        /* Force show */
        flex: 1;
        max-width: none;
    }

    .search-input {
        background: #f5f5f5;
        height: 36px;
        font-size: 13px;
        padding-left: 12px;
        padding-right: 30px;
        border-radius: 4px;
    }

    .search-btn {
        width: 30px;
        right: 0;
    }

    .search-btn svg {
        width: 16px;
        height: 16px;
    }

    /* 3. Right: Hamburger */
    .header-right {
        order: 3;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        height: 100%;
    }

    .mobile-search-toggle {
        display: none !important;
    }

    .mobile-menu-btn {
        width: 48px;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--color-black);
    }
}

/* --- Indicator Dots (restored) --- */
.indicator-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.indicator-dot.active {
    background: var(--color-primary);
    height: 24px;
    /* Elongate active */
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(85, 107, 47, 0.6);
}

/* --- Search Button Fix --- */
.search-btn {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0;
}

.search-btn:hover {
    transform: none;
}

/* Cleaned up orphaned code */
.mobile-search-trigger svg {
    width: 20px;
    height: 20px;
}


/* --- Hero Section (Mobile) --- */
.hero-section {
    margin-left: -16px;
    margin-right: -16px;
    margin-bottom: 40px;
    height: auto;
    padding-top: 0;
}

.hero-split-grid {
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 0;
}

.hero-left {
    height: 60vh;
    max-height: 480px;
    border-radius: 0;
}

.hero-right {
    padding: 20px 16px;
    background: #fff;
}

.hero-list-header h3 {
    font-size: 18px;
}

.hero-list-item {
    padding: 15px 0;
}

.slide-content {
    left: 20px;
    bottom: 30px;
    max-width: 90%;
}

.slide-content h2 {
    font-size: 28px;
}

/* --- Trending Section (Mobile) --- */
.trending-img-grid {
    grid-template-columns: 1fr !important;
    /* 1 Column requested */
    gap: 40px;
}

.section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    border-bottom: 1px solid #eee;
}

.header-group-left {
    width: 100%;
    justify-content: space-between;
}

.section-title {
    font-size: 20px;
}

.tab-menu {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    gap: 20px;
    padding-bottom: 5px;
    /* Scrollbar space */
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    flex: 0 0 auto;
    font-size: 15px;
}
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        translateY(10px);
    }

    to {
        opacity: 1;
        translateY(0);
    }
}

/* --- Books Section (Accent Theme) --- */
.books-section {
    background-color: #E8F0D8;
    /* Light Olive Accent */
    padding: 80px 0;
    color: var(--color-black);
    margin-bottom: 0 !important;
}

.books-section .section-title {
    color: #3E4A28;
    /* Dark Olive Text */
}

.books-section .view-all-link {
    color: #556B2F;
}

.books-section .section-header-row {
    border-bottom: 2px solid #556B2F;
}

.books-section .book-card span {
    color: #556B2F !important;
    font-weight: 600;
}

/* --- Media Section (New) --- */
.media-section {
    background: #111;
    color: white;
    border-top: 1px solid #333;
}

.media-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

.media-col {
    padding: 80px 40px;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.media-col:last-child {
    border-right: none;
}

.media-col h3 {
    font-size: 28px;
    margin-bottom: 24px;
    font-family: var(--font-serif);
    display: flex;
    align-items: center;
    gap: 12px;
}

.spotify-badge {
    color: #1DB954;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(29, 185, 84, 0.1);
    border-radius: 50%;
}

.media-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

.media-thumb {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    background: #333;
}

.media-info h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.media-info p {
    font-size: 14px;
    color: #999;
    margin-bottom: 16px;
}

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    background: #333;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background 0.2s;
}

.btn-play:hover {
    background: #444;
}

@media (max-width: 900px) {
    .media-grid {
        grid-template-columns: 1fr;
    }

    .media-col {
        border-right: none;
        border-bottom: 1px solid #333;
        padding: 60px 20px;
    }

    .media-thumb {
        width: 100px;
        height: 100px;
    }
}

/* --- Book List (Tabs & Horizontal) --- */
.book-tabs-wrapper {
    overflow-x: auto;
    width: 100%;
    margin-bottom: 30px;
    -ms-overflow-style: none;
    /* Hide scrollbar */
    scrollbar-width: none;
}

.book-tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.book-tabs {
    display: flex;
    gap: 12px;
    width: max-content;
}

.book-tab {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-gray);
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.book-tab.active,
.book-tab:hover {
    color: white;
    background: var(--color-black);
    border-color: var(--color-black);
}

.book-scroller-wide {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 30px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.book-scroller-wide::-webkit-scrollbar {
    display: none;
}

.book-card-wide {
    flex: 0 0 340px;
    /* Fixed card width */
    background: white;
    display: flex;
    /* Row layout */
    gap: 16px;
    align-items: flex-start;
    padding: 0;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.book-thumb-wide {
    flex: 0 0 90px;
    aspect-ratio: 2/3;
    background: #f0f0f0;
    /* Placeholder */
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.book-thumb-wide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-info-wide {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.book-cat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.book-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--color-black);
    word-break: keep-all;
}

.book-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-meta {
    font-size: 12px;
    color: #999;
}

.book-meta span {
    display: inline-block;
}

.book-meta .publisher::before {
    content: '|';
    margin: 0 6px;
    opacity: 0.5;
}

/* Mobile Overrides */
@media (max-width: 600px) {
    .book-card-wide {
        flex: 0 0 300px;
    }

    .book-title {
        font-size: 16px;
    }
}

/* =========================================
   8. Home Page Refinement (Inline Header & Subtitle)
   ========================================= */

/* Latest Header Inline */
.latest-header-inline {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #111;
    /* Strong divider */
    overflow: hidden;
    /* Prevent vertical overflow */
}

.inline-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-black);
    white-space: nowrap;
    margin: 0;
    flex-shrink: 0;
    line-height: 1;
    padding-top: 2px;
    /* Visual alignment with buttons */
}

.category-filter-scroll {
    display: flex;
    gap: 8px;
    /* Tighter gap */
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE */
    padding-right: 20px;
    align-items: center;
}

.category-filter-scroll::-webkit-scrollbar {
    display: none;
}

/* Buttons in scroll container */
.category-filter-scroll .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 8px 16px;
    /* Increased from 6 14 */
    font-size: 14px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #666;
    font-weight: 500;
    transition: all 0.2s;
}

/* Book Section Spacing */
.book-list-container {
    margin-top: 40px;
    /* Generous gap */
}

.category-filter-scroll .filter-btn.active {
    background: var(--color-black);
    color: #fff;
    font-weight: 700;
}

/* Subtitle Style */
.trend-list-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 400;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .latest-header-inline {
        gap: 10px;
        margin-bottom: 15px;
        border-bottom: 1px solid #111;
    }

    .inline-title {
        font-size: 17px;
        /* Slightly smaller */
    }

    /* Vertical Book List Styles (Like Latest Content) */
    .book-list-wrapper {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding-bottom: 20px;
    }

    .book-list-item {
        display: flex;
        gap: 15px;
        align-items: center;
        /* Centered Image */
        cursor: pointer;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
    }

    .book-list-item:last-child {
        border-bottom: none;
    }

    /* Thumbnail (Left) */
    .book-list-thumb {
        width: 80px;
        /* Specific width */
        flex-shrink: 0;
        aspect-ratio: 2/3;
        /* Book ratio */
        border-radius: 4px;
        overflow: hidden;
        background: #f0f0f0;
    }

    .book-list-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Info (Right) */
    .book-list-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 4px;
        overflow: hidden;
        /* For truncation */
    }

    /* Info: Category */
    .book-cat-label {
        font-size: 11px;
        font-weight: 700;
        color: var(--color-primary);
        /* Green or use specific */
        text-transform: uppercase;
        display: block;
        margin-bottom: 2px;
    }

    /* Info: Title */
    .book-list-title {
        font-size: 16px;
        font-weight: 700;
        color: #111;
        margin: 0;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Info: Subtitle */
    .book-list-subtitle {
        font-size: 13px;
        font-weight: 400;
        color: #555;
        margin: 0;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Info: Description */
    .book-list-desc {
        font-size: 13px;
        color: #888;
        margin: 4px 0;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Info: Meta (Author | Publisher) */
    .book-list-meta {
        font-size: 12px;
        color: #999;
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: auto;
        /* Push to bottom if height fixed, though redundant here */
    }

    .book-list-meta .divider {
        color: #ddd;
    }

    /* More Button Outline */
    .btn-more-outline {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 10px 30px;
        border: 1px solid #ddd;
        border-radius: 30px;
        font-size: 14px;
        font-weight: 500;
        color: #666;
        text-decoration: none;
        transition: all 0.2s;
        background: #fff;
    }

    .btn-more-outline:hover {
        border-color: #333;
        color: #333;
    }

    /* Author Section Padding (Since we modified it previously, let's just ensure) */
    /* Books Section Top Padding */
    .latest-content-section+.container {
        /* If books are next, add spacing? */
        /* Or just target the wrapper div */
    }

    /* Ensure container has existing padding */
    .book-list-wrapper {
        padding-top: 10px;
    }
}

/* YouTube Playlist Section */
.playlist-section {
    overflow: hidden;
    /* Hide scrollbar if parent needs it */
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0 0 20px 0;
}

/* Horizontal Slider Container */
.playlist-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
    /* Space for scrollbar or shadow */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.playlist-slider::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for Chrome/Safari */
}

/* Card Style */
.playlist-card {
    flex: 0 0 auto;
    width: 300px;
    /* Desktop default */
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Thumb */
.playlist-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.playlist-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    opacity: 0.9;
}

.playlist-card:hover .playlist-thumb img {
    transform: scale(1.05);
    opacity: 1;
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    backdrop-filter: blur(2px);
    transition: background 0.2s;
}

.playlist-card:hover .play-overlay {
    background: #ff0000;
    /* YouTube Red */
}

/* Info */
.playlist-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #111;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-desc {
    font-size: 13px;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .section-title {
        font-size: 20px;
        /* Slightly smaller on mobile */
        padding: 0 4px;
        /* Align with slider separation if needed */
    }

    .playlist-slider {
        gap: 15px;
        padding-right: 20px;
        /* Peel effect */
    }

    .playlist-card {
        width: 85vw;
        /* Show mostly one card */
        scroll-snap-align: center;
        /* Center focus */
    }
}

/* =========================================
   PC Desktop Layout Optimization (Round 24)
   ========================================= */

@media (min-width: 992px) {

    /* 1. Top Section Split */
    .desktop-top-grid {
        display: grid;
        grid-template-columns: 1.8fr 1fr;
        gap: 40px;
        align-items: start;
        margin-bottom: 60px;
    }

    /* Adjust Hero Slider Height for balance */
    .hero-compact-slider {
        /* Ensure it takes full width of its grid cell */
        width: 100%;
        /* You might want to fix height or aspect ratio */
    }

    .hero-slide-h {
        height: 500px;
        /* Taller on desktop */
    }

    /* Latest Content Section adjustments in grid */
    .latest-content-section.container.layout-v5 {
        /* Reset container width since it's inside grid cell */
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }

    /* Latest Content List Item */
    .trend-list-item.latest-item {
        /* Sidebar List Style */
        border-bottom: 1px solid #eee;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    /* 2. Book List Grid (5 Columns) */
    .book-list-wrapper {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }

    .book-list-item {
        /* Ensure cards stretch */
        width: 100%;
        border: 1px solid #eee;
        /* Light border for definition */
        padding: 15px;
        border-radius: 8px;
        transition: transform 0.2s, box-shadow 0.2s;
        /* Reset any display flex from mobile if present */
        display: flex;
        flex-direction: column;
    }

    .book-list-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .book-list-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1.5;
        /* Standard Book Ratio */
        margin-bottom: 15px;
        margin-right: 0;
    }

    .book-list-info {
        padding: 0;
        width: 100%;
    }
}

/* End PC Optimization */
}