/* gândacul — tabloid stylesheet
 *
 * Aesthetic: Sun/Bild/Click tabloid. Bold red brand, mixed-case headlines
 * (CAPS reserved for category pills + breaking-news bar), dense grid,
 * heavy imagery. Mobile-first. ~300 lines, no preprocessor, no JS.
 *
 * The contrast between this real-news design and the obviously-absurd
 * satire content is the joke.
 */

:root {
    /* Brand */
    --brand-red: #E10600;
    --brand-red-dark: #B30500;
    --brand-black: #111111;
    --brand-yellow: #FFD200;       /* used sparingly, breaking-news / "BILD plus" feel */

    /* Neutrals */
    --bg: #FFFFFF;
    --bg-soft: #F4F4F2;
    --bg-dark: #111111;
    --text: #1A1A1A;
    --text-soft: #5A5A5A;
    --text-faint: #8A8A8A;
    --rule: #E5E5E2;

    /* Source-specific accents (subtle) */
    --src-gandul: #2B5BA8;
    --src-gsp: #00794D;
    --src-cancan: #6E1B3F;

    /* Typography
     *
     * Both stacks lead with webfonts loaded in base.html (Roboto Condensed,
     * Inter) so Romanian diacritics — ț, ș, ă, î, â — render in the same
     * face as the rest of the word. System-font fallbacks are kept only as
     * a graceful-degradation safety net; on Edge/Windows we saw the OS
     * fall back per-glyph to a bold serif when the chosen font lacked
     * Latin Extended-A coverage. */
    --font-display: "Roboto Condensed", "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: "DM Serif Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-red); }

img { max-width: 100%; display: block; }

/* ------------------------------------------------------------------ */
/* Top bar — small, persistent satire disclaimer                      */
/* ------------------------------------------------------------------ */
.alert-bar {
    background: var(--brand-yellow);
    color: var(--brand-black);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    padding: 6px 12px;
    border-bottom: 2px solid var(--brand-black);
}

/* ------------------------------------------------------------------ */
/* Masthead                                                            */
/* White background hosts the black logo at full strength. The red     */
/* stripe + black bottom rule give the tabloid signal without          */
/* fighting the wordmark.                                              */
/* ------------------------------------------------------------------ */
.masthead {
    background: #fff;
    color: var(--brand-black);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--rule);
}

.masthead-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--brand-black);
    line-height: 1;
}

.logo:hover { color: var(--brand-black); }

/* Bug mascot image (or inline-SVG stopgap when no static file exists).
 * Sized so it visually weighs the same as the wordmark cap-height plus
 * descender — bigger than the previous combined-logo image. */
.logo-bug {
    width: auto;
    height: 64px;
    display: block;
}

.logo-bug-svg {
    width: 64px;
    height: 64px;
    color: var(--brand-black);
}

@media (min-width: 800px) {
    .logo-bug,
    .logo-bug-svg { height: 96px; width: auto; }
    .logo-bug-svg { width: 96px; }
}

/* Wordmark + tagline stack — wordmark sits left-baseline-aligned with
 * the bug; tagline tucks directly under it at 40% of the wordmark size
 * with almost zero gap (newspaper masthead feel). */
.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    line-height: 1;
}

.logo-word {
    font-family: "DM Serif Display", "Playfair Display", Georgia, "Times New Roman", serif;
    font-weight: 400;     /* DM Serif Display is intrinsically heavy at 400 */
    font-size: 48px;
    letter-spacing: -0.01em;
    line-height: 1;
    color: var(--brand-black);
}

.logo-tagline {
    font-family: "DM Serif Display", "Playfair Display", Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 400;
    font-size: 19px;          /* ≈ 40% of 48 */
    line-height: 1.05;
    letter-spacing: 0;
    color: var(--text-soft);
    /* Newspaper sub-strap visual: nothing fancy. */
}

@media (min-width: 800px) {
    .logo-word    { font-size: 60px; }
    .logo-tagline { font-size: 24px; }   /* 40% of 60 */
}

