/*
Theme Name: Сад — SAD53 обновлённый (v1)
Description: Привычная структура старого sad53.ru (меню слева, фотогалерея, скачать каталог) в современном и удобном оформлении.
Version: 0.2
Text Domain: sad-v1
*/

/* Layout: the old three-column SE_Blue site, kept recognisable — blue banner, left nav, centre text, right column — but airy and responsive */
:root {
  --sky: #1d5f8f;
  --sky-dk: #154a70;
  --sky-lt: #e8f1f8;
  --page: #f3f6f9;
  --paper: #ffffff;
  --ink: #1d2733;
  --muted: #5b6876;
  --line: #d9e3ec;
  --peony: #c2185b;
  --f-head: "PT Serif", Georgia, "Times New Roman", serif;
  --f-body: "PT Sans", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 17px/1.6 var(--f-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky); }
a:hover { color: var(--peony); }
:focus-visible { outline: 3px solid var(--peony); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; }
.page { max-width: 1240px; margin: 0 auto; padding: 0 16px 24px; }

/* Banner */
.banner { background: linear-gradient(180deg, #2a78ad 0%, var(--sky) 55%, var(--sky-dk) 100%); color: #fff; border-radius: 0 0 14px 14px; }
.banner .in { display: flex; align-items: center; gap: 20px; padding: 14px 22px; flex-wrap: wrap; }
.banner .logo { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.banner .logo img { height: 54px; width: auto; }
.banner .logo span { font-size: 15px; opacity: .9; border-left: 1px solid rgba(255, 255, 255, .35); padding-left: 14px; line-height: 1.3; }
.banner .contacts { margin-left: auto; text-align: right; font-size: 15px; line-height: 1.35; }
.banner .contacts a { color: #fff; font-weight: 700; text-decoration: none; }
.banner .contacts small { display: block; opacity: .8; }
.notice { background: var(--peony); color: #fff; text-align: center; padding: 8px 16px; font-weight: 700; border-radius: 10px; margin: 14px 0 0; }
.notice a { color: #fff; }

/* Three columns */
.cols { display: grid; grid-template-columns: 240px minmax(0, 1fr) 260px; gap: 20px; margin-top: 18px; align-items: start; }
.side { display: grid; gap: 16px; }
.box { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.box h3 { margin: 0; background: linear-gradient(180deg, #2a78ad, var(--sky)); color: #fff; font: 700 15px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; padding: 11px 16px; }
.box .bd { padding: 12px 16px 14px; }
.nav { list-style: none; margin: 0; padding: 6px 0; }
.nav li a { display: flex; justify-content: space-between; padding: 7px 16px; text-decoration: none; color: var(--ink); }
.nav li a::before { content: "»"; color: var(--sky); margin-right: 8px; }
.nav li a span { margin-right: auto; }
.nav li a small { color: var(--muted); }
.nav li a:hover, .nav li a.on { background: var(--sky-lt); color: var(--sky-dk); }
.nav .lbl { padding: 10px 16px 4px; font-weight: 700; color: var(--sky-dk); font-family: var(--f-head); }
.dl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dl a { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 8px; background: var(--sky-lt); }
.dl a:hover { background: #d7e8f5; }
.dl b { font-size: 12px; background: var(--sky); color: #fff; border-radius: 4px; padding: 2px 6px; }
.dl small { display: block; color: var(--muted); font-size: 13px; }
.chan a { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 700; padding: 10px; border-radius: 8px; margin-bottom: 8px; color: #fff; }
.chan .rt { background: #1b1f26; }
.chan .yt { background: #d62b2b; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.facts li:last-child { border-bottom: 0; }
.facts b { color: var(--sky-dk); }

/* Main content */
.main { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: clamp(18px, 3vw, 32px); min-width: 0; }
.main h1 { font-size: clamp(26px, 3vw, 34px); color: var(--sky-dk); }
.main .intro { font-family: var(--f-head); font-weight: 700; font-size: 19px; text-align: justify; hyphens: auto; }
.main .txt { text-align: justify; hyphens: auto; }
.main .txt p { text-indent: 1.5em; }
.photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.photos a { display: block; position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 10; }
.photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.photos a:hover img { transform: scale(1.04); }
.photos span { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; padding: 2px 8px; border-radius: 4px; }
.map-wrap { margin-top: 24px; }
.map-wrap h2 { font-size: 20px; text-align: center; }
.map-frame { width: 100%; height: 340px; border: 0; border-radius: 10px; }
.attrib { font-size: 12px; color: var(--muted); text-align: right; margin: 4px 0 0; }

/* Gallery */
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 16px; }
.gi { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper); }
.gi a.ph { display: block; aspect-ratio: 1; overflow: hidden; }
.gi a.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gi:hover a.ph img { transform: scale(1.05); }
.gi .t { padding: 8px 10px 0; flex: 1; }
.gi .t a { font-weight: 700; color: var(--ink); text-decoration: none; }
.gi .t small { display: block; color: var(--muted); font-size: 13px; }
.gi .p { padding: 4px 10px 10px; font-weight: 700; color: var(--sky-dk); font-size: 15px; }
.gi .p.off { font-weight: 400; color: var(--muted); font-size: 13px; }
.pick { margin: 0 10px 10px; border: 1px solid var(--sky); background: #fff; color: var(--sky); border-radius: 6px; padding: 7px; font: 700 14px var(--f-body); cursor: pointer; }
.pick[aria-pressed="true"] { background: var(--sky); color: #fff; }
.quote { background: var(--sky-lt); border-left: 4px solid var(--sky); padding: 14px 18px; border-radius: 0 8px 8px 0; font-style: italic; margin: 0 0 22px; }
.quote cite { display: block; font-style: normal; color: var(--muted); font-size: 14px; margin-top: 6px; }
.note { font-size: 14px; color: var(--muted); }

/* Single */
.single { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.single .pic img { border-radius: 10px; width: 100%; }
.spec { width: 100%; border-collapse: collapse; margin: 14px 0; }
.spec th, .spec td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { color: var(--muted); font-weight: 400; width: 40%; }
.bigprice { font: 700 26px/1 var(--f-head); color: var(--sky-dk); margin: 8px 0 14px; }

/* Zayavka block (re-used markup) */
.zayavka-wrap { margin-top: 28px; border-top: 2px solid var(--sky-lt); padding-top: 22px; }
.zlist { list-style: none; margin: 0 0 8px; padding: 0; }
.zlist li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.zlist button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; }
.zlist .empty { color: var(--muted); }
.zsum { font-size: 14px; color: var(--muted); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.form .full { grid-column: 1 / -1; }
.form label { display: grid; gap: 5px; font-weight: 700; font-size: 14px; }
.form input, .form textarea { font: 16px var(--f-body); padding: 10px; border: 1px solid #bcccd9; border-radius: 8px; width: 100%; }
.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--sky); color: #fff; border: 0; border-radius: 8px; padding: 12px 20px; font: 700 16px var(--f-body); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--sky-dk); color: #fff; }
.hp { position: absolute; left: -9999px; }
.msg { grid-column: 1 / -1; padding: 10px 12px; border-radius: 8px; background: #e6f4ea; margin: 0; }
.msg.err { background: #fde8ee; }
.zayavka-link { display: inline-block; margin-top: 6px; font-weight: 700; }

/* Footer */
.foot { margin-top: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.foot a { color: var(--sky); }

@media (max-width: 1080px) {
  .cols { grid-template-columns: 220px minmax(0, 1fr); }
  .side.right { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 760px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .side.left { order: 2; }
  .main { order: 1; }
  .side.right { order: 3; }
  .single, .form { grid-template-columns: minmax(0, 1fr); }
  .banner .contacts { margin-left: 0; text-align: left; }
  .banner .logo span { display: none; }
  .main .intro, .main .txt { text-align: left; }
}
