
/* ============================================================
   FOUNDATION PATCH — israel.in.ua
   Вставлено на початок style.css
   Версія: 2026-05
   ============================================================ */

/* ── 1. РОЗШИРЕННЯ :root — відсутні змінні ─────────────────
   НЕ дублює існуючі (--primary-blue, --accent-blue тощо),
   лише доповнює те, чого немає.
   ─────────────────────────────────────────────────────────── */
:root {
  --text-dark:      #1e293b;
  --border-color:   #e2e8f0;
  --bg-light:       #f1f5f9;
  --text-secondary: #475569;

  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  --fs-xs:   0.688rem;
  --fs-sm:   0.75rem;
  --fs-base: 1rem;
  --fs-md:   1.0625rem;
  --fs-lg:   1.125rem;
  --fs-xl:   1.25rem;
  --fs-2xl:  1.5rem;
  --fs-3xl:  1.875rem;
  --fs-4xl:  2.25rem;

  --lh-tight:   1.25;
  --lh-snug:    1.375;
  --lh-normal:  1.5;
  --lh-relaxed: 1.625;
  --lh-loose:   2;

  --z-below:    -1;
  --z-base:      0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-modal:    300;
  --z-toast:    400;

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}


/* ── 2. RESET / NORMALIZE ───────────────────────────────────*/
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6,
p, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
}

img, video, svg, canvas, iframe, embed, object {
  display: block;
  max-width: 100%;
}

body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}


/* ── 3. CONTAINER — оновлений до 1400px ─────────────────────*/
.container {
  max-width: 1400px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left:  2px;
  padding-right: 2px;
}

@media (min-width: 600px) {
  .container {
    padding-left:  var(--space-5);
    padding-right: var(--space-5);
  }
}

@media (min-width: 768px) {
  .container {
    padding-left:  var(--space-6);
    padding-right: var(--space-6);
  }
}

@media (min-width: 1440px) {
  .container {
    padding-left:  var(--space-8);
    padding-right: var(--space-8);
  }
}


/* ── 4. БАЗОВА ТИПОГРАФІКА ───────────────────────────────────*/
body {
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
}

@media (min-width: 1024px) {
  body {
    font-size: var(--fs-md);
  }
}

.article-body {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .article-body {
    font-size: var(--fs-lg);
  }
}

h1 { font-size: clamp(var(--fs-2xl), 4vw, var(--fs-4xl));  line-height: var(--lh-tight); }
h2 { font-size: clamp(var(--fs-xl),  3vw, var(--fs-3xl));  line-height: var(--lh-tight); }
h3 { font-size: clamp(var(--fs-lg),  2.5vw, var(--fs-2xl)); line-height: var(--lh-snug); }
h4 { font-size: clamp(var(--fs-base), 2vw, var(--fs-xl));  line-height: var(--lh-snug); }


/* ── 5. УТИЛІТИ ─────────────────────────────────────────────*/
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── END FOUNDATION PATCH ────────────────────────────────── */


