/*
Theme Name: Smako-theme Grid
Version: 1.1.1
Text Domain: smako-theme-grid
*/

/* ===================== Base ===================== */
:root {
    --paper: #f6f1e5;
    --ink: #1a1a1a;
    --muted: #6b6b6b;
    --rule: #c8bca6;
    --accent: #a40000;
}

* {
    box-sizing: border-box
}

html, body {
    margin: 0;
    padding: 0
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: Georgia, 'Times New Roman', Times, serif;
    line-height: 1.5;
    letter-spacing: .1px;
}

a {
    color: #000;
    text-decoration: none
}

a:hover {
    color: var(--accent);
    text-decoration: underline
}

/* ===================== Layout ===================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px
}

.header {
    text-align: center;
    border-bottom: 3px double var(--ink);
    padding: 24px 0 16px;
    margin-bottom: 12px
}

.header .logo a {
    font-size: 48px;
    color: var(--ink);
    font-variant: small-caps;
    letter-spacing: 2px
}

.header .tagline {
    color: var(--muted);
    margin-top: 6px;
    font-size: 14px
}

.grid-wrap {
    display: grid;
    grid-template-columns:1fr 300px;
    gap: 24px
}

@media (max-width: 1023px) {
    .grid-wrap {
        grid-template-columns:1fr
    }
}

.sidebar {
    border-left: 1px solid var(--rule);
    padding-left: 16px
}

@media (max-width: 1023px) {
    .sidebar {
        display: none
    }
}

/* ===================== Sections ===================== */
.section {
    border: 1px solid var(--rule);
    background: #f8f5ee;
    padding: 16px;
    margin-top: 18px
}

.section-title {
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 8px;
    margin-bottom: 12px
}

.section-title a {
    color: var(--ink)
}

/* ===================== Cards / Masonry ===================== */
.masonry {
    display: grid;
    grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    align-items: start
}

.card {
    background: #fffdf7;
    border: 1px solid var(--rule);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .04)
}

.card img {
    width: 100%;
    height: auto;
    display: block;
    background: #eee
}

.card h3 {
    margin: 8px 10px 4px;
    font-size: 18px;
    line-height: 1.25
}

.card .meta {
    font-size: 12px;
    color: var(--muted);
    margin: 6px 10px 10px;
    border-top: 1px dotted var(--rule);
    padding-top: 6px
}

a.title {
    font-size: 14px
}

h3.entry-title {
    min-height: 45px
}

/* ===================== Share (inline) ===================== */
.share-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px 10px;
    border-top: 1px solid var(--rule);
    margin-top: 8px;
    flex-wrap: wrap
}

.share-bar .share-label {
    font-size: 12px;
    color: var(--muted);
    margin-right: 4px
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid var(--rule);
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    color: var(--ink)
}

.share-btn:hover {
    background: #f6f1e5
}

.share-btn svg {
    width: 14px;
    height: 14px;
    display: block
}

/* ===================== Share (square newspaper) ===================== */
.share-icons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid var(--rule);
    padding-top: 12px;
    margin-top: 16px;
    font-family: "Times New Roman", Georgia, serif
}

.share-label {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .4px;
    margin-right: 6px;
    color: var(--ink)
}

.share-icons .icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #fff;
    border: 1px solid #000;
    transition: all .2s ease-in-out
}

.share-icons .icon:hover {
    background: #222;
    transform: translateY(-2px)
}

.share-icons .icon:active {
    background: #000;
    transform: none
}

.share-icons .icon i {
    font-size: 18px;
    line-height: 1
}

.share-icons .icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px);
    mix-blend-mode: overlay;
    opacity: .15
}
.share-icons .icon:hover{
    text-decoration: none;
}
@media (max-width: 600px) {
    .share-icons .icon {
        width: 36px;
        height: 36px;
        font-size: 15px
    }

    .share-label {
        font-size: 13px
    }
}
h1{
    margin: 0;
    text-align: center;
}
/* ===================== Breadcrumbs ===================== */
.breadcrumb {
    margin: 12px 0 24px;
    font-size: 14px;
    letter-spacing: .3px;
    color: var(--muted);
    border-top: 3px double var(--ink);
    border-bottom: 3px double var(--ink);
}

.breadcrumb ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border:none;
}

.breadcrumb li {
    display: flex;
    align-items: center
}

.breadcrumb li + li::before {
    content: "›";
    color: var(--rule);
    margin: 0 6px;
    font-size: 13px;
    line-height: 1
}

.breadcrumb a {
    color: var(--ink)
}

.breadcrumb a:hover {
    color: var(--accent);
    text-decoration: underline
}

.breadcrumb li:last-child a {
    pointer-events: none;
    color: var(--muted);
    text-decoration: none
}

/* ===================== Pagination ===================== */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 28px 0;
    padding: 10px 0;
    border-top: 2px double var(--rule);
    border-bottom: 2px double var(--rule);
    font-family: "Times New Roman", Georgia, serif;
    font-size: 14px;
    letter-spacing: .4px
}

.pagination a, .pagination span {
    display: inline-block;
    min-width: 32px;
    padding: 4px 8px;
    text-align: center;
    color: var(--ink);
    border: 1px solid var(--rule);
    background: #f9f7f2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 1px 2px rgba(0, 0, 0, .15);
    transition: all .2s ease-in-out
}

.pagination a:hover {
    background: #eae6df;
    transform: translateY(-1px)
}

.pagination .current {
    background: #000;
    color: #fff;
    border-color: #000;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .4);
    cursor: default
}

