/* ============================================================
   FRESH THEME — Minimal Magazine Style
   Font: Outfit (headings + body) — geometric, modern
   Palette: Deep Emerald #0f4c3a, Coral #e85d4a, Cream #faf8f5, Charcoal #1d1d1d
   ============================================================ */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #1d1d1d;
    background: #faf8f5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .2s, opacity .2s; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ---------- CONTAINER ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- PAGE LOADER ---------- */
.page-loader {
    position: fixed; inset: 0; z-index: 9999;
    background: #faf8f5;
    display: flex; align-items: center; justify-content: center;
    transition: opacity .35s;
}
.page-loader.hidden { opacity: 0; pointer-events: none; }
.loader-spinner {
    width: 32px; height: 32px;
    border: 3px solid #e0ddd8;
    border-top-color: #e85d4a;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- READING PROGRESS ---------- */
.reading-progress {
    position: fixed; top: 0; left: 0;
    height: 3px; background: #e85d4a;
    z-index: 1100; width: 0;
    transition: width .08s linear;
}

/* ============================================================
   HEADER — Minimal top bar
   ============================================================ */
.site-header {
    background: #ffffff;
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.header-main { padding: 16px 0; }
.header-grid {
    display: flex; align-items: center; gap: 20px;
}

/* Logo */
.header-logo img { height: 60px; width: auto; }

/* Search — pill shape */
.header-search {
    margin-left: auto;
    width: 260px;
}
.header-search form {
    display: flex;
    background: #f2f0ec;
    border-radius: 40px;
    overflow: hidden;
    border: 1px solid transparent;
    transition: border-color .2s;
}
.header-search form:focus-within { border-color: #0f4c3a; }
.header-search input {
    flex: 1; border: none; background: transparent;
    padding: 10px 18px; font-size: .88rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
}
.header-search button {
    padding: 10px 16px; color: #0f4c3a; font-size: .9rem;
}

/* Mobile tools */
.header-tools { display: flex; align-items: center; gap: 8px; }
.header-tools .mobile-menu-toggle {
    display: none;
    font-size: 1.2rem; color: #1d1d1d; padding: 8px;
}

/* ============================================================
   NAVIGATION — Horizontal tabs with underline active
   ============================================================ */
.site-nav {
    border-top: 1px solid #eae8e4;
    background: #ffffff;
}
.nav-list {
    display: flex; align-items: center;
    gap: 0; overflow-x: auto;
    -ms-overflow-style: none; scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list li a {
    display: block;
    padding: 14px 18px;
    font-size: .84rem;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    position: relative;
    letter-spacing: .2px;
    text-transform: uppercase;
}
.nav-list li a::after {
    content: '';
    position: absolute; bottom: 0; left: 18px; right: 18px;
    height: 2px; background: #e85d4a;
    transform: scaleX(0); transition: transform .25s;
}
.nav-list li a:hover { color: #0f4c3a; }
.nav-list li a:hover::after,
.nav-list li a.active::after { transform: scaleX(1); }
.nav-list li a.active { color: #0f4c3a; font-weight: 600; }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
    display: none; position: absolute;
    top: 100%; left: 0;
    background: #fff; min-width: 160px;
    border-radius: 8px; z-index: 100;
    box-shadow: 0 12px 32px rgba(0,0,0,.1);
    padding: 6px 0;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a {
    padding: 10px 18px; font-size: .82rem;
    text-transform: none;
}
.dropdown-menu li a::after { display: none; }
.dropdown-menu li a:hover { background: #f5f3ef; color: #0f4c3a; }

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.page { padding: 36px 0 60px; }

/* ============================================================
   LAYOUT GRID — sidebar left + main right
   ============================================================ */
.layout-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 36px;
    align-items: start;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { position: sticky; top: 110px; }
.widget {
    background: #ffffff;
    border: 1px solid #eae8e4;
    border-radius: 12px;
    padding: 20px;
}
.widget-title {
    font-size: .92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #0f4c3a;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e85d4a;
}
.widget ul { display: flex; flex-direction: column; gap: 0; }
.widget-item a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #f2f0ec;
}
.widget-item:last-child a { border-bottom: none; }
.widget-item h4 {
    font-size: .82rem; font-weight: 500;
    color: #333; line-height: 1.4; margin-bottom: 3px;
}
.widget-item a:hover h4 { color: #e85d4a; }
.widget-item .meta { font-size: .72rem; color: #999; }

/* ============================================================
   SECTION HEADS
   ============================================================ */
.section-head {
    display: flex; align-items: baseline;
    justify-content: space-between;
    margin: 44px 0 20px;
}
.section-title {
    font-size: 1.5rem; font-weight: 700;
    color: #1d1d1d;
    position: relative;
    padding-left: 14px;
}
.section-title::before {
    content: '';
    position: absolute; left: 0; top: 4px; bottom: 4px;
    width: 4px; border-radius: 2px;
    background: #e85d4a;
}
.section-link {
    font-size: .82rem; font-weight: 600;
    color: #e85d4a;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.section-link:hover { opacity: .7; }

/* ---------- PAGE HEADING ---------- */
.page-heading { margin-bottom: 28px; }
.page-heading h1 {
    font-size: 2rem; font-weight: 700; color: #1d1d1d;
    margin-bottom: 6px;
}
.page-heading p { color: #777; font-size: .9rem; }

/* ============================================================
   HERO — Full-width featured strip
   ============================================================ */
.hero-mosaic {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    grid-template-rows: 380px;
    gap: 6px;
    margin-bottom: 44px;
    border-radius: 16px;
    overflow: hidden;
}
.hero-tile {
    position: relative; overflow: hidden;
}
.hero-tile.is-lead { grid-row: 1 / 2; }
.hero-tile a {
    display: block; width: 100%; height: 100%; position: relative;
}
.hero-tile img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .5s ease;
}
.hero-tile:hover img { transform: scale(1.04); }
.hero-tile .caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 28px 24px;
    background: linear-gradient(transparent 0%, rgba(0,0,0,.7) 100%);
    color: #fff;
}
.hero-tile.is-lead .caption h2 {
    font-size: 1.7rem; font-weight: 700; line-height: 1.25;
}
.hero-tile .caption h3 {
    font-size: .95rem; font-weight: 600; line-height: 1.3;
}
.hero-tile .caption .kicker {
    display: inline-block;
    background: #e85d4a; color: #fff;
    font-size: .65rem; font-weight: 700;
    padding: 3px 9px; border-radius: 3px;
    margin-bottom: 8px;
    text-transform: uppercase; letter-spacing: .5px;
}
.hero-tile .caption .meta {
    margin-top: 8px; font-size: .76rem; opacity: .8;
}

/* Right side of hero — stacked 2 */
.hero-right {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
}

/* ============================================================
   CARDS — Rounded, elevated
   ============================================================ */
.card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eae8e4;
    transition: transform .3s, box-shadow .3s;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.07);
}
.card-img {
    display: block; overflow: hidden;
    aspect-ratio: 16/10;
}
.card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s;
}
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 16px 18px 20px; }
.card-body .kicker {
    display: inline-block;
    font-size: .68rem; font-weight: 700;
    color: #e85d4a;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 6px;
}
.card-body h3 {
    font-size: .95rem; font-weight: 600;
    color: #1d1d1d; line-height: 1.4;
    margin-bottom: 8px;
}
.card-body h3:hover { color: #0f4c3a; }
.card-body .meta {
    font-size: .75rem; color: #999;
    display: flex; gap: 12px;
}
.card-body .meta i { margin-right: 3px; }
.card.featured .card-body h3 { font-size: 1.1rem; }

/* ============================================================
   GRIDS
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ============================================================
   LAYOUT 1+3 — Featured left, list right
   ============================================================ */
.layout-1plus3 {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-card {
    display: flex; gap: 14px; align-items: center;
    padding: 12px; border-radius: 10px;
    background: #ffffff;
    border: 1px solid #eae8e4;
    transition: border-color .2s, transform .2s;
}
.row-card:hover { border-color: #e85d4a; transform: translateX(4px); }
.row-img {
    width: 80px; min-width: 80px; height: 60px;
    border-radius: 8px; overflow: hidden;
}
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.row-body h4 {
    font-size: .84rem; font-weight: 500;
    color: #1d1d1d; line-height: 1.35; margin-bottom: 3px;
}
.row-body .meta { font-size: .72rem; color: #aaa; }

/* ============================================================
   LAYOUT ASYMMETRIC
   ============================================================ */
.layout-asym {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 20px;
}
.layout-asym .a-3 { display: flex; flex-direction: column; gap: 16px; }

/* ============================================================
   HORIZONTAL SCROLL
   ============================================================ */
.h-scroll {
    display: flex; gap: 16px;
    overflow-x: auto; padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none; scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll .card {
    min-width: 230px; max-width: 250px;
    scroll-snap-align: start; flex-shrink: 0;
}

/* ============================================================
   COMPACT LIST
   ============================================================ */
.compact-list {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}

/* ============================================================
   ARTICLE (news detail)
   ============================================================ */
.article { max-width: 740px; }
.article-kicker {
    display: inline-block;
    background: #e85d4a; color: #fff;
    font-size: .7rem; font-weight: 700;
    padding: 4px 12px; border-radius: 4px;
    text-transform: uppercase; letter-spacing: .4px;
    margin-bottom: 14px;
}
.article-title {
    font-size: 2.2rem; font-weight: 700;
    color: #1d1d1d; line-height: 1.25;
    margin-bottom: 16px;
}
.article-meta {
    display: flex; flex-wrap: wrap; gap: 18px;
    font-size: .82rem; color: #888;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eae8e4;
}
.article-meta i { margin-right: 5px; color: #e85d4a; }

.article-hero {
    margin-bottom: 28px;
    border-radius: 14px;
    overflow: hidden;
}
.article-hero img { width: 100%; }

.article-body {
    font-size: 1.05rem; line-height: 1.9;
    color: #2a2a2a; margin-bottom: 28px;
}
.article-body p { margin-bottom: 1.1em; }

/* Embed */
.article-embed { margin: 28px 0; }
.embed-16x9 {
    position: relative; padding-bottom: 56.25%;
    height: 0; overflow: hidden; border-radius: 12px;
}
.embed-16x9 iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; border: none;
}
.article-embed video {
    width: 100%; border-radius: 12px; background: #000;
}
.article-embed iframe[data-tg-embed="1"] {
    width: 100%; min-height: 300px;
    border: none; border-radius: 12px;
}

/* Figure */
.article-figure {
    margin: 24px 0; border-radius: 12px; overflow: hidden;
}
.article-figure img { width: 100%; }

/* Source */
.article-source {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px;
    background: #ffffff; border: 1px solid #eae8e4;
    border-radius: 10px; margin: 24px 0;
    font-size: .86rem;
}
.article-source i { color: #0f4c3a; font-size: 1.1rem; }
.article-source a { color: #0f4c3a; font-weight: 600; }
.article-source a:hover { color: #e85d4a; }

/* ============================================================
   SHARE BAR
   ============================================================ */
.share-bar {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 10px; margin-top: 32px;
    padding-top: 22px; border-top: 1px solid #eae8e4;
}
.share-bar .label {
    font-weight: 600; font-size: .86rem;
    color: #1d1d1d; margin-right: 8px;
}
.share-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 40px;
    font-size: .78rem; font-weight: 500;
    background: #f2f0ec; color: #555;
    transition: background .2s, color .2s, transform .2s;
}
.share-btn:hover { background: #0f4c3a; color: #fff; transform: scale(1.04); }
.share-btn.copied { background: #28a745; color: #fff; }
.share-btn i { font-size: .85rem; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex; align-items: center;
    justify-content: center; gap: 6px;
    margin-top: 40px;
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px;
    padding: 0 12px; border-radius: 8px;
    font-size: .86rem; font-weight: 500;
    color: #555; background: #ffffff;
    border: 1px solid #eae8e4;
    transition: all .2s;
}
.pagination a:hover { background: #0f4c3a; color: #fff; border-color: #0f4c3a; }
.pagination span.active { background: #e85d4a; color: #fff; border-color: #e85d4a; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 70px 20px; }
.empty-state i { font-size: 3.5rem; color: #ddd; margin-bottom: 18px; }
.empty-state h2 { font-size: 1.4rem; color: #1d1d1d; margin-bottom: 8px; }
.empty-state p { color: #888; margin-bottom: 22px; }
.btn {
    display: inline-block;
    padding: 12px 26px;
    background: #0f4c3a; color: #fff;
    font-weight: 600; border-radius: 40px;
    font-size: .88rem;
    transition: background .2s, transform .2s;
}
.btn:hover { background: #0a3a2c; transform: scale(1.03); }

/* ============================================================
   ALERT FLOOD
   ============================================================ */
.alert-flood {
    background: #fff8e1; border: 1px solid #ffcc02;
    border-radius: 12px; padding: 24px; text-align: center;
}
.alert-flood h2 { color: #7a5d00; font-size: 1.1rem; margin-bottom: 6px; }
.alert-flood p { color: #7a5d00; font-size: .88rem; }

/* ============================================================
   FOOTER — Clean, minimal
   ============================================================ */
.site-footer {
    background: #1d1d1d; color: #bbb;
    margin-top: 60px;
}
.footer-top { padding: 48px 0 36px; }
.footer-top .container {
    display: flex; flex-direction: column;
    align-items: center; gap: 24px; text-align: center;
}
.footer-brand h2 {
    font-size: 1.3rem; color: #fff; margin-bottom: 6px;
}
.footer-brand p { font-size: .86rem; color: #888; }
.footer-cats {
    display: flex; flex-wrap: wrap;
    justify-content: center; gap: 8px;
}
.footer-cats a {
    padding: 7px 16px;
    background: rgba(255,255,255,.06);
    border-radius: 40px;
    font-size: .78rem; color: #ccc;
    transition: background .2s, color .2s;
}
.footer-cats a:hover { background: #e85d4a; color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 18px 0; text-align: center;
    font-size: .78rem; color: #666;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position: fixed; bottom: 28px; right: 28px;
    width: 44px; height: 44px; border-radius: 50%;
    background: #0f4c3a; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    opacity: 0; transform: translateY(12px);
    transition: opacity .3s, transform .3s;
    z-index: 900;
    box-shadow: 0 6px 16px rgba(15,76,58,.3);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: #e85d4a; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .layout-asym { grid-template-columns: 1fr 1fr; }
    .layout-asym .a-3 { grid-column: 1 / -1; flex-direction: row; }
    .layout-asym .a-3 .card { flex: 1; }
    .hero-mosaic { grid-template-rows: 320px; }
}

@media (max-width: 768px) {
    .header-search { display: none; width: 100%; }
    .header-search.is-open {
        display: block;
        position: absolute; top: 100%; left: 0; right: 0;
        padding: 14px 24px;
        background: #fff; border-bottom: 1px solid #eae8e4;
        max-width: 100%;
    }
    .header-search.is-open form { max-width: 100%; }
    .header-tools .mobile-menu-toggle { display: block; }

    .site-nav { overflow: hidden; }
    .nav-list {
        display: none; flex-direction: column;
    }
    .nav-list.is-open { display: flex; }
    .nav-list li a {
        padding: 14px 24px;
        border-bottom: 1px solid #f2f0ec;
    }
    .nav-list li a::after { display: none; }

    .dropdown-menu { position: static; box-shadow: none; padding-left: 20px; }
    .nav-dropdown.is-open .dropdown-menu { display: block; }

    .hero-mosaic {
        grid-template-columns: 1fr;
        grid-template-rows: 260px 180px;
    }
    .hero-right { display: none; }

    .layout-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; order: 2; }
    .main-column { order: 1; }

    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }

    .layout-1plus3 { grid-template-columns: 1fr; }
    .layout-asym { grid-template-columns: 1fr; }
    .layout-asym .a-3 { flex-direction: column; }
    .compact-list { grid-template-columns: 1fr; }

    .article-title { font-size: 1.6rem; }
    .section-title { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .grid-4 { grid-template-columns: 1fr; }
    .hero-mosaic { grid-template-rows: 220px; }
    .h-scroll .card { min-width: 200px; }
    .container { padding: 0 16px; }
}
