/*
Theme Name: dds_foodrepublicbelize.com
Theme URI: https://foodrepublicbelize.com
Author: Шишкина София
Author URI: https://foodrepublicbelize.com
Description: Тема для блога «Рестораны мира и гастрономия» — обзоры ресторанов по всему миру, гастрономические направления и рекомендации заведений.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dds_foodrepublicbelize
*/

/* ==============================
   1. Reset and base
   ============================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.7;
    color: #2b2a28;
    background-color: #f4ede0;
    background-image:
        radial-gradient(rgba(120, 95, 70, 0.045) 1px, transparent 1px),
        radial-gradient(rgba(150, 120, 90, 0.035) 1px, transparent 1px);
    background-size: 3px 3px, 7px 7px;
    background-position: 0 0, 1px 2px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; }

a {
    color: #b04a32;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover { color: #7a3220; text-decoration: underline; }

p { margin: 0 0 1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-weight: 700;
    line-height: 1.25;
    color: #2b2a28;
    margin: 1.6em 0 0.6em;
    letter-spacing: 0.005em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.85rem; color: #b04a32; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

blockquote {
    margin: 1.5em 0;
    padding: 1em 1.2em;
    border-left: 3px solid #6f7d3a;
    background: rgba(111, 125, 58, 0.07);
    font-family: "Archivo Narrow", "Arial Narrow", sans-serif;
    font-style: normal;
    color: #4d5527;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0 1.5em;
    border: 1px solid #c9b89a;
}

th, td {
    border: 1px solid #c9b89a;
    padding: 0.6em 0.8em;
    text-align: left;
}

th { background: rgba(176, 74, 50, 0.08); font-family: "Playfair Display", serif; }

code {
    background: rgba(120, 100, 75, 0.1);
    padding: 0.1em 0.4em;
    border-radius: 3px;
    font-size: 0.92em;
}

/* ==============================
   2. Layout
   ============================== */

.site-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.layout-main {
    display: flex;
    gap: 40px;
    margin: 30px 0 60px;
    align-items: flex-start;
}

.layout-content { flex: 1 1 67%; min-width: 0; }
.layout-sidebar { flex: 0 0 27%; max-width: 27%; }
.layout-content.is-wide { flex-basis: 100%; }
.layout-content.is-wide-85 { flex: 0 0 85%; max-width: 85%; margin: 30px auto 60px; }

@media (max-width: 960px) {
    .layout-main { flex-direction: column; gap: 24px; }
    .layout-sidebar { flex: 1 1 100%; max-width: 100%; }
    .layout-content.is-wide-85 { flex-basis: 100%; max-width: 100%; }
}

/* ==============================
   3. Header
   ============================== */

.site-head {
    background: rgba(255, 250, 240, 0.55);
    border-bottom: 1px solid rgba(176, 74, 50, 0.18);
    padding: 18px 0 14px;
}

.head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.brand-block { display: flex; align-items: center; gap: 16px; flex: 1 1 auto; min-width: 0; }

