/* ═══════════════════════════════════════
   MAGICTRIP — Stories Page
   ═══════════════════════════════════════ */

/* ── Stories Hero ── */
.stories-hero {
    position: relative; min-height: 60vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: #fff; overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
    margin-top: var(--nav-height);
}
.stories-hero::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(138,93,225,0.2), transparent 60%);
}
.stories-hero .container { position: relative; z-index: 2; padding: 80px 32px 120px; }
.stories-hero h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 16px; line-height: 1.15; }
.stories-hero .hero-desc { font-size: 1.15rem; max-width: 600px; margin: 0 auto 36px; opacity: 0.8; line-height: 1.7; font-family: var(--font-serif); }
.stories-hero .hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.stories-hero .hero-actions .btn { font-size: 0.95rem; padding: 14px 32px; }
.stories-hero .hero-actions .btn-outline { color: #fff !important; border-color: rgba(255,255,255,0.3); background: transparent !important; }
.stories-hero .hero-actions .btn-outline:hover { color: #fff !important; background: var(--c-primary) !important; border-color: var(--c-primary) !important; }

/* ── Stories Sub Nav ── */
.stories-nav-wrap { position: relative; z-index: 99; }
.stories-nav {
    display: flex; align-items: center; gap: 2px;
    background: #1a1a2e; padding: 10px 24px;
    overflow-x: auto; scrollbar-width: none;
    justify-content: center; width: 100%;
    transition: box-shadow 0.3s;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 768px) {
    .stories-nav { justify-content: flex-start; padding: 10px 12px; }
    .stories-nav-item { padding: 8px 14px; font-size: 0.8rem; }
}
.stories-nav::-webkit-scrollbar { display: none; }
.stories-nav.sticky {
    position: fixed; top: var(--nav-height); left: 0; right: 0;
    z-index: 999; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.stories-nav-item {
    color: rgba(255,255,255,0.55); text-decoration: none !important;
    padding: 8px 20px; font-size: 0.85rem; font-weight: 500;
    white-space: nowrap; border-radius: 6px;
    transition: all 0.2s; font-family: var(--font-display);
}
.stories-nav-item:hover { color: #fff; background: rgba(255,255,255,0.1); }
.stories-nav-item.active { color: #fff; background: var(--c-primary); }

/* ── Story Card Grid ── */
.story-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 28px; max-width: var(--max-width); margin: 0 auto; padding: 0 32px;
}
.story-card {
    background: #fff; border: 1px solid var(--c-border);
    border-radius: var(--radius-lg); overflow: hidden;
    text-decoration: none; color: inherit !important;
    display: flex; flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s ease;
}
.story-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); border-color: transparent; }
.story-card:hover h3 { color: var(--c-primary); }
.story-card-img {
    height: 200px; overflow: hidden; flex-shrink: 0; background: var(--c-bg-alt);
}
.story-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.story-card:hover .story-card-img img { transform: scale(1.06); }
.story-card-body {
    flex: 1; padding: 20px 22px 18px;
    display: flex; flex-direction: column;
}
.story-card-body .story-meta { font-size: 0.72rem; color: var(--c-primary); font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
.story-card-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.35; transition: color 0.3s; }
.story-card-body p { font-size: 0.85rem; color: var(--c-text-dim); line-height: 1.6; flex: 1; }
.story-card-author {
    display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px;
    border-top: 1px solid var(--c-border);
}
.story-card-author .avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--c-primary-bg); }
.story-card-author .name { font-size: 0.8rem; font-weight: 600; }
.story-card-author .date { font-size: 0.72rem; color: var(--c-text-muted); }
.story-card-cta {
    font-size: 0.82rem; font-weight: 600; color: var(--c-primary);
    margin-top: 12px; display: flex; align-items: center; gap: 4px;
    transition: gap 0.3s ease;
}
.story-card:hover .story-card-cta { gap: 8px; }
.story-card-cta svg { transition: transform 0.3s ease; }
.story-card:hover .story-card-cta svg { transform: translateX(2px); }

/* ── Load More ── */
.load-more-wrap { text-align: center; margin-top: 40px; }
.load-more-btn { cursor: pointer; }
.load-more-btn.hidden { display: none; }

