/*
Theme Name: Reddit Matome
Theme URI: https://example.com/reddit-matome
Author: Your Name
Description: 2chまとめブログ風WordPressテーマ
Version: 4.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: reddit-matome
*/

:root {
    color-scheme: light;
    --font-sans: "Zen Kaku Gothic New", "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    --font-display: "Noto Sans JP", "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;

    --ink: #0f121a;
    --muted: #5c6574;
    --accent: #ff5d3a;
    --accent-strong: #e63a1a;
    --accent-2: #18b6a4;
    --surface: #ffffff;
    --surface-2: #f6f1ea;
    --surface-3: #eef5f4;
    --stroke: #e6e0d8;
    --shadow: 0 18px 48px rgba(12, 18, 30, 0.14);
    --shadow-soft: 0 10px 28px rgba(12, 18, 30, 0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-pill: 999px;
}

/* ======== Reset ======== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.75;
    color: var(--ink);
    background: #f4f1ea;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(900px 500px at 5% -10%, rgba(255, 216, 188, 0.9), transparent 55%),
        radial-gradient(700px 420px at 100% 0%, rgba(182, 244, 238, 0.7), transparent 60%),
        radial-gradient(640px 320px at 10% 100%, rgba(255, 227, 207, 0.6), transparent 55%);
    z-index: -1;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: none; }

::selection {
    background: rgba(255, 93, 58, 0.2);
}

/* ======== Layout ======== */
.site-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-main {
    min-width: 0;
    margin-top: 28px;
}

/* Top page: tighter top margin since hero handles spacing */
.home .site-main {
    margin-top: 24px;
}

/* ======== Single Page 2-Column Layout ======== */
.single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.single-content {
    min-width: 0;
}

.single-sidebar {
    position: sticky;
    top: 76px;
    align-self: start;
}

/* ======== Header ======== */
.site-header {
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(15, 18, 26, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
}

.site-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 16px;
}

.site-title {
    font-size: 22px;
    font-weight: 900;
    margin: 0;
    font-family: var(--font-display);
    letter-spacing: 0.02em;
    flex-shrink: 0;
    text-transform: none;
}

.site-title a {
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.site-title a:hover { color: var(--ink); }

.site-title .logo-icon {
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.site-title .logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-search { position: relative; }

.header-search input[type="search"] {
    background: var(--surface-3);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    padding: 8px 14px 8px 36px;
    font-size: 13px;
    color: var(--ink);
    width: 180px;
    outline: none;
    transition: border-color 0.2s, width 0.2s, box-shadow 0.2s;
}

.header-search input[type="search"]::placeholder { color: #8b93a3; }

.header-search input[type="search"]:focus {
    border-color: rgba(24, 182, 164, 0.6);
    width: 240px;
    box-shadow: 0 6px 18px rgba(24, 182, 164, 0.18);
}

.header-search .fa-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8b93a3;
    font-size: 13px;
    pointer-events: none;
}

.menu-toggle {
    display: none;
    background: #fff;
    border: 1px solid rgba(15, 18, 26, 0.12);
    color: var(--ink);
    font-size: 16px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    line-height: 1;
    box-shadow: 0 6px 14px rgba(12, 18, 30, 0.08);
}

.menu-toggle:hover { background: var(--surface-2); }

/* ======== Header Nav (right-aligned) ======== */
.header-nav {
    display: flex;
    align-items: center;
}

.header-nav > ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2px;
}

.header-nav li a,
.header-nav__dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    border: none;
    font-family: inherit;
    line-height: 1.4;
}

.header-nav li a:hover,
.header-nav__dropdown-trigger:hover {
    color: var(--accent-strong);
    background: rgba(255, 93, 58, 0.08);
}

.header-nav li a i,
.header-nav__dropdown-trigger i {
    font-size: 12px;
}

.header-nav__arrow {
    font-size: 9px !important;
    margin-left: 2px;
    transition: transform 0.25s;
}

.header-nav__dropdown.is-open .header-nav__arrow {
    transform: rotate(180deg);
}

/* ======== Mega Dropdown (Amazon-style) ======== */
.header-nav__dropdown {
    position: relative;
}

.mega-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 480px;
    background: #fff;
    border: 1px solid rgba(15, 18, 26, 0.08);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 18, 26, 0.18), 0 8px 24px rgba(15, 18, 26, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    z-index: 200;
    overflow: hidden;
}

