/* ===========================================================
   База отдыха «Ступинская» — статическая версия сайта
   Тема восстановлена из оригинального дизайна stupino-bo.ru
   =========================================================== */

:root {
  --bg-dark: #00322a;
  --bg-darker: #00382f;
  --panel: #008744;
  --panel-border: #006835;
  --accent-yellow: #fff100;
  --accent-yellow2: #ffe200;
  --accent-green: #b3fea1;
  --accent-green2: #b4ffa2;
  --news-bg: #002c25;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg-dark) url(../img/background.jpg) repeat;
  color: #fff;
  font: 16px/1.5 "Times New Roman", Georgia, serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img { border: 0; max-width: 100%; }

ul, ol { list-style: none; }

/* ---------- floating go top / bottom ---------- */
#Go_Top, #Go_Bottom {
  position: fixed; right: 18px; z-index: 50; cursor: pointer;
  width: 42px; height: 42px; border: none; border-radius: 8px;
  background: rgba(0,44,37,.85); color: var(--accent-yellow);
  font-size: 22px; line-height: 42px; text-align: center;
  display: none;
}
#Go_Top { bottom: 70px; }
#Go_Bottom { bottom: 20px; }
#Go_Top:hover, #Go_Bottom:hover { background: #325a53; }

/* ---------- header / logo ---------- */
#main { flex: 1 0 auto; }

#logo { text-align: center; padding: 14px 0 0; }
#logo img { width: 320px; max-width: 70%; height: auto; }

/* ---------- slideshow (home) ---------- */
.slideshow {
  max-width: 1400px; margin: 14px auto 0; position: relative;
  border: 6px solid var(--accent-yellow2); border-radius: 6px;
  background: #fff; overflow: hidden; box-shadow: 0 1px 8px rgba(0,0,0,.3);
}
.slideshow .slides { position: relative; }
.slideshow .slides li { display: none; }
.slideshow .slides li.active { display: block; animation: fade 1s; }
.slideshow .slides img { width: 100%; height: auto; display: block; }
@keyframes fade { from { opacity: .2; } to { opacity: 1; } }
.slideshow .slide-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,44,37,.6); color: #fff; border: none;
  font-size: 30px; padding: 6px 14px; cursor: pointer; z-index: 3;
}
.slideshow .slide-nav:hover { background: rgba(0,44,37,.9); }
.slideshow .prev { left: 0; border-radius: 0 6px 6px 0; }
.slideshow .next { right: 0; border-radius: 6px 0 0 6px; }
.slideshow .dots { position: absolute; bottom: 8px; width: 100%; text-align: center; z-index: 3; }
.slideshow .dots span {
  display: inline-block; width: 11px; height: 11px; margin: 0 4px;
  border-radius: 50%; background: rgba(255,255,255,.6); cursor: pointer;
}
.slideshow .dots span.active { background: var(--accent-yellow); }

/* ---------- main panel ---------- */
#mid {
  width: 90%; max-width: 1100px; margin: 26px auto 0;
  background: var(--panel); border: 9px solid var(--panel-border);
  border-radius: 4px; box-shadow: 0 0 30px rgba(0,0,0,.5);
  position: relative;
}

