/* Theme Name: Twenty Twenty-Five */
/* КАСТОМНЫЕ СТИЛИ FEOCAFE */

/* ── Общий враппер ─────────────────────────────────────────── */
.custom-homepage-wrapper {
    width: 100%;
    padding: 0;
}

/* ── Старые колонки — скрыты (используется grid) ───────────── */
.categories-columns { display: none !important; }

/* ── Layout: сайдбар + основная область ────────────────────── */
.cafe-layout-wrapper {
    display: block;
    width: 100%;
    min-height: auto;
}
.cafe-main-area {
    display: block;
    width: 100%;
    min-width: 0;
}
.cafe-sidebar-filters {
    display: none;
}

/* ── Карточка поста ────────────────────────────────────────── */
.post-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}
.post-thumbnail {
    display: block;
    margin-bottom: 0;
    overflow: hidden;
    border-radius: 5px;
}
.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}
.post-thumbnail:hover img { transform: scale(1.05); }
.post-thumbnail-wrapper {
    position: relative;
    display: block;
    margin-bottom: 15px;
}
.post-thumbnail-wrapper .post-thumbnail {
    display: block;
    margin-bottom: 0;
    overflow: hidden;
    border-radius: 5px;
}
.post-title {
    font-size: 18px;
    margin-bottom: 10px;
}
.post-title a { color: #333; text-decoration: none; }
.post-title a:hover { color: #0073aa; }
.post-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 10px;
}
.read-more {
    display: inline-block;
    padding: 8px 15px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
    margin-top: auto;
}
.read-more:hover { background-color: #005a87; }

/* ── Бейдж категории ────────────────────────────────────────── */
.cafe-category-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.cafe-category-badge.badge-not-expensive { background: #e8f5e9; color: #2e7d32; }
.cafe-category-badge.badge-common        { background: #fff3e0; color: #e65100; }
.cafe-category-badge.badge-expensive     { background: #fce4ec; color: #ad1457; }

/* ── Адрес в карточке ───────────────────────────────────────── */
.cafe-card-address {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 10px;
    font-size: 13px;
    color: #555;
}
.cafe-card-address a {
    color: #e84141;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    transition: color 0.2s;
}
.cafe-card-address a:hover { color: #b71c1c; }
.cafe-card-address svg { flex-shrink: 0; }

/* ── Теги в карточке ────────────────────────────────────────── */
.cafe-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 12px;
}
.cafe-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    transition: all 0.2s ease;
}
.cafe-tag-item:hover { background: #0073aa; color: #fff; border-color: #0073aa; }
.cafe-tag-icon { width: 18px; height: 18px; object-fit: contain; }
.cafe-tag-name { line-height: 1; }

/* ── Рейтинг в карточке ─────────────────────────────────────── */
.cafe-card-total-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border-radius: 8px;
    border-left: 3px solid #ffc107;
}
.cafe-card-total-rating .rating-value {
    font-size: 20px;
    font-weight: 800;
    color: #ff9800;
}
.cafe-card-total-rating .rating-stars {
    font-size: 15px;
    color: #ffc107;
    letter-spacing: 1px;
}
.cafe-card-ratings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 12px;
    margin: 10px 0;
    font-size: 12px;
}
.cafe-card-rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #eee;
    padding-bottom: 4px;
    gap: 6px;
}
.cafe-card-rating-label { color: #777; }
.cafe-card-rating-score { font-weight: 700; color: #ff9800; white-space: nowrap; }
.cafe-rating-display {
    margin: 15px 0;
    padding: 12px;
    background: #f8f9fa;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    text-align: center;
}
.cafe-rating-display strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 13px;
}
.rating-value {
    font-size: 18px;
    font-weight: bold;
    color: #ff9800;
    display: block;
    margin-bottom: 5px;
}
.rating-stars { font-size: 20px; color: #ffc107; letter-spacing: 2px; }

/* ── Медали/значки позиции ──────────────────────────────────── */
.rank-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 80px;
    z-index: 10;
    cursor: help;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.45));
    transition: transform 0.2s ease, filter 0.2s ease;
}
.rank-badge:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 5px 12px rgba(0,0,0,0.55));
}
.rank-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(33,33,33,0.93);
    color: #fff;
    padding: 7px 11px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
    width: max-content;
    max-width: 200px;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}
