/* ============================================
   CSS VARIABLES
   ============================================ */

:root {
    /* Brand — Lisbon steel blue */
    --primary-color: #3d70a2;        /* Steel Blue — links, titles, active nav */
    --primary-deep: #2c5980;         /* Deep Steel — hover/active of primary */
    --secondary-color: #2c5980;      /* Alias of Deep Steel (kept for residual var refs) */
    --primary-tint: #e8f0f5;         /* Pale Steel — chips, selected/hover surfaces */
    --accent-color: #ff6a00;         /* Lisbon Orange — rules under section titles */
    --accent-coral: #ff6a00;
    /* Text — slate editorial */
    --text-color: #495057;           /* Body Text — gray-700 */
    --text-muted: #6c757d;           /* Muted Slate — gray-500 (4.5:1 floor) */
    --text-ink: #212529;             /* Heading Ink — gray-900 */
    --on-primary: #ffffff;           /* Foreground on a primary-colored fill */
    /* Surfaces — pure white editorial */
    --bg-color: #ffffff;             /* Page White */
    --card-bg: #ffffff;              /* Card White (frameless) */
    --surface-sunken: #f8f9fa;       /* Alt Section — gray-100 */
    --surface-hover: #f1f3f5;        /* Hover wash */
    --border-color: #e9ecef;
    --border-strong: #dee2e6;     /* Border Strong — emphasis borders */
    /* Semantic */
    --success: #2f7d4f;
    --danger: #b3413a;
    --warning: #b88433;
    /* Elevation — shadows tinted toward Ink, reserved for state */
    --shadow-sm: 0 2px 4px rgba(33, 37, 41, 0.06);
    --shadow: 0 4px 8px rgba(33, 37, 41, 0.08);
    --shadow-lg: 0 12px 32px rgba(33, 37, 41, 0.12);

    /* Radii */
    --radius-xs: 1px;
    --radius-sm: 3px;
    --radius-md: 5px;
    --radius-lg: 7px;
    --radius-xl: 9px;
    --radius-2xl: 11px;
    --radius-pill: 999px;

    /* Broadsheet design tokens — the editorial component vocabulary. */
    --rule-w: 1px;            /* hairline rule width (borders, dividers) */
    --rule-w-strong: 2px;     /* emphasis rule (masthead, active states) */
    --ph-rule-w: 4px;         /* page-header accent rule under the title */
    --field-pad-y: 0.7rem;
    --field-pad-x: 0.875rem;
    --btn-pad-y: 0.7rem;
    --btn-pad-x: 1.5rem;
    /* Focus ring drawn as a tinted inset offset, never a generic blue glow */
    --field-focus-ring: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--accent-color);

    /* Lightbox — intentionally near-black scrim in both themes so the image reads */
    --lightbox-overlay: rgba(0, 0, 0, 0.835);

    --base-font-size: 100%; /* Dynamic font size, changes via HTML data-font-size attribute */

    /* Type ramp — em/rem values inherit --base-font-size so the accessibility control scales them. */
    --fs-display: clamp(1.8rem, 4.5vw, 2.8rem);
    --fs-headline: clamp(1.5rem, 3.5vw, 2.25rem);
    --fs-h3: 1.4rem;
    --fs-title: 1.25rem;
    --fs-lead: 1.125rem;
    --fs-body: 1rem;
    --fs-subtitle: 0.9rem;
    --fs-label: 0.8125rem;
    --fs-meta: 0.75rem;

    /* Site footer — LIGHT (lisbon.vip identity: white footer, dark text). Defined as
       variables so the theme override blocks retint the footer alongside the palette. */
    --footer-bg: #ffffff;
    --footer-text: #495057;
    --footer-heading: #212529;
    --footer-link-hover: #3d70a2;
    --footer-border: #e9ecef;

    /* Bootstrap override */
    --bs-body-bg: #ffffff;
    --bs-body-color: #495057;
    --bs-card-bg: #ffffff;
    --bs-border-color: #e9ecef;
}

[data-bs-theme="dark"] {
    --primary-color: #83abd1;        /* lightened steel blue for dark-bg contrast */
    --primary-deep: #6f99c0;         /* Deep Steel — lightened for dark-bg contrast */
    --secondary-color: #6f99c0;
    --primary-tint: rgba(131, 171, 209, 0.16); /* Pale Steel translucent — reads on dark surfaces */
    --accent-color: #ff8c33;
    --accent-coral: #ff8c33;
    --text-color: #d3dae3;
    --text-muted: #9aa6b8;
    --text-ink: #e9eef4;
    /* Dark palettes lighten the primary fill for contrast on dark surfaces,
       so the foreground on a primary fill flips from white to the palette's
       own ground — the darkest ink available in the theme. */
    --on-primary: var(--bg-color);
    --bg-color: #15181a;             /* Lisbon Night */
    --card-bg: #1f2429;              /* Raised Slate (raised) */
    --surface-sunken: #111416;
    --surface-hover: #292e35;        /* Slate hover wash */
    --border-color: #2f353c;
    --border-strong: #3d444e;        /* Border Strong — emphasis borders in dark */
    /* Semantic — lightened for dark-bg contrast (≥4.5:1 on Lisbon Night) */
    --success: #5cb47a;
    --danger: #e07a72;
    --warning: #d4a44d;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);

    /* Bootstrap override */
    --bs-body-bg: #15181a;
    --bs-body-color: #d3dae3;
    --bs-card-bg: #1f2429;
    --bs-border-color: #2f353c;
    --bs-light-rgb: 31, 36, 41;
    /* Bootstrap color utility RGB triplets so framework text-/bg- utilities
       inherit the brand palette instead of Bootstrap defaults */
    --bs-primary-rgb: 131, 171, 209;
    --bs-secondary-rgb: 154, 166, 184;
    --bs-success-rgb: 47, 125, 79;
    --bs-danger-rgb: 179, 65, 58;
    --bs-warning-rgb: 184, 132, 51;
    --bs-info-rgb: 131, 171, 209;
    --bs-dark-rgb: 21, 24, 26;

    /* Site footer — DARK (lisbon.vip identity: a sunken slab darker than the
       page so the footer reads as a grounding weight, ink headings on muted
       text). Overrides the light defaults above for every color theme. */
    --footer-bg: #111416;
    --footer-text: #9aa6b8;
    --footer-heading: #e9eef4;
    --footer-link-hover: #83abd1;
    --footer-border: #2f353c;
}

/* ============================================
   COLOR THEME OVERRIDES — Editorial Magazine family
   Each alternate theme re-tints the identity variables AND the hue-matched
   neutrals (text/ink/muted/border/shadow) so the palette reads as one coherent
   world. Every palette keeps a warm punchy accent (the tick-rule under section
   titles, echoing the default Lisbon Orange) and a dark footer slab (the
   grounding weight, lisbon.vip identity) in both light and dark mode. Default
   theme (virgo_blue) is defined in :root above — no override block needed.
   ============================================ */

