html, body { font-family:sans-serif; }
body { background-color:#f3eee9; }
* { box-sizing:border-box; }

header { width:85%; padding:20px; margin:0 auto; background-color:#fefefd; }
header { display:grid; grid-template-columns:auto repeat(3, max-content); grid-template-rows:repeat(2, auto); grid-auto-flow:column; 
         column-gap:30px; row-gap:10px; align-items:center; justify-content:start; }
header > a:first-child { grid-row:1 / 3; grid-column:1; align-self:center; margin-right:20px; }
header a:not(:first-child):nth-child(even) { align-self:end; }
header a:not(:first-child):nth-child(odd) { align-self:start; }
@media (max-width:1064px) {
    header { grid-template-columns:auto 1fr; grid-template-rows:none; grid-auto-flow:row; row-gap:2px; }
    header > a:first-child { grid-row:1 / 8; grid-column:1; align-self:start; }
    header > a:not(:first-child) { grid-column:2; }
}
header img { margin-right:5%; }
header a { font-size:17px; line-height:1.2; text-decoration:none;}
header a:hover { text-decoration:underline;}

.layout { width:85%; margin:0 auto; display:flex; align-items:flex-start; background-color:#fefefd; }

.sidebar { width:250px; flex-shrink:0; padding:20px; border-right:1px solid #eee; }
.sidebar .burger-button { display:none; }
.sidebar-overlay { display:none; }
.sidebar-nav { display:flex; flex-direction:column; gap:10px; }
.sidebar-nav a { text-decoration:none; color:inherit; font-size:18px; }

.filter-group { margin-bottom:24px; }
.filter-title { margin:0 0 10px 0; font-size:16px; text-transform:uppercase; letter-spacing:0.5px; color:#333; }
.filter-item { display:flex; align-items:flex-start; gap:8px; font-size:16px; padding:4px 0; cursor:pointer; }
.filter-item input { margin:3px 0 0 0; flex-shrink:0; }
.filter-item span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* .filter-scroll { padding-bottom:90px; } */
.filter-apply-button { display:block; /* position:fixed; */ position:sticky; bottom:20px; width:210px; text-align:center; text-decoration:none; font-size:16px; 
                       font-weight:bold; padding:14px 0; border-radius:6px; background-color:#ccc; color:#666; 
                       transition:background-color 0.3s, color 0.3s; box-shadow:0 2px 8px rgba(0,0,0,0.2); z-index:1002; }
.filter-apply-button.active { background-color:#2ecc71; color:#fff; }
@keyframes filter-button-pulse {
  0%   { transform:scale(1); }
  30%  { transform:scale(1.05); }
  60%  { transform:scale(0.98); }
  100% { transform:scale(1); }
}
.filter-apply-button.pulse { animation:filter-button-pulse 0.4s ease; }
@media (max-width:768px) {
    .filter-scroll { max-height:calc(100% - 0px); overflow-y:auto; }
    .filter-apply-button { left:0; right:0; width:auto; margin:0 20px; }
}

main { flex:1; padding:20px; font-size:17px; line-height:1.5; display:flex; flex-wrap:wrap; gap:20px; justify-content:left; min-width:0; }
.hero-intro { width:100%; }
.results-meta { width:100%; font-size:16px; }

.breadcrumbs { width:100%; font-size:15px; }
.breadcrumbs ul { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0; padding:0; list-style:none; }
.breadcrumbs li { display:flex; align-items:center; gap:6px; color:#9e8a6e; }
.breadcrumbs li:not(:first-child)::before { content:"/"; color:#d8d2c6; }
.breadcrumbs a { color:#6b6259; text-decoration:none; }
.breadcrumbs a:hover { color:#7c5c3a; text-decoration:underline; }
.breadcrumbs li:last-child span { color:#2c2724; font-weight:600; }

@media (max-width:768px) {
  header { width:95%; }
  .layout { width:95%; flex-direction:column; }
  .sidebar { width:auto; padding:0; border-right:none; }
  .sidebar .burger-button { display:block; position:fixed; top:15px; left:15px; width:44px; height:44px; font-size:22px; line-height:44px; 
                            text-align:center; padding:0; background-color:#fefefd; border:1px solid #ccc; border-radius:6px; 
                            cursor:pointer; z-index:1001; box-shadow:0 2px 6px rgba(0,0,0,0.15); }
  .sidebar-overlay { display:block; position:fixed; top:0; left:0; width:100%; height:100%; background-color:rgba(0,0,0,0.4); 
                     z-index:999; opacity:0; pointer-events:none; transition:opacity 0.3s; }
  .sidebar-overlay.open { opacity:1; pointer-events:auto; }
  .sidebar-nav { position:fixed; top:0; left:0; height:100%; width:270px; background-color:#fefefd; padding:80px 20px 20px 20px;
                 transform:translateX(-100%); transition:transform 0.3s; z-index:1000; box-shadow:2px 0 8px rgba(0,0,0,0.2); }
  .sidebar-nav.open { transform:translateX(0); }
  main { padding-top:10px; width:100%; }
}       

.card { width:240px; text-decoration:none; color:inherit; display:block; font-size:16px; }
.card:hover { opacity:0.9; }
.card img { width:100%; border-radius:6px; }
.card h3, p { margin:0; }

.pagination-wrap { display:flex; flex-direction:column; align-items:center; gap:12px; padding:12px 0 4px; border-top:1px solid #d8d2c6; width:100%; }
.pagination { display:flex; align-items:center; gap:4px; flex-wrap:wrap; justify-content:center; }
.page-btn { font-size:1rem; font-weight:500; color:#4a443c; background:#faf8f4; border:1px solid #d8d2c6; 
            padding:6px 6px; min-width:24px; text-align:center; border-radius:3px; cursor:pointer; transition:all 0.25s ease; 
            line-height:1; user-select:none; text-decoration:none; }
.page-btn:hover { border-color:#9e8a6e; color:#7c5c3a; background:rgba(124,92,58,0.05); }
.page-btn.active { background:#7c5c3a; border-color:#7c5c3a; color:#fff; font-weight:600; box-shadow:0 2px 8px rgba(124,92,58,0.3); }
.page-ellipsis { font-size:1.5rem; color:#7a7268; padding:6px 3px; user-select:none; }

h1 { margin-top:0px; margin-bottom: 15px;}

article {max-width:100%;}
article p {margin:12px 0px;}

.gallery-wrapper { position:relative; padding:20px 50px; overflow:hidden; background:#d3c5af; margin-top:10px; margin-bottom:20px;}
.gallery { display:flex; flex-wrap:nowrap; overflow-x:auto; width:100%; gap:20px; scroll-behavior:smooth; scrollbar-width:none; }
.gallery::-webkit-scrollbar { display:none; }
.gallery figure { margin:0; width:380px; flex-shrink:0; background:#fff;  padding:10px;}
.gallery figure img { display:block; width:100%; height:auto; }
.gallery figcaption { margin-top:8px; width:360px; font-size:16px; word-wrap:break-word; }
.gallery-arrow { display:none; position:absolute; top:200px; transform:translateY(-50%); width:40px; height:40px; border:none; border-radius:50%; 
                 background:rgba(0, 0, 0, 0.6); color:#fff; font-size:24px; line-height:1; 
                 cursor:pointer; align-items:center; justify-content:center; z-index:2; }
.gallery-wrapper.has-scroll .gallery-arrow { display:flex; }
.gallery-arrow-left { left:5px; }
.gallery-arrow-right { right:5px; }
.gallery-arrow:hover { background:rgba(0, 0, 0, 0.85); }
.gallery figcaption small { display:block; margin-top:4px; font-size:12px; color:#555; float:right; }
.gallery figcaption small a { color:#555; text-decoration:none; border-bottom:1px dotted #ccc; }
.gallery figcaption small a:hover { color:#357; border-bottom-color:#357; }
.gallery figure img { cursor:pointer; }

.param-table{ width:100%; border-collapse:collapse; background:#fefefd; line-height:1.1; }
.param-table .subhead td{ padding:28px 0 8px 0; border:none; }
.param-table .subhead:first-child td{ padding-top:0; }
.param-table .subhead h2{ margin:0; font-weight:600; color:#2c2724; }
.param-table tr.row{ transition:background-color 0.25s ease; }
.param-table tr.row:hover{ background-color:rgba(120, 78, 42, 0.07); }
.param-table td{ border:none; padding:10px 12px; vertical-align:top; }
.param-table td.label{ width:25%; color:#6b6259; }
.param-table td.value{ color:#2c2724; }

@media (max-width:640px){
  .param-table, .param-table tbody, .param-table tr, .param-table td{ display:block; width:100%; }
  .param-table tr.row{ padding:10px 0; }
  .param-table td.label, .param-table td.value{ padding:2px 0; width:auto; }
  .param-table td.value{ padding-left:14px; }
  .param-table td.label{ font-weight:600; color:#6b6259; }
  .param-table .subhead td{ padding:24px 0 6px 0; }
}

#lb-overlay { display:none; position:fixed; inset:0; background:rgba(0, 0, 0, 0.7); z-index:9999; align-items:center; 
              justify-content:center; padding:16px; }
#lb-overlay.open { display:flex; }
#lb-box { position:relative; max-width:960px; width:100%; text-align:center; background-color:#000; }
#lb-img { max-width:100%; max-height:80vh; display:block; margin:0 auto; }
#lb-caption { color:#fff; font-size:18px; margin-top:0px; padding:10px; background-color:#000; }
#lb-caption small { float:right; margin:5px 0px; color:#cbfff6;}
#lb-caption a { color:#cbfff6; }
#lb-close { position:absolute; top:-14px; right:-14px; width:32px; height:32px; border-radius:50%; background:rgba(255, 255, 255, 0.2); 
            border:none; color:#fff; font-size:20px; cursor:pointer; }
#lb-close:hover { background:rgba(255, 255, 255, 0.35); }

.related { margin:10px auto 0; display:flex; gap:30px; flex-wrap:wrap; background-color:#fefefd; padding:25px 10px; box-sizing:border-box; }
.related section { flex:1; min-width:280px; }
.related h2 { margin:0px 0px 25px 0px; font-size:18px; text-transform:uppercase; letter-spacing:0.5px; color:#333; }
.related-grid { display:flex; flex-direction:column; gap:16px; }
.related-card { display:grid; grid-template-columns:90px 1fr; grid-template-rows:auto 1fr; column-gap:14px; text-decoration:none; color:inherit; }
.related-card img { grid-row:1 / 3; grid-column:1; width:90px; height:90px; object-fit:cover; display:block; border-radius:4px; }
.related-card h3 { grid-column:2; grid-row:1; margin:0; font-size:16px; line-height:1.3; }
.related-card p { grid-column:2; grid-row:2; margin:4px 0 0 0; font-size:15px; line-height:1.4; color:#6b6259; }
.related-card:hover h3 { text-decoration:underline; }
@media (max-width:768px) { .related { width:95%; flex-direction:column; gap:24px; } }









.site-footer {
    background-color: #2c2724;
    color: #b8afa4;
    margin-top: 60px;
}

.footer-container {
    width: 85%;
    margin: 0 auto;
    padding: 60px 0 40px;
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

/* Блок 1: бренд */

.footer-brand {
    flex: 1 1 260px;
    max-width: 320px;
}

.footer-logo {
    display: inline-block;
    font-size: 22px;
    font-weight: 700;
    color: #fefefd;
    text-decoration: none;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.footer-tagline {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px 0;
    color: #9c9186;
}

.footer-stats {
    font-size: 13px;
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid #453f3a;
    color: #9c9186;
}

.footer-stats strong {
    color: #d8b98a;
    font-weight: 600;
}

/* Блок 2: навигация */

.footer-nav {
    flex: 3 1 600px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-heading {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #fefefd;
    margin-bottom: 18px;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    font-size: 14px;
    color: #9c9186;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #d8b98a;
}

/* Нижняя плашка */

.footer-bottom {
    background-color: #221e1b;
    border-top: 1px solid #453f3a;
}

.footer-bottom-container {
    width: 85%;
    margin: 0 auto;
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.copyright {
    font-size: 12px;
    margin: 0;
    color: #776e64;
}

.legal-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 24px;
}

.legal-links a {
    font-size: 12px;
    color: #9c9186;
    text-decoration: none;
}

.legal-links a:hover {
    color: #d8b98a;
    text-decoration: underline;
}

/* Адаптив */

@media (max-width: 768px) {

    .footer-container {
        width: 95%;
        gap: 40px;
        padding: 40px 0 30px;
    }

    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 20px;
    }

    .footer-bottom-container {
        width: 95%;
        flex-direction: column;
        align-items: flex-start;
    }

}

@media (max-width: 480px) {

    .footer-nav {
        grid-template-columns: 1fr;
    }

}