.brand-logo {
    width: 64px;
    height: 64px;
    display: block;
    flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-title {
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.55rem;
    color: #2b2a28;
    margin: 0;
    line-height: 1.15;
}

.brand-title a { color: inherit; text-decoration: none; }
.brand-title a:hover { color: #b04a32; text-decoration: none; }

.brand-tagline {
    font-family: "Archivo Narrow", "Arial Narrow", sans-serif;
    font-size: 0.92rem;
    color: #8a7d68;
    margin: 4px 0 0;
    line-height: 1.3;
}

/* Primary nav — uppercase letterspaced */
.primary-nav { flex: 0 0 auto; }

.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.primary-nav a {
    font-family: "Archivo Narrow", "Arial Narrow", sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #2b2a28;
    padding: 6px 2px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.primary-nav a:hover,
.primary-nav .current-menu-item a,
.primary-nav .current_page_item a {
    color: #b04a32;
    border-bottom-color: #b04a32;
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #b04a32;
    color: #b04a32;
    padding: 8px 14px;
    font-family: "Archivo Narrow", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .head-inner { flex-direction: column; align-items: stretch; }
    .brand-block { justify-content: center; text-align: left; }
    .menu-toggle { display: inline-block; align-self: center; }
    .primary-nav { width: 100%; }
    .primary-nav[hidden] { display: none !important; }
    .primary-nav ul { flex-direction: column; gap: 8px; align-items: center; padding-top: 12px; }
}

/* ==============================
   4. Buttons
   ============================== */

.btn,
button.btn,
input[type="submit"].btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #b04a32;
    border: 1.5px solid #b04a32;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: "Archivo Narrow", "Arial Narrow", sans-serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover,
button.btn:hover,
input[type="submit"].btn:hover {
    background: #b04a32;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(176, 74, 50, 0.15);
    text-decoration: none;
}

.btn-card .btn-icon {
    width: 16px;
    height: 16px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.btn-card:hover .btn-icon { opacity: 1; transform: translateX(0); }

.btn-olive {
    background: #6f7d3a;
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: 8px;
    padding: 11px 22px;
}

.btn-olive:hover { background: #58642e; color: #fff; box-shadow: none; }

/* ==============================
   5. Cards (post listing)
   ============================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin: 24px 0;
}

.card {
    display: flex;
    flex-direction: column;
    background: rgba(245, 232, 210, 0.55);
    border: 1px solid rgba(176, 74, 50, 0.15);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(80, 50, 30, 0.08);
}

.card-thumb-wrap {
    width: 100%;
    overflow: hidden;
    background: rgba(176, 74, 50, 0.08);
}

.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.card:hover .card-thumb-wrap img { transform: scale(1.04); }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 22px 22px;
}

.card-meta {
    font-family: "Archivo Narrow", sans-serif;
    font-size: 0.82rem;
    color: #8a7d68;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 8px;
}

.card-title {
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-size: 1.3rem;
    margin: 0 0 10px;
    line-height: 1.3;
    color: #2b2a28;
}

.card-title a { color: inherit; }
.card-title a:hover { color: #b04a32; text-decoration: none; }

.card-excerpt {
    flex: 1;
    margin: 0 0 14px;
    color: #4a443c;
    font-size: 0.97rem;
}

.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-actions { margin-top: auto; }

/* Horizontal cards (used on archives/index) */
.card.is-horizontal { flex-direction: row; align-items: stretch; }

.card.is-horizontal .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}

.card.is-horizontal .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

.card.is-horizontal .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
}

@media (max-width: 600px) {
    .card.is-horizontal { flex-direction: column; }
    .card.is-horizontal .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card.is-horizontal .card-thumb-wrap a { position: static; }
    .card.is-horizontal .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* ==============================
   6. Single post / pages
   ============================== */

.post-head {
    margin: 30px 0 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(176, 74, 50, 0.18);
}

.post-title {
    margin: 6px 0 12px;
    font-size: 2.2rem;
}

.post-meta {
    font-family: "Archivo Narrow", sans-serif;
    font-size: 0.88rem;
    color: #8a7d68;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.post-meta span + span::before { content: " · "; margin: 0 6px; }

.post-thumb {
    margin: 0 0 26px;
    border-radius: 10px;
    overflow: hidden;
}

.post-thumb img { display: block; width: 100%; height: auto; }

.entry-content {
    font-size: 1.05rem;
    line-height: 1.75;
}

.entry-content img {
    border-radius: 8px;
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1em 0;
}

.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin: 0.3em 0; }

/* ==============================
   7. Sidebar / widgets
   ============================== */

.layout-sidebar .widget,
.site-foot .widget {
    background: rgba(232, 222, 205, 0.45);
    border: 1px solid rgba(176, 74, 50, 0.12);
    border-radius: 10px;
    padding: 18px 22px;
    margin: 0 0 24px;
}

.widget-title {
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-size: 1.2rem;
    margin: 0 0 14px;
    color: #b04a32;
    border-bottom: 1px solid rgba(176, 74, 50, 0.2);
    padding-bottom: 6px;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    padding: 6px 0;
    border-bottom: 1px dashed rgba(120, 100, 75, 0.18);
    font-size: 0.97rem;
}

.widget li:last-child { border-bottom: none; }

.widget li a { color: #2b2a28; }
.widget li a:hover { color: #b04a32; }

.widget select {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #c9b89a;
    background: #fff;
    font-family: inherit;
}

/* ==============================
   8. Front page
   ============================== */

.fp-hero {
    text-align: center;
    padding: 50px 20px 30px;
    margin: 0 0 36px;
    background: linear-gradient(135deg, rgba(176, 74, 50, 0.05), rgba(111, 125, 58, 0.05));
    border-radius: 14px;
    border: 1px solid rgba(176, 74, 50, 0.12);
}

.fp-hero h1 {
    font-size: 2.6rem;
    margin: 0 0 14px;
    color: #2b2a28;
}

.fp-hero p {
    font-family: "Archivo Narrow", sans-serif;
    font-size: 1.1rem;
    color: #5a5048;
    max-width: 720px;
    margin: 0 auto 16px;
}

.fp-section {
    margin: 50px 0;
}

.fp-section-title {
    text-align: center;
    margin: 0 0 28px;
    position: relative;
    padding-bottom: 14px;
}

.fp-section-title::after {
    content: "";
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: #b04a32;
}

.fp-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 26px;
}

.fp-col {
    padding: 22px 24px;
    background: rgba(245, 232, 210, 0.5);
    border: 1px solid rgba(176, 74, 50, 0.12);
    border-radius: 10px;
}

.fp-col h3 {
    margin: 0 0 10px;
    color: #b04a32;
    font-size: 1.25rem;
}

.fp-steps {
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.fp-step {
    position: relative;
    padding: 26px 22px 22px;
    background: rgba(255, 250, 240, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(111, 125, 58, 0.2);
}

.fp-step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: -16px; left: 22px;
    width: 36px; height: 36px;
    background: #6f7d3a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: 1.1rem;
}

.fp-step h4 { margin: 0 0 8px; color: #2b2a28; }

/* ==============================
   9. Breadcrumbs
   ============================== */

.breadcrumbs {
    font-family: "Archivo Narrow", sans-serif;
    font-size: 0.88rem;
    color: #8a7d68;
    margin: 18px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.breadcrumbs a { color: #8a7d68; }
.breadcrumbs a:hover { color: #b04a32; }
.breadcrumbs .sep { margin: 0 8px; color: #c9b89a; }

/* ==============================
   10. Pagination
   ============================== */

.pager-wrap {
    margin: 36px 0 20px;
    display: flex;
    justify-content: center;
}

.pager-wrap .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border: 1px solid #c9b89a;
    border-radius: 6px;
    color: #2b2a28;
    font-family: "Archivo Narrow", sans-serif;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pager-wrap .page-numbers:hover,
.pager-wrap .page-numbers.current {
    background: #b04a32;
    color: #fff;
    border-color: #b04a32;
}

.pager-wrap .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

/* ==============================
   11. Footer
   ============================== */

.site-foot {
    margin-top: 60px;
    background: rgba(58, 48, 38, 0.04);
    border-top: 1px solid rgba(176, 74, 50, 0.18);
    padding: 40px 0 20px;
}

.foot-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.foot-cols .widget {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.foot-cols .widget-title { color: #b04a32; }

.site-copy {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(176, 74, 50, 0.15);
    font-family: "Archivo Narrow", sans-serif;
    font-size: 0.88rem;
    color: #8a7d68;
}

/* ==============================
   12. Comments
   ============================== */

.comments-block {
    margin: 40px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid rgba(176, 74, 50, 0.18);
}

.comments-block h2, .comments-block h3 {
    color: #b04a32;
}

.commentlist {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}

.commentlist .comment {
    padding: 16px 18px;
    margin: 0 0 14px;
    background: rgba(245, 232, 210, 0.4);
    border-radius: 8px;
    border-left: 3px solid #b04a32;
}

.commentlist .children {
    list-style: none;
    padding-left: 24px;
    margin-top: 12px;
}

.comment-meta {
    font-family: "Archivo Narrow", sans-serif;
    font-size: 0.85rem;
    color: #8a7d68;
    margin-bottom: 8px;
}

.comment-author { font-weight: 600; color: #2b2a28; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c9b89a;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 0.97rem;
    margin-bottom: 12px;
}

.comment-form textarea { min-height: 130px; resize: vertical; }

.comment-form label {
    display: block;
    font-family: "Archivo Narrow", sans-serif;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #5a5048;
}

/* ==============================
   13. Search form
   ============================== */

.search-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #c9b89a;
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 0.97rem;
}

.search-form input[type="submit"] {
    padding: 10px 18px;
    border-radius: 8px;
    border: 1.5px solid #b04a32;
    background: transparent;
    color: #b04a32;
    cursor: pointer;
    font-family: "Archivo Narrow", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background 0.2s ease, color 0.2s ease;
}

.search-form input[type="submit"]:hover {
    background: #b04a32;
    color: #fff;
}

/* ==============================
   14. 404
   ============================== */

.notfound {
    text-align: center;
    padding: 60px 20px;
}

.notfound-num {
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-size: 6rem;
    color: #b04a32;
    margin: 0;
    line-height: 1;
}

/* ==============================
   15. Cookie banner — hidden rule must come BEFORE display rule (A11)
   ============================== */

.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: #2b2a28;
    color: #f4ede0;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    font-family: "Archivo Narrow", sans-serif;
    font-size: 0.95rem;
}

.cookie-banner p { margin: 0; flex: 1 1 320px; background: none; }

.cookie-banner button {
    background: #b04a32;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-family: "Archivo Narrow", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.88rem;
    transition: background 0.2s ease;
}

.cookie-banner button:hover { background: #8c3a26; }

/* ==============================
   16. Misc
   ============================== */

.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin: 1em auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text {
    font-family: "Archivo Narrow", sans-serif;
    font-size: 0.88rem;
    color: #8a7d68;
    text-align: center;
    margin: 6px 0;
}

.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
    background: #b04a32;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    z-index: 9999;
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.85rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    .fp-hero h1 { font-size: 1.85rem; }
    .post-title { font-size: 1.6rem; }
}