/* --- Navy Kobalt — Kobalt Lacivert, art/culture quarterly depth --- */
[data-color-theme="navy_kobalt"] {
    --primary-color: #1f4d7a;
    --primary-deep: #163a5e;
    --secondary-color: #163a5e;
    --primary-tint: #e6eef5;
    --accent-color: #e85a1a;
    --accent-coral: #e85a1a;
    --text-color: #2b3543;
    --text-muted: #5a6678;
    --text-ink: #18202d;
    --card-bg: #f4f7fb;
    --surface-sunken: #eaeff5;
    --surface-hover: #eef2f8;
    --border-color: #d4dce6;
    --border-strong: #b9c4d4;
    --shadow-sm: 0 2px 4px rgba(24, 32, 45, 0.06);
    --shadow: 0 4px 8px rgba(24, 32, 45, 0.08);
    --shadow-lg: 0 12px 32px rgba(24, 32, 45, 0.12);
    --bs-body-color: #2b3543;
    --bs-card-bg: #f4f7fb;
    --bs-border-color: #d4dce6;
    --footer-bg: #0f1620;
    --footer-text: #94a3b8;
    --footer-heading: #dde6f0;
    --footer-link-hover: #7eaad4;
    --footer-border: #1f2a3a;
}
[data-color-theme="navy_kobalt"][data-bs-theme="dark"] {
    --primary-color: #7eaad4;
    --primary-deep: #5e8cb8;
    --secondary-color: #5e8cb8;
    --on-primary: var(--bg-color);
    --primary-tint: rgba(126, 170, 212, 0.16);
    --accent-color: #ff8a3d;
    --accent-coral: #ff8a3d;
    --text-color: #cfd9e6;
    --text-muted: #8c9bb0;
    --text-ink: #e9eef4;
    --bg-color: #141a24;
    --card-bg: #1d2533;
    --surface-sunken: #0f141c;
    --surface-hover: #262f3f;
    --border-color: #2a3445;
    --border-strong: #3a4759;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --bs-body-bg: #141a24;
    --bs-body-color: #cfd9e6;
    --bs-card-bg: #1d2533;
    --bs-border-color: #2a3445;
    --bs-primary-rgb: 126, 170, 212;
    --bs-light-rgb: 29, 37, 51;
    --bs-dark-rgb: 20, 26, 36;
    --footer-bg: #0c1118;
    --footer-text: #8c9bb0;
    --footer-heading: #e9eef4;
    --footer-link-hover: #9bbfe0;
    --footer-border: #1f2a3a;
}

/* --- Wine Bordeaux — Bordo Baskı, gourmet/wine oxblood refinement --- */
[data-color-theme="wine_bordeaux"] {
    --primary-color: #7a2438;
    --primary-deep: #5d1a2a;
    --secondary-color: #5d1a2a;
    --primary-tint: #f3e7ea;
    --accent-color: #c97a33;
    --accent-coral: #c97a33;
    --text-color: #3a2d2e;
    --text-muted: #6e5650;
    --text-ink: #271a1c;
    --card-bg: #fbf7f5;
    --surface-sunken: #f2ece9;
    --surface-hover: #f5efec;
    --border-color: #e0d3cf;
    --border-strong: #cab8ab;
    --shadow-sm: 0 2px 4px rgba(39, 26, 28, 0.06);
    --shadow: 0 4px 8px rgba(39, 26, 28, 0.08);
    --shadow-lg: 0 12px 32px rgba(39, 26, 28, 0.12);
    --bs-body-color: #3a2d2e;
    --bs-card-bg: #fbf7f5;
    --bs-border-color: #e0d3cf;
    --footer-bg: #1f1410;
    --footer-text: #b0a090;
    --footer-heading: #f0e6dc;
    --footer-link-hover: #d27a8e;
    --footer-border: #38221c;
}
[data-color-theme="wine_bordeaux"][data-bs-theme="dark"] {
    --primary-color: #d27a8e;
    --primary-deep: #b35870;
    --secondary-color: #b35870;
    --on-primary: var(--bg-color);
    --primary-tint: rgba(210, 122, 142, 0.16);
    --accent-color: #e0a05a;
    --accent-coral: #e0a05a;
    --text-color: #e0d6d2;
    --text-muted: #a89790;
    --text-ink: #efe2d8;
    --bg-color: #1f1614;
    --card-bg: #2a1d1a;
    --surface-sunken: #160f0d;
    --surface-hover: #36241f;
    --border-color: #3d2a25;
    --border-strong: #503732;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --bs-body-bg: #1f1614;
    --bs-body-color: #e0d6d2;
    --bs-card-bg: #2a1d1a;
    --bs-border-color: #3d2a25;
    --bs-primary-rgb: 210, 122, 142;
    --bs-light-rgb: 42, 29, 26;
    --bs-dark-rgb: 31, 22, 20;
    --footer-bg: #160f0d;
    --footer-text: #a89790;
    --footer-heading: #efe2d8;
    --footer-link-hover: #e09aae;
    --footer-border: #38221c;
}

/* --- Forest Olive — Orman Yeşili, travel/nature conifer editorial --- */
[data-color-theme="forest_olive"] {
    --primary-color: #26513c;
    --primary-deep: #1a3a2a;
    --secondary-color: #1a3a2a;
    --primary-tint: #e7efe9;
    --accent-color: #d9732a;
    --accent-coral: #d9732a;
    --text-color: #283228;
    --text-muted: #556455;
    --text-ink: #161e16;
    --card-bg: #f5f8f4;
    --surface-sunken: #ebefe9;
    --surface-hover: #eff3ed;
    --border-color: #d2dacd;
    --border-strong: #bcc7b6;
    --shadow-sm: 0 2px 4px rgba(22, 30, 22, 0.06);
    --shadow: 0 4px 8px rgba(22, 30, 22, 0.08);
    --shadow-lg: 0 12px 32px rgba(22, 30, 22, 0.12);
    --bs-body-color: #283228;
    --bs-card-bg: #f5f8f4;
    --bs-border-color: #d2dacd;
    --footer-bg: #101a14;
    --footer-text: #9fb0a0;
    --footer-heading: #dde6dc;
    --footer-link-hover: #7bbf93;
    --footer-border: #213326;
}
[data-color-theme="forest_olive"][data-bs-theme="dark"] {
    --primary-color: #7bbf93;
    --primary-deep: #5a9e74;
    --secondary-color: #5a9e74;
    --on-primary: var(--bg-color);
    --primary-tint: rgba(123, 191, 147, 0.16);
    --accent-color: #f0933e;
    --accent-coral: #f0933e;
    --text-color: #d2dccd;
    --text-muted: #90a08c;
    --text-ink: #e6efe2;
    --bg-color: #131a15;
    --card-bg: #1c241e;
    --surface-sunken: #0c110d;
    --surface-hover: #243028;
    --border-color: #28342a;
    --border-strong: #36473a;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --bs-body-bg: #131a15;
    --bs-body-color: #d2dccd;
    --bs-card-bg: #1c241e;
    --bs-border-color: #28342a;
    --bs-primary-rgb: 123, 191, 147;
    --bs-light-rgb: 28, 36, 30;
    --bs-dark-rgb: 19, 26, 21;
    --footer-bg: #0b110d;
    --footer-text: #90a08c;
    --footer-heading: #e6efe2;
    --footer-link-hover: #94ceac;
    --footer-border: #213326;
}

