/* ═══════════════════════════════════════════════════
   GeoVibe — Modern Wikipedia Style
   Mobile First · Fast · Clean
   ═══════════════════════════════════════════════════ */

/* Системні шрифти — нульове завантаження */
:root {
    --serif: 'Montserrat', -apple-system, sans-serif;
    --sans: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bg:           #f8f9fa;
    --surface:      #ffffff;
    --border:       #a2a9b1;
    --border-light: #eaecf0;
    --text:         #202122;
    --text-muted:   #54595d;
    --link:         #3366cc;
    --link-hover:   #2a55b0;
    --accent:       #3366cc;
    --header-bg:    #0f1923;
    --radius:       2px;
    --gap:          12px;
    --content-max:  1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--serif);
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── HEADER ── */
/* ── TOPBAR ── темний рядок з датою + навігацією */
#topbar {
    background: linear-gradient(135deg, #0f1923 0%, #1a2c3d 60%, #0d2137 100%);
    border-bottom: 1px solid #1e3550;
    position: sticky;
    top: 0;
    z-index: 201;
}
#topbar-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 16px;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 0;
}
#topbar-datetime {
    font-family: var(--sans);
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 20px;
}
#topbar-nav {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden;
    gap: 0;
}
#topbar-nav a {
    font-family: var(--sans);
    font-size: 13px;
    color: #bbb;
    text-decoration: none;
    padding: 0 12px;
    height: 44px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
#topbar-nav a:hover,
#topbar-nav a.active {
    color: #fff;
    border-bottom-color: #ff7a00;
}
#topbar-tg { color: #888 !important; }
#topbar-tg:hover { color: #29b6f6 !important; border-bottom-color: transparent !important; }
#lang-switcher {
    font-family: var(--sans);
    font-size: 12px;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 12px;
}
#lang-switcher svg { width: 10px; height: 10px; fill: #ccc; }

/* ── HEADER ── білий рядок з лого + пошук */
#header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 52px;
    z-index: 200;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
#header-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 20px 0 14px;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Бургер */
#burger {
    background: none;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    color: #444;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 9px 10px;
    flex-shrink: 0;
    transition: background .15s, border-color .15s;
}
#burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
#burger:hover { background: #f5f5f5; border-color: #bbb; color: #1c1c1e; }
#burger.nav-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#burger.nav-open span:nth-child(2) { opacity: 0; }
#burger.nav-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Лого */
#logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    min-width: 200px;
}
#logo-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
    border-radius: 50%;
}
#logo-fallback {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #2a52b0, #4477dd);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
#logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}
#logo-name {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: bold;
    color: #1c1c1e;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1.1;
}
#logo-tagline {
    font-family: var(--sans);
    font-size: 10px;
    color: #444;
    white-space: nowrap;
    line-height: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Пошук — заповнює увесь простір між лого і краєм */
#search-form {
    flex: 1;
    display: flex;
    align-items: stretch;
    height: 42px;
}
#search-input {
    flex: 1;
    padding: 0 18px;
    border: 1.5px solid #dde1e7;
    border-right: none;
    border-radius: 6px 0 0 6px;
    background: #f7f8fa;
    color: #202122;
    font-family: var(--sans);
    font-size: 14.5px;
    outline: none;
    transition: border-color .15s, background .15s;
    height: 100%;
}
#search-input::placeholder { color: #b0b8c1; }
#search-input:focus {
    border-color: var(--accent);
    background: #fff;
}
#search-btn {
    padding: 0 28px;
    background: var(--accent);
    color: #fff;
    border: 1.5px solid var(--accent);
    border-left: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
    height: 100%;
    letter-spacing: 0.2px;
}
#search-btn:hover { background: #2a55b0; border-color: #2a55b0; }

#search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    display: none;
    align-items: center;
    padding: 6px;
    flex-shrink: 0;
}
#search-toggle:hover { color: #1c1c1e; }

#header-social { display: none; }
#header-right-col { display: none; }
#header-actions { display: none; }

#mobile-search-bar {
    display: none;
    position: fixed;
    top: 98px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    z-index: 198;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
