/* ===== МАДХО: палитра и типографика нынешнего сайта ===== */
: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; }

/* ===== МЕНЮ: кнопка на всех разрешениях (просьба заказчика) ===== */
#header .navbar-section.desktop-menu{ display:none !important; }
.mobile-menu{ display:block !important; }
#overlay{ display:none; }
#overlay.open{ display:block !important; }
#header .navbar{ flex-wrap:nowrap !important; }
#header .navbar-brand.madho-brand{ max-width:none !important; }
#header .madho-brand-name{ white-space:nowrap; }

/* ===== ВИДЕО: картинка + плашка поверх ===== */
.madho-video{ position:relative; display:block; max-width:720px; width:100%; margin:1.4rem 0; font-size:0; text-decoration:none; }
.madho-video img{ width:100%; height:auto; display:block; border-radius:10px; }
.madho-video:before{
  content:"▶"; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:66px; height:66px; line-height:66px; text-align:center; padding-left:5px;
  border-radius:50%; background:rgba(0,0,0,.55); color:#fff; font-size:27px;
}
.madho-video:after{
  content:"▶  Смотреть на YouTube";
  position:absolute; left:12px; bottom:12px; padding:.4rem .75rem; border-radius:8px;
  background:rgba(0,0,0,.7); color:#fff; font-size:.88rem; white-space:nowrap;
}
.madho-video:hover:after{ background:rgba(179,38,30,.95); }
.madho-videos{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:1.4rem; margin-top:1rem; }
.madho-videos .madho-video{ max-width:100%; }

/* ===== ПОДПИСИ К РАБОТАМ ===== */
.madho-gallery figure{ margin:0 0 .4rem 0; }
.madho-gallery figcaption{ font-size:.8rem; line-height:1.25; color:#555; margin-top:.3rem; }