/* ── Daily Pick ── */
.daily-pick {
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px;
    max-width: var(--max-width); margin: 0 auto; padding: 0 32px;
    align-items: stretch;
}
.daily-pick-image {
    border-radius: var(--radius-lg); overflow: hidden;
    height: 450px; background: var(--c-bg-alt);
    transition: all 0.4s ease;
}
.daily-pick-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.daily-pick-list { display: flex; flex-direction: column; gap: 12px; }
.daily-pick-item {
    flex: 1; display: flex; flex-direction: column; justify-content: center;
    padding: 20px 24px; background: #fff; border: 1px solid var(--c-border);
    border-radius: var(--radius-md); cursor: pointer;
    transition: all 0.3s; min-height: 100px;
}
.daily-pick-item:hover, .daily-pick-item.active { border-color: var(--c-primary); background: var(--c-primary-bg); }
.daily-pick-item .dp-label { font-size: 0.7rem; color: var(--c-primary); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }
.daily-pick-item h4 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.daily-pick-item p { font-size: 0.82rem; color: var(--c-text-dim); line-height: 1.5; }

/* ── Culture Grid (5 organic blocks) ── */
.culture-grid {
    display: grid; gap: 20px;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 210px 291px;
    max-width: 1200px; margin: 0 auto; padding: 0 32px;
}
.culture-grid > * { min-height: 0; }
.culture-card {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    display: flex; align-items: flex-end; padding: 28px 24px;
    text-decoration: none; color: #fff !important;
    background: #1a1a2e;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.culture-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0,0,0,0.2); }
.culture-card:first-child { grid-row: 1 / 3; }                    /* 最左边 388×532 */
.culture-card:nth-child(2) { }                                     /* 中间上面 388×210 */
.culture-card:nth-child(3) { grid-row: 2; }                        /* 中间下面 388×291 */
.culture-card:nth-child(4) { grid-row: 1; }                        /* 右边上面 388×291 */
.culture-card:nth-child(5) { grid-row: 2; }                        /* 右边下面 388×210 */
.culture-card-bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover;
}
.culture-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0.1) 100%);
    transition: opacity 0.4s;
}
.culture-card:hover .culture-card-overlay { opacity: 0.85; }
.culture-card-content { position: relative; z-index: 2; }
.culture-card-content .cc-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; opacity: 0.7; margin-bottom: 6px; }
.culture-card-content h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.culture-card-content p { font-size: 0.82rem; opacity: 0.8; line-height: 1.5; }