#mobile-search-bar.open { display: block; }
#mobile-search-bar form { display: flex; }
#mobile-search-bar input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 24px 0 0 24px;
    background: #f5f5f5;
    color: #202122;
    font-size: 15px;
    outline: none;
    font-family: var(--sans);
}
#mobile-search-bar input::placeholder { color: #aaa; }
#mobile-search-bar input:focus { border-color: var(--accent); background: #fff; }
#mobile-search-bar button {
    padding: 10px 18px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0 24px 24px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* ── NAV — лівий sidebar (десктоп) ── */
#nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 198;
}
#nav-overlay.open { display: block; }

#mobile-lang { display: none; }

#nav {
    position: fixed;
    top: 124px; /* topbar(52) + header(72) */
    right: -300px;
    width: 280px;
    bottom: 0;
    background: #fff;
    z-index: 199;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -4px 0 20px rgba(0,0,0,.12);
    transition: right .25s ease;
}
#nav.nav-open { right: 0; }

#nav-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    gap: 10px;
}
#nav-header img {
    width: 32px; height: 32px; border-radius: 50%;
}
#nav-header span {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: bold;
    color: #1c1c1e;
}

#nav-inner { padding: 8px 0; }
#nav ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0;
    min-width: 0;
}
#nav ul li a {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    font-family: var(--sans);
    font-size: 15px;
    color: var(--text);
    border-left: 3px solid transparent;
    text-decoration: none;
    transition: background .12s, color .12s;
    gap: 10px;
}
#nav ul li a:hover,
#nav ul li a.active {
    border-left-color: var(--accent);
    background: #f0f4fb;
    color: var(--accent);
    text-decoration: none;
}
#nav-tg-link { color: var(--text); }
#nav-tg-link svg { width: 22px; height: 22px; flex-shrink: 0; }

/* ── LAYOUT ── */
#content-wrap {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 14px 12px;
    display: grid;
    grid-template-columns: 1fr 268px;
    gap: var(--gap);
    align-items: start;
}

/* ── MAIN CONTENT ── */
#main-content {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 18px 20px;
    min-height: 400px;
    overflow-x: auto;
    min-width: 0;
}

#main-content h1 {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: normal;
    line-height: 1.3;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}
#main-content h2 {
    font-family: var(--sans);
    font-size: 21px;
    font-weight: bold;
    margin: 28px 0 12px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-light);
    scroll-margin-top: 130px;
}
#main-content h3 {
    font-family: var(--sans);
    font-size: 17px;
    font-weight: bold;
    margin: 18px 0 8px;
    scroll-margin-top: 130px;
}
#main-content p { margin-bottom: 12px; }

/* ── SIDEBAR ── */
#sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    min-width: 0;
}

.sidebar-box {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}
.sidebar-box-title {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    padding: 7px 12px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg);
}
.sidebar-box-content { padding: 10px 12px; }

/* ── WIKITABLE ── */
.wikitable,
#main-content table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
    margin-bottom: 16px;
    background: var(--surface);
}
.wikitable th,
.wikitable td,
#main-content table th,
#main-content table td {
    border: 1px solid var(--border);
    padding: 5px 8px;
    vertical-align: top;
    line-height: 1.5;
}
.wikitable th,
#main-content table th {
    background: #eaecf0;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}
.wikitable tr:nth-child(even) td { background: #f8f9fa; }
.wikitable tr:hover td,
#main-content table tr:hover td { background: #eaf0fb; }

/* Sortable */
.wikitable th.sortable,
#main-content table th.sortable {
    cursor: pointer;
    user-select: none;
    padding-right: 20px;
    position: relative;
}
.wikitable th.sortable::after,
#main-content table th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 4px;
    font-size: 10px;
    color: #999;
}
th.sort-asc::after  { content: '↑' !important; color: var(--accent) !important; }
th.sort-desc::after { content: '↓' !important; color: var(--accent) !important; }

/* Table filter */
.table-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.table-filter input {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 13px;
    width: 220px;
    outline: none;
    transition: border-color .15s;
}
.table-filter input:focus { border-color: var(--accent); }
.table-filter-count {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--text-muted);
}