.rank-badge::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(33,33,33,0.93);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 9999;
    pointer-events: none;
}
.rank-badge:hover::after,
.rank-badge:hover::before { opacity: 1; visibility: visible; }
.medal-ribbon {
    width: 22px;
    height: 18px;
    clip-path: polygon(15% 0, 85% 0, 100% 100%, 50% 82%, 0 100%);
    flex-shrink: 0;
}
.rank-medal-gold   .medal-ribbon { background: linear-gradient(to right, #F57F17, #FFCA28, #F57F17); }
.rank-medal-silver .medal-ribbon { background: linear-gradient(to right, #757575, #EEEEEE, #757575); }
.rank-medal-bronze .medal-ribbon { background: linear-gradient(to right, #5D4037, #BCAAA4, #5D4037); }
.medal-circle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: -2px;
    box-shadow: inset 0 -5px 10px rgba(0,0,0,0.3), inset 0 5px 10px rgba(255,255,255,0.25);
}
.rank-medal-gold   .medal-circle { background: radial-gradient(circle at 38% 35%, #FFF9C4, #FFD600 45%, #E65100 100%); border: 2.5px solid #E65100; }
.rank-medal-silver .medal-circle { background: radial-gradient(circle at 38% 35%, #FFFFFF, #BDBDBD 45%, #424242 100%); border: 2.5px solid #424242; }
.rank-medal-bronze .medal-circle { background: radial-gradient(circle at 38% 35%, #FFCC80, #CD7F32 45%, #4E342E 100%); border: 2.5px solid #4E342E; }
.medal-stars { font-size: 7px; letter-spacing: 1.5px; line-height: 1.2; opacity: 0.8; }
.rank-medal-gold   .medal-stars { color: #FFF9C4; }
.rank-medal-silver .medal-stars { color: #FAFAFA; }
.rank-medal-bronze .medal-stars { color: #FFCC80; }
.medal-number { font-size: 23px; font-weight: bold; font-family: Georgia, serif; line-height: 1; }
.rank-medal-gold   .medal-number { color: #4E1500; text-shadow: 0 1px 2px rgba(255,255,255,0.5); }
.rank-medal-silver .medal-number { color: #212121; text-shadow: 0 1px 2px rgba(255,255,255,0.5); }
.rank-medal-bronze .medal-number { color: #3E2723; text-shadow: 0 1px 2px rgba(255,255,255,0.4); }
.rank-number-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 35%, #78909C, #455A64, #263238);
    border: 3px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}
.rank-number-badge span {
    font-size: 26px;
    font-weight: bold;
    color: #fff;
    font-family: Georgia, serif;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ── Grid ───────────────────────────────────────────────────── */
.cafe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 24px 20px;
    width: 100%;
    box-sizing: border-box;
}
.cafe-grid .post-item {
    height: 100%;
    margin-bottom: 0;
}
.cafe-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #aaa;
    font-style: italic;
    padding: 60px 20px;
    font-size: 16px;
}

/* ── Попап карты ────────────────────────────────────────────── */
.cafe-map-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cafe-map-popup-overlay.active { display: flex; }
.cafe-map-popup {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}
.cafe-map-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    gap: 12px;
}
.cafe-map-popup-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cafe-map-popup-close {
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.cafe-map-popup-close:hover { background: #c62828; }
.cafe-map-popup-body {
    padding: 0;
    flex: 1;
}
.cafe-map-popup-body iframe {
    display: block;
    width: 100%;
    height: 480px;
    border: none;
}
.cafe-map-open-btn { display: none; }

@media screen and (max-width: 768px) {
    .cafe-map-popup-body iframe { height: 60vh; }
}

/* ── Панель фильтров ────────────────────────────────────────── */
.cafe-filter-panel {
    background: #fff;
    border-bottom: 2px solid #e0e0e0;
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.cafe-filter-toggle {
    display: none;
    width: 100%;
    padding: 11px 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: background 0.2s ease;
}
.cafe-filter-toggle.active { background: #005a87; }
.cafe-filter-toggle-icon {
    font-size: 20px;
    transition: transform 0.25s ease;
}
.cafe-filter-toggle.open .cafe-filter-toggle-icon { transform: rotate(45deg); }
.cafe-filter-body {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 30px;
    align-items: flex-start;
}
.cafe-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}
.cafe-filter-group-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.07em;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.cafe-filter-option {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    line-height: 1.3;
    user-select: none;
}
.cafe-filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0073aa;
    cursor: pointer;
    flex-shrink: 0;
}
.cafe-filter-option:hover { color: #0073aa; }
.cafe-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cafe-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #f0f0f0;
    border: 1.5px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    white-space: nowrap;
}
.cafe-filter-tag:hover { background: #e3f2fd; border-color: #90caf9; color: #0073aa; }
.cafe-filter-tag.active { background: #0073aa; border-color: #0073aa; color: #fff; }
.cafe-filter-tag img { width: 16px; height: 16px; object-fit: contain; }
.cafe-filter-reset {
    align-self: flex-end;
    padding: 7px 16px;
    background: transparent;
    border: 1.5px solid #bbb;
    border-radius: 6px;
    font-size: 13px;
    color: #777;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-top: auto;
}
.cafe-filter-reset:hover { border-color: #f44336; color: #f44336; background: #fff5f5; }

/* ── Недоступные элементы фильтра ───────────────────────────── */
label.cafe-filter-option.filter-disabled { opacity: 0.35; cursor: default; }
label.cafe-filter-option.filter-disabled input { cursor: default; }
.cafe-filter-tag.filter-disabled { opacity: 0.35; cursor: default; pointer-events: none; }

/* ── Лоадер ─────────────────────────────────────────────────── */
.cafe-filter-loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.55);
    z-index: 9990;
    align-items: center;
    justify-content: center;
}
.cafe-filter-loading.active { display: flex; }
.cafe-filter-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e0e0e0;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: cafeSpinner 0.75s linear infinite;
}
@keyframes cafeSpinner { to { transform: rotate(360deg); } }
.cafe-no-results {
    text-align: center;
    color: #aaa;
    font-style: italic;
    padding: 30px 10px;
    font-size: 14px;
}

/* ── Тултипы фильтра ────────────────────────────────────────── */
.filter-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #bbb;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    cursor: help;
    position: relative;
    vertical-align: super;
    margin-left: 4px;
    flex-shrink: 0;
    line-height: 1;
    transition: background 0.2s;
}
.filter-tooltip:hover { background: #555; }
.filter-tooltip-text {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    padding: 10px 14px;
    border-radius: 8px;
    width: 260px;
    white-space: normal;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    pointer-events: none;
}
.filter-tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #222;
}
.filter-tooltip:hover .filter-tooltip-text { display: block; }
.filter-tooltip.tooltip-right .filter-tooltip-text { left: auto; right: 0; transform: none; }
.filter-tooltip.tooltip-right .filter-tooltip-text::after { left: auto; right: 12px; transform: none; }

/* ══ ≥1600px — боковой сайдбар ══════════════════════════════ */
@media screen and (min-width: 1600px) {
    .cafe-layout-wrapper {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        min-height: 100vh;
    }
    .cafe-sidebar-filters {
        display: block;
        width: 260px;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        background: #fff;
        border-right: 2px solid #e0e0e0;
        padding: 24px 18px;
        box-shadow: 2px 0 8px rgba(0,0,0,0.05);
        scrollbar-width: thin;
        scrollbar-color: rgba(0,0,0,0.15) transparent;
    }
    .cafe-sidebar-filters::-webkit-scrollbar { width: 4px; }
    .cafe-sidebar-filters::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }
    .cafe-filter-sidebar-inner {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }
    .cafe-sidebar-filters .cafe-filter-group-title {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        color: #999;
        letter-spacing: 0.07em;
        margin-bottom: 8px;
    }
    .cafe-sidebar-filters .cafe-filter-tags {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    .cafe-sidebar-filters .cafe-filter-tag {
        width: auto !important;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 5px 10px;
        border-radius: 20px;
        font-size: 13px;
        white-space: nowrap;
        cursor: pointer;
        border: 1px solid #e0e0e0;
        background: #f5f5f5;
        transition: background 0.2s, border-color 0.2s;
    }
    .cafe-sidebar-filters .cafe-filter-tag:hover,
    .cafe-sidebar-filters .cafe-filter-tag.active { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
    .cafe-sidebar-filters .cafe-filter-tag img { width: 18px; height: 18px; object-fit: contain; }
    .cafe-sidebar-filters .cafe-filter-tag.filter-disabled { opacity: 0.35; cursor: default; pointer-events: none; }
    .cafe-sidebar-filters .cafe-filter-reset { width: 100%; text-align: center; padding: 9px; }
    .cafe-main-area {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }
    .cafe-filter-panel { display: none !important; }
    .cafe-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* ══ 769px – 1599px — горизонтальная панель фильтров ════════ */
@media screen and (min-width: 769px) and (max-width: 1599px) {
    .cafe-filter-toggle   { display: none !important; }
    .cafe-filter-close-btn { display: none !important; }
    .cafe-filter-body {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        gap: 0 !important;
        padding: 14px 20px !important;
        max-height: none !important;
        overflow: visible !important;
        border-bottom: 2px solid #e8e8e8;
    }
    .cafe-filter-group.filter-group-cat {
        flex: 0 0 auto !important;
        padding-right: 20px !important;
        margin-right: 20px !important;
        border-right: 1px solid #ddd !important;
    }
    .cafe-filter-group.filter-group-rating {
        flex: 0 0 auto !important;
        padding-right: 20px !important;
        margin-right: 20px !important;
        border-right: 1px solid #ddd !important;
    }
    .cafe-filter-group.filter-group-tags {
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }
    .cafe-filter-group.filter-group-tags .cafe-filter-tags {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .cafe-filter-group.filter-group-tags .cafe-filter-tag {
        width: auto !important;
        display: inline-flex !important;
        white-space: nowrap !important;
    }
    .filter-group-cat .cafe-filter-reset {
        display: block !important;
        margin-top: 10px !important;
        width: 100% !important;
    }
       .cafe-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        padding: 20px;
        gap: 20px;
    }
}

/* ══ ≤768px — мобильная версия ══════════════════════════════ */
@media screen and (max-width: 768px) {
    .cafe-layout-wrapper {
        display: block;
        min-height: auto;
    }
    .cafe-main-area {
        width: 100%;
        display: block;
    }
    .cafe-sidebar-filters { display: none !important; }
    .cafe-filter-panel {
        display: block !important;
        padding: 10px 14px;
        padding-left: 60px;
        top: 0;
    }
    .cafe-filter-toggle {
        display: flex;
        border-radius: 0 8px 8px 0;
    }
    .cafe-filter-body {
        display: none;
        flex-direction: column;
        gap: 18px;
        padding-top: 14px;
        border-top: 1px solid #eee;
        margin-top: 10px;
    }
    .cafe-filter-body.open { display: flex; }
    .cafe-filter-group { min-width: 100%; }
    .cafe-filter-tags { gap: 8px; }
    .cafe-filter-tag { font-size: 14px; padding: 6px 13px; }
    .cafe-filter-reset {
        align-self: stretch;
        text-align: center;
        padding: 10px;
        font-size: 14px;
    }
    .cafe-filter-close-btn {
        display: block;
        width: 100%;
        padding: 12px;
        margin-top: 16px;
        background: #333;
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        text-align: center;
        transition: background 0.2s ease;
    }
    .cafe-filter-close-btn:hover { background: #000; }
    .cafe-grid {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 16px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* ── Шапка сайта ────────────────────────────────────────────── */
.site-header {
    background: #ffffff;
    border-bottom: 3px solid #0073aa;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.site-branding { flex: 0 0 auto; }
.site-title { margin: 0; font-size: 28px; }
.site-title a { color: #333; text-decoration: none; }
.site-title a:hover { color: #0073aa; }
.site-description { margin: 5px 0 0; font-size: 14px; color: #666; }
.main-navigation {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
}
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}
.nav-menu li { margin: 0; padding: 0; position: relative; }
.nav-menu a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 15px;
    display: block;
    transition: all 0.3s ease;
    border-radius: 4px;
}
.nav-menu a:hover,
.nav-menu .current-menu-item a { background: #0073aa; color: #fff; }
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    min-width: 200px;
    margin-top: 5px;
    padding: 10px 0;
    list-style: none;
    z-index: 100;
}
.nav-menu li:hover .sub-menu { display: block; }
.nav-menu .sub-menu li { margin: 0; }
.nav-menu .sub-menu a { padding: 10px 20px; }

/* ── Мобильное меню ─────────────────────────────────────────── */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 9998;
    background: rgba(255,255,255,0.95);
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    width: 48px;
    height: 48px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.burger-line {
    display: block;
    width: 22px;
    height: 3px;
    background: #333;
    border-radius: 2px;
}
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
}
.mobile-menu-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: #fff;
    padding: 30px 20px;
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0,0,0,0.3);
}
.mobile-menu-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 32px;
    color: #333;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
}
.mobile-menu-branding {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}
.mobile-menu-branding h2 { font-size: 22px; margin: 0 0 5px; }
.mobile-menu-branding h2 a { color: #333; text-decoration: none; }
.mobile-menu-branding p { margin: 0; font-size: 13px; color: #666; }
.mobile-nav-menu { list-style: none; margin: 0; padding: 0; }
.mobile-nav-menu li { margin: 0; border-bottom: 1px solid #eee; }
.mobile-nav-menu a {
    display: block;
    padding: 15px 10px;
    color: #333;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    transition: background 0.2s ease;
}
.mobile-nav-menu a:hover,
.mobile-nav-menu a:active { background: #f5f5f5; color: #0073aa; }
body.menu-open { overflow: hidden; }

/* ── Попап «Добавить кафе» ──────────────────────────────────── */
.add-cafe-popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.add-cafe-popup-container {
    background: #fff;
    border-radius: 15px;
    padding: 35px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}
.add-cafe-popup-close {
    position: absolute;
    top: 12px; right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: color 0.2s ease;
}
.add-cafe-popup-close:hover { color: #333; }
.add-cafe-popup-title { margin: 0 0 25px; font-size: 24px; color: #333; text-align: center; }
.popup-form-group { margin-bottom: 18px; }
.popup-form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: #555; }
.popup-form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}
.popup-form-group input[type="text"]:focus { outline: none; border-color: #0073aa; }
.popup-disclaimer {
    margin: 20px 0;
    padding: 15px;
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    font-style: italic;
}
.popup-submit-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}
.popup-submit-btn:hover:not(:disabled) { background: #005a87; }
.popup-submit-btn:disabled { background: #ccc; cursor: not-allowed; }
.popup-form-response { margin-top: 15px; text-align: center; }
.popup-form-response .success-message { color: #4caf50; font-weight: bold; padding: 10px; background: #d4edda; border-radius: 5px; }
.popup-form-response .error-message   { color: #f44336; font-weight: bold; padding: 10px; background: #f8d7da; border-radius: 5px; }

/* ── Голосование ────────────────────────────────────────────── */
.cafe-voting-section {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.voting-question { font-size: 26px; margin-bottom: 25px; color: #333; font-weight: bold; }
.voting-buttons { display: flex; justify-content: center; gap: 40px; margin-bottom: 20px; }
.vote-btn {
    background: #fff;
    border: 3px solid #ddd;
    border-radius: 15px;
    padding: 25px 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 140px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.vote-btn:hover:not(:disabled) { transform: translateY(-5px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.vote-btn.vote-up   { border-color: #4caf50; }
.vote-btn.vote-up:hover:not(:disabled)   { background: #4caf50; border-color: #4caf50; }
.vote-btn.vote-down { border-color: #f44336; }
.vote-btn.vote-down:hover:not(:disabled) { background: #f44336; border-color: #f44336; }
.vote-btn:hover:not(:disabled) .vote-icon { transform: scale(1.2); }
.vote-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.vote-btn.voted { background: #e0e0e0; border-color: #bbb; }
.vote-icon { font-size: 60px; transition: transform 0.3s ease; }
.vote-count { font-size: 24px; font-weight: bold; color: #333; }
.voting-message { margin-top: 15px; font-size: 16px; }
.success-message { color: #4caf50; font-weight: bold; }
.error-message   { color: #f44336; font-weight: bold; }

/* ── Форма жалобы ───────────────────────────────────────────── */
.complaint-form-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
}
.complaint-form-overlay {
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.complaint-form-container {
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}
.close-complaint-form {
    position: absolute;
    top: 15px; right: 15px;
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 35px; height: 35px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.3s ease;
}
.close-complaint-form:hover { background: #d32f2f; }
.complaint-form-container h3 { margin: 0 0 25px; font-size: 24px; color: #333; text-align: center; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: bold; color: #555; }
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}
.form-group textarea:focus { outline: none; border-color: #0073aa; }
.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
}
.file-info { display: block; margin-top: 8px; font-size: 12px; color: #666; }
.form-actions { display: flex; gap: 15px; margin-top: 25px; }
.submit-complaint,
.cancel-complaint {
    flex: 1;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.submit-complaint { background: #4caf50; color: #fff; }
.submit-complaint:hover:not(:disabled) { background: #45a049; }
.submit-complaint:disabled { background: #ccc; cursor: not-allowed; }
.cancel-complaint { background: #f44336; color: #fff; }
.cancel-complaint:hover { background: #d32f2f; }
.form-response { margin-top: 20px; padding: 15px; border-radius: 8px; text-align: center; font-weight: bold; }
.form-response .success-message { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.form-response .error-message   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ── Одиночная запись ───────────────────────────────────────── */
.cafe-single-post { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }
.entry-header { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 3px solid #ddd; }
.entry-title { font-size: 36px; margin-bottom: 15px; color: #333; }
.header-rating {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
}
.header-rating-value { font-size: 24px; font-weight: bold; display: block; margin-bottom: 5px; }
.header-rating-stars { font-size: 28px; color: #ffd700; letter-spacing: 3px; }
.featured-image { margin-bottom: 40px; text-align: center; }
.featured-image img { max-width: 100%; height: auto; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.cafe-description { margin-bottom: 40px; padding: 25px; background: #f9f9f9; border-radius: 8px; }
.cafe-description h2 { font-size: 28px; margin-bottom: 20px; color: #333; border-bottom: 2px solid #0073aa; padding-bottom: 10px; }
.cafe-detailed-ratings { margin-bottom: 40px; padding: 30px; background: #fff; border: 2px solid #ddd; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.cafe-detailed-ratings h2 { text-align: center; margin-bottom: 30px; color: #333; font-size: 28px; }
.ratings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 30px; }
.rating-item {
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rating-item:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.15); }
.rating-label { display: block; font-weight: bold; margin-bottom: 10px; color: #555; font-size: 15px; }
.rating-score { display: block; font-size: 22px; font-weight: bold; color: #ff9800; margin-bottom: 8px; }
.rating-stars-wrapper { display: flex; align-items: center; justify-content: center; gap: 8px; }
.rating-item .rating-stars { font-size: 24px; color: #ffc107; }
.rating-info-icon {
    display: inline-block;
    width: 20px; height: 20px;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    cursor: help;
    font-weight: bold;
    position: relative;
    vertical-align: super;
    font-size: 11px;
}
.rating-info-icon:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: normal;
    width: 200px;
    font-size: 12px;
    line-height: 1.4;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.rating-info-icon:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}
.average-rating-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.average-rating-box h3 { margin: 0 0 15px; font-size: 24px; }
.average-rating-value { font-size: 52px; font-weight: bold; margin-bottom: 10px; }
.average-rating-stars { font-size: 40px; color: #ffd700; letter-spacing: 6px; }

/* ── Галерея ────────────────────────────────────────────────── */
.cafe-gallery-section { margin-bottom: 40px; padding: 30px; background: #f9f9f9; border-radius: 10px; }
.cafe-gallery-section h2 { font-size: 28px; margin-bottom: 25px; color: #333; text-align: center; }
.cafe-gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; }
.cafe-gallery-item { display: block; overflow: hidden; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); transition: transform 0.3s ease; }
.cafe-gallery-item:hover { transform: scale(1.05); }
.cafe-gallery-item img { width: 100%; height: 250px; object-fit: cover; display: block; }

/* ── Карта на странице записи ───────────────────────────────── */
.cafe-map-section { margin-bottom: 40px; padding: 30px; background: #fff; border: 2px solid #ddd; border-radius: 10px; }
.cafe-map-section h2 { font-size: 28px; margin-bottom: 20px; color: #333; text-align: center; }
.cafe-map-container { position: relative; width: 100%; height: 450px; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.cafe-map-container iframe { width: 100%; height: 100%; border: none; }

/* ── Похожие кафе ───────────────────────────────────────────── */
.similar-cafes-section { margin-bottom: 40px; padding: 30px; background: #f0f0f0; border-radius: 10px; }
.similar-cafes-section h2 { font-size: 28px; margin-bottom: 25px; color: #333; text-align: center; }
.similar-cafes-slider { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.similar-cafe-item { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.similar-cafe-item:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.similar-cafe-thumb { display: block; overflow: hidden; }
.similar-cafe-thumb img { width: 100%; height: 180px; object-fit: cover; transition: transform 0.3s ease; }
.similar-cafe-item:hover .similar-cafe-thumb img { transform: scale(1.1); }
.similar-cafe-title { padding: 15px 15px 10px; margin: 0; font-size: 16px; }
.similar-cafe-title a { color: #333; text-decoration: none; }
.similar-cafe-title a:hover { color: #0073aa; }
.similar-cafe-rating { padding: 0 15px 15px; text-align: center; }
.similar-cafe-rating .rating-value { font-size: 16px; font-weight: bold; color: #ff9800; display: block; margin-bottom: 5px; }
.similar-cafe-rating .rating-stars { font-size: 18px; color: #ffc107; }

/* ── Архив тегов ────────────────────────────────────────────── */
.tag-archive-header { max-width: 1200px; margin: 0 auto; padding: 30px 20px 20px; text-align: center; border-bottom: 3px solid #ddd; }
.tag-archive-title { font-size: 32px; color: #333; margin: 0 0 10px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.tag-archive-icon { width: 40px; height: 40px; object-fit: contain; }
.tag-archive-description { font-size: 16px; color: #666; margin: 0; }
.no-posts { text-align: center; color: #999; font-style: italic; padding: 20px; }

/* ══ Мобильный адаптив — одиночная запись ════════════════════ */
@media screen and (max-width: 768px) {
    .site-header { display: none; }
    .mobile-menu-toggle { display: flex; }
    .entry-title { font-size: 28px; }
    .ratings-grid { grid-template-columns: 1fr; }
    .cafe-gallery-grid { grid-template-columns: 1fr; }
    .similar-cafes-slider { grid-template-columns: 1fr; }
    .average-rating-value { font-size: 40px; }
    .header-container { flex-direction: column; gap: 15px; }
    .main-navigation { width: 100%; justify-content: center; }
    .nav-menu { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .voting-buttons { flex-direction: column; align-items: center; gap: 20px; }
    .vote-btn { width: 100%; max-width: 200px; }
    .complaint-form-container { padding: 25px; }
    .form-actions { flex-direction: column; }
}