/* Category badge — fullstory only */
.cat-pill {
    display: inline-block;
    padding: 3px 12px;
    background: var(--cat-color, var(--accent-blue));
    color: #fff !important;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

/* CAT_COLORS_START */
.cat-1, .ag-breadcrumbs a[href$="/news/"] { --cat-color: #2563eb; }
.cat-2, .ag-breadcrumbs a[href$="/novyny-ukrayiny/"] { --cat-color: #1e00ff; }
.cat-3, .ag-breadcrumbs a[href$="/ekonomika-ta-nerukhomist-izrayilyu/"] { --cat-color: #f20232; }
.cat-4, .ag-breadcrumbs a[href$="/blyzkiy-skhid/"] { --cat-color: #ea580c; }
.cat-5, .ag-breadcrumbs a[href$="/army-and-security/"] { --cat-color: #475569; }
.cat-6, .ag-breadcrumbs a[href$="/zdorovya-ta-medytsyna/"] { --cat-color: #dc2626; }
.cat-7, .ag-breadcrumbs a[href$="/kultura-ta-sport/"] { --cat-color: #7c3aed; }
.cat-8, .ag-breadcrumbs a[href$="/oglyad-zmi/"] { --cat-color: #0891b2; }
.cat-9, .ag-breadcrumbs a[href$="/tekhno/"] { --cat-color: #0284c7; }
.cat-10, .ag-breadcrumbs a[href$="/suspilstvo/"] { --cat-color: #4f46e5; }
.cat-11, .ag-breadcrumbs a[href$="/tradytsiyi-ta-svyata/"] { --cat-color: #d97706; }
.cat-12, .ag-breadcrumbs a[href$="/diaspora-ukrayinska/"] { --cat-color: #e11d48; }
.cat-14, .ag-breadcrumbs a[href$="/mandrivki/"] { --cat-color: #059669; }
.cat-15, .ag-breadcrumbs a[href$="/politics/"] { --cat-color: #6b7280; }
.cat-16, .ag-breadcrumbs a[href$="/vybory-izrail-2026/"] { --cat-color: #b91c1c; }
.cat-17, .ag-breadcrumbs a[href$="/weekend-routes/"] { --cat-color: #65a30d; }
.cat-18, .ag-breadcrumbs a[href$="/history-places/"] { --cat-color: #92400e; }
.cat-19, .ag-breadcrumbs a[href$="/afisha/"] { --cat-color: #a21caf; }
.cat-20, .ag-breadcrumbs a[href$="/regions/"] { --cat-color: #0369a1; }
.cat-21, .ag-breadcrumbs a[href$="/north/"] { --cat-color: #0f766e; }
.cat-22, .ag-breadcrumbs a[href$="/center/"] { --cat-color: #9fa7bc; }
.cat-23, .ag-breadcrumbs a[href$="/south/"] { --cat-color: #c2410c; }
.cat-24, .ag-breadcrumbs a[href$="/jerusalem/"] { --cat-color: #b45309; }
.cat-25, .ag-breadcrumbs a[href$="/crime/"] { --cat-color: #607d8b; }
.cat-26, .ag-breadcrumbs a[href$="/world/"] { --cat-color: #030303; }
.cat-27, .ag-breadcrumbs a[href$="/global/"] { --cat-color: #09aafb; }
.cat-28, .ag-breadcrumbs a[href$="/life/"] { --cat-color: #607d8b; }
/* pill-nav active colors */
.pill-nav a[data-cat="1"].active, .pill-nav a[data-cat="1"]:hover { background:#2563eb; border-color:#2563eb; }
.pill-nav a[data-cat="2"].active, .pill-nav a[data-cat="2"]:hover { background:#1e00ff; border-color:#1e00ff; }
.pill-nav a[data-cat="3"].active, .pill-nav a[data-cat="3"]:hover { background:#f20232; border-color:#f20232; }
.pill-nav a[data-cat="4"].active, .pill-nav a[data-cat="4"]:hover { background:#ea580c; border-color:#ea580c; }
.pill-nav a[data-cat="5"].active, .pill-nav a[data-cat="5"]:hover { background:#475569; border-color:#475569; }
.pill-nav a[data-cat="6"].active, .pill-nav a[data-cat="6"]:hover { background:#dc2626; border-color:#dc2626; }
.pill-nav a[data-cat="7"].active, .pill-nav a[data-cat="7"]:hover { background:#7c3aed; border-color:#7c3aed; }
.pill-nav a[data-cat="8"].active, .pill-nav a[data-cat="8"]:hover { background:#0891b2; border-color:#0891b2; }
.pill-nav a[data-cat="9"].active, .pill-nav a[data-cat="9"]:hover { background:#0284c7; border-color:#0284c7; }
.pill-nav a[data-cat="10"].active, .pill-nav a[data-cat="10"]:hover { background:#4f46e5; border-color:#4f46e5; }
.pill-nav a[data-cat="11"].active, .pill-nav a[data-cat="11"]:hover { background:#d97706; border-color:#d97706; }
.pill-nav a[data-cat="12"].active, .pill-nav a[data-cat="12"]:hover { background:#e11d48; border-color:#e11d48; }
.pill-nav a[data-cat="14"].active, .pill-nav a[data-cat="14"]:hover { background:#059669; border-color:#059669; }
.pill-nav a[data-cat="15"].active, .pill-nav a[data-cat="15"]:hover { background:#6b7280; border-color:#6b7280; }
.pill-nav a[data-cat="16"].active, .pill-nav a[data-cat="16"]:hover { background:#b91c1c; border-color:#b91c1c; }
.pill-nav a[data-cat="17"].active, .pill-nav a[data-cat="17"]:hover { background:#65a30d; border-color:#65a30d; }
.pill-nav a[data-cat="18"].active, .pill-nav a[data-cat="18"]:hover { background:#92400e; border-color:#92400e; }
.pill-nav a[data-cat="19"].active, .pill-nav a[data-cat="19"]:hover { background:#a21caf; border-color:#a21caf; }
.pill-nav a[data-cat="20"].active, .pill-nav a[data-cat="20"]:hover { background:#0369a1; border-color:#0369a1; }
.pill-nav a[data-cat="21"].active, .pill-nav a[data-cat="21"]:hover { background:#0f766e; border-color:#0f766e; }
.pill-nav a[data-cat="22"].active, .pill-nav a[data-cat="22"]:hover { background:#9fa7bc; border-color:#9fa7bc; }
.pill-nav a[data-cat="23"].active, .pill-nav a[data-cat="23"]:hover { background:#c2410c; border-color:#c2410c; }
.pill-nav a[data-cat="24"].active, .pill-nav a[data-cat="24"]:hover { background:#b45309; border-color:#b45309; }
.pill-nav a[data-cat="25"].active, .pill-nav a[data-cat="25"]:hover { background:#607d8b; border-color:#607d8b; }
.pill-nav a[data-cat="26"].active, .pill-nav a[data-cat="26"]:hover { background:#030303; border-color:#030303; }
.pill-nav a[data-cat="27"].active, .pill-nav a[data-cat="27"]:hover { background:#09aafb; border-color:#09aafb; }
.pill-nav a[data-cat="28"].active, .pill-nav a[data-cat="28"]:hover { background:#607d8b; border-color:#607d8b; }
/* CAT_COLORS_END */

:root {
    /* Color Palette */
    --primary-blue: #1a365d; /* Deep blue for text and logo */
    --accent-blue: #2563eb; /* Active/Button blue */
    --accent-orange: #f97316; /* Notifications/badges */
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-card: rgba(255, 255, 255, 0.65); /* Glass Background */
    --border-glass: rgba(255, 255, 255, 0.8);
    
    /* Background Gradient (Subtle UA/IL mix) */
    --bg-gradient: #f8fafc;
    
    /* Anti-gravity Shadows */
    --shadow-soft: 0 8px 32px rgba(37, 99, 235, 0.05); /* Blue tinted shadow */
    --shadow-hover: 0 16px 48px rgba(37, 99, 235, 0.12);
    
    /* Border Radius */
    --radius-md: 12px;
    --radius-lg: 20px;
}

@media (max-width: 768px) {
    .ambient-blob { display: none; }
    .ambient-bg { overflow: hidden; max-width: 100vw; }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background: var(--bg-gradient);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Atmospheric Background --- */
.ambient-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-gradient);
}

.ambient-blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.6;
    border-radius: 50%;
    animation: floatBlob 25s infinite alternate ease-in-out;
}

.blob-blue {
    width: 600px; height: 600px;
    background: rgba(37, 99, 235, 0.15);
    top: -10%; right: -10%;
}

.blob-yellow {
    width: 500px; height: 500px;
    background: rgba(245, 158, 11, 0.15);
    bottom: -10%; left: -10%;
    animation-delay: -5s;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-80px, 80px) scale(1.1); }
}

a {
    text-decoration: none;
    color: inherit;
}

/* .container — визначено у FOUNDATION PATCH на початку файлу */

/* --- Header & Navigation --- */
.logo-block {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-blue);
}

.logo-block h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 16px 24px;
    border-radius: 50px;
    border: none;
    box-shadow: var(--shadow-soft);
    font-size: 1rem;
    outline: none;
}

.search-bar button {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: 8px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 50px;
    width: 40px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-bar button:hover {
    background: #1d4ed8;
}

/* --- Section Titles --- */
.section-title {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 24px;
    font-weight: 600;
}

/* --- Latest News Row (Horizontal) --- */
.news-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.news-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.news-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.news-card-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-content h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--primary-blue);
    line-height: 1.3;
}

.news-card-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.learn-more {
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 600;
    margin-top: auto;
}

/* --- Service Grid (The Core) --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.service-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: #eff6ff;
    color: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.1rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* --- Quick Links & Map Area --- */
.lower-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    margin-bottom: 80px;
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quick-link-btn {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary-blue);
    box-shadow: var(--shadow-soft);
    transition: background 0.2s;
}

.quick-link-btn:hover {
    background: #f8fafc;
}

.map-container {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    height: 100%;
    min-height: 250px;
    background-image: url('https://images.unsplash.com/photo-1524661135-423995f22d0b?q=80&w=800');
    background-size: cover;
    background-position: center;
    position: relative;
}

.map-overlay {
    position: absolute;
    top: 20px; left: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

/* --- Footer --- */
.main-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h4 {
    color: var(--primary-blue);
    margin-bottom: 16px;
    font-size: 1rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
}

/* --- Modular Bento Grid Layout --- */
.modular-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
    margin-bottom: 60px;
}

/* Top Dashboard (Hero + Widgets) */
/* Main layout: left (hero+news) / right sidebar — mobile-first */
.bento-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
}

.bento-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bento-news-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 600px) {
    .bento-news-row { grid-template-columns: 1fr 1fr; gap: 16px; }
}

@media (min-width: 900px) {
    .bento-main { grid-template-columns: 2fr 1fr; gap: 24px; }
    .bento-left { gap: 24px; }
    .bento-news-row { gap: 24px; }
}

/* Travel section on homepage */
.travel-home-section { margin-top: 32px; }
.travel-home-title { font-size: 1.2rem; font-weight: 700; color: var(--text-dark); display: flex; align-items: center; gap: 8px; margin: 0; }
.travel-home-title i { color: var(--primary-blue); }
.travel-home-more { font-size: 0.85rem; color: var(--primary-blue); text-decoration: none; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.travel-home-more:hover { text-decoration: underline; }
.travel-home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1024px) { .travel-home-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .travel-home-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }

/* Quick actions: 3 cols on mobile, 4 on wider screens */
.module-card--compact .quick-action-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.module-card--compact .quick-action-btn {
    padding: 10px 6px;
    font-size: 0.8rem;
}
@media (min-width: 480px) {
    .module-card--compact .quick-action-grid { grid-template-columns: repeat(4, 1fr); }
}

/* .bento-top — collapsed by default on mobile (bento-main is 1fr base) */

.hero-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.hero-wrapper .module-hero { flex: none; }

/* Main Hero Module — mobile-first */
.module-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 240px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

@media (min-width: 480px) { .module-hero { height: 280px; } }
@media (min-width: 768px) { .module-hero { height: 360px; } }
@media (min-width: 1024px) { .module-hero { height: 460px; } }

.module-hero:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.module-hero-bg {
    position: absolute;
    inset: 0;
}

.module-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.module-hero:hover .module-hero-bg img { transform: scale(1.05); }

.module-hero-cats {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
}

.module-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 100%;
    overflow: hidden;
    background: linear-gradient(0deg, rgba(0,50,120,0.95) 0%, rgba(0,50,120,0.5) 55%, transparent 100%);
    padding: 36px 16px 16px;
    z-index: 2;
}

.module-hero-content h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    margin-bottom: 6px;
}

@media (min-width: 480px) {
    .module-hero-content { padding: 40px 20px 20px; }
    .module-hero-content h2 { font-size: 1.4rem; }
}

@media (min-width: 768px) {
    .module-hero-content { padding: 50px 28px 24px; }
    .module-hero-content h2 { font-size: 1.7rem; }
}

@media (min-width: 1024px) {
    .module-hero-content { padding: 50px 30px 30px; }
    .module-hero-content h2 { font-size: 2rem; }
}

.module-hero-content h2 a {
    color: #fff;
    text-decoration: none;
    position: relative;
    z-index: 3;
}

.module-hero-content p {
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    line-height: 1.6;
}

/* Right Sidebar Modules */
.bento-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.module-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 10px;
}

.module-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Bento Weather Widget */
.weather-bento {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}
.module-card--compact { padding: 16px; }
.module-header--sm { margin-bottom: 12px; padding-bottom: 8px; }
.module-header--sm h3 { font-size: 1rem; }

.wb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: rgba(255,255,255,0.35);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 8px 4px;
    text-align: center;
}
.wb-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}
.wb-temp {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.1;
}
.wb-name {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Rates Bento Widget */
.rates-bento {
    display: flex;
    flex-direction: row;
    gap: 0;
    text-align: center;
}
.rb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    padding: 4px 2px;
    border-right: 1px solid var(--border-glass);
}
.rb-item:last-child { border-right: none; }
.rb-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    white-space: nowrap;
}
.rb-val {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.1;
}
.rb-change {
    font-size: 0.7rem;
    font-weight: 600;
}
.rb-up   { color: #10b981; }
.rb-down { color: #ef4444; }
.rb-flat { color: var(--text-muted); }

/* Utility Module (Weather/Rate) */
.utility-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    text-align: center;
}

.utility-item h4 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
}

.utility-item .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue);
}

/* Quick Action Grid inside module */
.quick-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.quick-action-btn {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 15px 10px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-blue);
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-action-btn i {
    display: block;
    font-size: 1.5rem;
    color: var(--accent-blue);
    margin-bottom: 8px;
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

/* --- Lower Bento Grid (3 Columns) — mobile-first --- */
.bento-lower {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .bento-lower { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

/* === Україна сьогодні === */
.ukr-news-list { display: flex; flex-direction: column; gap: 0; }

.ukr-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.ukr-item:last-child { border-bottom: none; }

.ukr-item__link {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 5px;
    transition: color 0.2s;
}
.ukr-item__link:hover { color: var(--accent-blue); }

.ukr-item__meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ukr-source-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #005BBB;
    display: block;
    margin: 10px 0 2px;
}
.ukr-source-label:first-child { margin-top: 0; }
.ukr-source-label + .ukr-source-label,
.feed-item + .ukr-source-label { margin-top: 10px; }

.ukr-item__date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* bento-lower mobile handled above (mobile-first) */


/* Live Feed Module */
.live-feed-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-item {
    display: flex;
    gap: 12px;
}

.feed-hot-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(220, 38, 38, 0.88);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 4px;
    margin-bottom: 5px;
}

.feed-loc {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.67rem;
    color: #6b7280;
}

.feed-time {
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-weight: 600;
    white-space: nowrap;
}

.feed-title {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.4;
}

/* Forum Module */
.forum-topic {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.forum-icon {
    width: 32px;
    height: 32px;
    background: #eff6ff;
    color: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.forum-topic h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.forum-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Anti-Gravity Breadcrumbs --- */
/* Wrapper для стрілок категорій + міста */
.cat-location-row {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

/* Location pills — parallelogram chain under title */
.loc-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 8px 0 12px;
    max-width: 100%;
    overflow: hidden;
}
.loc-pill {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 16px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    transform: skewX(-18deg);
    margin-right: 2px;
    position: relative;
}
.loc-pill-inner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transform: skewX(18deg);
}
.loc-pill-city         { background: #00ffff; z-index: 2; padding-left: 14px; color: #1a365d; }
.loc-pill-region       { background: #00ffff; z-index: 1; padding-left: 20px; padding-right: 14px; color: #1a365d; }
.loc-pill:last-child   { margin-right: 0; }
.loc-pill svg          { width: 15px; height: 15px; flex-shrink: 0; }

/* Стрілка міста — той самий shape що ag-breadcrumbs але нейтральний колір */
.city-arrow {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 18px 0 22px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    margin-left: -8px;
    z-index: 1;
    position: relative;
    background-color: #475569;
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 50%, 100% 100%, 10px 100%, 0% 50%);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25), 0 2px 4px rgba(0,0,0,0.15),
                inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -1px 0 rgba(0,0,0,0.15);
    background-image: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.06) 45%, rgba(0,0,0,0.08) 100%);
    background-blend-mode: overlay;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
}

.city-arrow:hover {
    filter: brightness(1.15) drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.pin-badge {
    position: absolute;
    top: 12px;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    background: rgba(220, 38, 38, 0.82);
    border-radius: 6px 0 0 6px;
    padding: 5px 12px 5px 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    box-shadow: -2px 2px 8px rgba(0,0,0,0.25);
    z-index: 10;
}
.pin-badge svg { width: 14px; height: 14px; }

/* Mobile: simple single category badge; Desktop: full breadcrumb chain */
.cat-badge-mobile {
    display: inline-block;
    background: var(--primary-blue);
    color: #fff !important;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.6px;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 6px;
}
.ag-breadcrumbs.cat-breadcrumbs-desktop { display: none; }

@media (min-width: 768px) {
    .cat-badge-mobile { display: none; }
    .ag-breadcrumbs.cat-breadcrumbs-desktop { display: inline-flex; }
}

.ag-breadcrumbs {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 18px;
    font-size: 0;
}

.article-meta-top .ag-breadcrumbs {
    margin-bottom: 0;
}

.ag-breadcrumbs a {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 18px 0 22px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #fff !important;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.6px;
    white-space: nowrap;
    margin-left: -8px;
    z-index: 1;

    /* Arrow chevron shape: notch on left, point on right */
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 50%, 100% 100%, 10px 100%, 0% 50%);

    /* Anti-gravity 3D: top highlight + deep shadow */
    box-shadow:
        0 6px 16px rgba(0,0,0,0.25),
        0 2px 4px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.35),
        inset 0 -1px 0 rgba(0,0,0,0.15);

    /* Shine overlay via gradient */
    background-image: linear-gradient(
        180deg,
        rgba(255,255,255,0.22) 0%,
        rgba(255,255,255,0.06) 45%,
        rgba(0,0,0,0.08) 100%
    );
    background-blend-mode: overlay;

    transition:
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        filter 0.25s ease,
        z-index 0s;
}

/* First crumb: flat left edge */
.ag-breadcrumbs a:first-child {
    clip-path: polygon(0% 0%, 100% 0%, calc(100% - 10px) 50%, 100% 100%, 0% 100%);
    padding-left: 14px;
    margin-left: 0;
}

/* Hover: float up + brighten glow */
.ag-breadcrumbs a:hover {
    transform: scale(1.06);
    z-index: 20;
    filter: brightness(1.18) drop-shadow(0 10px 18px rgba(0,0,0,0.35));
}

/* Reverse z-index so left arrows render on top of right arrows (shows chevron tips) */
.ag-breadcrumbs a:nth-child(1) { z-index: 6; }
.ag-breadcrumbs a:nth-child(2) { z-index: 5; }
.ag-breadcrumbs a:nth-child(3) { z-index: 4; }
.ag-breadcrumbs a:nth-child(4) { z-index: 3; }
.ag-breadcrumbs a:nth-child(5) { z-index: 2; }

/* Hide " / " separator text/elements output by {link-category} */
.ag-breadcrumbs > *:not(a) { display: none; }

/* breadcrumb arrows use --cat-color set above */
.ag-breadcrumbs a { background-color: var(--cat-color, var(--accent-blue)); }

/* --- Glassmorphism Overrides for Legacy Header/Footer --- */
.header-info-bar, .header-nav-bar {
    background: #ffffff !important; /* Solid white for crisp, editorial look */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}


@media (max-width: 768px) {
    /* On mobile keep only Home + first category, hide deeper levels */
    .speedbar-inner a:nth-child(n+3) { display: none; }
    .speedbar-inner { white-space: nowrap; overflow: hidden; padding-left: 10px; padding-right: 10px; }
}

.speedbar-nav {
    position: static !important;
    margin: 0 !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    background: linear-gradient(180deg, #ffffff 0%, #eef3f9 100%) !important;
    border-top: none !important;
    border-bottom: 1px solid #dce6f0 !important;
    box-shadow: none !important;
    padding: 8px 0 !important;
}

/* Allow the original image to show clearly */
.header-top::before {
    background: rgba(255, 255, 255, 0.3) !important; /* Less white over the image itself */
}
.header-top {
    border-bottom: none !important;
}
.header-info-bar {
    background: #ffffff !important; /* Absolutely solid white */
    margin-bottom: 0 !important;
}
header {
    margin-bottom: 0 !important;
}

.footer-v2 {
    border-top: 1px solid var(--border-glass) !important;
    margin-top: 60px;
}

/* Restore clear footer overlay */
.footer-v2::before { 
    display: block !important;
    background: rgba(255, 255, 255, 0.5) !important;
}

/* Ensure dropdowns also match anti-gravity but with high readability */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.85) !important; /* Less transparent for readability */
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid var(--border-glass) !important;
    box-shadow: var(--shadow-hover) !important;
}

.dropdown-menu .dropdown-menu {
    background: rgba(255, 255, 255, 0.96) !important; /* Make 3rd level less transparent */
}

/* =============================================
   CATEGORY PAGE LAYOUT — Featured + Grid + Sidebar
   ============================================= */

/* Category page layout — mobile-first */
.cat-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
    align-items: start;
}

@media (min-width: 1024px) {
    .cat-layout {
        grid-template-columns: 1fr 300px;
        gap: 32px;
        margin-top: 24px;
    }
}

/* News grid: mobile-first 1 col → 2 col, first card hero on 600px+ */
.cat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-content: start;
}

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

/* Search/xfsearch grid — no hero first card */
.cat-grid--plain {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-content: start;
}

@media (min-width: 600px) {
    .cat-grid--plain { grid-template-columns: 1fr 1fr; gap: 20px; }
}

.cat-grid--plain > form { grid-column: 1 / -1; }
.cat-grid--plain > .navigation-v2 { grid-column: 1 / -1; justify-self: center; }
.cat-grid--plain .isr-card:first-child .isr-card__img { height: auto; position: static; }
.cat-grid--plain .isr-card:first-child .isr-card__cats { position: static; padding: 10px 16px 0; }
.cat-grid--plain .isr-card:first-child .isr-card__body { position: static; background: none; padding: 12px 16px 16px; }
.cat-grid--plain .isr-card:first-child .isr-card__title { font-size: 1rem; color: var(--text-main); text-shadow: none; }
.cat-grid--plain .isr-card:first-child .isr-card__meta { color: var(--text-muted); }
.cat-grid--plain .isr-card:first-child .isr-card__excerpt { color: var(--text-secondary); }

/* Category badges — static under image */
.isr-card__cats {
    padding: 10px 16px 0;
}

/* First card: mobile — flat full-width (no overlay, bigger image + title) */
.cat-grid .isr-card:first-child { grid-column: 1 / -1; }
.cat-grid .isr-card:first-child .isr-card__img { height: 240px; }
.cat-grid .isr-card:first-child .isr-card__cats { position: static; padding: 10px 16px 0; z-index: auto; }
.cat-grid .isr-card:first-child .isr-card__body { position: static; background: none; padding: 10px 16px 16px; z-index: auto; }
.cat-grid .isr-card:first-child .isr-card__title { font-size: 1.25rem; color: var(--primary-blue); text-shadow: none; }
.cat-grid .isr-card:first-child .isr-card__meta { color: var(--text-muted); }
.cat-grid .isr-card:first-child .isr-card__excerpt { display: -webkit-box; color: var(--text-secondary); }

/* First card: 768px+ — full hero with overlay */
@media (min-width: 768px) {
    .cat-grid .isr-card:first-child .isr-card__img { height: 420px; }
    .cat-grid .isr-card:first-child .isr-card__cats {
        position: absolute;
        top: 14px; left: 14px;
        padding: 0; z-index: 3;
    }
    .cat-grid .isr-card:first-child .isr-card__body {
        position: absolute;
        bottom: 0; left: 0; right: 0;
        background: linear-gradient(0deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.5) 55%, transparent 100%);
        padding: 32px 28px 24px; z-index: 2;
    }
    .cat-grid .isr-card:first-child .isr-card__title {
        font-size: 1.55rem; color: #fff;
        text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    }
    .cat-grid .isr-card:first-child .isr-card__meta { color: rgba(255,255,255,0.75); }
    .cat-grid .isr-card:first-child .isr-card__excerpt { display: -webkit-box; color: rgba(255,255,255,0.85); }
}

/* News card */
.isr-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-glass);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(12px);
}

.isr-card:hover {
    box-shadow: var(--shadow-hover);
}

.isr-card__link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.isr-card__img {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: var(--bg-light);
}

.isr-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.isr-card:hover .isr-card__img img { transform: scale(1.05); }

.isr-card__body {
    padding: 8px 16px 16px;
    position: relative;
    z-index: 2;
}

.isr-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--primary-blue);
    margin: 4px 0 10px;
}

.isr-card__title a {
    color: inherit;
    text-decoration: none;
    position: relative;
    z-index: 3;
}

.isr-card__excerpt {
    display: none;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 14px;
}

.isr-card__meta {
    display: flex;
    gap: 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* Sidebar */
.cat-sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: stretch; /* stretch to grid row height so sticky works full-length */
}

.sidebar-block {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(12px);
}

.sidebar-block__title {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Popular items */
.sidebar-popular-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: color 0.2s;
}

.sidebar-popular-item:last-child { border-bottom: none; padding-bottom: 0; }

.sidebar-popular-img {
    width: 60px;
    height: 45px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

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

.sidebar-popular-info { display: flex; flex-direction: column; gap: 5px; }

.sidebar-popular-title {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--primary-blue);
    line-height: 1.3;
    transition: color 0.2s;
}

.sidebar-popular-item:hover .sidebar-popular-title { color: var(--accent-blue); }

.sidebar-popular-meta { font-size: 0.73rem; color: var(--text-muted); }

/* Telegram block */
.sidebar-tg {
    background: linear-gradient(135deg, #229ED9 0%, #1a8fc1 100%);
    text-align: center;
    border: none;
}

.sidebar-tg .sidebar-block__title { color: white; justify-content: center; }

.sidebar-tg p { font-size: 0.85rem; color: rgba(255,255,255,0.9); margin-bottom: 14px; }

.sidebar-tg__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #229ED9;
    padding: 9px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sidebar-tg__btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.2); }

/* Tag cloud */
.sidebar-tags { display: flex; flex-wrap: wrap; gap: 7px; }

.sidebar-tags a {
    background: rgba(37,99,235,0.08);
    color: var(--accent-blue);
    padding: 4px 11px;
    border-radius: 50px;
    font-size: 0.76rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.sidebar-tags a:hover { background: var(--accent-blue); color: white; }

/* Fullstory layout */
.full-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 12px;
    align-items: start;
    margin-bottom: 32px;
}

@media (min-width: 1024px) {
    .full-layout {
        grid-template-columns: 1fr 300px;
        gap: 32px;
        margin-top: 24px;
        margin-bottom: 60px;
    }
}
.full-article-wrapper { min-width: 0; width: 100%; max-width: 100%; }
.cat-sidebar { min-width: 0; }
.full-article { width: 100%; max-width: 100%; overflow: hidden; }
.full-layout { overflow: hidden; }
.article-meta-top .ag-breadcrumbs { max-width: 100%; overflow: hidden; display: flex; flex-wrap: wrap; }
.cat-location-row { min-width: 0; max-width: 100%; overflow: hidden; }

/* Related news items */
.related-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: color 0.2s;
}

.related-item:last-child { border-bottom: none; padding-bottom: 0; }

.related-item__img {
    width: 72px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.related-item__img img { width: 100%; height: 100%; object-fit: cover; }

.related-item__info { display: flex; flex-direction: column; gap: 5px; }

.related-item__title {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--primary-blue);
    line-height: 1.3;
    transition: color 0.2s;
}

.related-item:hover .related-item__title { color: var(--accent-blue); }

.related-item__meta { font-size: 0.73rem; color: var(--text-muted); }

/* === Fullstory H1 === */
.article-h1 {
    font-size: 1.875rem;   /* 30px */
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.3px;
    color: var(--text-main);
    margin-bottom: 20px;
    word-break: break-word;
}

/* cat-layout/cat-grid handled above (mobile-first) */
@media (max-width: 960px) {
    .full-layout { grid-template-columns: 1fr; }
    .cat-sidebar { position: static; }
}

@media (max-width: 768px) {
    .article-h1 { font-size: 1.5rem; line-height: 1.3; }
}



/* ==========================================================================
   LOGIN.TPL — Login modal & logged-in user dropdown
   ========================================================================== */

/* --- Avatar (small, in header) --- */
.user-brief { cursor: pointer; display: flex; align-items: center; position: relative; }
.avatar-small { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-blue); overflow: hidden; flex-shrink: 0; }
.avatar-small img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--primary-blue); object-fit: cover; }
.pm-badge { position: absolute; top: -5px; right: -5px; background: var(--accent-orange); color: white; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 10px; border: 2px solid white; }

/* --- Logged-in user dropdown --- */
.user-profile-dropdown { position: relative; display: inline-block; }
.user-dropdown-menu {
    position: absolute;
    right: -8px;
    top: calc(100% + 10px);
    width: 280px;
    background: #fdfbf7 url('/templates/Israel_portal/images/login-modal-watercolor.png') no-repeat center bottom / cover;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.22);
    border: 1px solid rgba(0,0,0,0.08);
    padding: 20px;
    display: none;
    z-index: 12000;
}

@media (max-width: 991px) {
    .user-dropdown-menu {
        position: fixed;
        right: 8px;
        top: auto;
    }
}

.user-dropdown-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 11999;
}
@media (max-width: 991px) {
    .user-dropdown-backdrop.active {
        display: block;
    }
}

.user-dropdown-menu::before { content: none; }
.user-dropdown-menu.active { display: block; animation: slideDown 0.3s var(--ease); }
@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.user-info-head { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.avatar-large { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.avatar-large img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.user-name-link { font-weight: 800; font-size: 1.1rem; color: var(--text-main); }
.user-group-label { font-size: 0.75rem; font-weight: 700; color: var(--primary-blue); text-transform: uppercase; display: block; }

.user-menu-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.user-menu-list a {
    display: flex; align-items: center; gap: 12px; padding: 12px 15px;
    border-radius: 8px; font-weight: 600; font-size: 0.95rem; color: var(--text-main);
    transition: all 0.3s var(--ease);
}
.user-menu-list a:hover { background: rgba(0, 94, 184, 0.05); color: var(--primary-blue); padding-left: 25px; }
.user-menu-list .count { margin-left: auto; background: rgba(0,0,0,0.05); padding: 2px 8px; border-radius: 6px; font-size: 0.8rem; }
.admin-link-style { color: var(--accent-orange) !important; }

.user-menu-foot { margin-top: 5px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,0.05); }
.logout-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; font-weight: 700; color: #ff4757 !important; transition: all 0.2s ease; }
.logout-link:hover { color: #ff1f31 !important; }

/* --- Login trigger button (header) --- */
.login-wrapper { position: relative; }
.login-trigger {
    display: inline-flex; align-items: center; gap: 8px;
    background-color: #ffffff; border: 1.5px solid var(--border-color);
    padding: 7px 18px; border-radius: 12px; color: var(--text-main);
    font-family: var(--font-ui); font-size: 0.9rem; font-weight: 700;
    cursor: pointer; transition: all 0.3s var(--ease);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02); position: relative; overflow: hidden;
}
.login-trigger::before {
    content: ''; position: absolute; inset: 0;
    background: url('/templates/Israel_portal/images/login-bg-ethnic.webp') no-repeat center;
    background-size: cover; filter: grayscale(100%) opacity(0.15) contrast(0.8);
    transition: all 0.5s var(--ease); z-index: 1;
}
.login-trigger:hover::before { filter: grayscale(0%) opacity(0.5) contrast(1.1); }
.login-trigger i, .login-trigger span { position: relative; z-index: 2; transition: all 0.3s var(--ease); }
.login-trigger:hover { border-color: var(--primary-blue); color: #000; background-color: #ffffff; transform: translateY(-1px); box-shadow: 0 6px 15px rgba(0, 94, 184, 0.2); }
.login-trigger i { font-size: 1.2rem; color: var(--primary-blue); }
.login-trigger:hover i { color: #000; transform: scale(1.1); }

/* --- Login modal dropdown --- */
.login-modal {
    position: absolute; top: calc(100% + 15px); right: 0; width: 340px;
    background: rgba(253, 251, 247, 0.6) url('/templates/Israel_portal/images/login-modal-watercolor.png') no-repeat center bottom / cover;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.1); border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    padding: 24px 24px 40px; z-index: 2100;
    display: none; opacity: 0; transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.login-modal::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 40px; /* Centered relative to the 'Увійти' button */
    width: 12px;
    height: 12px;
    background: #fdfbf7;
    transform: rotate(45deg);
    border-top: 1px solid rgba(0,0,0,0.1);
    border-left: 1px solid rgba(0,0,0,0.1);
}

.login-modal.active { display: block; opacity: 1; transform: translateY(0); }

.login-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.login-modal-header h3 { font-size: 1.3rem; font-weight: 850; letter-spacing: -0.5px; color: var(--text-main); }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; opacity: 0.3; transition: 0.2s; }
.modal-close:hover { opacity: 1; color: var(--accent-orange); }

/* --- Login form fields --- */
.form-field label { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.5px; }
.input-with-icon { position: relative; }
.input-with-icon i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--primary-blue); font-size: 1.1rem; opacity: 0.8; }
.input-with-icon input {
    width: 100%; padding: 12px 12px 12px 42px; border: 2px solid #cbd5e1;
    border-radius: 12px; background: rgba(255,255,255,0.9); outline: none;
    transition: all 0.3s var(--ease); font-family: var(--font-ui); font-size: 0.95rem; color: var(--text-main);
}
.input-with-icon input:focus { border-color: var(--primary-blue); background: #fff; box-shadow: 0 0 0 4px rgba(0, 94, 184, 0.1); }

/* --- Remember-me checkbox --- */
.login-options { margin-top: 15px; }
.checkbox-container { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.checkbox-container input { display: none; }
.checkmark { width: 20px; height: 20px; background: rgba(255,255,255,0.8); border: 2px solid #cbd5e1; border-radius: 6px; position: relative; transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.checkbox-container input:checked + .checkmark { background: var(--primary-blue); border-color: var(--primary-blue); }
.checkmark:after { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; display: none; left: 50%; top: 50%; transform: translate(-50%, -50%); color: white; font-size: 12px; font-weight: 900; }
.checkbox-container input:checked + .checkmark:after { display: block; }
.label-text { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }

/* --- Submit button (login form) --- */
.btn-submit {
    display: block; margin: 20px auto 0; padding: 10px 40px;
    background: rgba(37, 99, 235, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    color: white; border: 1px solid rgba(255,255,255,0.2); border-radius: 100px;
    font-weight: 550; font-size: 1rem; cursor: pointer; transition: all 0.3s var(--ease);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}
.btn-submit:hover { transform: translateY(-2px); background: rgba(37, 99, 235, 1); box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3); }

/* --- Login links (register / forgot) --- */
.login-links { display: flex; justify-content: space-between; margin-top: 18px; font-size: 0.8rem; font-weight: 700; }
.login-links a { color: #000; opacity: 1; transition: 0.2s; }
.login-links a:hover { color: var(--primary-blue); text-decoration: underline; }

/* --- Social login block --- */
.social-login { margin-top: 22px; border-top: 1px solid var(--border-color); text-align: center; }
.social-login p { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.social-icons-list { display: flex; justify-content: center; gap: 12px; }
.social-icons-list a { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 1.2rem; background: var(--bg-light); transition: all 0.3s var(--ease); }
.social-icons-list a:hover { transform: translateY(-3px); color: white; }
.s-vk:hover { background: #4C75A3 !important; }
.s-fb:hover { background: #1877F2 !important; }
.s-gp:hover { background: #DB4437 !important; }


/* ==========================================================================
   USERINFO.TPL — User profile page
   ========================================================================== */

/* --- Outer frame with map background --- */
.user-profile-page {
    max-width: 1100px; margin: 20px auto 60px; padding: 40px;
    background: #fff url('/templates/Israel_portal/images/odessa-haifa-v2.png') no-repeat center center / cover;
    border-radius: 40px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    z-index: 1; overflow: hidden;
}
/* Hide news cards/pagination DLE may inject on profile page */
.user-profile-page .isr-card, .user-profile-page .navigation-v2 { display: none !important; }

.user-profile-page::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.4); z-index: 0;
}
.user-profile-page > * { position: relative; z-index: 1; }

/* --- Profile card --- */
.profile-card {
    padding: 40px; margin-bottom: 30px;
    background: rgba(255,255,255,0.3) !important;
    backdrop-filter: blur(20px); border: 1px solid var(--border-glass); border-radius: 24px; overflow: hidden;
}
.profile-header-wrap { display: flex; align-items: center; gap: 30px; margin-bottom: 40px; border-bottom: 1px solid rgba(0,0,0,0.06); padding-bottom: 30px; }
.profile-avatar-box { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.profile-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; box-shadow: var(--shadow-soft); border: 4px solid #fff; }

/* --- Online/offline badge --- */
.status-badge { position: absolute; bottom: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; border: 3px solid #fff; }
.status-badge.online { background: #10b981; box-shadow: 0 0 10px rgba(16,185,129,0.4); }
.status-badge.offline { background: #94a3b8; }

/* --- Profile name & meta --- */
.profile-name { font-size: 2rem; font-weight: 800; color: var(--primary-blue); margin-bottom: 8px; }
.profile-meta-tags { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.user-group-tag, .user-group-tag * {
    background: linear-gradient(135deg, #006aff, #2563eb); color: #fff !important;
    padding: 2px 6px; border-radius: 100px; font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; display: inline-flex; align-items: center; gap: 4px;
    box-shadow: 0 2px 6px rgba(0,106,255,0.15);
}
.profile-status-text { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.profile-actions-header { margin-left: auto; }

/* --- Stats grid --- */
.profile-details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 40px; }
.detail-item { display: flex; flex-direction: column; gap: 6px; }
.detail-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; }
.detail-label i { color: var(--accent-blue); }
.detail-value { font-size: 1rem; font-weight: 600; color: var(--primary-blue); }

/* --- Bio & signature blocks --- */
.profile-bio { background: rgba(0,0,0,0.02); padding: 20px; border-radius: 16px; margin-bottom: 40px; }
.bio-content { margin-top: 10px; font-size: 0.95rem; line-height: 1.6; color: var(--text-main); }

/* --- Profile footer (social icons + settings link) --- */
.profile-footer-links { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 25px; }
.profile-web-link, .profile-edit-trigger { font-weight: 700; font-size: 0.85rem; color: var(--accent-blue); display: flex; align-items: center; gap: 8px; transition: 0.2s; }
.profile-web-link:hover, .profile-edit-trigger:hover { opacity: 0.8; transform: translateX(3px); }

/* --- Edit profile section --- */
.edit-profile-section { padding: 40px; background: rgba(255,255,255,0.2) !important; backdrop-filter: blur(8px); border: 1px solid var(--border-glass); border-radius: 30px; }
.form-grid-rows { display: flex; flex-direction: column; gap: 20px; }
.ag-grid-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.ag-grid-single-col {}
.ag-field { margin-bottom: 0; }
.ag-field label { 
    display: flex !important; 
    align-items: center !important; 
    gap: 16px !important; 
    font-size: 0.85rem !important; 
    font-weight: 700; 
    color: var(--text-muted); 
    margin-bottom: 12px; 
    padding-left: 5px; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ag-field label i { 
    font-size: 1.2rem !important; 
    line-height: 1 !important;
    color: var(--accent-blue);
    display: flex !important;
    align-items: center !important;
}
.ag-field input, .ag-field textarea, .ag-field select { width: 100%; padding: 12px 18px; border-radius: 12px; border: 1.5px solid #e2e8f0; background: #fff; font-family: inherit; font-size: 0.95rem; transition: 0.3s; outline: none; height: 48px; }
.ag-field textarea { height: auto; min-height: 100px; }
.ag-field input:focus, .ag-field textarea:focus, .ag-field select:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 4px rgba(37,99,235,0.1); background: #fff !important; }

.ag-field textarea { 
    height: auto; 
    min-height: 120px; 
    padding: 18px !important; 
    line-height: 1.6 !important; 
    background: rgba(255,255,255,0.3) !important; 
    backdrop-filter: blur(5px); 
    border: 1.5px solid rgba(0,0,0,0.08) !important; 
    resize: vertical;
}

.ag-field .input-with-icon { position: relative; width: 100%; }
.ag-field .input-with-icon i {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--accent-blue) !important;
    font-size: 1.1rem !important;
    pointer-events: none !important;
    display: flex !important;
    align-items: center !important;
}
.ag-field .input-with-icon input { padding-left: 48px !important; }

/* --- Social Integration Panel --- */
.social-integration-panel {
    background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.05)) !important;
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255,255,255,0.4);
    padding: 35px !important;
    border-radius: 24px !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.03);
}
.social-integration-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.social-integration-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.social-integration-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #fff;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1.5px solid #e2e8f0;
    transition: all 0.3s ease;
}
.social-integration-list a:hover {
    border-color: var(--accent-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37,99,235,0.1);
}

/* --- Checkboxes (profile options) --- */
.ag-checkbox-item, .ag-checkbox-item label { display: flex !important; align-items: center !important; gap: 14px !important; font-size: 0.92rem; font-weight: 500; color: var(--text-main); cursor: pointer; line-height: 1.5; margin-bottom: 5px; }
.ag-checkbox-item br { display: none; }
.ag-checkbox-item label { margin-bottom: 0 !important; }
.ag-checkbox-item input[type="checkbox"], .ag-checkbox-item label input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 20px !important; height: 20px !important; min-width: 20px !important; min-height: 20px !important;
    margin: 0 !important; border: 2px solid #cbd5e1; border-radius: 4px; background: #fff;
    cursor: pointer; position: relative; transition: 0.2s var(--ease); flex-shrink: 0; display: inline-block !important;
}
.ag-checkbox-item input[type="checkbox"]:checked, .ag-checkbox-item label input[type="checkbox"]:checked { background: var(--accent-blue); border-color: var(--accent-blue); }
.ag-checkbox-item input[type="checkbox"]:checked::after, .ag-checkbox-item label input[type="checkbox"]:checked::after { content: '\F26E'; font-family: 'bootstrap-icons' !important; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 12px; font-weight: 900; }

/* --- Profile action buttons --- */
.ag-btn { padding: 12px 28px; border-radius: 100px; font-weight: 700; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; border: none; transition: 0.3s var(--ease); color: #fff !important; text-decoration: none; }
.ag-btn--primary { background: var(--primary-blue); }
.ag-btn--accent { background: var(--accent-blue); box-shadow: 0 4px 15px rgba(37,99,235,0.3); }
.ag-btn:hover { transform: translateY(-2px); opacity: 0.95; color: #fff !important; }

/* --- Social connect icons on profile --- */
.profile-social-icons-compact { display: flex; gap: 10px; }
.soc-compact-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: rgba(0,0,0,0.04); color: var(--text-muted); font-size: 1rem; transition: 0.2s; }
.soc-compact-btn:hover { background: var(--accent-blue); color: #fff; transform: translateY(-2px); }
.soc-icon-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #fff; color: var(--text-muted); font-size: 1.2rem; transition: 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.soc-icon-btn.fb:hover { color: #1877f2; }
.soc-icon-btn.gp:hover { color: #ea4335; }
.delete-account-link:hover { color: #dc2626 !important; text-decoration: underline !important; }

/* --- Profile mobile --- */
@media (max-width: 768px) {
    .profile-header-wrap { flex-direction: column; text-align: center; }
    .profile-details-grid { grid-template-columns: 1fr 1fr; }
    .form-row-grid { grid-template-columns: 1fr; }
    .form-options-panel { flex-direction: column; align-items: flex-start; gap: 20px; }
}

/* --- Anti-gravity Shared Form System (Comments & News) --- */
.ag-form-glass, .ag-card-glass {
    background: rgba(255, 255, 255, 0.4) no-repeat center center / cover !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.08);
    padding: 35px !important;
    position: relative;
    z-index: 1;
}

/* Specific backgrounds */
.ag-comment-form-container .ag-card-glass { background-image: url('../images/dnipro-netanya-bg.png') !important; background-attachment: fixed; min-height: 520px; }
.ag-news-container .ag-card-glass { background-image: url('../images/haifa-telaviv-bg.png') !important; background-attachment: fixed; min-height: 800px; }

.ag-form-label, .ag-xfields-wrapper td:first-child {
    display: block;
    font-size: 0.8rem;
    font-weight: 850;
    text-transform: uppercase;
    color: #1e293b; 
    margin-bottom: 10px;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 3px rgba(255,255,255,1), 0 0 10px rgba(255,255,255,0.5);
}

/* Target ALL inputs and textareas inside glass cards, even if not wrapped (for xfields) */
.ag-card-glass input:not([type="submit"]), 
.ag-card-glass select, 
.ag-card-glass textarea {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 10px 15px !important;
    font-family: var(--font-ui) !important;
    font-size: 1rem !important;
    color: #000 !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(5px);
}

/* Aggressive Hover/Focus for ALL fields in the News/Comments containers */
.ag-card-glass input:hover, 
.ag-card-glass select:hover, 
.ag-card-glass textarea:hover,
.ag-card-glass .fr-box:hover,
.ag-card-glass input:focus, 
.ag-card-glass select:focus, 
.ag-card-glass textarea:focus,
.ag-card-glass .ag-editor-container:focus-within {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-color: var(--primary-blue) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1) !important;
    opacity: 1 !important;
}

/* Ensure editor elements inside also react */
.ag-card-glass .fr-box:hover .fr-wrapper,
.ag-card-glass .fr-box:hover .fr-element {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.ag-input-wrapper { position: relative; width: 100%; }
.ag-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-blue);
    font-size: 1.1rem;
    opacity: 0.7;
    z-index: 2;
}

.ag-input-wrapper input, .ag-input-wrapper select, .ag-input-wrapper textarea {
    width: 100% !important;
    padding: 12px 12px 12px 42px !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 12px !important;
    font-family: var(--font-ui) !important;
    font-size: 1rem !important;
    color: #000 !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(5px);
}

.ag-input-wrapper input:hover, .ag-input-wrapper input:focus,
.ag-input-wrapper textarea:hover, .ag-input-wrapper textarea:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: var(--primary-blue) !important;
}

.ag-editor-container {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 10px !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(5px);
}

.ag-editor-container:hover, .ag-editor-container:focus-within {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: var(--primary-blue) !important;
}

/* DLE Editor Universal Transparency Overrides */
.ag-comment-form-container .fr-box, .ag-news-container .fr-box,
.ag-comment-form-container .fr-wrapper, .ag-news-container .fr-wrapper,
.ag-comment-form-container .fr-element, .ag-news-container .fr-element,
.ag-comment-form-container textarea, .ag-news-container textarea,
.ag-comment-form-container iframe, .ag-news-container iframe {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
}

.ag-comment-form-container .fr-toolbar, .ag-news-container .fr-toolbar {
    background: rgba(255, 255, 255, 0.5) !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

.ag-btn-primary {
    display: inline-flex !important;
    align-items: center;
    background: rgba(37, 99, 235, 0.65) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 12px 35px !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.2);
}

.ag-btn-primary:hover {
    transform: translateY(-2px);
    background: rgba(37, 99, 235, 0.9) !important;
}
/* Cache Buster: 1776969533 */

/* --- Anti-gravity Attachment System --- */
.ag-attachment-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 15px 20px;
    margin: 20px 0;
    gap: 15px;
    transition: all 0.3s ease;
}

.ag-attachment-card:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.ag-attachment-icon {
    font-size: 2rem;
    color: var(--primary-blue);
    opacity: 0.8;
}

.ag-attachment-info { flex: 1; }

.ag-attachment-name a {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s;
}

.ag-attachment-name a:hover { color: var(--primary-blue); }

.ag-attachment-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.ag-meta-divider { opacity: 0.3; }

.ag-link-sub {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
    opacity: 0.8;
}

.ag-link-sub:hover { opacity: 1; text-decoration: underline; }

.ag-btn-download {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-blue);
    color: white !important;
    border-radius: 12px;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 94, 184, 0.2);
}

.ag-btn-download:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 94, 184, 0.3);
}

.ag-attachment-alert {
    padding: 15px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    color: #b91c1c;
    font-weight: 600;
    margin: 15px 0;
}

/* --- Anti-gravity Comment List System --- */
.ag-comment-item-glass {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(241, 245, 255, 0.5)) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid #ffffff !important;
    border-radius: 28px;
    padding: 30px;
    margin-bottom: 35px;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.03),
        0 20px 50px rgba(37, 99, 235, 0.05);
    display: flex;
    gap: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.ag-comment-item-glass:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(241, 245, 255, 0.7)) !important;
    transform: translateY(-5px) scale(1.01);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.06),
        0 30px 70px rgba(37, 99, 235, 0.1);
    z-index: 5;
}

.ag-comment-avatar {
    width: 65px;
    flex-shrink: 0;
}

.ag-comment-avatar img {
    width: 65px;
    height: 65px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.ag-comment-main { flex: 1; min-width: 0; }

.ag-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ag-comment-author {
    font-size: 1.15rem;
    font-weight: 850;
    color: #1e293b;
}

.ag-comment-author a { color: inherit; text-decoration: none; }

.ag-comment-date {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.ag-comment-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #334155;
    word-wrap: break-word;
}

.ag-comment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.ag-comment-actions {
    display: flex;
    gap: 20px;
}

.ag-action-link {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 10px;
    transition: all 0.2s;
}

.ag-action-link:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-blue);
    transform: translateY(-1px);
}

.ag-action-link i { font-size: 1.1rem; }

.ag-comment-rating {
    background: rgba(255, 255, 255, 0.5);
    padding: 5px 15px;
    border-radius: 30px;
    display: flex;
    gap: 12px;
    font-weight: 800;
    font-size: 0.9rem;
}

.ag-rate-plus { color: #10b981; }
.ag-rate-minus { color: #ef4444; }

/* Hide default list numbers in comments */
#comment-list, ol.comments { list-style: none !important; padding: 0 !important; }
#comment-list li, .comments li { list-style: none !important; }

.ag-meta-left { display: flex; align-items: center; gap: 15px; }
.ag-comment-news-title { font-size: 1rem; font-weight: 800; color: var(--primary-blue); margin-bottom: 10px; }
.ag-comment-admin { display: flex; align-items: center; gap: 10px; }
.ag-mass-check input { transform: scale(1.2); cursor: pointer; }

/* Restore Comment Form Footer Styles */
.ag-footer-action-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    margin-top: 40px !important;
    gap: 20px;
    flex-wrap: wrap;
}

.ag-footer-security {
    flex: 1;
    min-width: 300px;
}

.ag-captcha-box { margin-bottom: 10px; }

.ag-captcha-classic { display: flex; gap: 15px; align-items: flex-end; }
.ag-captcha-classic .ag-input-wrapper { width: 180px; }

@media (max-width: 600px) {
    .ag-footer-action-row { flex-direction: column; align-items: stretch !important; }
    .ag-footer-button { text-align: right; width: 100%; }
    .ag-btn-primary { width: 100% !important; justify-content: center; }
}

/* Ensure Card Wraps Content */
.ag-card-glass {
    display: block !important;
    overflow: visible !important;
    min-height: 100px;
    clear: both;
}

.ag-options-bar {
    display: flex;
    gap: 15px;
    align-items: center;
}

.ag-link-sub {
    color: var(--primary-blue);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}

.ag-link-sub:hover { text-decoration: underline; }

/* Final Comment Form Polish */
.ag-comment-form-container { margin-top: 50px; }
.ag-security-row { display: flex; flex-wrap: wrap; gap: 30px; margin-bottom: 25px; }
.ag-captcha-item { flex: 1; min-width: 200px; }
.ag-subscribe-wrap label { font-weight: 700; color: #1a1a1a; font-size: 0.9rem; margin-left: 10px; cursor: pointer; }
.ag-subscribe-wrap input { transform: scale(1.2); cursor: pointer; margin-right: 4px; }
.ag-comment-form-container .ag-link-sub { color: #1a1a1a; }
.ag-comment-form-container .ag-link-sub:hover { color: #1a1a1a; opacity: 0.7; }

/* Ensure no weird backgrounds on form links */
.ag-form-links { display: flex; align-items: center; gap: 25px; flex-wrap: wrap; }
.ag-form-links a { background: transparent !important; padding: 5px 0 !important; transition: opacity 0.2s; }
.ag-form-links a:hover { opacity: 0.7; }

/* Force Card Background Visibility */
.ag-card-glass {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 1) !important;
    padding-bottom: 50px !important;
}

.ag-options-flex {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 25px;
    margin-top: 20px;
}


/* ==========================================================================
   FULLSTORY.TPL — Full article page
   ========================================================================== */

/* full-article card */
.full-article {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
}

@media (min-width: 768px) {
    .full-article { border-radius: 20px; }
}

/* Header */
.article-header-full {
    padding: 20px 10px 14px;
}

@media (min-width: 768px) {
    .article-header-full { padding: 40px 40px 20px; }
}

/* Meta row: breadcrumbs + date */
.article-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .article-meta-top { margin-bottom: 20px; }
}

.article-meta-date {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.article-meta-date span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta-date .bi-pencil-square {
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* Main image */
.article-main-image {
    width: 100%;
    max-height: 320px;
    overflow: hidden;
    background: var(--bg-light);
    position: relative;
}

@media (min-width: 600px) { .article-main-image { max-height: 420px; } }
@media (min-width: 1024px) { .article-main-image { max-height: 500px; } }

.article-main-image img {
    width: 100% !important;
    height: 100%;
    object-fit: cover;
    display: block;
    max-width: 100% !important;
    height: auto !important;
}

/* Article body */
.article-body {
    padding: 20px 10px 24px;
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

@media (min-width: 768px) {
    .article-body { padding: 40px; font-size: 1.15rem; }
}

.article-body img { max-width: 100% !important; height: auto !important; display: block; }
.article-body table { max-width: 100%; overflow-x: auto; display: block; }
.article-body iframe { max-width: 100%; }
.article-body p { margin-bottom: 20px !important; line-height: 1.8; }
.article-body h2 { font-size: 1.3rem; margin-top: 32px !important; margin-bottom: 16px !important; font-weight: 700; color: #222; }
.article-body h3 { font-size: 1.15rem; margin-top: 24px !important; margin-bottom: 12px !important; font-weight: 600; }
.article-body ul, .article-body ol { margin-bottom: 20px; padding-left: 20px; }
.article-body li { margin-bottom: 8px; }

@media (min-width: 768px) {
    .article-body p { margin-bottom: 28px !important; }
    .article-body h2 { font-size: 1.5rem; margin-top: 50px !important; margin-bottom: 25px !important; }
    .article-body h3 { font-size: 1.3rem; margin-top: 35px !important; margin-bottom: 15px !important; }
    .article-body ul, .article-body ol { margin-bottom: 25px; }
    .article-body li { margin-bottom: 10px; }
}

/* Context box */
.context-box {
    margin: 0 10px 16px;
    padding: 16px 20px;
    background: #f0f7ff;
    border-left: 4px solid var(--primary-blue);
    border-radius: 0 12px 12px 0;
}

@media (min-width: 768px) {
    .context-box { margin: 0 40px 20px; padding: 20px 25px; }
}

.context-box-title {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.context-box-body {
    font-size: 0.97rem;
    line-height: 1.7;
    color: #444;
}

/* Source box */
.source-box {
    margin: 0 10px 20px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-left: 4px solid #adb5bd;
    border-radius: 0 12px 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .source-box { margin: 0 40px 30px; padding: 14px 25px; flex-wrap: nowrap; }
}

.source-box .bi-link-45deg { font-size: 1.1rem; color: #6c757d; flex-shrink: 0; }
.source-box__label { font-size: 0.9rem; color: #6c757d; }
.source-box a { font-size: 0.9rem; font-weight: 600; color: var(--primary-blue); text-decoration: none; }
.source-box a:hover { text-decoration: underline; }

/* Footer: tags + share */
.article-footer-meta {
    padding: 16px 10px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

@media (min-width: 768px) {
    .article-footer-meta { padding: 20px 40px 40px; }
}

.article-tags { display: flex; gap: 8px; flex-wrap: wrap; font-size: 0; align-items: center; }
.article-tags .bi-tags { font-size: 1rem; color: var(--primary-blue); }
.article-tags a { background: var(--bg-light); padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); transition: 0.2s; }
.article-tags a:hover { background: var(--primary-blue); color: white; }
.article-tags > * { font-size: 1rem; }

.article-share { display: flex; align-items: center; gap: 15px; }
.share-links { display: flex; gap: 10px; font-size: 1.3rem; color: var(--primary-blue); }

/* Comments */
/* Comments accordion */
.comments-accordion {
    margin-top: 12px;
}

.comments-accordion__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-light);
    border-radius: 12px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    transition: background 0.2s;
}
.comments-accordion__toggle::-webkit-details-marker { display: none; }
.comments-accordion__toggle::after {
    content: '\F282';
    font-family: 'bootstrap-icons';
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: transform 0.25s;
    margin-left: auto;
}
.comments-accordion[open] > .comments-accordion__toggle::after {
    transform: rotate(180deg);
}
.comments-accordion__title { display: flex; align-items: center; gap: 8px; }
.comments-accordion__count {
    background: var(--primary-blue);
    color: #fff;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* На десктопі — одразу відкрито */
@media (min-width: 768px) {
    .comments-accordion { margin-top: 24px; }
    .comments-accordion__toggle { display: none; }
    .comments-accordion[open] > .comments-accordion__toggle,
    .comments-accordion:not([open]) > .comments-accordion__toggle { display: none; }
}

.comments-block {
    padding: 20px 10px 0;
    background: var(--bg-light);
}

@media (min-width: 768px) {
    .comments-block { padding: 40px 40px 0; }
}

.comments-block .widget-title { margin-bottom: 20px; }

@media (min-width: 768px) {
    .comments-block .widget-title { margin-bottom: 30px; }
}

.full-article h1 { word-break: break-word; }

/* Legacy hero-style selectors (kept for compatibility) */
.hero-style .article-header { margin-bottom: 40px; border-bottom: 1px solid #eee; padding-bottom: 30px; }
.hero-style .category-badge { display: inline-block; background: var(--primary-blue); color: white; padding: 5px 15px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 20px; }
.hero-style .entry-title { font-size: 3rem; line-height: 1.1; font-weight: 800; margin-bottom: 25px; color: var(--text-dark); }
.hero-style .article-meta { display: flex; gap: 20px; font-size: 0.9rem; color: #888; }
.hero-style .meta-item i { margin-right: 5px; color: var(--primary-blue); }
.hero-style .article-content-body { font-size: 1.15rem; line-height: 1.8; color: #333; }
.hero-style .article-content-body img { border-radius: 12px; margin: 30px 0; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
@media (max-width: 900px) { .hero-style .entry-title { font-size: 2rem; } }


/* ==========================================================================
   NAVIGATION.TPL — Pagination
   ========================================================================== */
.navigation-v2 { margin: 40px 0; display: flex; justify-content: center; }
.navigation-v2 .nav-links { display: flex; align-items: center; gap: 10px; }
.pages-list { display: flex; gap: 8px; }
.pages-list a, .pages-list span { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border-radius: 10px; background: white; border: 1px solid var(--border-color); font-weight: 700; font-size: 0.9rem; transition: 0.2s; }
.pages-list a:hover { border-color: var(--primary-blue); color: var(--primary-blue); }
.pages-list span { background: var(--primary-blue); border-color: var(--primary-blue); color: white; }
.nav-prev, .nav-next { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--bg-light); color: var(--primary-blue); cursor: pointer; transition: 0.2s; }
.nav-prev:hover, .nav-next:hover { background: var(--primary-blue); color: white; }


/* ==========================================================================
   PROFILE_POPUP.TPL — Hover user card
   ========================================================================== */
.ag-popup-card { padding: 20px; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-radius: 20px; width: 320px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); font-family: inherit; color: #1e293b; }
.ag-popup-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.ag-popup-avatar-wrap { position: relative; flex-shrink: 0; }
.ag-popup-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid #fff; }
.ag-popup-status { position: absolute; bottom: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; background: #94a3b8; }
.ag-popup-status.online { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.5); }
.ag-popup-user-meta { overflow: hidden; }
.ag-popup-name { font-weight: 800; font-size: 1.1rem; color: #0f172a; line-height: 1.2; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-popup-group { font-size: 0.75rem; font-weight: 600; color: #2563eb; text-transform: uppercase; letter-spacing: 0.5px; }
.ag-popup-stats-grid { display: flex; flex-direction: column; gap: 12px; }
.ag-stat-item { display: grid; grid-template-columns: 24px auto 1fr; align-items: center; gap: 8px; font-size: 0.85rem; }
.ag-stat-item i { color: #64748b; font-size: 0.9rem; }
.stat-label { color: #64748b; }
.stat-value { font-weight: 600; color: #334155; text-align: right; }
.stat-value strong { color: #0f172a; }
.stat-value a { color: #2563eb; text-decoration: none; }
.stat-value a:hover { text-decoration: underline; }
.ag-popup-rss-link { margin-top: 15px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,0.05); text-align: center; }
.ag-popup-rss-link a { font-size: 0.8rem; font-weight: 700; color: #ea580c; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }


/* ==========================================================================
   FASTSEARCHRESULT.TPL — Live search dropdown items
   ========================================================================== */
.fast-search-item:hover { background: var(--bg-light); }
.fast-search-item:last-child { border-bottom: none; }


/* ==========================================================================
   STATIC.TPL — Static pages content
   ========================================================================== */
.static-content h2 { font-size: 1.8rem; font-weight: 800; margin: 35px 0 20px; color: var(--text-main); }
.static-content h3 { font-size: 1.4rem; font-weight: 700; margin: 30px 0 15px; color: var(--text-main); }
.static-content p { margin-bottom: 1.5rem; }
.static-content ul, .static-content ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.static-content li { margin-bottom: 0.5rem; }
.static-content img { border-radius: 12px; margin: 25px 0; max-width: 100%; height: auto; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
@media (max-width: 768px) {
    .article-header-full { padding: 30px 20px 10px !important; }
    .article-header-full h1 { font-size: 1.8rem !important; }
    .article-body { padding: 25px 20px !important; font-size: 1.05rem !important; }
}


/* --- Anti-gravity User Profile System (Refined & Clean) --- */
.user-profile-page {
    margin: 40px 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
}

/* Refined Glass Card for Profile & Edit */
.profile-card, .edit-profile-section {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid #ffffff !important;
    border-radius: 32px;
    padding: 50px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.06);
    z-index: 5;
    width: 100%;
}

.edit-profile-section {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(255,255,255,0.9) !important;
}

.profile-header-wrap {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.profile-avatar-box {
    position: relative;
    width: 120px;
    height: 120px;
}

.profile-avatar-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 28px;
    border: 3px solid #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.profile-name {
    font-size: 2.4rem;
    font-weight: 850;
    color: #1e293b;
    margin-bottom: 5px;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    background: rgba(255, 255, 255, 0.3);
    padding: 25px;
    border-radius: 20px;
}

.detail-item { display: flex; flex-direction: column; gap: 5px; }
.detail-label { font-size: 0.7rem; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.detail-value { font-size: 0.95rem; font-weight: 700; color: #1e293b; }

/* Edit Form Fields - Compact & Glass */
.edit-form-container .ag-field input, 
.edit-form-container .ag-field textarea,
.edit-form-container .ag-field select {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1.5px solid rgba(0,0,0,0.05) !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
    transition: all 0.3s !important;
}

.edit-form-container .ag-field input:focus {
    background: #fff !important;
    border-color: var(--primary-blue) !important;
    box-shadow: 0 8px 20px rgba(37,99,235,0.1) !important;
}

/* Custom Select Arrow */
.edit-form-container select {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%232563eb' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 12px !important;
}

@media (max-width: 768px) {
    .profile-header-wrap { flex-direction: column; text-align: center; }
    .profile-details-grid { grid-template-columns: 1fr; }
    .ag-grid-row { grid-template-columns: 1fr; }
}

/* Restore Premium Anti-gravity Look (Image 2) */
.is-profile-page main.container {
    max-width: 1300px !important;
    padding: 0 !important;
}

.user-profile-page {
    margin: 40px auto !important;
    gap: 40px !important;
    background: transparent !important;
}

.profile-card, .edit-profile-section {
    background: rgba(255, 255, 255, 0.4) !important; /* Higher transparency */
    backdrop-filter: blur(30px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(150%) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 40px 100px rgba(0,0,0,0.1) !important;
    border-radius: 40px !important;
    padding: 60px !important;
    width: 100% !important;
    animation: ag-float 8s ease-in-out infinite;
}

.edit-profile-section {
    animation-delay: -4s; /* Offset animation */
    background: rgba(255, 255, 255, 0.35) !important;
}

.profile-details-grid {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.edit-form-container .ag-field input {
    background: rgba(255, 255, 255, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.edit-form-container .ag-field input:focus {
    background: rgba(255, 255, 255, 0.8) !important;
}

/* Fix for the white container issue */
.is-profile-page main > div[style*="padding: 20px"] {
    padding: 0 !important;
    background: transparent !important;
}

/* Final Polish for Production Alignment */
.ag-grid-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    width: 100% !important;
}

.edit-form-container .ag-field input,
.edit-form-container .ag-field textarea,
.edit-form-container .ag-field select {
    width: 100% !important;
    background: #ffffff !important; /* Cleaner white like production */
    border: 1px solid #e2e8f0 !important;
    padding: 15px 20px !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
}

.edit-form-container .ag-field label {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    margin-bottom: 12px !important;
}

.profile-details-grid .detail-item {
    border-right: 1px solid rgba(0,0,0,0.05);
    padding-right: 20px;
}

.profile-details-grid .detail-item:nth-child(3n) {
    border-right: none;
}

@media (max-width: 992px) {
    .ag-grid-row { grid-template-columns: 1fr !important; }
    .profile-details-grid { grid-template-columns: 1fr 1fr !important; }
}

/* Optimized Grid for Profile Details */
.profile-details-grid {
    grid-template-columns: 1fr 1.6fr 0.8fr !important; /* Stretch middle, shrink right */
    gap: 30px !important;
}

.profile-details-grid .detail-value {
    white-space: nowrap; /* Prevent line breaks for small links */
}

@media (max-width: 1200px) {
    .profile-details-grid {
        grid-template-columns: 1fr 1fr !important; /* Wrap to 2 columns on smaller screens */
    }
    .profile-details-grid .detail-value {
        white-space: normal;
    }
}

/* Precise Grid Column Tuning */
.profile-details-grid {
    grid-template-columns: 1.2fr 1.6fr 1.1fr !important; /* Balanced distribution */
    gap: 20px !important;
}

.profile-details-grid .detail-value {
    white-space: normal !important; /* Allow wrapping if strictly necessary to prevent overflow */
    word-break: break-word;
}

/* Applied Unified Watercolor Background */
.user-profile-page {
    background: url('../images/profile-full-bg.png') no-repeat center center / cover !important;
    border-radius: 40px;
    padding: 20px;
    box-shadow: inset 0 0 100px rgba(255,255,255,0.4);
}

/* Enhancing Card Visibility on the New Background */
.profile-card, .edit-profile-section {
    background: rgba(255, 255, 255, 0.7) !important; /* Slightly more opaque for better legibility */
    backdrop-filter: blur(25px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 30px 80px rgba(0,0,0,0.15) !important;
}

.edit-profile-section {
    margin-top: 20px !important; /* Keep the 20px gap we agreed on */
}

/* Harmonizing Profile Typography */
.profile-edit-link {
    color: var(--primary-blue) !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-edit-link:hover {
    color: #1d4ed8 !important;
    transform: translateX(5px);
}

.detail-label {
    font-size: 0.75rem !important;
    letter-spacing: 1px !important;
    color: #475569 !important;
}

.detail-value {
    font-size: 1.05rem !important;
    color: #0f172a !important;
}

.profile-status-text {
    font-size: 0.9rem !important;
}

/* Fixing Dissonance: Balancing Labels and Values */
.detail-label {
    font-size: 0.85rem !important; /* Larger labels */
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.detail-value {
    font-size: 0.95rem !important; /* Slightly smaller values */
    font-weight: 600 !important;
    color: #1e293b !important; /* Softened black */
    margin-top: 2px;
}

.profile-details-grid {
    gap: 25px 40px !important; /* Better vertical spacing */
}

/* Matching Edit Form Labels to Profile Details */
.ag-field label {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 12px !important;
    display: block;
}

/* Modern Toggle Switch (Slider) for Checkboxes */
.ag-checkbox-item {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-top: 15px !important; /* Increased gap from field */
    cursor: pointer;
}

.ag-toggle-slider label {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

.ag-toggle-slider input[type="checkbox"],
.ag-toggle-slider label input[type="checkbox"] {
    position: relative !important;
    width: 50px !important;
    min-width: 50px !important;
    height: 26px !important;
    min-height: 26px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background: #cbd5e1 !important;
    border-radius: 20px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.ag-toggle-slider input[type="checkbox"]:checked,
.ag-toggle-slider label input[type="checkbox"]:checked {
    background: var(--accent-blue, #3b82f6) !important;
    border: none !important;
}

.ag-toggle-slider input[type="checkbox"]::before,
.ag-toggle-slider label input[type="checkbox"]::before {
    content: "" !important;
    position: absolute !important;
    top: 3px !important;
    left: 3px !important;
    width: 20px !important;
    height: 20px !important;
    background: white !important;
    border-radius: 50% !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

.ag-toggle-slider input[type="checkbox"]:checked::before,
.ag-toggle-slider label input[type="checkbox"]:checked::before {
    left: 27px !important;
}

/* Remove base checkmark icon from toggle slider */
.ag-toggle-slider input[type="checkbox"]::after,
.ag-toggle-slider label input[type="checkbox"]::after {
    content: none !important;
}

/* Harmonizing Select Dropdowns */
.ag-field select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 1.2em !important;
    padding-right: 2.5rem !important;
}

/* Premium File Input Styling */
/* Native File Input Styling */
.ag-field input[type="file"] {
    padding: 0 0 0 20px !important;
    display: flex !important;
    align-items: center !important;
    direction: rtl !important;
    color: transparent !important; /* Hide native browser text */
    position: relative !important;
}

.ag-field input[type="file"]::after {
    content: var(--file-text, 'Світлину не обрано') !important;
    color: #64748b !important;
    position: absolute !important;
    left: 20px !important;
    top: 0 !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    direction: ltr !important; /* Normal text direction */
    font-size: 0.9rem !important;
    pointer-events: none !important;
}

.ag-field input[type="file"]::file-selector-button {
    background: var(--accent-blue) !important;
    color: #ffffff !important; /* Ensure white text */
    border: none !important;
    border-radius: 0 12px 12px 0 !important;
    padding: 0 25px !important;
    height: 48px !important;
    margin: 0 !important;
    margin-left: 15px !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: 0.3s var(--ease) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ag-field input[type="file"]::file-selector-button:hover {
    background: #2563eb !important;
}

/* --- Search Page Stylings (Anti-Gravity) --- */
.search-form-box {
    background: var(--bg-card, rgba(255, 255, 255, 0.65));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.8));
    border-radius: var(--radius-lg, 20px);
    padding: 35px;
    box-shadow: var(--shadow-soft, 0 8px 32px rgba(37, 99, 235, 0.05));
    margin-bottom: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-form-box:hover {
    box-shadow: var(--shadow-hover, 0 16px 48px rgba(37, 99, 235, 0.12));
}

.search-form-group { margin-bottom: 22px; }
.search-form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 10px;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-form-group input[type="text"], 
.search-form-group select {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-md, 12px);
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    transition: 0.3s;
    color: var(--text-main);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.search-form-group input[type="text"]:focus, 
.search-form-group select:focus {
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), inset 0 2px 4px rgba(0,0,0,0.02);
}

.search-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-primary-action {
    background: linear-gradient(135deg, var(--accent-blue, #2563eb), var(--primary-blue, #1a365d));
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-md, 12px);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s ease;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-primary-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, var(--primary-blue, #1a365d), #0f172a);
}

.btn-secondary-action {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-main);
    border: 1px solid rgba(0,0,0,0.1);
    padding: 14px 28px;
    border-radius: var(--radius-md, 12px);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-secondary-action:hover {
    background: white;
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.search-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.search-form-row {
    display: flex;
    gap: 15px;
}

.search-form-row input[type="radio"],
.search-form-row input[type="checkbox"] {
    margin-right: 5px;
    accent-color: var(--primary-blue);
}

.search-form-row label {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    text-transform: none;
    color: var(--text-main);
    cursor: pointer;
    margin-bottom: 0;
    letter-spacing: 0;
}

/* --- Dropdown Search Bar --- */
.search-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 340px;
    background: #fdfbf7 url('/templates/Israel_portal/images/login-modal-watercolor.png') no-repeat center bottom / cover;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 25px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid rgba(0,0,0,0.05);
}

.search-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 4px; /* Centered relative to the search icon */
    width: 12px;
    height: 12px;
    background: #fdfbf7;
    transform: rotate(45deg);
    border-top: 1px solid rgba(0,0,0,0.05);
    border-left: 1px solid rgba(0,0,0,0.05);
}

.search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-dropdown .top-search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.25); /* Semi-transparent like addcomments */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(203, 213, 225, 0.7); /* Thinner and lighter border */
    border-radius: 12px;
    padding: 6px 16px;
    transition: all 0.3s var(--ease);
}

.search-dropdown .top-search-form:hover,
.search-dropdown .top-search-form:focus-within {
    background: #ffffff;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 15px rgba(0, 94, 184, 0.1);
}

.search-dropdown .top-search-form i {
    color: var(--primary-blue);
    font-size: 1.1rem;
    margin-right: 12px;
}

.search-dropdown .top-search-form input {
    height: 40px;
    border: none;
    background: none;
    outline: none;
    flex-grow: 1;
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-main);
    color: var(--text-main);
}

.search-dropdown .top-search-form input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

@media (max-width: 600px) {
    .search-dropdown {
        width: calc(100vw - 40px);
        right: -50px; /* Adjust based on mobile padding */
    }
    .search-dropdown::before {
        right: 65px;
    }
}

/* ============================================================
   MOBILE STICKY HEADER — collapse on scroll-down
   ============================================================ */
@media (max-width: 991px) {
    header .header-top {
        transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
        max-height: 200px;
        overflow: hidden;
        opacity: 1;
    }
    header.header--compact .header-top {
        max-height: 0;
        padding: 0;
        opacity: 0;
        pointer-events: none;
    }
    header {
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
}

/* ============================================================
   PILL-SCROLL MOBILE MENU — mobile-first
   ============================================================ */
.pill-nav {
    display: flex;
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    padding: 8px 12px 8px 16px;
    gap: 7px;
    flex-wrap: nowrap;
    align-items: center;
}
.pill-nav::-webkit-scrollbar { display: none; }
.pill-nav::before {
    content: '';
    min-width: 10px;
    flex-shrink: 0;
    display: block;
}
@media (min-width: 992px) { .pill-nav::before { display: none; } }

.pill-nav a {
    display: inline-flex;
    align-items: center;
    scroll-snap-align: start;
    flex-shrink: 0;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1.5px solid #e5e7eb;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.pill-nav a:hover,
.pill-nav a.active {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}

/* Per-category active colors — managed by cat_colors module */

@media (min-width: 992px) {
    .pill-nav {
        display: none;
    }
}

/* ============================================================
   FULLSTORY MOBILE
   ============================================================ */
@media (max-width: 767px) {
    .full-article .article-header-full {
        padding: 20px 16px 12px !important;
    }
    .full-article .article-body {
        padding: 16px !important;
        font-size: 1rem !important;
    }
    .full-article .context-box {
        margin: 0 0 16px !important;
        padding: 14px 16px !important;
    }
    .full-article .source-box {
        margin: 0 0 20px !important;
        padding: 12px 16px !important;
    }
    .full-article .article-footer-meta {
        padding: 16px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .full-article .article-main-image {
        max-height: 240px !important;
    }
    .full-article .article-meta-top {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    /* Breadcrumbs / speedbar */
    .speedbar-inner {
        font-size: 0.78rem;
        flex-wrap: wrap;
    }
    /* Comments block — hidden on mobile until full responsive rewrite */
    .comments-block { display: none !important; }
}

/* =============================================
   SIDEBAR NEWS
   ============================================= */
.sidebar-news-item {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    text-decoration: none;
}
.sidebar-news-item:last-child { border-bottom: none; }
.sidebar-news-item:hover .sidebar-news-title { color: var(--primary-blue); }
.sidebar-news-row { display: flex; justify-content: space-between; gap: 10px; }
.sidebar-news-title { font-size: 0.9rem; font-weight: 700; line-height: 1.4; flex-grow: 1; margin: 0; }
.sidebar-news-views { font-size: 0.75rem; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

/* =============================================
   USERINFO (from userinfo.tpl)
   ============================================= */
.subscriptions-area .ag-checkbox-item { margin: 0 !important; }

/* =============================================
   TAGS PAGE — two-column news grid
   ============================================= */
.tags-news-wrap {
    padding: 20px 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    align-items: start;
}
@media (max-width: 640px) {
    .tags-news-wrap { grid-template-columns: 1fr; }
}

/* ── Auto-links in article body ─────────────────────────────────────── */
.article-body a:not([class]) {
    color: #1a6fc4 !important;
    text-decoration: underline !important;
    text-decoration-style: dotted !important;
    text-underline-offset: 3px;
    text-decoration-color: #1a6fc480 !important;
    transition: color .15s, text-decoration-color .15s;
}
.article-body a:not([class]):hover {
    color: #0d4f9e !important;
    text-decoration-color: #0d4f9e !important;
    text-decoration-style: solid !important;
}

/* ══ Travel fullstory layout ═══════════════════════════════════════════════ */
.travel-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .travel-layout { grid-template-columns: 1fr; }
}
.travel-sidebar:not(:has(.travel-sidebar-block)) { display: none; }
.travel-layout:not(:has(.travel-sidebar-block)) { grid-template-columns: 1fr; }

.travel-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
}

.travel-sidebar-block {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.travel-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-blue);
    padding: 14px 16px;
    line-height: 1;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-glass);
}

.travel-sidebar-title i { font-size: 1.1rem; line-height: 1; position: relative; top: -1px; }
.travel-sidebar-block--weather .travel-sidebar-title { padding-bottom: 4px; border-bottom: none; }
.travel-sidebar-block--weather .travel-weather-wrap { padding-top: 0; }
.travel-info-block:not(:has(.travel-info-row)) { display: none; }
.travel-info-list { padding: 4px 0 4px; }
.travel-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-glass);
}
.travel-info-row:last-child { border-bottom: none; }
.travel-info-row--tips { background: #fffbeb; }
.travel-info-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    margin-top: 3px;
}
/* Кольори іконок по рядках */
.travel-info-row:nth-child(1) .travel-info-icon { background: #e0f0ff; color: #2563eb; }
.travel-info-row:nth-child(2) .travel-info-icon { background: #e8f5e9; color: #16a34a; }
.travel-info-row:nth-child(3) .travel-info-icon { background: #fce7f3; color: #db2777; }
.travel-info-row:nth-child(4) .travel-info-icon { background: #fff3e0; color: #ea580c; }
.travel-info-row--tips .travel-info-icon { background: #fef3c7; color: #d97706; }
.travel-info-body { min-width: 0; }
.travel-info-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    margin-bottom: 2px;
    line-height: 1.3;
}
.travel-info-value {
    font-size: 0.88rem;
    color: var(--text-dark);
    line-height: 1.5;
}
.travel-info-value ul { list-style: none; margin: 0; padding: 0; }
.travel-info-value ul li { padding: 1px 0; }

.travel-map-wrap { padding: 12px; }
.travel-weather-wrap { padding: 2px 12px 14px; }
.ww-forecast { display: flex; flex-direction: column; gap: 8px; }
.ww-city-name { font-size: 0.78rem; color: var(--text-muted); text-align: center; padding: 2px 0 4px; }
.ww-days { display: flex; gap: 0; }
.ww-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 10px;
    text-align: center;
}
.ww-day--today { background: #f0f7ff; }
.ww-day-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.ww-day--today .ww-day-label { color: var(--primary-blue); }
.ww-day-icon { display: block; }
.ww-day-temps { display: flex; gap: 5px; align-items: baseline; }
.ww-max { font-size: 1rem; font-weight: 700; color: var(--text-dark); }
.ww-min { font-size: 0.8rem; color: var(--text-muted); }

/* Photo gallery widget */
.travel-gallery-wrap { padding: 4px 12px 16px; }
.pg-wrap { position: relative; }
.pg-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.pg-strip::-webkit-scrollbar { display: none; }
.pg-thumb-link { flex-shrink: 0; scroll-snap-align: start; display: block; border-radius: 10px; overflow: hidden; }
.pg-thumb { width: 88px; height: 88px; object-fit: cover; display: block; transition: opacity 0.15s; }
.pg-thumb:hover { opacity: 0.85; }
.pg-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(255,255,255,0.92); border: 1px solid var(--border-color); border-radius: 50%; width: 28px; height: 28px; font-size: 1.2rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-dark); box-shadow: 0 2px 6px rgba(0,0,0,0.12); padding: 0; transition: background 0.15s; }
.pg-arrow:hover { background: white; }
.pg-arrow-left { left: -10px; }
.pg-arrow-right { right: -10px; }
@media (max-width: 768px) {
    .pg-thumb { width: 80px; height: 80px; }
    .pg-arrow { width: 24px; height: 24px; font-size: 1rem; }
}

.city-cluster-items { display: flex; flex-direction: column; gap: 0; }
.cluster-item a { display: flex; align-items: center; gap: 10px; padding: 10px 16px; text-decoration: none; transition: background 0.15s; border-radius: 10px; }
.cluster-item a:hover { background: var(--bg-light); }
.cluster-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.cluster-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cluster-title { font-size: 0.82rem; font-weight: 600; color: var(--text-dark); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cluster-badge { font-size: 0.7rem; font-weight: 700; color: var(--primary-blue); text-transform: uppercase; letter-spacing: 0.3px; }

/* ── DLE 20.0 migration fixes ───────────────────────────────*/
.text_spoiler { display: none; }
.monthselect-inner { display: flex; align-items: center; justify-content: center; gap: 3em; }
.monthselect-title { display: inline-block; }
.dlepopupnewsedit .wseditor { border-top: none; }
.dlepopupnewsedit .tox .tox-toolbar-overlord { background-color: #f7f7f7; }
.article-sources cite + cite::before { content: " · "; }