/* ── HELPERS ── */
.page-title {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: normal;
    margin-bottom: 6px;
    line-height: 1.3;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}
.page-subtitle {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--link); }
.breadcrumb-sep { color: #c0c5cc; }

.geo-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--surface);
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    transition: background .12s, border-color .12s;
    white-space: nowrap;
}
.geo-tag:hover {
    background: #f0f4fb;
    border-color: var(--link);
    color: var(--link);
    text-decoration: none;
}

.geo-list { list-style: none; padding: 0; margin: 0 0 16px; }
.geo-list li {
    padding: 5px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}
.geo-list li:last-child { border-bottom: none; }
.geo-list-cols { columns: 2; column-gap: 20px; }
.geo-list-cols li { break-inside: avoid; }

.info-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.info-table td {
    padding: 4px 0;
    vertical-align: top;
    border-bottom: 1px solid var(--border-light);
    line-height: 1.4;
}
.info-table td:first-child { color: var(--text-muted); width: 50%; padding-right: 8px; }
.info-table td:last-child { font-weight: 500; text-align: right; }
.info-table tr:last-child td { border-bottom: none; }

.page-cover { position: relative; margin: -18px -20px 18px; overflow: hidden; }
.page-cover img { width: 100%; height: 220px; object-fit: cover; display: block; }
.page-cover-title {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.72));
    padding: 32px 20px 16px;
}
.page-cover-title h1 {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: normal;
    color: #fff;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
    border: none !important;
    padding: 0 !important;
}

.notice {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 13px;
    margin-bottom: 16px;
    border-left: 3px solid;
    line-height: 1.5;
}
.notice-info  { background: #eaf0fb; border-color: var(--link); color: #1a3a7a; }
.notice-warn  { background: #fff8e1; border-color: #e8a000; color: #5a3e00; }
.notice-debug { background: #fff8e1; border-color: #ffe082; color: #5d4037; font-family: monospace; font-size: 12px; }

/* ── TOOLTIP ── */
.symbol-hint {
    position: relative;
    display: inline-block;
    width: 100%;
}
.symbol-hint::after {
    content: attr(data-hint);
    position: absolute;
    top: 105%; left: 0;
    background: #ffffe1;
    color: #000;
    font-size: 12px;
    font-family: var(--sans);
    line-height: 1.5;
    padding: 6px 10px;
    border: 1px solid #b8b800;
    border-radius: 3px;
    width: 240px;
    text-align: left;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
    z-index: 999;
    box-shadow: 2px 2px 6px rgba(0,0,0,.12);
}
.symbol-hint:hover::after { opacity: 1; }


/* ── MOBILE INFOCARD — видима тільки на телефоні ── */
.mobile-infocard {
    display: none;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 18px;
    background: var(--surface);
    overflow: hidden;
}
.mobile-infocard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.mobile-infocard-table td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
    line-height: 1.4;
}
.mobile-infocard-table tr:last-child td { border-bottom: none; }
.mobile-infocard-table td:first-child {
    color: var(--text-muted);
    width: 42%;
    font-family: var(--sans);
}
.mobile-infocard-table td:last-child { font-weight: 500; }

@media (max-width: 768px) {
    .mobile-infocard { display: block; }
}

/* ── FOOTER ── */
#footer {
    background: #111213;
    color: #999;
    font-family: var(--sans);
    font-size: 13px;
    border-top: 1px solid #2a2a2c;
    margin-top: 32px;
    padding: 40px 0 24px;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}
.footer-logo {
    font-family: var(--serif);
    font-size: 20px;
    color: #fff;
    margin-bottom: 10px;
    font-weight: normal;
}
.footer-desc {
    font-size: 13px;
    color: #999;
    line-height: 1.6;
    margin-bottom: 16px;
}
.footer-copy {
    font-size: 12px;
    color: #999;
}
.footer-col-title {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #aaa;
    margin-bottom: 12px;
}
.footer-col a {
    display: block;
    color: #888;
    text-decoration: none;
    font-size: 13px;
    padding: 3px 0;
    transition: color .15s;
}
.footer-col a:hover { color: #ccc; text-decoration: none; }
.footer-social-link { display: flex !important; align-items: center; }

@media (max-width: 768px) {
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 480px) {
    .footer-inner { grid-template-columns: 1fr; }
}

/* ════════════════════════════════
   RESPONSIVE — Mobile First
   ════════════════════════════════ */
@media (max-width: 768px) {
    /* Топбар ховаємо на мобільному */
    #topbar { display: none; }

    #header {
        top: 0;
    }
    #header-inner {
        padding: 0 10px 0 6px;
        gap: 8px;
        height: 58px;
    }
    #logo-img { width: 36px; height: 36px; }
    #logo-fallback { width: 36px; height: 36px; font-size: 14px; }
    #logo-tagline { display: none; }
    #logo-name { font-size: 17px; }
    #search-form { display: none; }
    #search-toggle { display: flex; }
    #mobile-lang { display: flex; }
    #burger { display: flex; }
    #burger span { transition: transform .2s, opacity .2s; }
    #burger.nav-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    #burger.nav-open span:nth-child(2) { opacity: 0; }
    #burger.nav-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    #mobile-search-bar { top: 58px; }
    #nav {
        right: 0;
        left: auto;
        top: 58px;
        width: 75%;
        max-width: 300px;
        bottom: 0;
        transform: translateX(100%);
        transition: transform .25s ease;
        box-shadow: -4px 0 20px rgba(0,0,0,.15);
    }
    #nav.nav-open { transform: translateX(0); }

    #content-wrap {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 10px;
    }
    /* Sidebar ховаємо на мобільному — інфо виводиться через .mobile-infocard */
    #sidebar { display: none; }
    #main-content { padding: 14px; }
    .page-title { font-size: 22px; }
    .page-cover { margin: -14px -14px 14px; }
    .page-cover img { height: 170px; }
    .page-cover-title h1 { font-size: 22px; }
    .geo-list-cols { columns: 1; }
    .wikitable,
    #main-content table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    #content-wrap { grid-template-columns: 1fr 220px; }
}