/* --- Graphite Steel — Grafit Çelik, business/finance ink monochrome --- */
[data-color-theme="graphite_steel"] {
    --primary-color: #3a4856;
    --primary-deep: #28323d;
    --secondary-color: #28323d;
    --primary-tint: #e9ecef;
    --accent-color: #d8682a;
    --accent-coral: #d8682a;
    --text-color: #2d333b;
    --text-muted: #5a6573;
    --text-ink: #1c2128;
    --card-bg: #f7f8f9;
    --surface-sunken: #eef0f2;
    --surface-hover: #f1f3f5;
    --border-color: #dde1e5;
    --border-strong: #bcc4cd;
    --shadow-sm: 0 2px 4px rgba(28, 33, 40, 0.06);
    --shadow: 0 4px 8px rgba(28, 33, 40, 0.08);
    --shadow-lg: 0 12px 32px rgba(28, 33, 40, 0.12);
    --bs-body-color: #2d333b;
    --bs-card-bg: #f7f8f9;
    --bs-border-color: #dde1e5;
    --footer-bg: #161a1f;
    --footer-text: #97a0aa;
    --footer-heading: #dfe4eb;
    --footer-link-hover: #9ba6b2;
    --footer-border: #2a3138;
}
[data-color-theme="graphite_steel"][data-bs-theme="dark"] {
    --primary-color: #9ba6b2;
    --primary-deep: #7a8693;
    --secondary-color: #7a8693;
    --on-primary: var(--bg-color);
    --primary-tint: rgba(155, 166, 178, 0.16);
    --accent-color: #ff8a4a;
    --accent-coral: #ff8a4a;
    --text-color: #d3d9df;
    --text-muted: #939ea9;
    --text-ink: #e9eef4;
    --bg-color: #15181c;
    --card-bg: #1f2329;
    --surface-sunken: #0e1114;
    --surface-hover: #282d35;
    --border-color: #2b3138;
    --border-strong: #3a414a;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --bs-body-bg: #15181c;
    --bs-body-color: #d3d9df;
    --bs-card-bg: #1f2329;
    --bs-border-color: #2b3138;
    --bs-primary-rgb: 155, 166, 178;
    --bs-light-rgb: 31, 35, 41;
    --bs-dark-rgb: 21, 24, 28;
    --footer-bg: #0e1114;
    --footer-text: #939ea9;
    --footer-heading: #e9eef4;
    --footer-link-hover: #b3bdca;
    --footer-border: #2a3138;
}

/* High specificity dark mode overrides */
html[data-bs-theme="dark"] {
    color-scheme: dark;
}

/* ============================================
   GLOBAL RESETS & TYPOGRAPHY
   ============================================ */

/* Root font size drives the whole scale: --base-font-size is set from the
   data-font-size attribute (render-head.php / app.js). Anchoring it on <html>
   makes every rem unit (Bootstrap included) scale with the setting, and em
   values inherit it through the body. */
html {
    font-size: var(--base-font-size);
}