.header-nav__dropdown.is-open .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-dropdown__inner {
    max-height: 70vh;
    overflow-y: auto;
}

.mega-dropdown__header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(15, 18, 26, 0.06);
    background: linear-gradient(135deg, rgba(255, 238, 230, 0.6), rgba(236, 249, 246, 0.6));
}

.mega-dropdown__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-dropdown__label i {
    color: var(--accent-strong);
}

.mega-dropdown__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding: 8px;
}

.mega-dropdown__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}

.mega-dropdown__item:hover {
    background: rgba(255, 93, 58, 0.06);
    color: var(--accent-strong);
    transform: translateX(4px);
}

.mega-dropdown__item-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 93, 58, 0.15), rgba(255, 93, 58, 0.08));
    color: var(--accent-strong);
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.mega-dropdown__item:hover .mega-dropdown__item-icon {
    background: linear-gradient(135deg, #ff7a5c, #ff3d1f);
    color: #fff;
    box-shadow: 0 6px 14px rgba(255, 93, 58, 0.3);
}

.mega-dropdown__item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mega-dropdown__item-name {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.3;
}

.mega-dropdown__item-count {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

/* ======== Mobile Menu Overlay ======== */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu-overlay.is-open {
    visibility: visible;
    opacity: 1;
}

.mobile-menu-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 26, 0.5);
    backdrop-filter: blur(4px);
}

.mobile-menu {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: 100vh;
    overflow-y: auto;
    margin-left: auto;
    background: #fff;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.mobile-menu-overlay.is-open .mobile-menu {
    transform: translateX(0);
}

.mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(15, 18, 26, 0.08);
    background: linear-gradient(120deg, rgba(255, 238, 230, 0.7), rgba(236, 249, 246, 0.7));
}

.mobile-menu__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-menu__title i {
    color: var(--accent-strong);
}

.mobile-menu__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(15, 18, 26, 0.1);
    border-radius: 10px;
    color: var(--ink);
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.mobile-menu__close:hover {
    background: var(--surface-2);
}

.mobile-menu__search {
    padding: 16px 22px;
    border-bottom: 1px solid rgba(15, 18, 26, 0.06);
}

.mobile-menu__search form {
    position: relative;
}

.mobile-menu__search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8b93a3;
    font-size: 14px;
    pointer-events: none;
}

.mobile-menu__search input[type="search"] {
    width: 100%;
    background: var(--surface-3);
    border: 1px solid rgba(15, 18, 26, 0.08);
    border-radius: var(--radius-pill);
    padding: 12px 16px 12px 40px;
    font-size: 14px;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mobile-menu__search input[type="search"]:focus {
    border-color: rgba(24, 182, 164, 0.6);
    box-shadow: 0 0 0 3px rgba(24, 182, 164, 0.12);
}

.mobile-menu__nav {
    padding: 12px 14px;
}

.mobile-menu__nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-menu__nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: background 0.15s, color 0.15s;
}

.mobile-menu__nav li a:hover {
    background: rgba(255, 93, 58, 0.08);
    color: var(--accent-strong);
}

.mobile-menu__nav li.current-menu-item a,
.mobile-menu__nav li.current_page_item a {
    background: linear-gradient(135deg, #ff7a5c, #ff3d1f);
    color: #fff;
    box-shadow: 0 6px 16px rgba(255, 93, 58, 0.3);
}

.mobile-menu__section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 22px 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-menu__section-label i {
    color: var(--accent-strong);
    font-size: 12px;
}

.mobile-menu__categories {
    padding: 14px 0 20px;
    border-top: 1px solid rgba(15, 18, 26, 0.06);
}

.mobile-menu__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 22px;
}