@media (min-width: 480px) {
    #logo-name { display: block; }
}

@media print {
    #topbar, #header, #nav, #sidebar, #footer, .table-filter { display: none !important; }
    #content-wrap { grid-template-columns: 1fr; padding: 0; }
    #main-content { border: none; padding: 0; }
    body { font-size: 12pt; }
}

/* ══ PHOTO GRID — МІСТА І ПАМ'ЯТКИ ══════════════════════════════ */
.photo-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px;
    margin-bottom: 0;
}
.video-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}
.video-grid .photo-card-inner {
    padding-top: 56.25%;
}
.photo-card {
    text-decoration: none;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    background: #ddd;
}
.photo-card-inner {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
}
.photo-card-inner img {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transition: transform .3s ease;
}
.photo-card:hover .photo-card-inner img { transform: scale(1.06); }
.photo-card-inner::after { content:''; position:absolute; inset:0; background:rgba(0,0,0,0); transition:background .3s; pointer-events:none; }
.photo-card:hover .photo-card-inner::after { background:rgba(0,0,0,0.18); }
.photo-card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.75) 100%);
    padding: 32px 10px 10px;
    pointer-events: none;
}
.photo-card-name {
    color: #fff;
    font-family: var(--serif);
    font-size: 14px;
    font-weight: bold;
    line-height: 1.25;
    display: block;
}
.video-grid .photo-card-name {
    font-size: 10px;
    font-weight: normal;
    opacity: 0.8;
}
.photo-card-sub {
    color: rgba(255,255,255,0.78);
    font-size: 11px;
    font-family: var(--sans);
    display: block;
    margin-top: 2px;
}
.photo-card-placeholder {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #c8d6e5, #a8b8cc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}
.photo-section-footer { margin-top: 14px; margin-bottom: 28px; }
.btn-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border: 1px solid #d0d0d0;
    border-radius: 24px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    font-family: var(--sans);
    background: #fff;
    transition: background .15s, border-color .15s, color .15s;
}
.btn-all::after { content: ' ›'; font-size: 18px; line-height: 1; }
.btn-all:hover { background: #f0f4fb !important; border-color: var(--link) !important; color: var(--link) !important; }

@media (max-width: 768px) {
    .photo-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ══ SIDEBAR ARTICLES ═══════════════════════════════════════════ */
.sidebar-article {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #e8e8e8;
    text-decoration: none;
    transition: background .12s;
}
.sidebar-article:last-of-type { border-bottom: none; }
.sidebar-article:hover { background: #f7f7f7; }
.sidebar-article-img {
    width: 60px;
    height: 46px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
}
.sidebar-article-ph {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #bbb;
}
.sidebar-article-title {
    font-size: 13px;
    color: #222;
    line-height: 1.4;
    font-family: var(--sans);
    padding-top: 2px;
}
.sidebar-article:hover .sidebar-article-title { color: var(--link); }

/* ══ FOOTER BOTTOM ══════════════════════════════════════════════ */
.footer-bottom {
    border-top: 1px solid #222;
    margin-top: 32px;
    padding: 16px 0 0;
}
.footer-bottom-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    font-size: 12px;
    color: #888;
}

/* ══ COUNTRY GRID (глобальні стилі) ═════════════════════════════ */
.country-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.country-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    transition: background .12s;
}
.country-row:hover { background: #f0f4fb; }
.country-grid-4 .country-row:nth-child(4n) { border-right: none; }
.country-flag {
    width: 34px;
    height: 23px;
    object-fit: cover;
    border: 1px solid #ddd;
    flex-shrink: 0;
    border-radius: 2px;
}
.country-flag-ph {
    width: 34px;
    height: 23px;
    background: #eee;
    border: 1px solid #ddd;
    flex-shrink: 0;
    border-radius: 2px;
}
.country-name {
    font-size: 14px;
    color: #1a3a5c;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    font-weight: 500;
}
.country-name small {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--sans);
    margin-top: 1px;
}
@media (max-width: 768px) {
    .country-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .country-grid-4 .country-row:nth-child(4n) { border-right: 1px solid var(--border-light); }
    .country-grid-4 .country-row:nth-child(2n) { border-right: none; }
}

/* ══ КНОПКА "ВГОРУ" ══════════════════════════════════════════════ */
#back-to-top {
    position: fixed;
    bottom: 28px;
    right: 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(30, 45, 65, 0.82);
    border: none;
    box-shadow: 0 3px 14px rgba(0,0,0,0.25);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s, transform .25s, box-shadow .25s;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    background: rgba(30, 45, 65, 0.95);
}
@media (max-width: 768px) {
    #back-to-top { bottom: 16px; right: 14px; width: 40px; height: 40px; }
}