body {
    font-family: 'Noto Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* All typography elements affected by font size - em based */
h1, .h1 { font-size: var(--fs-headline); }
h2, .h2 { font-size: var(--fs-headline); }
h3, .h3 { font-size: var(--fs-h3); }
h4, .h4 { font-size: var(--fs-h3); }
h5, .h5 { font-size: var(--fs-title); }
h6, .h6 { font-size: var(--fs-body); }

p, span, label, a, .card-text, .form-text, .breadcrumb-item,
.text-muted, .small {
    font-size: var(--fs-body);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ============================================
   FOCUS VISIBLE — global keyboard ring
   Visible 2px Steel Blue ring on every interactive element.
   Never removed without replacement (WCAG 2.4.7).
   ============================================ */

:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Inputs already paint their own tinted ring; don't double up */
.form-control:focus-visible,
.form-select:focus-visible,
.search-input:focus-visible {
    outline: none;
}

/* ============================================
   DARK MODE GLOBAL OVERRIDES
   Only Bootstrap utilities and components that hardcode colors
   need explicit dark overrides; everything else cascades from the
   variable block via var(--*) tokens.
   ============================================ */

html[data-bs-theme="dark"] .bg-white,
html[data-bs-theme="dark"] .bg-light {
    background-color: var(--card-bg);
}

html[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--text-muted);
}

html[data-bs-theme="dark"] .dropdown-menu {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

html[data-bs-theme="dark"] .dropdown-item {
    color: var(--text-color);
}

html[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: var(--border-color);
    color: var(--text-color);
}

html[data-bs-theme="dark"] .text-muted {
    color: var(--text-muted);
}

html[data-bs-theme="dark"] .text-dark {
    color: var(--text-color);
}

html[data-bs-theme="dark"] .border {
    border-color: var(--border-color);
}

html[data-bs-theme="dark"] .list-group-item {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

html[data-bs-theme="dark"] .modal-content {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

html[data-bs-theme="dark"] .modal-header,
html[data-bs-theme="dark"] .modal-footer {
    background-color: var(--surface-sunken);
}

html[data-bs-theme="dark"] .btn-outline-secondary {
    color: var(--text-color);
    border-color: var(--border-color);
    background-color: transparent;
}

html[data-bs-theme="dark"] .btn-outline-secondary:hover,
html[data-bs-theme="dark"] .btn-outline-secondary.active {
    background-color: var(--border-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

html[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

html[data-bs-theme="dark"] .table {
    border-color: var(--border-color);
}

html[data-bs-theme="dark"] .table > :not(caption) > * > * {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

html[data-bs-theme="dark"] .table thead th {
    background-color: var(--bg-color);
    border-color: var(--border-color);
}

/* Dark Mode Fixes */
html[data-bs-theme="dark"] .text-light {
    color: var(--text-muted) !important;
}

/* ============================================
   SWEET ALERT 2 - DARK MODE
   ============================================ */

html[data-bs-theme="dark"] .swal2-popup {
    background-color: var(--card-bg);
    color: var(--text-color);
}

html[data-bs-theme="dark"] .swal2-popup .swal2-icon {
    border-color: var(--border-color);
}

html[data-bs-theme="dark"] .swal2-popup .swal2-success {
    background-color: rgba(var(--bs-success-rgb), 0.15);
    border-color: rgba(var(--bs-success-rgb), 0.3);
}

html[data-bs-theme="dark"] .swal2-popup .swal2-success [class^="swal2-success"] {
    border-color: rgb(var(--bs-success-rgb));
}

html[data-bs-theme="dark"] .swal2-popup .swal2-success .swal2-success-ring {
    border-color: rgba(var(--bs-success-rgb), 0.3);
}

html[data-bs-theme="dark"] .swal2-popup .swal2-error {
    background-color: rgba(var(--bs-danger-rgb), 0.15);
    border-color: rgba(var(--bs-danger-rgb), 0.3);
}

html[data-bs-theme="dark"] .swal2-popup .swal2-warning {
    background-color: rgba(var(--bs-warning-rgb), 0.15);
    border-color: rgba(var(--bs-warning-rgb), 0.3);
}

html[data-bs-theme="dark"] .swal2-popup .swal2-info {
    background-color: rgba(var(--bs-info-rgb), 0.15);
    border-color: rgba(var(--bs-info-rgb), 0.3);
}

html[data-bs-theme="dark"] .swal2-popup .swal2-question {
    background-color: rgba(var(--bs-info-rgb), 0.15);
    border-color: rgba(var(--bs-info-rgb), 0.3);
}

html[data-bs-theme="dark"] .swal2-popup .swal2-validation-message {
    background-color: rgba(var(--bs-danger-rgb), 0.15);
    color: rgb(var(--bs-danger-rgb));
}

html[data-bs-theme="dark"] .swal2-popup .swal2-loader {
    border-color: var(--border-color) transparent var(--border-color) transparent;
}

/* SVG AI Loading Spinner (SweetAlert) */
.swal2-ai-spinner {
    color: var(--primary-color);
}

.profile-swal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* ============================================
   RTL (Right-to-Left) SUPPORT - Global
   Arabic, Persian and other RTL languages
   ============================================ */

/* Direction and alignment for RTL languages */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Reverse margin and padding */
html[dir="rtl"] .me-auto {
    margin-left: auto;
    margin-right: 0;
}

html[dir="rtl"] .ms-auto {
    margin-right: auto;
    margin-left: 0;
}

html[dir="rtl"] .me-1 { margin-left: 0.25rem; margin-right: 0; }
html[dir="rtl"] .me-2 { margin-left: 0.5rem; margin-right: 0; }
html[dir="rtl"] .me-3 { margin-left: 1rem; margin-right: 0; }
html[dir="rtl"] .ms-1 { margin-right: 0.25rem; margin-left: 0; }
html[dir="rtl"] .ms-2 { margin-right: 0.5rem; margin-left: 0; }
html[dir="rtl"] .ms-3 { margin-right: 1rem; margin-left: 0; }

/* Reverse padding */
html[dir="rtl"] .ps-1 { padding-left: 0.25rem; padding-right: 0; }
html[dir="rtl"] .ps-2 { padding-left: 0.5rem; padding-right: 0; }
html[dir="rtl"] .ps-3 { padding-left: 1rem; padding-right: 0; }
html[dir="rtl"] .pe-1 { padding-right: 0.25rem; padding-left: 0; }
html[dir="rtl"] .pe-2 { padding-right: 0.5rem; padding-left: 0; }
html[dir="rtl"] .pe-3 { padding-right: 1rem; padding-left: 0; }

/* Reverse icon positions */
html[dir="rtl"] .bi-chevron-right::before {
    content: "\F284"; /* Left arrow */
}

html[dir="rtl"] .bi-chevron-left::before {
    content: "\F285"; /* Right arrow */
}

/* Dropdown menu direction */
html[dir="rtl"] .dropdown-menu {
    text-align: right;
    right: 0;
    left: auto;
    padding-right: 0;
}

/* Form elements */
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    text-align: right;
}

html[dir="rtl"] .input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-left: 1px solid var(--border-color);
    border-right: none;
}

html[dir="rtl"] .input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating) {
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Lists */
html[dir="rtl"] ul,
html[dir="rtl"] ol {
    padding-right: 2rem;
    padding-left: 0;
}

html[dir="rtl"] .dropdown-menu ul {
    padding-right: 0;
}

/* RTL for cards and containers */
html[dir="rtl"] .card {
    text-align: right;
}

html[dir="rtl"] .text-start {
    text-align: right;
}

html[dir="rtl"] .text-end {
    text-align: left;
}

/* Flexbox reverse direction */
html[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

/* RTL for breadcrumb */
html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, "/");
    float: right;
    padding-left: 0.5rem;
    padding-right: 0;
}

/* RTL for pagination */
html[dir="rtl"] .pagination {
    padding-right: 0;
}

/* Form elements RTL */
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select {
    text-align: right;
}

/* Buttons RTL */
html[dir="rtl"] .btn {
    text-align: right;
}

/* Card header RTL */
html[dir="rtl"] .card-header {
    text-align: right;
}

/* Table RTL */
html[dir="rtl"] .table {
    text-align: right;
}

html[dir="rtl"] .table th,
html[dir="rtl"] .table td {
    text-align: right;
}

/* Alert RTL */
html[dir="rtl"] .alert {
    text-align: right;
}

/* Modal RTL */
html[dir="rtl"] .modal-content {
    text-align: right;
}

/* Search input RTL - detailed rules in search.css */

/* Typewriter Cursor */
html[dir="rtl"] .typewriter-cursor {
    margin-right: 3px;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .navbar,
    .position-header-utility,
    .theme-toggle,
    .language-dropdown,
    footer {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }
}

/* ============================================
   GLOBAL UTILITIES
   ============================================ */

* {
    box-sizing: border-box;
}

table {
    font-size: var(--fs-meta);
}

/* ============================================
   INSIDE PAGE HEADER — BROADSHEET SECTION MASTHEAD
   A section divider, not a colored underline. A double rule (a hairline
   gap between two steel-blue strokes) closes the heading the way a
   printed section folio does; the leading icon becomes a small Lisbon
   Orange marker.
   ============================================ */

.inside-page-header {
    font-size: var(--fs-lead);
    font-weight: 700;
    color: var(--text-ink);
    margin-bottom: 20px;
    padding-bottom: 10px;
    /* Double-rule bottom — the broadsheet section folio: a 2px steel-blue
       stroke, a 3px paper gap, then a 1px echo line. Painted as two stacked
       bottom background gradients (no border) so the two strokes and the gap
       land at predictable pixel offsets regardless of box-model quirks. */
    border-bottom: 0;
    background-image:
        linear-gradient(var(--primary-color), var(--primary-color)),
        linear-gradient(var(--primary-color), var(--primary-color));
    background-repeat: no-repeat;
    background-size: 100% 2px, 100% 1px;
    background-position: 0 100%, 0 calc(100% - 5px);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.inside-page-header i,
.inside-page-header svg {
    color: var(--accent-color);
}


html[data-bs-theme="dark"] .inside-page-header h2 {
    color: var(--text-ink);
}

html[data-bs-theme="dark"] .inside-page-header p {
    color: var(--text-muted);
}


/* ============================================
   BUTTONS — BROADSHEET
   Primary stays a solid steel-blue fill (primary actions must read first),
   with a tight radius and a press feedback of tonal deepen + a hairline
   inset, not a floating shadow. Outline buttons carry the signature: a
   2px steel-blue frame, transparent fill, fill-on-hover — the type that
   reads as a printed call-to-action chip.
   ============================================ */

.btn {
    font-size: var(--base-font-size);
    border-radius: var(--radius-xs);
    /* Keyboard focus wears the field focus ring, not the framework's
       default blue glow. */
    --bs-btn-focus-box-shadow: var(--field-focus-ring);
}

.btn-primary {
    /* The button is committed explicitly and per-state: content-area anchor
       rules (.main-content a) must never bleed into buttons, and Bootstrap's
       own --bs-btn-* variants default to raw framework blue/white, which is
       both off-palette (focus/active flash) and unreadable on the lightened
       primary fills of the dark palettes. --on-primary flips to the palette
       ground in dark mode. */
    --bs-btn-color: var(--on-primary);
    --bs-btn-hover-color: var(--on-primary);
    --bs-btn-active-color: var(--on-primary);
    --bs-btn-disabled-color: var(--on-primary);
    --bs-btn-bg: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-bg: var(--primary-deep);
    --bs-btn-hover-border-color: var(--primary-deep);
    --bs-btn-active-bg: var(--primary-deep);
    --bs-btn-active-border-color: var(--primary-deep);
    color: var(--on-primary);
    background-color: var(--primary-color);
    border: var(--rule-w) solid var(--primary-color);
    padding: var(--btn-pad-y) var(--btn-pad-x);
    font-weight: 600;
    letter-spacing: 0.005em;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-deep);
    border-color: var(--primary-deep);
    box-shadow: var(--shadow-sm);
}

.btn-primary:active {
    /* Press feedback: a hairline inset instead of a translate, so the button
       feels stamped rather than lifted. */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Outline secondary — the broadsheet signature button. */
.btn-outline-primary {
    color: var(--primary-color);
    border: var(--rule-w-strong) solid var(--primary-color);
    background-color: transparent;
    padding: var(--btn-pad-y) var(--btn-pad-x);
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
    /* Focus-visible and :active consume the framework's state variables, so
       those states commit to the palette too — otherwise keyboard focus
       paints the raw framework blue fill and white text. */
    --bs-btn-hover-color: var(--on-primary);
    --bs-btn-hover-bg: var(--primary-color);
    --bs-btn-hover-border-color: var(--primary-color);
    --bs-btn-active-color: var(--on-primary);
    --bs-btn-active-bg: var(--primary-deep);
    --bs-btn-active-border-color: var(--primary-deep);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--on-primary);
}

.btn-outline-secondary {
    color: var(--text-color);
    border: var(--rule-w) solid var(--border-strong);
    background-color: transparent;
}

.btn-outline-secondary:hover {
    background-color: var(--surface-sunken);
    color: var(--text-ink);
    border-color: var(--border-strong);
}

.btn-dark,
.btn-success,
.btn-danger {
    border-radius: var(--radius-xs);
}

/* ============================================
   CARDS — BROADSHEET
   A card is a printed panel: a hairline border at rest, the border deepens
   and gains a Lisbon Orange accent rule on its top edge when the user can
   act on it. Informational cards stay flat — no shadow, no translate; only
   the border shifts. The lift reflex that Karma uses is refused here.
   ============================================ */

.card {
    background-color: var(--card-bg);
    border: var(--rule-w) solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* Informational cards: border deepens slightly, no shadow/transform. */
.card:hover {
    border-color: var(--border-strong);
}

/* Clickable cards: the top edge becomes a Lisbon Orange rule on hover —
   the broadsheet "selected story" mark, grounded (no lift). */
a > .card:hover,
.is-clickable > .card:hover,
.is-clickable:hover {
    border-color: var(--border-strong);
    box-shadow: inset 0 var(--rule-w-strong) 0 var(--accent-color);
}

.card-header {
    background-color: transparent;
    border-bottom: var(--rule-w) solid var(--border-color);
    font-weight: 700;
    letter-spacing: -0.005em;
}


/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background-color: var(--primary-color);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: var(--fs-display);
    font-weight: 700;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.hero-section p {
    font-size: var(--fs-title);
    opacity: 0.9;
}

/* ============================================
   STAT CARDS
   ============================================ */

.stat-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    height: 100%;
    border: 1px solid var(--border-color);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    background-color: var(--surface-sunken);
    border-color: var(--border-strong);
}

.stat-card h2 {
    font-size: var(--fs-display);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ============================================
   IMAGES
   ============================================ */

.image-thumbnail {
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.image-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.image-thumbnail.active {
    border-color: var(--primary-color);
}

/* ============================================
   SEARCH
   ============================================ */

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

/* Broadsheet hero search — a wide ruled field, sharp, with a Lisbon Orange
   rule on focus. Larger padding than a form field because this is the
   page's primary query affordance. */
.search-input {
    border-radius: var(--radius-xs);
    padding: 1rem 1.5rem;
    border: var(--rule-w-strong) solid var(--border-strong);
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus-visible {
    border-color: var(--accent-color);
    box-shadow: var(--field-focus-ring);
}

/* ============================================
   THEME TOGGLE
   ============================================ */

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: var(--fs-title);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--border-color);
}

.theme-toggle-wrapper {
    display: inline-block;
}

/* ============================================
   LANGUAGE DROPDOWN
   ============================================ */

.language-dropdown .dropdown-toggle {
    background: none;
    border: none;
    color: var(--text-color);
}

.language-dropdown .dropdown-toggle:hover {
    color: var(--primary-color);
}

/* ============================================
   PAGINATION
   ============================================ */

/* Broadsheet pagination — page folios: sharp squares, hairline rules,
   active page is a solid steel-blue block (the current folio), hover lifts
   the border to the accent rule. */
.pagination .page-link {
    color: var(--text-color);
    background-color: var(--card-bg);
    border: var(--rule-w) solid var(--border-strong);
    border-radius: var(--radius-xs);
    font-weight: 600;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.pagination .page-link:hover {
    color: var(--primary-color);
    background-color: var(--card-bg);
    border-color: var(--accent-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--on-primary);
}

.pagination .page-item.active .page-link:hover {
    color: var(--on-primary);
}

/* ============================================
   TABLES
   ============================================ */

.table {
    color: var(--text-color);
}

.table thead th {
    border-color: var(--border-strong);
    background-color: var(--surface-sunken);
}

.table tbody tr {
    border-color: var(--border-color);
}

.table tbody tr:hover {
    background-color: var(--surface-sunken);
}

/* ============================================
   FORMS — BROADSHEET
   Fields are ruled lines, not molded boxes. Sharp corners, a slightly
   heavier border-strong at rest so the field reads as an inset rule, and
   on focus the border becomes Lisbon Orange with a paper-colored gap ring
   (the page surface, not a blue halo) — the cursor line of a typesetter.
   ============================================ */

.form-control,
.form-select {
    background-color: var(--card-bg);
    border: var(--rule-w) solid var(--border-strong);
    border-radius: var(--radius-xs);
    color: var(--text-color);
    padding: var(--field-pad-y) var(--field-pad-x);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-color);
    /* Two-layer ring: a page-surface gap, then the orange stroke — reads as
       a crisp rule under the field, never a generic blue glow. */
    box-shadow: var(--field-focus-ring);
    background-color: var(--card-bg);
    color: var(--text-color);
}

.form-label {
    color: var(--text-ink);
    font-weight: 600;
    letter-spacing: 0.005em;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    border-radius: var(--radius-lg);
    border: none;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    min-height: calc(100vh - 56px);
}

.sidebar .nav-link {
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.25rem;
}

.sidebar .nav-link:hover {
    background-color: var(--border-color);
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* ============================================
   RESPONSIVE (Global Components)
   ============================================ */

@media (max-width: 768px) {
    .hero-section p {
        font-size: var(--fs-body);
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Respect reduced-motion: skip entrance animation, show content immediately */
@media (prefers-reduced-motion: reduce) {
    .fade-in {
        animation: none;
        opacity: 1;
    }
}

/* ============================================
   FONT SIZING (component-level)
   Utility classes .fs-1..fs-6 are intentionally NOT redefined here: Bootstrap's
   native fs-* scale owns them so utility classes stay consistent across the app.
   ============================================ */

a.badge {
    font-size: var(--fs-meta);
}

a.badge:hover {
    color: var(--accent-coral);
}

.card-title {
    font-size: var(--fs-title);
}

.dropdown-item {
    font-size: var(--fs-subtitle);
}

/* Form controls inherit the base rem scale so the accessibility font-size
   control (data-font-size on <html>) scales them together with the body. */
.form-control,
.form-select,
input,
textarea,
select {
    font-size: inherit;
}

.form-label {
    font-size: var(--fs-label);
}

/* ============================================
   MODULE POSITION CONTAINERS
   ============================================ */

.position-header-top .container-fluid,
.position-header-utility .container-fluid,
.position-main-nav .container-fluid,
.position-header-bottom .container-fluid,
.position-breadcrumb .container-fluid,
.position-footer-top .container-fluid,
.position-footer-bottom .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

/* Position containers full width in fluid mode */
body.layout-fluid .position-header-top .container-fluid,
body.layout-fluid .position-header-utility .container-fluid,
body.layout-fluid .position-main-nav .container-fluid,
body.layout-fluid .position-header-bottom .container-fluid,
body.layout-fluid .position-breadcrumb .container-fluid,
body.layout-fluid .position-footer-top .container-fluid,
body.layout-fluid .position-footer-bottom .container-fluid {
    max-width: 100%;
}

.position-main-nav {
    border-bottom: 1px solid var(--border-color);
    padding: 5px 0;
}

/* Header utility strip — sits directly below the header-top position and
   carries the header-language-select + header-theme-switch module positions
   side by side, centered to align with the centered masthead logo and the
   centered main menu. Deliberately kept transform-free so the open language
   dropdown's z-index never gets trapped in a stacking context. */
.position-header-utility {
    border-bottom: 1px solid var(--border-color);
    padding: 0.375rem 0;
}

.position-header-utility .container-fluid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.position-header-utility .module-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

/* ============================================
   MODULES GENERAL
   ============================================ */
   
.module-title {
    font-size: var(--fs-title);
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

/* ============================================
   TEMPLATE LAYOUT VARIABLES
   ============================================ */

:root {
    --header-main-height: 100px;
    /* Approximate rendered height of the header utility strip (language +
       theme bar below header-top); only consumed by the main-wrapper
       min-height footer-push heuristic. */
    --header-utility-height: 44px;
    --sticky-menu-height: 60px;
    --navbar-height: 85px;
}

/* ============================================
   NAVBAR - LOGO BAR
   ============================================ */

.header-main {
    background-color: var(--card-bg);
    z-index: 1001;
    border-bottom: 1px solid var(--border-color);
}

/* Logo row: center the logo (lisbon.vip masthead). The language/theme
   controls live in the header utility strip above this bar, so the row is
   a single centered column. */
.header-main .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--header-main-height);
}

/* Remove max-width constraint in fluid mode */
body.layout-fluid .header-main .container-fluid {
    max-width: 100%;
}

/* Logo Bar - centered column */
.header-main-left {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 1rem;
}

/* header-main-left module position */
.header-main-left .module-wrapper {
    margin: 0;
}

.header-main-left .module-wrapper .module-title {
    display: none;
}

/* Sidebar Layout - Flex structure */
.sidebar-layout {
    display: flex;
    gap: 1.5rem;
}

.sidebar-left-col,
.sidebar-right-col {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-layout-content {
    flex: 1;
    min-width: 0;
}

.module-wrapper {
    margin-bottom: 2.2rem;
}

.sidebar-left-col .module-wrapper,
.sidebar-right-col .module-wrapper {
    margin-bottom: 3rem;
}

.position-main-nav .module-wrapper {
    margin-bottom: 0;
}

.sidebar-left-col .module-wrapper:last-child,
.sidebar-right-col .module-wrapper:last-child {
    margin-bottom: 0;
}

/* Tablet and below responsive */
@media (max-width: 991.98px) {
    .sidebar-layout {
        flex-direction: column;
    }

    .sidebar-left-col,
    .sidebar-right-col {
        width: 100%;
    }
}

/* ============================================
   NAVBAR (GENERAL - Existing styles)
   ============================================ */

.navbar {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    padding: 0 20px;
}

/* Nav row: center the menu items (lisbon.vip centered megamenu). */
.main-nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 575.98px) {
    .main-nav-inner {
        justify-content: space-between;
    }
}

html[data-bs-theme="dark"] .navbar {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

html[data-bs-theme="dark"] .navbar .nav-link {
    color: var(--text-color);
}

/* Main menu hover style */
.navbar .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--surface-sunken);
}

html[data-bs-theme="dark"] .navbar .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(var(--bs-primary-rgb), 0.12);
}

html[data-bs-theme="dark"] .navbar-brand {
    color: var(--primary-color);
}

html[data-bs-theme="dark"] .navbar-toggler {
    border-color: var(--border-color);
    color: var(--text-color);
}

.navbar-toggler {
    padding: 0.25rem 0.5rem;
    font-size: var(--fs-subtitle);
}

.navbar-toggler-icon {
    width: 1.25rem;
    height: 1.25rem;
}

html[data-bs-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28233, 236, 239, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navbar Collapse (Mobile Menu) */
.navbar-collapse {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 0.35rem;
    box-shadow: var(--shadow);
}

/* Prevent mobile menu from pushing other elements when open */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1050;
        max-height: 70vh;
        overflow-y: auto;
    }
}

html[data-bs-theme="dark"] .navbar-collapse {
    background-color: var(--card-bg);
}

.navbar > .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    align-items: center;
}

/* Remove max-width constraint in fluid mode */
body.layout-fluid .navbar > .container-fluid {
    max-width: 100%;
}

.navbar-brand {
    padding-right: 60px;
    font-weight: 700;
    font-size: var(--fs-title);
    color: var(--primary-color);
}


.nav-link {
    font-weight: 500;
    padding: 0.5rem 0.7rem;
    color: var(--text-color);
    transition: color 0.2s ease;
    border-radius: var(--radius-xs);
}

/* ============================================
   SEARCH
   ============================================ */

.search-form-wrapper {
    max-width: 300px;
}

.search-form-wrapper .form-control {
    border-radius: var(--radius-xs) 0 0 var(--radius-xs);
    border: var(--rule-w) solid var(--border-strong);
    background-color: var(--bg-color);
    color: var(--text-color);
}

.search-form-wrapper .form-control:focus {
    border-color: var(--accent-color);
    box-shadow: var(--field-focus-ring);
    background-color: var(--card-bg);
}

.search-form-wrapper .input-group-text {
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
    border: var(--rule-w) solid var(--border-strong);
    border-left: 0;
}

.search-icon-btn {
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.search-icon-btn:hover {
    background-color: var(--accent-color);
    color: var(--on-primary);
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
}

.search-results-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.search-results-section:last-child {
    border-bottom: none;
}

.search-results-title {
    font-size: var(--fs-meta);
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    margin: 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.search-result-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-xs);
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.search-result-item .result-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    border-radius: var(--radius-xs);
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.search-result-item .result-info {
    flex: 1;
    min-width: 0;
}

.search-result-item .result-title {
    font-weight: 500;
    font-size: var(--fs-subtitle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-item .result-code {
    font-size: var(--fs-meta);
    color: var(--text-muted);
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.search-loading {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

html[data-bs-theme="dark"] .search-results-dropdown {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

html[data-bs-theme="dark"] .search-results-section {
    border-color: var(--border-color);
}

html[data-bs-theme="dark"] .search-result-item:hover {
    background-color: var(--surface-sunken);
}

/* ============================================
   LANGUAGE SELECTOR
   ============================================ */

/* Multi-column language dropdown - CSS multi-column layout */
.lang-dropdown-multi {
    column-count: var(--lang-cols, 1);
    column-gap: 0;
}

.lang-dropdown-multi > li {
    break-inside: avoid;
    border-top: 1px solid var(--dropdown-border-color, var(--border-color));
    border-bottom: none;
}

.lang-dropdown-multi > li.col-last {
    border-bottom: 1px solid var(--dropdown-border-color, var(--border-color));
}

html[data-bs-theme="dark"] .lang-dropdown-multi > li {
    border-top-color: var(--border-color);
}

html[data-bs-theme="dark"] .lang-dropdown-multi > li.col-last {
    border-bottom-color: var(--border-color);
}

/* Language dropdown menu stays above navbar and sticky bar */
.language-dropdown {
    position: relative;
    z-index: 1020;
}

.language-dropdown .dropdown-menu {
    z-index: 1020;
}

.language-dropdown .dropdown-item.active {
    background-color: var(--primary-color);
    color: white;
}

.language-dropdown .dropdown-item.active:hover {
    background-color: var(--secondary-color);
}

/* ============================================
   MAIN WRAPPER
   ============================================ */

.main-wrapper {
    display: flex;
    min-height: calc(100vh - var(--header-main-height) - var(--sticky-menu-height) - var(--header-utility-height));
    margin-top: 20px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Main wrapper full width in fluid mode */
body.layout-fluid .main-wrapper {
    max-width: 100%;
}

/* Desktop: sufficient margin-top for main-wrapper */
@media (min-width: 992px) {
    .main-wrapper {
        margin-top: 10px;
    }
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    min-width: 0;
    padding: 0 1rem;
    background-color: var(--bg-color);
}

.main-content > .container-fluid {
    max-width: 100%;
    margin-bottom: 20px;
}

/* ============================================
   PAGE HEADER — BROADSHEET MASTHEAD PLATE
   Not a filled banner. A printed editorial plate: hairline frame on all
   four sides, the title set in heavy ink on the page surface, and a single
   Lisbon Orange accent rule closing the bottom edge like a magazine
   section divider. The color does the talking, not a wash of primary.
   ============================================ */

.page-header {
    position: relative;
    background-color: var(--card-bg);
    color: var(--text-ink);
    padding: 1.75rem 1.5rem 1.5rem;
    margin-bottom: 2rem;
    overflow: hidden;
    border: var(--rule-w) solid var(--border-strong);
    border-bottom: var(--rule-w-strong) solid var(--accent-color);
    border-radius: var(--radius-lg);
}

.page-header .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Page header full width in fluid mode */
body.layout-fluid .page-header .container-fluid {
    max-width: 100%;
}

/* Section kicker line — a thin steel-blue rule + date/eyebrow slot sitting
   above the title. Broadsheet mastheads name the section before the story. */
.page-header h1 {
    font-size: var(--fs-headline);
    font-weight: 700;
    margin-bottom: 0;
    position: relative;
    display: inline-block;
    max-width: 100%;
    text-wrap: balance;
    letter-spacing: -0.015em;
    color: var(--text-ink);
}

/* Title accent — a short Lisbon Orange tick mark on the inline-start edge,
   like a typesetter's pilcrow mark, instead of an underline. */
.page-header h1::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0.14em;
    width: 3px;
    height: 0.72em;
    background: var(--accent-color);
}

/* On larger screens the tick clears the title text; on tight widths the
   h1 keeps its default padding so the mark never overlaps glyphs. */
@media (min-width: 576px) {
    .page-header h1 {
        padding-left: 0.625rem;
    }
}

/* The accent already lives in the bottom border; keep the dark-mode surface
   honest (card surface, not a primary fill). */
html[data-bs-theme="dark"] .page-header {
    background-color: var(--card-bg);
    color: var(--text-ink);
}


/* ============================================
   IMAGE MODAL (1024px max width)
   ============================================ */

/* Main clickable images */
.main-image-container img {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-image-container img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.image-modal-custom {
    max-width: 1024px;
}

.modal-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

.modal-header,
.modal-footer {
    border-color: var(--border-color);
}

/* Image Modal Styles */
#imageModal .modal-header,
#imageModal .modal-footer {
    background-color: var(--lightbox-overlay);
}

#imageModal .modal-footer {
    min-height: 30px;
}

#imageModal .btn-close {
    filter: invert(1) grayscale(1);
}

.image-modal-custom .modal-body {
    padding: 0;
    background-color: var(--lightbox-overlay);
}

.image-modal-custom .modal-content {
    background-color: transparent;
}

.image-modal-custom .modal-image {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
}

/* ============================================
   GALLERY MODAL - IMAGE NAVIGATION
   ============================================ */

.gallery-modal-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: var(--fs-body);
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.gallery-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav-btn:focus-visible {
    outline: 2px solid var(--accent-coral);
    outline-offset: 2px;
}

.gallery-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-nav-btn.gallery-prev {
    left: 15px;
}

.gallery-nav-btn.gallery-next {
    right: 15px;
}

.gallery-nav-btn:disabled {
    opacity: 0.3;
    cursor: not allowed;
}

.gallery-nav-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-50%) scale(1);
}

.gallery-image-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: var(--fs-meta);
    font-weight: 500;
    z-index: 10;
}

/* Larger tap target for touch devices */
@media (max-width: 768px) {
    .gallery-nav-btn {
        width: 44px;
        height: 44px;
        font-size: var(--fs-body);
    }

    .gallery-nav-btn.gallery-prev {
        left: 10px;
    }

    .gallery-nav-btn.gallery-next {
        right: 10px;
    }

    .gallery-image-counter {
        bottom: 10px;
        font-size: var(--fs-meta);
        padding: 5px 12px;
    }
}

.image-thumbnails {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
}

.image-thumbnail-custom {
    width: 135px;
    height: auto;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid transparent;
}

.image-thumbnail-custom:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.image-thumbnail-custom.active {
    border-color: var(--primary-color);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

/* Site footer — light surface (lisbon.vip identity: white footer with dark text).
   Colors come from the --footer-* variables so the theme override blocks retint
   the footer with the rest of the palette (no hardcoded values). */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0;
    border-top: 1px solid var(--footer-border);
    flex-shrink: 0;
}

.site-footer .text-muted {
    color: var(--footer-text);
}

.footer-contact-icon {
    color: var(--footer-heading);
    font-size: 200%;
    line-height: 50px;
 }

.site-footer a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer h5 {
    color: var(--footer-heading);
    font-weight: 600;
    margin-bottom: 1rem;
}

.site-footer a:hover {
    color: var(--footer-link-hover);
}

.site-footer hr {
    border-color: var(--footer-border);
}

.site-footer > .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

/* Footer full width in fluid mode */
body.layout-fluid .site-footer > .container-fluid {
    max-width: 100%;
}

/* Footer Position Row */
.site-footer .position-row {
    margin-bottom: 1.5rem;
}

.site-footer .position-row .position-col {
    padding: 0 1rem;
}

.site-footer .position-row .position-col + .position-col {
    border-left: 1px solid var(--footer-border);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 991px) {
    :root {
        --header-main-height: 100px;
        --sticky-menu-height: 50px;
        --navbar-height: 120px;
    }

    .header-main {
        min-height: var(--header-main-height);
    }

    .main-content {
        width: 100%;
        padding: 0 0.5rem;
        margin-top: 40px;
    }

    .main-wrapper {
        max-width: 100%;
        margin-top: 20px;
    }

    .search-form-wrapper {
        max-width: 100%;
        order: 3;
        width: 100%;
    }

    .page-header .container-fluid {
        padding: 0 1rem;
    }
}

@media (max-width: 767px) {
    .main-wrapper {
        margin-top: 20px;
    }

    .main-content {
        width: 100%;
        padding: 0 0.4rem;
    }

    .page-header h1 {
        font-size: var(--fs-h3);
    }

    .page-header {
        padding: 1.5rem 1rem 1.25rem;
    }

    /* Mobile: keep the inline-start tick but remove the text offset so the
       short title does not feel shoved against the accent mark. */
    .page-header h1 {
        padding-left: 0;
    }

    .page-header h1::before {
        display: none;
    }
}

@media (max-width: 575px) {
    .main-content {
        width: 100%;
        padding: 0 0.3rem;
        margin-top: 0;
    }

    .header-main .container-fluid {
        justify-content: center;
    }
}

.navbar .container-fluid {
    padding-left: 0;
}

/* Main menu active item - with hover appearance */
.navbar .nav-link.active {
    color: var(--primary-color);
    background-color: var(--surface-sunken);
}

html[data-bs-theme="dark"] .navbar .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(var(--bs-primary-rgb), 0.12);
}

ul.navbar-nav li.nav-item {
    margin-right: 5px;
}

/* ============================================
   RTL - LAYOUT SPECIFIC
   Arabic, Persian and other RTL languages
   ============================================ */

/* RTL for navbar */
html[dir="rtl"] .navbar-brand {
    margin-left: 1rem;
    margin-right: 0;
}

html[dir="rtl"] .navbar-nav {
    padding-right: 0;
}

html[dir="rtl"] .nav-item {
    text-align: right;
}

/* RTL for footer */
html[dir="rtl"] footer {
    text-align: right;
}

html[dir="rtl"] footer .text-start {
    text-align: right;
}

html[dir="rtl"] footer .text-end {
    text-align: left;
}

/* Title accent tick — RTL moves to the inline-start edge (right) and the
   title text offset flips with it. */
html[dir="rtl"] .page-header h1::before {
    left: auto;
    right: 0;
}

@media (min-width: 576px) {
    html[dir="rtl"] .page-header h1 {
        padding-left: 0;
        padding-right: 0.625rem;
    }
}


/* ============================================
   CSS-ONLY TOOLTIP (data-tooltip attribute)
   ============================================ */

[data-tooltip] {
    position: relative;
}

/* Show on hover AND keyboard focus (WCAG 1.4.13 / 2.4.7 — keyboard parity) */
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-color);
    color: var(--card-bg);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-xs);
    font-size: var(--fs-meta);
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
}

[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--text-color);
    z-index: 10000;
    pointer-events: none;
}