/* ---------- navigation ---------- */
nav.mainnav { background: var(--bg-dark); border-bottom: 2px solid #fff; }
.menu { display: flex; flex-wrap: wrap; justify-content: center; font-family: "Century Gothic", "Trebuchet MS", sans-serif; }
.menu > li { position: relative; border: 2px solid #fff; border-bottom: none; }
.menu > li > a, .menu > li > span {
  display: block; padding: 12px 20px; color: var(--accent-yellow);
  cursor: pointer; font-size: 19px; white-space: nowrap;
}
.menu > li:hover { background: #325a53; }
.menu > li > a:hover { color: var(--accent-green); text-decoration: none; }
.menu .has-sub > span::after { content: " ▾"; font-size: 12px; }

.sub-menu {
  position: absolute; left: 0; top: 100%; min-width: 230px;
  background: #003129; z-index: 20; display: none; text-align: left;
}
.menu li:hover > .sub-menu { display: block; }
.sub-menu li { border-bottom: 1px solid #0a4a3e; }
.sub-menu a {
  display: block; padding: 10px 16px; color: var(--accent-yellow);
  font-style: italic; font-size: 17px;
}
.sub-menu li:hover { background: #325a53; border-left: 3px solid var(--accent-yellow); }
.sub-menu a:hover { color: var(--accent-green); text-decoration: none; }

.mobile-menu {
  display: none; padding: 12px; background: #003129;
  color: var(--accent-yellow); text-transform: uppercase; cursor: pointer;
  font-family: "Century Gothic", sans-serif; text-align: center;
}
.mobile-menu:hover { background: #325a53; }

/* ---------- page header ---------- */
#empty { text-align: center; padding: 22px 10px 0; }
#empty h4, .page-header h2 {
  font: 22px "Century Gothic", sans-serif; color: var(--accent-yellow2);
  text-decoration: underline; font-weight: normal;
}
.page-header { text-align: center; margin-bottom: 18px; }

/* ---------- content ---------- */
#content {
  color: #fff; text-align: left; padding: 22px 5% 14px;
  overflow: hidden; word-wrap: break-word;
}
#content p { padding: 10px 0; }
#content a { color: #d7ffca; font-weight: bold; }
#content a:hover { color: var(--accent-green); }
#content h1, #content h2, #content h3 { color: var(--accent-yellow2); font-weight: normal; margin: 10px 0; }
#content ul li { list-style: disc inside; text-align: left; margin-bottom: 5px; }
#content ol li { list-style: decimal inside; text-align: left; margin-bottom: 5px; }
#content hr { margin: 20px 0; border: 0; height: 1px; background: #fff; }
#content img { height: auto; }
#content iframe { max-width: 100%; }

/* news block on home */
#float-news { float: right; width: 320px; max-width: 100%; margin: 0 0 12px 14px; }
#news {
  background: var(--news-bg); border: 2px solid #fff; border-radius: 8px;
  text-align: center; padding: 8px;
}
#news > a { color: var(--accent-green); font-weight: bold; font-size: 18px; }
.info { background: var(--bg-darker); border-radius: 6px; padding: 10px; margin-top: 8px; color: var(--accent-green); }
.info .date { font-style: italic; color: #fff; }
.info p { padding: 4px 0; }
a.readmore { display: inline-block; font-style: italic; margin: 4px 0 14px; }

/* description tables on cabin pages */
#houses-table-wrapper { max-width: 720px; margin: 0 auto 18px; overflow-x: auto; }
.table-description { width: 100%; border-collapse: collapse; background: #014f42; }
.table-description th {
  text-align: center; color: var(--accent-green2);
  background: var(--bg-darker); font-family: Georgia; padding: 10px;
  border: 2px solid #268766;
}
.table-description td { border: 2px solid #268766; padding: 10px; vertical-align: top; }
.table-description ul { margin-left: 18px; }
.table-description ul li { list-style: disc; }

/* generic content tables (price table etc.) */
#content table { border-collapse: collapse; margin: 10px auto; max-width: 100%; background: #014f42;}
#content table td, #content table th { border: 1px solid #268766; padding: 8px; }

.list-streets { text-align: center; margin: 6px 0; }
.list-streets li {
  display: inline-block; background: #76c875; color: #003129;
  margin: 4px; padding: 6px 10px; border-radius: 8px; font-style: italic;
}
.list-streets li a { color: #003129; }
.list-streets li:hover { background: #9ce29a; }

/* buttons */
.scheme, .scheme-page, .map-mobile {
  display: inline-block; background: var(--news-bg); padding: 10px 14px;
  color: var(--accent-yellow); font: italic 20px "Century Gothic", sans-serif;
  border: 1.8px solid #fff; border-radius: 8px; text-decoration: none;
}
.scheme:hover, .scheme-page:hover, .map-mobile:hover { background: #325a53; color: var(--accent-yellow); text-decoration: none; }
#scheme-nomera { text-align: center; margin: 18px 0; }

#cleaning {
  color: #fff; background: #00463b; max-width: 1000px; margin: 18px auto;
  padding: 12px 18px; border-radius: 8px;
}
#cleaning li { list-style: disc inside; text-align: center; padding: 4px; }

/* cabin / leisure listing grid */
.list_contents { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; padding: 10px 0; }
.list_contents .view {
  width: 230px; height: 180px; border: 1.8px solid #fff; border-radius: 8px;
  overflow: hidden; position: relative; background: #003129;
}
.list_contents .view a { display: block; width: 100%; height: 100%; font-weight: normal; }
.list_contents .view img { width: 100%; height: 100%; object-fit: cover; display: block; }
.list_contents .view .mask {
  position: absolute; inset: 0; padding: 10px; display: flex; flex-direction: column;
  justify-content: flex-end; text-align: center;
  background: linear-gradient(rgba(0,44,37,0) 35%, rgba(0,44,37,.85));
  transition: background .3s;
}
.list_contents .view:hover .mask { background: rgba(0,44,37,.78); justify-content: center; }
.list_contents .view h2 { color: #fff; font-size: 14px; text-transform: uppercase; margin-bottom: 6px; }
.list_contents .view p { color: #fff; font: italic 13px Georgia; margin: 0; padding: 0; }
.list_contents .view .readmore {
  display: inline-block; margin-top: 8px; padding: 4px 10px; background: #000;
  color: #fff; font-size: 12px; text-transform: uppercase; opacity: 0; transition: opacity .3s;
}
.list_contents .view:hover .readmore { opacity: 1; }

/* ===========================================================
   Mini-gallery (drop-in) + lightbox
   Положите фото с именами 1.jpg, 2.jpg, … в папку
   assets/galleries/<id>/  — и они появятся здесь автоматически.
   =========================================================== */
.mini-gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0; }
.mini-gallery .gallery-item {
  width: 240px; height: 150px; border: 3px ridge var(--bg-darker);
  border-radius: 4px; overflow: hidden; cursor: pointer; background: #003129;
}
.mini-gallery .gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.mini-gallery .gallery-item:hover img { transform: scale(1.08); }
.gallery-empty {
  width: 100%; text-align: center; color: var(--accent-green);
  font-style: italic; padding: 26px; border: 2px dashed #2f7a64; border-radius: 8px;
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 1000;
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92%; max-height: 88%; box-shadow: 0 0 30px rgba(0,0,0,.8); }
.lightbox .lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); color: #fff; border: none;
  font-size: 40px; padding: 10px 18px; cursor: pointer; user-select: none;
}
.lightbox .lb-btn:hover { background: rgba(255,255,255,.25); }
.lightbox .lb-prev { left: 20px; }
.lightbox .lb-next { right: 20px; }
.lightbox .lb-close { position: absolute; top: 16px; right: 22px; font-size: 40px; line-height: 1; }
.lightbox .lb-counter { position: absolute; bottom: 20px; width: 100%; text-align: center; color: #fff; font-size: 15px; }

/* ---------- footer ---------- */
#footer { flex-shrink: 0; background: var(--bg-darker); padding: 26px 0 30px; margin-top: 30px; }
#foot-cont { width: 88%; max-width: 1200px; margin: 0 auto; text-align: center; }
#foot-cont > .custom > p { margin-bottom: 18px; }
#contacts {
  background: var(--accent-green2); border: 2px solid #008c47; border-radius: 6px;
  max-width: 430px; margin: 18px auto; color: var(--news-bg);
  font: bold 18px Georgia; overflow: hidden;
}
.contacts-top { background: var(--news-bg); color: var(--accent-green2); padding: 10px; font: 20px "Century Gothic", sans-serif; text-align: left; }
.contacts-body { padding: 12px; }
.contacts-bottom { display: flex; flex-wrap: wrap; margin-top: 10px; font: normal 16px Georgia; color: #000; }
#address { flex: 1 1 180px; border-right: 2px solid green; padding: 8px; line-height: 1.2; }
#phones { flex: 1 1 180px; padding: 8px; display: flex; flex-direction: column; justify-content: center; }
#phones p { margin: 4px 0; }

#footer-buttons { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px; margin-top: 14px; }
#soc-net a { display: inline-block; margin: 0 6px; }
#soc-net img { width: 42px; height: auto; vertical-align: middle; }
#cont-right { margin: 22px auto 0; max-width: 760px; height: 320px; }
#cont-right iframe, #cont-right > div { width: 100%; height: 100%; }
.map-mobile { display: none; margin-top: 14px; font-size: 16px; }

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 900px) {
  #mid { width: 94%; }
  .menu > li > a, .menu > li > span { font-size: 16px; padding: 10px 14px; }
}

@media (max-width: 805px) {
  .mobile-menu { display: block; }
  nav.mainnav { background: transparent; border: none; }
  .menu { display: none; flex-direction: column; }
  .menu.open { display: flex; }
  .menu > li { border: 1px solid #fff; border-radius: 4px; margin: 3px 6px; background: #003129; }
  .menu > li > a, .menu > li > span { text-align: center; }
  .sub-menu { position: static; display: block; min-width: 0; background: transparent; }
  .menu .has-sub > span::after { content: ""; }
  .sub-menu li { border: none; }
}

@media (max-width: 640px) {
  #content { padding: 16px 4%; }
  #empty h4, .page-header h2 { font-size: 19px; }
  #float-news { float: none; width: 100%; margin: 0 0 16px; }
  .map-mobile { display: inline-block; }
  #cont-right { height: 260px; }
}

@media (max-width: 460px) {
  #logo img { max-width: 78%; }
  #mid { width: 97%; border-width: 5px; }
  .list_contents .view { width: 46%; min-width: 150px; height: 150px; }
  .mini-gallery .gallery-item { width: 46%; min-width: 140px; height: 120px; }
  #contacts { font-size: 16px; }
}