/* ══ SECTION-HEAD (спільний для всіх сторінок) ══════════════════ */
.section-head {
    font-family: var(--sans);
    font-size: 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #333;
    margin: 0 0 14px;
    padding: 0 0 0 10px;
    border-left: 3px solid #e67e22;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ══ BOOKING BLOCK (спільний для всіх сторінок) ═════════════════ */
.booking-section {
    margin: 32px 0 8px;
    padding-top: 24px;
    border-top: 2px solid var(--border-light);
}
.booking-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.booking-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    background: var(--surface);
    transition: box-shadow 0.15s, transform 0.15s;
}
.booking-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-2px);
    text-decoration: none;
}
.booking-card-logo { display: flex; align-items: center; gap: 8px; }
.booking-card-icon { font-size: 22px; }
.booking-card-brand { font-size: 17px; font-weight: 700; font-family: var(--sans, sans-serif); }
.booking-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; flex: 1; }
.booking-card-btn { margin-top: 4px; font-size: 13px; font-weight: 600; color: #3366cc; }
.booking-card--booking { border-top: 3px solid #003580; }
.booking-card--skyscanner { border-top: 3px solid #0770e3; }
.booking-card--gyg { border-top: 3px solid #ff5533; }
@media (max-width: 600px) {
    .booking-cards { grid-template-columns: 1fr; }
}