/* Bottom variant (data-tooltip-pos="bottom") — for controls at the very top
   of the page (header utility strip), where a top-positioned tooltip is
   clipped off the viewport. Mirrors the base tooltip's centering, but below
   the control with the arrow pointing up; centering is direction-agnostic,
   so no RTL mirror is needed. */
[data-tooltip-pos="bottom"]:hover::after,
[data-tooltip-pos="bottom"]:focus-visible::after {
    bottom: auto;
    top: calc(100% + 6px);
}

[data-tooltip-pos="bottom"]:hover::before,
[data-tooltip-pos="bottom"]:focus-visible::before {
    bottom: auto;
    top: calc(100% + 2px);
    border-top-color: transparent;
    border-bottom-color: var(--text-color);
}

/* ============================================
   BADGE MULTILINE SUPPORT
   ============================================ */

.badge {
    white-space: normal;
    line-height: 1.4;
}


/* ============================================
   SWEET ALERT 2
   ============================================ */

.swal2-popup {
    font-size: var(--fs-body);
}

.swal2-title {
    font-size: var(--fs-title);
}

.swal2-html-container {
    font-size: var(--fs-subtitle);
}

.swal2-popup .swal2-actions .swal2-confirm {
    font-size: var(--fs-body);
}

/* ============================================
   LISBON MAGAZINE CARD GRAMMAR
   Targets the existing module class vocabulary emitted by the carousel
   (.cc-* / .fpc-*) and magazine (.cmag-* / .fpm-*) renderers so a page
   configured with those modules reads as the lisbon.vip magazine look:
   full-bleed portrait overlay carousel cards alternating with a
   "1 big featured + thumbnail list" magazine block, sharp corners, no
   resting shadow. Palette flows from the tokens above.
   ============================================ */