.mobile-menu__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(24, 182, 164, 0.1);
    border: 1px solid rgba(24, 182, 164, 0.2);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    color: #117a70;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.mobile-menu__chip:hover {
    background: rgba(255, 93, 58, 0.12);
    border-color: rgba(255, 93, 58, 0.3);
    color: var(--accent-strong);
    transform: translateY(-1px);
}

.mobile-menu__chip-count {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: rgba(24, 182, 164, 0.7);
    border-radius: 99px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.mobile-menu__chip:hover .mobile-menu__chip-count {
    background: rgba(255, 93, 58, 0.7);
}

/* Body lock when menu open */
body.menu-open {
    overflow: hidden;
}

/* ======================================================
   HERO SLIDER (Top Page) – Peek Carousel
   ====================================================== */

/* 全画面フルブリード */
.hero-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-bottom: 48px;
    overflow: hidden;
    position: relative;
    background: #0a0c14;
}

.hero-slider {
    position: relative;
    padding: 20px 0 60px;
    /* Swiper のデフォルト矢印・スクロールバーは使わず独自 UI を使う */
    --swiper-navigation-size: 0px;
}
/* Swiper デフォルト UI を非表示 */
.hero-slider .swiper-button-prev,
.hero-slider .swiper-button-next,
.hero-slider .swiper-scrollbar { display: none; }

/* 各スライド: 62vw で左右30%ちかく見える（Swiper が swiper-wrapper を管理）
   Swiper デフォルトの width:100%/height:100%/transition-property:transform を上書き */
.hero-slide {
    flex-shrink: 0;
    width: 62vw;
    height: auto;
    aspect-ratio: 3 / 2;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition-property: transform, box-shadow, opacity;
    transition-duration: 0.55s;
    transition-timing-function: ease;
    transform: scale(0.91);
    opacity: 0.55;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    cursor: pointer;
}

.hero-slide--active {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 24px 64px rgba(0,0,0,0.55);
    cursor: default;
}

.hero-slide__bg {
    position: absolute;
    inset: 0;
}

.hero-slide__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide__bg-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1d26, #2d3140);
}

.hero-slide__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(10, 12, 20, 0.88) 0%,
        rgba(10, 12, 20, 0.35) 50%,
        rgba(10, 12, 20, 0.08) 100%
    );
    z-index: 2;
}

.hero-slide__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 36px 40px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* 非アクティブスライドはリンク無効 */
    pointer-events: none;
}

.hero-slide--active .hero-slide__content {
    pointer-events: auto;
}

.hero-slide__badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 4px 12px;
    background: linear-gradient(135deg, #ff7a5c, #ff3d1f);
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(255, 93, 58, 0.4);
}

.hero-slide__title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    font-family: var(--font-display);
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: color .2s;
}

/* スライド全体を覆うストレッチリンク（アクティブスライドのみクリック可能） */
.hero-slide__link {
    position: absolute;
    inset: 0;
    z-index: 15; /* overlay(2) / content(3) / btn(20) の間 */
    text-decoration: none;
    /* 非アクティブスライドはクリック無効（Swiper のスライド切替クリックを優先） */
    pointer-events: none;
}
.hero-slide--active .hero-slide__link {
    pointer-events: auto;
    cursor: pointer;
}
.hero-slide--active:hover .hero-slide__title {
    color: #ffd5c8;
}

.hero-slide__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.hero-slide__meta i { margin-right: 4px; }

/* 前後ボタン */
.hero-slider__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-60%); /* dots分上にオフセット */
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .2s;
}

.hero-slider__btn:hover {
    background: rgba(255,255,255,.32);
    transform: translateY(-60%) scale(1.1);
}

.hero-slider__btn--prev { left: 12px; }
.hero-slider__btn--next { right: 12px; }

/* ドット（中央配置・pill型アクティブ） */
.hero-slider__dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 20;
}

.hero-slider__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.4);
    background: transparent;
    cursor: pointer;
    transition: background .2s, border-color .2s, width .3s, border-radius .3s;
    padding: 0;
}

.hero-slider__dot:hover { border-color: rgba(255,255,255,.8); }