/* ── TV Channel ── */
.tv-section {
    display: grid; grid-template-columns: auto 1fr; gap: 32px;
    max-width: var(--max-width); margin: 0 auto; padding: 0 32px;
    align-items: start;
}
.tv-frame {
    border-radius: var(--radius-lg); overflow: hidden;
    background: #1a1a2e; padding: 20px;
    box-shadow: 0 0 0 4px #2d2d44, 0 0 0 8px #1a1a2e, 0 20px 40px rgba(0,0,0,0.3);
    position: relative; max-width: 760px;
}
.tv-frame iframe { width: 100%; aspect-ratio: 16 / 9; border: none; border-radius: var(--radius-sm); display: block; }
.tv-play-btn { position: absolute; inset: 0; margin: auto; width: 92px; height: 92px; border-radius: 50%; border: none; background: rgba(0,0,0,0.55); color: #fff; cursor: pointer; z-index: 6; display: flex; align-items: center; justify-content: center; transition: all 0.25s ease; }
.tv-play-btn:hover { background: rgba(0,0,0,0.75); transform: scale(1.08); }
.tv-play-btn .material-symbols-outlined { font-size: 54px; }
.tv-play-btn.hidden { display: none; }
.tv-channels {
    display: flex; flex-direction: column; gap: 8px;
    background: #1a1a2e; border-radius: var(--radius-lg); padding: 16px;
}
.tv-channel {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px; border-radius: var(--radius-md);
    background: rgba(255,255,255,0.05); cursor: pointer;
    transition: all 0.3s; border: 1px solid transparent;
}
.tv-channel:hover, .tv-channel.active { background: rgba(255,255,255,0.1); border-color: var(--c-primary); }
.tv-channel .ch-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--c-primary-bg); color: var(--c-primary); flex-shrink: 0; }
.tv-channel .ch-info { flex: 1; }
.tv-channel .ch-info h4 { font-size: 0.9rem; font-weight: 600; color: #fff; margin-bottom: 2px; }
.tv-channel .ch-info p { font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.tv-channel .ch-num { font-size: 0.72rem; color: rgba(255,255,255,0.3); font-weight: 700; }

/* ─── TV Video Navigation Arrows ─── */
.tv-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 48px; height: 48px; border-radius: 50%; border: none; background: rgba(0,0,0,0.35); color: #fff; font-size: 28px; font-weight: 300; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.25s ease; opacity: 0; line-height: 1; }
.tv-frame:hover .tv-arrow { opacity: 1; }
.tv-arrow:hover { background: rgba(0,0,0,0.65); transform: translateY(-50%) scale(1.1); }
.tv-arrow-prev { left: 16px; }
.tv-arrow-next { right: 16px; }

.tv-counter { position: absolute; top: 12px; right: 16px; background: rgba(0,0,0,0.55); color: #fff; font-size: 0.8rem; font-weight: 600; padding: 3px 10px; border-radius: 6px; z-index: 2; }

/* ── Section scroll offset for sticky nav ── */
.page-section[id] { scroll-margin-top: 120px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .story-grid { grid-template-columns: repeat(2, 1fr); }
    .daily-pick { grid-template-columns: 1fr; }
    .daily-pick-image { min-height: 280px; }
    .culture-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
    .culture-card { min-height: 200px; }
    .culture-card:first-child { grid-row: 1 / 3; }
    .culture-card:nth-child(2) { }
    .culture-card:nth-child(3) { grid-row: 2; }
    .culture-card:nth-child(4) { }
    .culture-card:nth-child(5) { grid-row: 2; }
    .tv-section { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .stories-hero h1 { font-size: 2.2rem; }
    .story-grid { grid-template-columns: 1fr; }
    .culture-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .culture-card { min-height: 180px; }
    .culture-card:nth-child(3) { grid-row: auto; }
    .culture-card:nth-child(5) { grid-row: auto; }
    .daily-pick-image { min-height: 220px; }
}
@media (max-width: 480px) {
    .stories-hero h1 { font-size: 1.6rem; }
    .stories-hero .container { padding: 60px 16px 100px; }
    .stories-hero .hero-actions { flex-direction: column; align-items: center; }
    .tv-frame { padding: 12px; max-width: none; }
    .tv-section { grid-template-columns: 1fr; }
}

/* ═══ Ultrawide (≥2560px) — content spreads to 2200px+; normal screens untouched ═══ */
@media (min-width: 2560px) {
    /* Stories: 4 per row instead of 3 */
    .story-grid { grid-template-columns: repeat(4, 1fr); }

    /* Culture: 5 equal blocks in a single row (equal width & height) */
    .culture-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: 420px;
        max-width: var(--max-width);
    }
    .culture-grid > * { grid-row: auto !important; min-height: 0; }
    .culture-card:first-child { grid-row: auto; }

    /* TV: video player gets half the width (channels list the other half) */
    .tv-section { grid-template-columns: 1fr 1fr; }
    .tv-frame { max-width: none; }

    /* Story card titles: single line with ellipsis */
    .story-card-body h3 {
        display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Sounds of China banner: wider to match the 2200px content column */
    .sounds-banner { max-width: var(--max-width) !important; }
}

/* ═══ Mobile UX improvements (2026-08) — desktop untouched ═══ */

/* ⑩ Daily Pick — keep image landscape 4:3 instead of the fixed 450px
   portrait box that survived every mobile breakpoint. */
@media (max-width: 768px) {
    .daily-pick-image { height: auto; aspect-ratio: 4 / 3; min-height: 0; }
}

/* ⑪ Discover Culture — 5 equal stacked cards on phones (override the
   asymmetric grid-row placements that leaked into single-column view). */
@media (max-width: 768px) {
    .culture-grid { grid-template-columns: 1fr !important; grid-template-rows: auto !important; gap: 16px; }
    .culture-grid > * { grid-row: auto !important; grid-column: auto !important; }
    .culture-card { min-height: 200px !important; height: 200px; }
}