/* --- Sharp corners + no resting shadow across magazine cards --- */
.cc-card,
.fpc-card,
.cmag-main-card,
.cmag-side-item,
.fpm-main-card,
.fpm-side-item {
    border-radius: 0;
    box-shadow: none;
}

/* --- Magazine section titles: centered, with the orange rule --- */
.cmag-header,
.fpm-header {
    text-align: center;
    margin-bottom: 2rem;
}

.cmag-title,
.fpm-title {
    font-size: var(--fs-display);
    font-weight: 600;
    color: var(--text-ink);
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* ============================================
   PORTRAIT OVERLAY CAROUSEL CARD
   (category-carousel / featured-pages-carousel in fullImages mode)
   Full-bleed image, portrait aspect, bottom black gradient, white title.
   ============================================ */
.cc-card.cc-card-full .cc-card-image,
.fpc-card.fpc-card-full .fpc-card-image {
    aspect-ratio: 475 / 560;
}

.cc-card-overlay,
.fpc-card-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 60%);
}

.cc-page-title-overlay,
.fpc-page-title-overlay {
    font-size: 1rem;          /* 16px */
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
}

.cc-page-title-overlay:hover,
.fpc-page-title-overlay:hover {
    color: #ffffff;
    text-decoration: underline;
}

.cc-category-name-overlay,
.fpc-category-name-overlay {
    font-size: 0.75rem;       /* 12px */
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.35rem;
    display: block;
}