.hero-slider__dot--active {
    background: #ff5d3a;
    border-color: #ff5d3a;
    width: 24px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(255,93,58,.6);
}

/* ======================================================
   SECTION HEADINGS
   ====================================================== */
.section-heading {
    margin-bottom: 20px;
    padding: 0 4px;
}

.section-heading__title {
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    font-family: var(--font-display);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.section-heading__title i {
    color: var(--accent-strong);
    font-size: 18px;
}

.section-heading__sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

/* ======================================================
   CATEGORY SHOWCASE (Top Page)
   ====================================================== */
.category-showcase {
    margin-bottom: 40px;
}

.category-showcase__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.category-showcase__card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: transform 0.25s, box-shadow 0.25s;
    min-height: 110px;
}

.category-showcase__card-bg {
    position: absolute;
    inset: 0;
    background: var(--card-gradient);
    transition: transform 0.4s;
}

.category-showcase__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.2);
}

.category-showcase__card:hover .category-showcase__card-bg {
    transform: scale(1.05);
}

.category-showcase__card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.category-showcase__card-icon {
    font-size: 22px;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.category-showcase__card-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.category-showcase__card-count {
    font-size: 11px;
    opacity: 0.75;
    font-weight: 600;
}

.category-showcase__card-glow {
    position: absolute;
    top: -50%;
    right: -30%;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    z-index: 1;
    transition: transform 0.4s;
}

.category-showcase__card:hover .category-showcase__card-glow {
    transform: scale(1.3);
}

/* ======================================================
   TRENDING / POPULAR HORIZONTAL SCROLL
   ====================================================== */
.trending-section {
    margin-bottom: 40px;
}

.trending-scroll {
    position: relative;
}

.trending-scroll__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 12px;
}

.trending-scroll__track::-webkit-scrollbar {
    display: none;
}

.trending-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
    background: var(--surface);
    border: 1px solid rgba(15, 18, 26, 0.08);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
}

.trending-card:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 18, 26, 0.15);
}

.trending-card a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.trending-card__rank {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff7a5c, #ff3d1f);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 8px;
    z-index: 3;
    box-shadow: 0 4px 10px rgba(255, 93, 58, 0.4);
}

.trending-card:nth-child(1) .trending-card__rank { background: linear-gradient(135deg, #ffd700, #f5a623); color: #3a2f1b; }
.trending-card:nth-child(2) .trending-card__rank { background: linear-gradient(135deg, #c0c0c0, #9e9e9e); }
.trending-card:nth-child(3) .trending-card__rank { background: linear-gradient(135deg, #cd7f32, #a0522d); }

.trending-card__thumb {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f0f0f0;
}

.trending-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}

.trending-card:hover .trending-card__thumb img {
    transform: scale(1.06);
}

.trending-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #bbb;
    background: #f5f5f5;
}

.trending-card__body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.trending-card__cat {
    display: inline-flex;
    align-self: flex-start;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    background: rgba(255, 93, 58, 0.14);
    color: #c93a22;
    font-size: 10px;
    font-weight: 700;
}

.trending-card__title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--ink);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-card:hover .trending-card__title {
    color: var(--accent-strong);
}

.trending-card__date {
    font-size: 11px;
    color: var(--muted);
    margin-top: auto;
}

/* Trending scroll buttons */
.trending-scroll__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(15, 18, 26, 0.12);
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    transition: background 0.15s, transform 0.15s;
}

.trending-scroll__btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-50%) scale(1.08);
}

.trending-scroll__btn--prev { left: -12px; }
.trending-scroll__btn--next { right: -12px; }

/* ======================================================
   LATEST SECTION
   ====================================================== */
.latest-section {
    margin-bottom: 12px;
}

