/* ===== МАДХО: палитра и типографика нынешнего сайта ===== */
:root{
  --madho-ink:#404041;      /* основной текст старого сайта */
  --madho-gold:#e6b02e;     /* акцент */
  --madho-gold-dark:#c9971f;
  --madho-line:#e6e6e6;
  --madho-muted:#777;
}
body{ color:var(--madho-ink); }
h1,h2,h3,h4,.site-title,.navbar a{ font-family:Georgia,'PT Serif','Times New Roman',Times,serif; letter-spacing:.2px; }
h1{ font-size:2.1rem; line-height:1.25; }
h2{ font-size:1.6rem; margin-top:1.4em; }
a{ color:var(--madho-gold-dark); }
a:hover{ color:var(--madho-ink); }
hr{ border:none; border-top:1px solid var(--madho-line); margin:1.8em 0; }

/* шапка */
#header{ background:#fff; border-bottom:3px solid var(--madho-gold); }
#header .navbar{ box-shadow:none; }
.site-logo img{ max-height:74px; width:auto; }
.navbar .nav-item > a{ font-size:.98rem; text-transform:none; }
.navbar .nav-item > a:hover{ color:var(--madho-gold-dark); }
#header .dropdown-menu a:hover{ background:var(--madho-gold); color:#fff; }

/* разделы: карточки списка */
.madho-cards{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:18px; margin:26px 0; }
.madho-card{ border:1px solid var(--madho-line); border-radius:10px; overflow:hidden; background:#fff; transition:box-shadow .15s,transform .15s; }
.madho-card:hover{ box-shadow:0 6px 20px rgba(0,0,0,.09); transform:translateY(-2px); }
.madho-card img{ width:100%; height:190px; object-fit:cover; display:block; }
.madho-card .txt{ padding:12px 14px; }
.madho-card .t{ font-family:Georgia,serif; font-size:1.06rem; }
.madho-card .d{ color:var(--madho-muted); font-size:.84rem; margin-top:4px; }

/* галерея с просмотром */
.madho-gallery{ display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:10px; margin:18px 0; }
.madho-gallery a{ display:block; }
.madho-gallery img{ width:100%; height:170px; object-fit:cover; border-radius:6px; display:block; background:#f2f2f2; }
article img{ max-width:100%; height:auto; }

/* главная */
.madho-hero{ position:relative; margin:0 0 26px; }
.madho-slider{ display:flex; overflow-x:auto; scroll-snap-type:x mandatory; gap:6px; border-radius:12px; }
.madho-slider figure{ margin:0; min-width:100%; scroll-snap-align:start; position:relative; }
.madho-slider img{ width:100%; max-height:520px; object-fit:cover; display:block; border-radius:12px; }
.madho-slider figcaption{ position:absolute; left:0; right:0; bottom:0; padding:14px 18px; background:linear-gradient(transparent,rgba(0,0,0,.55)); color:#fff; font-family:Georgia,serif; border-radius:0 0 12px 12px; }
.madho-blocks{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:18px; margin:26px 0; }
.madho-block{ border-top:4px solid var(--madho-gold); background:#fafafa; padding:16px 18px; border-radius:8px; }
.madho-news{ margin:26px 0; }
.madho-news li{ margin-bottom:8px; }

/* подвал */
#footer{ border-top:1px solid var(--madho-line); color:var(--madho-muted); font-size:.9rem; }

/* меню: слева, с переносами на узких экранах */
#header .navbar{ flex-wrap:wrap; align-items:flex-start; }
#header .navbar-section.desktop-menu{ flex:1 1 auto; margin-left:12px; }
#header .nav{ flex-wrap:wrap; justify-content:flex-start; gap:.25rem 1rem; }
#header .nav-item{ white-space:nowrap; }
#header .nav-item.active > a, #header .nav-item > a.active{ border-bottom:2px solid var(--madho-gold); }
@media (max-width:900px){
  #header .nav{ gap:.2rem .7rem; font-size:.92rem; }
  .madho-cards{ grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); }
  h1{ font-size:1.6rem; }
}
.madho-foot{ display:flex; flex-wrap:wrap; gap:10px 24px; justify-content:space-between; align-items:center; }



/* ===== ШАПКА (как в теме, только порог повыше) ===== */
#header .navbar{ display:flex; align-items:center; gap:1rem; flex-wrap:nowrap; }
#header .navbar-brand.madho-brand{ display:flex; align-items:center; gap:.5rem; flex:0 0 auto; max-width:none; padding:0; margin:0; text-decoration:none; }
#header .madho-emblem{ height:44px; width:44px; object-fit:contain; flex:0 0 auto; }
#header .madho-brand-name{ font-family:Georgia,'PT Serif',serif; font-size:1.3rem; line-height:1; color:var(--madho-ink); letter-spacing:1px; white-space:nowrap; }
#header .theme-toggle, #header .theme-toggle-wrapper, #header .login-status-wrapper{ display:none !important; }

/* 861–1100 px: включаю мобильное меню темы целиком (как в теме на 860) */
@media (min-width: 861px) and (max-width: 1100px){
  #header .desktop-menu{ display:none !important; }
  #header .mobile-menu{ display:block !important; }
  #header .mobile-container{ display:block !important; }
}

/* 1101 px и выше: настольное меню в одну строку */
@media (min-width: 1101px){
  #header .desktop-menu{ display:flex !important; flex:1 1 auto; justify-content:flex-end; min-width:0; }
  #header .dropmenu{ width:100%; }
  #header .dropmenu > ul,
  #header ul.navigation{ display:flex !important; flex-wrap:nowrap !important; align-items:center; justify-content:flex-end; gap:.1rem; margin:0 !important; padding:0 !important; list-style:none !important; }
  #header ul.navigation > li{ white-space:nowrap; position:relative; }
  #header ul.navigation > li > a{ font-size:.85rem; padding:.4rem .5rem; display:inline-block; }
  #header ul.navigation > li > ul{ position:absolute; top:100%; left:0; background:#fff; box-shadow:0 6px 18px rgba(0,0,0,.12); min-width:220px; padding:.3rem 0; z-index:80; }
  #header ul.navigation > li > ul > li > a{ display:block; padding:.35rem .8rem; font-size:.85rem; }
}
@media (max-width: 1300px) and (min-width: 1101px){
  #header ul.navigation > li > a{ font-size:.76rem; padding:.35rem .34rem; }
  #header .madho-emblem{ height:40px; width:40px; }
  #header .madho-brand-name{ font-size:1.05rem; }
}
@media (max-width: 620px){
  #header .madho-emblem{ height:36px; width:36px; }
  #header .madho-brand-name{ font-size:1.05rem; }
}