/* Carousel arrows: minimal, frosted, sit at vertical center */
.cc-arrow,
.fpc-arrow {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.cc-arrow:hover,
.fpc-arrow:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* ============================================
   MAGAZINE BLOCK — 1 big featured + thumbnail list
   (category-magazine / featured-pages-magazine)
   ============================================ */

/* Featured (main) card: landscape image on top, title below in dark ink */
.cmag-main-image,
.fpm-main-image {
    padding-top: 62.5%;       /* 16:10 aspect */
}

.cmag-main-title,
.fpm-main-title {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-ink);
    margin-top: 0.75rem;
}

.cmag-main-title a,
.fpm-main-title a {
    color: inherit;
}

.cmag-main-title a:hover,
.fpm-main-title a:hover {
    color: var(--primary-color);
}

/* Category label above the title: brand blue */
.cmag-category,
.fpm-category {
    color: var(--primary-color);
    font-weight: 600;
}

.cmag-main-intro,
.fpm-main-intro {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Thumbnail list rows (side items): image left, title right */
.cmag-side-image,
.fpm-side-image {
    width: 163px;
    min-width: 163px;
}

.cmag-side-title,
.fpm-side-title {
    font-size: 1rem;          /* 16px */
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-ink);
}

.cmag-side-title a,
.fpm-side-title a {
    color: inherit;
}