/* ======== Footer ======== */
.site-footer {
    background: #10131c;
    color: #c4c9d4;
    margin-top: 46px;
    padding: 28px 0;
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer__copy { color: #9aa3b2; font-size: 12px; }

.site-footer__links { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer__links a { color: #d4d9e3; font-size: 12px; }
.site-footer__links a:hover { color: #fff; text-decoration: none; }

/* ======== Sidebar ======== */
.sidebar-widget {
    background: var(--surface);
    border: 1px solid rgba(15, 18, 26, 0.08);
    border-radius: var(--radius);
    margin-bottom: 18px;
    box-shadow: var(--shadow-soft);
    padding: 0;
    overflow: hidden;
}

.sidebar-widget__title {
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    border-bottom: 1px solid rgba(15, 18, 26, 0.08);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(120deg, rgba(255, 238, 230, 0.9), rgba(236, 249, 246, 0.9));
}

.sidebar-widget__title i {
    color: var(--accent-strong);
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.sidebar-widget__content { padding: 10px 14px 14px; margin: 0; }

.sidebar-widget ul,
.sidebar-widget ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-widget .sidebar-widget__content > ul:not(.side-media-list) li a,
.sidebar-widget .sidebar-widget__content > ol:not(.sidebar-ranked-media) li a {
    display: block;
    padding: 10px 0;
    color: #3f4656;
    font-size: 13px;
    line-height: 1.5;
    border-bottom: 1px solid rgba(15, 18, 26, 0.06);
    transition: background 0.15s, color 0.15s, padding 0.15s;
    text-decoration: none;
}

.sidebar-widget .sidebar-widget__content > ul:not(.side-media-list) li:last-child a,
.sidebar-widget .sidebar-widget__content > ol:not(.sidebar-ranked-media) li:last-child a {
    border-bottom: none;
}

.sidebar-widget .sidebar-widget__content > ul:not(.side-media-list) li a:hover,
.sidebar-widget .sidebar-widget__content > ol:not(.sidebar-ranked-media) li a:hover {
    background: rgba(255, 93, 58, 0.08);
    color: var(--accent-strong);
    padding-left: 10px;
}

.sidebar-widget .wp-block-search__inside-wrapper {
    display: flex;
    gap: 8px;
}

.sidebar-widget input[type="search"],
.sidebar-widget input[type="text"],
.sidebar-widget input[type="email"] {
    width: 100%;
    border: 1px solid rgba(15, 18, 26, 0.12);
    border-radius: var(--radius-pill);
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
}

.sidebar-widget button,
.sidebar-widget input[type="submit"] {
    border: none;
    background: linear-gradient(135deg, #ff7a5c, #ff3d1f);
    color: #fff;
    border-radius: var(--radius-pill);
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.sidebar-widget .wp-block-latest-posts__list li,
.sidebar-widget .wp-block-archives-list li,
.sidebar-widget .wp-block-categories-list li,
.sidebar-widget .wp-block-latest-comments__comment {
    padding: 8px 0;
    border-bottom: 1px solid rgba(15, 18, 26, 0.06);
}

.sidebar-widget .wp-block-latest-posts__list li:last-child,
.sidebar-widget .wp-block-archives-list li:last-child,
.sidebar-widget .wp-block-categories-list li:last-child,
.sidebar-widget .wp-block-latest-comments__comment:last-child {
    border-bottom: none;
}

/* Sidebar media list */
.side-media-list {
    list-style: none;
    padding: 0;
    margin: -10px -14px -14px;
    display: flex;
    flex-direction: column;
}

.side-media-item {
    border-bottom: 1px solid rgba(15, 18, 26, 0.06);
}

.side-media-item:last-child {
    border-bottom: none;
}

.side-media-item a {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.side-media-item a:hover {
    background: rgba(255, 93, 58, 0.06);
}

.side-media-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: #f2f2f2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.side-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-media-thumb__placeholder {
    color: #a0a7b5;
    font-size: 18px;
}

.side-media-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.side-media-title {
    font-size: 13px;
    color: var(--ink);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-media-date {
    font-size: 11px;
    color: var(--muted);
}

.side-media-item a:hover .side-media-title {
    color: var(--accent-strong);
}

/* Ranked list */
.sidebar-ranked-list { list-style: none; counter-reset: rank; }
.sidebar-ranked-list li { counter-increment: rank; }
.sidebar-ranked-list li a {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
}

.sidebar-ranked-list li a::before {
    content: counter(rank);
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1f2430;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    margin-top: 1px;
}

.sidebar-ranked-list li:nth-child(1) a::before { background: #ff5d3a; }
.sidebar-ranked-list li:nth-child(2) a::before { background: #ff8c3a; }
.sidebar-ranked-list li:nth-child(3) a::before { background: #ffd166; color: #3a2f1b; }

/* Ranked media list (with thumbnails) */
.sidebar-ranked-media {
    list-style: none;
    padding: 0;
    margin: -10px -14px -14px;
    display: flex;
    flex-direction: column;
}

.sidebar-ranked-media__item {
    border-bottom: 1px solid rgba(15, 18, 26, 0.06);
}

.sidebar-ranked-media__item:last-child {
    border-bottom: none;
}

.sidebar-ranked-media__item a {
    display: grid;
    grid-template-columns: 24px 50px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.sidebar-ranked-media__item a:hover {
    background: rgba(255, 93, 58, 0.06);
}

.sidebar-ranked-media__rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1f2430;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-ranked-media__item:nth-child(1) .sidebar-ranked-media__rank { background: linear-gradient(135deg, #ff5d3a, #ff3d1f); box-shadow: 0 4px 10px rgba(255, 93, 58, 0.35); }
.sidebar-ranked-media__item:nth-child(2) .sidebar-ranked-media__rank { background: linear-gradient(135deg, #ff8c3a, #ff6a00); box-shadow: 0 4px 10px rgba(255, 140, 58, 0.3); }
.sidebar-ranked-media__item:nth-child(3) .sidebar-ranked-media__rank { background: linear-gradient(135deg, #ffd166, #f5b800); color: #3a2f1b; box-shadow: 0 4px 10px rgba(245, 184, 0, 0.3); }

.sidebar-ranked-media__thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-ranked-media__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-ranked-media__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sidebar-ranked-media__title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-ranked-media__item a:hover .sidebar-ranked-media__title {
    color: var(--accent-strong);
}

.sidebar-ranked-media__date {
    font-size: 11px;
    color: var(--muted);
}

.sidebar-cat-count {
    color: var(--muted);
    font-size: 11px;
    margin-left: 2px;
}

/* Category chips */
.sidebar-categories {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 0 !important;
}

.sidebar-categories li { padding: 0 !important; }

.sidebar-categories li a {
    display: inline-flex !important;
    align-items: center;
    padding: 6px 14px !important;
    background: rgba(24, 182, 164, 0.12);
    border: 1px solid rgba(24, 182, 164, 0.25);
    border-radius: var(--radius-pill);
    font-size: 12px !important;
    color: #117a70 !important;
    border-bottom: none !important;
}

.sidebar-categories li a:hover {
    background: rgba(255, 93, 58, 0.15) !important;
    border-color: rgba(255, 93, 58, 0.4) !important;
    color: var(--accent-strong) !important;
}

/* ======== Pagination ======== */
.pagination { text-align: center; padding: 28px 0; }
.pagination .nav-links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    background: var(--surface);
    border: 1px solid rgba(15, 18, 26, 0.12);
    border-radius: var(--radius-pill);
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow-soft);
}

.pagination .page-numbers:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.pagination .page-numbers.current {
    background: linear-gradient(135deg, #ff7a5c, #ff3d1f);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 20px rgba(255, 93, 58, 0.35);
}

/* ======== No Posts ======== */
.no-posts {
    background: var(--surface);
    border: 1px solid rgba(15, 18, 26, 0.08);
    border-radius: var(--radius);
    padding: 70px 32px;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.no-posts .no-posts__icon { font-size: 52px; color: #c5ccd8; margin-bottom: 12px; }
.no-posts p { color: var(--muted); margin-bottom: 6px; }

.no-posts .btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #ff7a5c, #ff3d1f);
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 12px 20px rgba(255, 93, 58, 0.3);
}

.no-posts .btn:hover { color: #fff; }

/* ======== Badges ======== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.6;
}

.badge--red { background: rgba(255, 93, 58, 0.18); color: #c92c15; }
.badge--blue { background: rgba(58, 141, 255, 0.18); color: #1f5fb9; }
.badge--green { background: rgba(24, 182, 164, 0.2); color: #0f7c6f; }
.badge--gray { background: rgba(15, 18, 26, 0.08); color: #4a5160; }

/* ======== Search Form ======== */
.search-form { display: flex; gap: 6px; }
.search-form .search-field {
    flex: 1;
    border: 1px solid rgba(15, 18, 26, 0.12);
    border-radius: var(--radius-pill);
    padding: 8px 14px;
    font-size: 13px;
    outline: none;
    background: var(--surface);
}

.search-form .search-field:focus {
    border-color: rgba(24, 182, 164, 0.6);
    box-shadow: 0 0 0 3px rgba(24, 182, 164, 0.15);
}

.search-form .search-submit {
    background: linear-gradient(135deg, #ff7a5c, #ff3d1f);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.search-form .search-submit:hover { opacity: 0.92; }

/* ======== Scroll to Top ======== */
.scroll-to-top {
    position: fixed;
    bottom: 26px;
    right: 26px;
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #ff7a5c, #ff3d1f);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 12px 20px rgba(255, 93, 58, 0.32);
    transition: transform 0.2s;
}

.scroll-to-top:hover { transform: translateY(-3px); }

/* ========================================
   Category Sections (Top Page) - Full-width stripes
   ======================================== */
.category-section {
    /* Break out of .site-wrapper max-width to go full viewport width */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 48px 0;
    position: relative;
}

.category-section__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Alternating full-width backgrounds */
.category-section:nth-child(odd of .category-section) {
    background: #ffffff;
    border-top: 1px solid rgba(15, 18, 26, 0.06);
    border-bottom: 1px solid rgba(15, 18, 26, 0.06);
}

.category-section:nth-child(even of .category-section) {
    background: #f7f5f0;
    border-top: 1px solid rgba(15, 18, 26, 0.04);
    border-bottom: 1px solid rgba(15, 18, 26, 0.04);
}

/* Top accent line - full width */
.category-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 10%,
        var(--cat-color, var(--accent)) 30%,
        var(--cat-color, var(--accent)) 70%,
        transparent 90%
    );
    opacity: 0.6;
}

.category-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.category-section__title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.category-section__bar {
    width: 5px;
    height: 32px;
    border-radius: 3px;
    background: var(--cat-color, var(--accent));
    flex-shrink: 0;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--cat-color, var(--accent)) 35%, transparent);
}

.category-section__title {
    font-size: 22px;
    font-weight: 900;
    color: var(--ink);
    font-family: var(--font-display);
    margin: 0;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-section__count {
    font-size: 11px;
    font-weight: 700;
    color: var(--cat-color, var(--accent));
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 10%, transparent);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    flex-shrink: 0;
}

.category-section__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    background: var(--cat-color, var(--accent));
    border: none;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--cat-color, var(--accent)) 30%, transparent);
}

.category-section__more:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--cat-color, var(--accent)) 40%, transparent);
    opacity: 0.92;
}

.category-section__more i {
    font-size: 11px;
    transition: transform 0.2s;
}

.category-section__more:hover i {
    transform: translateX(3px);
}

/* Card grid within sections */
.article-list--cat {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.article-list--cat .article-card__thumb {
    height: 170px;
}

@media screen and (max-width: 768px) {
    .category-section {
        padding: 32px 0;
    }

    .category-section__inner {
        padding: 0 16px;
    }

    .category-section__title {
        font-size: 18px;
    }

    .article-list--cat {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .category-section__count {
        display: none;
    }

    .category-section__more {
        padding: 6px 14px;
        font-size: 12px;
    }
}

@media screen and (max-width: 520px) {
    .category-section {
        padding: 24px 0;
    }

    .category-section__inner {
        padding: 0 14px;
    }

    .article-list--cat {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .category-section__more {
        font-size: 11px;
        padding: 5px 12px;
    }
}