.pagination .dots {
    border: none;
    background: transparent;
    box-shadow: none
}

.pagination a.next, .pagination a.prev {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px
}

@media (max-width: 640px) {
    .pagination {
        font-size: 13px;
        gap: 4px
    }

    .pagination a, .pagination span {
        min-width: 28px;
        padding: 3px 6px
    }
}

/* ===================== Footer ===================== */
.site-footer {
    margin-top: 32px;
    border-top: 3px double var(--ink);
    padding: 16px 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center
}

.category_description {
    border-bottom: 1px solid var(--rule);
    margin-bottom: 10px;
    padding: 10px;
}

.mobile-cats-bar,
.mobile-cats {
    display: none;
}

/* Панель з кнопкою і Home */
@media (max-width: 1023px) {

    .mobile-cats-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #f8f5ee;
        border: 1px solid var(--rule);
        padding: 12px 14px;
        margin: 8px 16px 12px;
        border-radius: 6px;
    }

    .mobile-cats-toggle {
        cursor: pointer;
        position: relative;
        z-index: 5;
    }

    .mobile-cats-bar .home-link {
        color: var(--ink);
        text-decoration: none;
    }

    .mobile-cats-bar .home-link:hover {
        color: var(--accent);
        text-decoration: underline;
    }
}

/* Коли меню відкрите — воно зверху і клікабельне */
.mobile-cats {
    position: relative;
    z-index: 10;
}

.mobile-cats.open {
    display: block;
}

/* --- Mobile drawer animation --- */
@media (max-width: 1023px) {
    .mobile-cats {
        overflow: hidden;
        max-height: 0;
        opacity: .0;
        transition: max-height .28s ease, opacity .2s ease;
        will-change: max-height, opacity;
    }

    .mobile-cats.open {
        opacity: 1;
    }
}
/*Menus*/
.main-nav {
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    text-align: center;
    padding: 10px 0;
    font-family: 'Times New Roman', serif;
    text-transform: uppercase;
}

.main-nav .nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 20px;
}

.main-nav .nav-menu li {
    display: inline-block;
}

.main-nav .nav-menu a {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.main-nav .nav-menu a:hover,
.main-nav .nav-menu .current-menu-item a {
    color: #d22;
}

.entry {
    text-align: center;
}




/* header */

/* === Newspaper Masthead === */
:root{
    --paper:#efe9dd;       /* кремовий фон */
    --ink:#1a1a1a;         /* чорнило */
    --accent:#a08b63;      /* тонкі лінії */
}
.container{max-width:1200px;margin:0 auto;padding:0 16px;}

.masthead{
    background:var(--paper);
    color:var(--ink);
    padding-top:18px;
    padding-bottom:8px;
}
.masthead-inner{
    display:grid;
    grid-template-columns: 220px 1fr 220px;
    align-items:center;
    gap:16px;
}
.masthead-slot{
    border:2px solid rgba(26,26,26,.15);
    height:76px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    font-family: "Times New Roman", Georgia, serif;
    background: rgba(255,255,255,.25);
}
.masthead-left{justify-self:start;padding: 5px;}
.masthead-right{justify-self:end;padding: 5px;}
.masthead-slot .slot-label{
    font-size:12px; text-transform:uppercase; opacity:.65; letter-spacing:.08em;
}
.masthead-slot .slot-value{
    font-size:22px; font-weight:700; margin-top:4px;
}

.masthead-titlewrap{text-align:center;}
.masthead-title{
    margin:0;
    font-size:48px;
    line-height:1;
    letter-spacing:.06em;
    text-transform:uppercase;
    font-family: "UnifrakturCook", "Cinzel", "Times New Roman", serif; /* газетний стиль */
}
.masthead-title a{color:var(--ink); text-decoration:none;}
.masthead-tagline{
    margin:.45rem 0 0;
    font-size:14px;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:#4b4437;
}

/* декоративні правила як у газеті */
.rule{height:1px;background:var(--accent);opacity:.6;}
.rule-thin{margin:10px 0 2px;}
.rule-double{
    margin:0 0 6px;
    box-shadow:0 2px 0 0 var(--accent), 0 5px 0 0 var(--accent);
    background:transparent;height:1px;
}

/* адаптив */
@media (max-width:900px){
    .masthead-left,.masthead-right{
        display: none;
    }
    .masthead-inner{
        grid-template-columns: 1fr;
    }
    .masthead-slot{
        height:56px;
        order: -1; /* price/date над заголовком на мобільних */
    }
    .masthead-left, .masthead-right{
        justify-self:stretch;
    }
    .masthead-title{font-size:36px;}
}
.share-container {
    width: 250px;
    margin: 0 auto;
}
/* Search */
span.sub-title {
    font-size: 18px;
}
.search-form {
    margin: 8px 0;
    font-family: "Times New Roman", Georgia, serif;
}

.search-form label {
    display: inline-block;
    margin-right: 5px;
}

.search-form .search-field {
    border: 1px solid #000;
    background: #f9f7f2;
    padding: 4px 6px;
    font-size: 14px;
    width: 220px;
    color: #000;
}

.search-form .search-field:focus {
    outline: none;
    border-color: #222;
    background: #fff;
}

.search-form .search-submit {
    border: 1px solid #000;
    background: #000;
    color: #fff;
    padding: 4px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.search-form .search-submit:hover {
    background: #222;
}
.visually-hidden{position:absolute!important;width:1px;height:1px;margin:-1px;border:0;padding:0;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;}