.cmag-side-title a:hover,
.fpm-side-title a:hover {
    color: var(--primary-color);
}

/* ============================================
   SLIDER (single-slide hero) — keep consistent sharp frameless look
   ============================================ */
.home-hero-slider .slider-slide {
    border-radius: 0;
}

/* ============================================
   LINKS — lisbon.vip underlines body links in brand blue.
   Buttons are exempted (:not(.btn)): this rule's specificity would otherwise
   out-rank the .btn framework layer and repaint an anchor-button's text with
   the link color — identical to its own fill — plus an editorial underline.
   ============================================ */
.article-body a:not(.btn),
.main-content a:not(.btn) {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.main-content a:not(.btn):hover {
    color: var(--text-ink);
}

/* ============================================
   CONTENT TYPOGRAPHY — BROADSHEET BODY SPECIMEN
   In-body mark, code, quotes and rules. These strip the framework's raw
   defaults (mark yellow, code pink) and restamp them as printed editorial
   specimens: sunken chips for code, a tinted highlight for mark, and a
   pull-quote framed by hairline rules above and below — never a side stripe.
   ============================================ */
.article-body mark,
.main-content mark {
    background-color: var(--primary-tint);
    color: var(--text-ink);
    padding: 0.1em 0.35em;
    border-radius: var(--radius-sm);
}

.article-body code,
.main-content code {
    color: var(--primary-color);
    background-color: var(--surface-sunken);
    border: var(--rule-w) solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.15em 0.4em;
    font-size: 0.875em;
}

/* Code already inside a pre block keeps the block's surface — no nested chip. */
.article-body pre code,
.main-content pre code {
    background-color: transparent;
    border: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.article-body kbd,
.main-content kbd {
    border: var(--rule-w) solid var(--border-strong);
    border-radius: var(--radius-sm);
}

.article-body pre,
.main-content pre {
    background-color: var(--surface-sunken);
    border: var(--rule-w) solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    padding: 1rem;
}

/* Pull-quote — a printed excerpt plate framed by hairline rules top and
   bottom, the way a broadsheet sets a quote lifted from the story. */
.article-body blockquote,
.main-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-top: var(--rule-w) solid var(--border-strong);
    border-bottom: var(--rule-w) solid var(--border-strong);
    color: var(--text-ink);
    font-size: var(--fs-lead);
    font-style: italic;
}

.article-body blockquote p,
.main-content blockquote p {
    font-size: inherit;
    margin-bottom: 0.25rem;
}

.article-body blockquote cite,
.main-content blockquote cite,
.article-body blockquote footer,
.main-content blockquote footer {
    font-size: var(--fs-meta);
    font-style: normal;
    color: var(--text-muted);
}

.article-body hr,
.main-content hr {
    border-top: var(--rule-w) solid var(--border-strong);
    opacity: 1;
}