.topnav {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    align-items: center;
}

.topnav a {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--brand-black);
    padding: 8px 0;
    border-bottom: 3px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.topnav a:hover,
.topnav a.active {
    color: var(--brand-red);
    border-bottom-color: var(--brand-red);
}

.masthead-stripe {
    height: 4px;
    background: var(--brand-red);
}

/* ------------------------------------------------------------------ */
/* Main wrapper                                                        */
/* ------------------------------------------------------------------ */
main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px 64px;
}

/* ------------------------------------------------------------------ */
/* Category pills                                                      */
/* ------------------------------------------------------------------ */
.cat-pill {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    background: var(--brand-red);
    color: #fff;
    margin-right: 6px;
    margin-bottom: 8px;
}

.cat-pill-exclusiv {
    background: var(--brand-red);
    color: #fff;
}

/* Topical category pills — colored so they scan at a glance in the grid.
 * Politică = navy serious, Actualitate = neutral charcoal, Sport = green,
 * Monden = magenta-pink, Diverse = warm grey. */
.cat-pill-cat-politica    { background: #143A6B; color: #fff; }
.cat-pill-cat-actualitate { background: #2F2F2F; color: #fff; }
.cat-pill-cat-sport       { background: var(--src-gsp); color: #fff; }
.cat-pill-cat-monden      { background: #B82A6E; color: #fff; }
.cat-pill-cat-diverse     { background: #6B6055; color: #fff; }

a.cat-pill { transition: filter 0.15s ease; }
a.cat-pill:hover { filter: brightness(1.1); color: #fff; }

/* ------------------------------------------------------------------ */
/* Page title (category pages)                                         */
/* ------------------------------------------------------------------ */
.page-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    line-height: 1;
}

.page-title-bar {
    display: inline-block;
    width: 8px;
    height: 32px;
    background: var(--brand-red);
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.hero {
    margin-bottom: 36px;
    border-bottom: 4px solid var(--brand-black);
    padding-bottom: 24px;
}

.hero-link {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 800px) {
    .hero-link {
        grid-template-columns: 1.1fr 1fr;
        align-items: center;
        gap: 32px;
    }
}

.hero-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    background-color: #ddd;
    display: block;
}

div.hero-image-placeholder {
    background: linear-gradient(135deg, #cccccc 0%, #aaaaaa 100%);
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-headline {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(26px, 3.0vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 8px 0 12px;
    color: var(--brand-black);
    /* Force long Romanian words to break gracefully rather than overflow */
    overflow-wrap: break-word;
    hyphens: auto;
}

.hero-link:hover .hero-headline {
    color: var(--brand-red);
}

.hero-teaser {
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.45;
    color: var(--text);
    margin: 0 0 16px;
    font-style: italic;
}

.hero-meta {
    font-size: 13px;
    color: var(--text-faint);
    margin: 0;
}

/* ------------------------------------------------------------------ */
/* Section title                                                       */
/* ------------------------------------------------------------------ */
.section-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 12px 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-bar {
    display: inline-block;
    width: 6px;
    height: 22px;
    background: var(--brand-red);
}

/* ------------------------------------------------------------------ */
/* Grid                                                                */
/* ------------------------------------------------------------------ */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px 20px;
}

@media (min-width: 600px)  { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }

.card {
    border-bottom: 1px solid var(--rule);
    padding-bottom: 16px;
}

.card-link {
    display: block;
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    background-color: #ddd;
    margin-bottom: 12px;
    display: block;
}

div.card-image-placeholder {
    background: linear-gradient(135deg, #d4d4d4 0%, #b0b0b0 100%);
}

.card-headline {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 20px;
    line-height: 1.15;
    margin: 6px 0 8px;
    color: var(--brand-black);
}

.card-link:hover .card-headline {
    color: var(--brand-red);
}

.card-teaser {
    font-size: 14px;
    color: var(--text-soft);
    line-height: 1.45;
    margin: 0;
    /* Truncate to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Article page                                                        */
/* ------------------------------------------------------------------ */
.article {
    max-width: 760px;
    margin: 0 auto;
}

.article-header {
    border-bottom: 4px solid var(--brand-black);
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.article-pills {
    margin-bottom: 12px;
}

.article-headline {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(30px, 4.8vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--brand-black);
    margin: 6px 0 12px;
}

.article-teaser {
    font-size: clamp(17px, 1.4vw, 21px);
    font-style: italic;
    color: var(--text);
    line-height: 1.45;
    margin: 0 0 16px;
}

.article-byline {
    font-size: 13px;
    color: var(--text-faint);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.byline-author {
    color: var(--brand-red);
    font-weight: 700;
}

.byline-sep {
    margin: 0 8px;
    opacity: 0.5;
}

.article-hero {
    margin: 0 0 28px;
}

.article-hero img {
    width: 100%;
    height: auto;
    border-radius: 0;
}

.article-hero figcaption {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.65;
    color: var(--text);
}

.article-body p {
    margin: 0 0 18px;
}

.article-body p:first-child::first-letter {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 64px;
    line-height: 0.85;
    float: left;
    margin: 4px 8px 0 0;
    color: var(--brand-red);
}

/* Source attribution */
.article-source {
    margin: 36px 0 24px;
    padding: 16px 18px;
    background: var(--bg-soft);
    border-left: 4px solid var(--brand-red);
}

.source-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--brand-red);
    margin: 0 0 6px;
    text-transform: uppercase;
}

.source-headline {
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--text);
}

.source-link a {
    font-size: 13px;
    color: var(--text-soft);
    word-break: break-all;
    text-decoration: underline;
}

.source-link a:hover { color: var(--brand-red); }

/* ------------------------------------------------------------------ */
/* Share buttons (article page)                                        */
/* ------------------------------------------------------------------ */
.article-share {
    margin: 36px 0 8px;
    padding: 16px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.share-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-right: 4px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--brand-black);
    background: var(--bg-soft);
    border: 1px solid var(--rule);
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.share-btn svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.share-btn:hover { color: #fff; }
.share-btn.share-copy:hover { background: var(--brand-red);  border-color: var(--brand-red); }
.share-btn.share-wa:hover   { background: #25D366;           border-color: #25D366; }
.share-btn.share-x:hover    { background: #000;              border-color: #000; }
.share-btn.share-ig:hover {
    background: linear-gradient(45deg,#f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    border-color: transparent;
}

.share-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    background: var(--brand-black);
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 100;
}

.share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.article-back {
    margin-top: 32px;
    font-size: 14px;
}

.article-back a {
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.article-back a:hover { color: var(--brand-red); }

/* ------------------------------------------------------------------ */
/* Pagination (homepage + category archive)                            */
/* ------------------------------------------------------------------ */
.pagination {
    margin: 48px 0 8px;
    padding: 20px 0;
    border-top: 4px solid var(--brand-black);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.page-link {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 10px 16px;
    color: var(--brand-black);
    background: var(--bg-soft);
    border: 1px solid var(--rule);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.page-link:hover {
    color: #fff;
    background: var(--brand-red);
    border-color: var(--brand-red);
}

.page-link.disabled {
    color: var(--text-faint);
    background: transparent;
    cursor: default;
    pointer-events: none;
}

.page-counter {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.page-title-sub {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.6em;
    letter-spacing: 0.04em;
    color: var(--text-soft);
    text-transform: uppercase;
}

/* ------------------------------------------------------------------ */
/* Empty state                                                         */
/* ------------------------------------------------------------------ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-soft);
}

.empty-state h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 32px;
    margin-bottom: 12px;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.site-footer {
    background: var(--bg-dark);
    color: #cccccc;
    padding: 32px 0;
    margin-top: 48px;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-disclaimer {
    font-size: 14px;
    line-height: 1.6;
    max-width: 720px;
    margin: 0 0 12px;
}

.footer-disclaimer strong {
    color: #ffffff;
}

.footer-meta {
    font-size: 12px;
    color: #777777;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}
