/* ============================================================
   Стили сайта «Краеведческий образовательный музей «Соболёк»»
   Палитра: тайга / реки / орнамент ханты-манси
   ============================================================ */

:root {
  --green:        #1B4332;
  --green-light:  #2D6A4F;
  --green-soft:   #95D5B2;
  --blue:         #1D4E89;
  --blue-light:   #4A7BA7;
  --gold:         #B8860B;
  --gold-light:   #D4A537;

  --bg:           #F7F5EF;
  --white:        #FFFFFF;
  --text:         #1F2937;
  --muted:        #6B7280;
  --border:       #E5E0D5;

  --radius:       16px;
  --shadow-sm:    0 2px 8px rgba(27, 67, 50, .06);
  --shadow-md:    0 8px 24px rgba(27, 67, 50, .10);
  --shadow-lg:    0 16px 48px rgba(27, 67, 50, .18);
  --transition:   .3s cubic-bezier(.4, 0, .2, 1);
  --container:    1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Open Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3 {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Баннер-картинка сверху ---------- */
.site-banner {
  width: 100%;
  line-height: 0;
  background: var(--green);
}
.site-banner img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 220px;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 720px) {
  .site-banner img { max-height: 130px; }
}

/* ---------- Панель меню на фоне рисунка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--green);
  background-image: url('/assets/img/menubar.jpg');
  background-repeat: repeat-x;
  background-position: center;
  background-size: auto 100%;
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 14px 0;
  position: relative;
}

.nav {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.nav a {
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  position: relative;
  padding: 4px 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
  transition: color var(--transition);
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--gold-light);
  transition: width var(--transition);
}
.nav a:hover { color: var(--gold-light); }
.nav a:hover::after { width: 100%; }

.burger {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column; justify-content: center; gap: 5px;
  align-items: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, .35);
}
.burger span {
  display: block; width: 20px; height: 2px;
  background: var(--white);
  transition: var(--transition);
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Вводный блок ---------- */
.intro {
  padding: 10px 0 60px;
  text-align: center;
  background: var(--white);
  position: relative;
}
.intro__title {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--green-light);
  letter-spacing: .02em;
  margin-bottom: 4px;
  text-transform: none;
}
.intro__subtitle {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 7vw, 76px);
  color: var(--green);
  line-height: 1.05;
  margin-bottom: 20px;
  letter-spacing: -.02em;
}
.intro__tagline {
  font-family: 'Marck Script', 'Georgia', cursive;
  font-size: clamp(22px, 3.2vw, 34px);
  color: var(--gold);
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.35;
}

/* ---------- Секции ---------- */
.section { padding: 90px 0; }
.section--white { background: var(--white); }

.section-title { text-align: center; margin-bottom: 56px; }
.section-title h2 {
  font-size: clamp(28px, 4vw, 42px);
  color: var(--green);
}
.section-title p {
  color: var(--muted);
  margin-top: 12px;
  max-width: 600px;
  margin-inline: auto;
}

/* ---------- Приветствие руководителя ---------- */
.welcome { padding: 90px 0; background: var(--white); position: relative; }
.welcome::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('/assets/img/texture.png');
  background-repeat: repeat;
  background-size: 400px;
  opacity: .5;
  pointer-events: none;
}
.welcome__inner {
  position: relative;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 60px;
  align-items: center;
}
.welcome__photo {
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 6px solid var(--bg);
  background: var(--bg);
}
.welcome__photo img { width: 100%; height: 100%; object-fit: cover; }
.welcome__photo-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 80px; color: var(--green-soft);
}
.welcome__quote {
  position: relative;
  padding-left: 60px;
}
.welcome__quote::before {
  content: '“';
  position: absolute;
  left: 0; top: -30px;
  font-family: Georgia, serif;
  font-size: 120px;
  line-height: 1;
  color: var(--gold);
  opacity: .25;
}
.welcome__quote blockquote {
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.55;
  font-style: italic;
  color: var(--text);
  margin-bottom: 24px;
}
.welcome__author { font-weight: 700; color: var(--green); }
.welcome__author small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ---------- Новости ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.news-card {
  background: #c4ede1; /* Мятно-бежевый фон */
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(27, 67, 50, 0.08); /* Легкая обводка для четкости */
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.news-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.news-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-card time {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}
.news-card h3 {
  font-size: 19px;
  margin-bottom: 10px;
  color: var(--green);
}
.news-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}
.news-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: var(--transition);
  color: var(--muted);
}
.share-btn:hover { color: var(--green); border-color: var(--green); }
.share-btn--vk:hover   { color: #0077FF; border-color: #0077FF; }
.share-btn--max:hover  { color: #6D28D9; border-color: #6D28D9; }

/* ---------- Внешние ссылки ---------- */
.external-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.ext-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.ext-link:hover {
  border-color: var(--green);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.ext-link__icon {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 20px;
  font-weight: 800;
  background: var(--green-soft);
  color: var(--green);
}
.ext-link__body { flex: 1; min-width: 0; }
.ext-link__title {
  font-weight: 700;
  color: var(--green);
  margin-bottom: 2px;
}
.ext-link__url {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Футер ---------- */
.site-footer {
  background: var(--green);
  color: rgba(255,255,255,.8);
  padding: 48px 0 32px;
}
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: var(--white); }
.site-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.site-footer h4 {
  color: var(--white);
  margin-bottom: 12px;
  font-size: 16px;
}
.site-footer p, .site-footer li {
  font-size: 14px;
  line-height: 1.7;
}
.site-footer ul { list-style: none; }

.site-footer__bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255,255,255,.6);
}
.footer-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 100px;
  font-size: 13px;
  transition: var(--transition);
}
.footer-login:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.6);
}

/* ---------- Тост ---------- */
.toast {
  position: fixed;
  right: 24px; bottom: 24px;
  padding: 14px 22px;
  background: #1F2937;
  color: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 999;
  max-width: 360px;
}
.toast.is-show { opacity: 1; transform: none; }
.toast--error { background: #B91C1C; }
.toast--success { background: #15803D; }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
  .welcome__inner { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .welcome__photo { width: 220px; margin: 0 auto; }
  .welcome__quote { padding-left: 0; }
  .welcome__quote::before { position: static; display: block; font-size: 80px; line-height: .8; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 720px) {
  .site-header__inner { justify-content: flex-end; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: 260px;
    padding: 100px 24px 24px;
    background-color: var(--green);
    background-image: url('/assets/img/menubar.jpg');
    background-size: cover;
    flex-direction: column;
    gap: 20px;
    transform: translateX(100%);
    transition: transform var(--transition);
    box-shadow: var(--shadow-lg);
    justify-content: flex-start;
    flex-wrap: nowrap;
  }
  .nav.is-open { transform: none; }
  .nav a { font-size: 17px; }
  .burger { display: flex; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); }
  .intro { padding: 50px 0 30px; }
}

/* ---------- Орнаментный разделитель между секциями ---------- */
.ornament-divider {
  width: 100%;
  padding: 16px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--white);      /* ← тот же фон, что у секций вокруг */
}
.ornament-divider img {
  display: block;
  max-width: 90%;
  height: 36px;
  object-fit: contain;
}

@media (max-width: 720px) {
  .ornament-divider img {
    height: 36px;
    max-width: 95%;
  }
}

.logo-museum {
  width: 100%;
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--white);      /* ← тот же фон, что у секций вокруг */
}
.logo-museum img {
  display: block;
  max-width: 90%;
  height: 220px;
  object-fit: contain;
}

@media (max-width: 720px) {
  .logo-museum img {
    height: 220px;
    max-width: 95%;
  }
}

/* ---------- Модальное окно новости ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(4px);
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
}
.modal__content {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.modal.is-open .modal__content {
  transform: translateY(0);
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 20px;
  display: grid;
  place-items: center;
  z-index: 10;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
}
.modal__close:hover {
  background: rgba(0,0,0,0.8);
}
.modal__image-wrap img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}
.modal__body {
  padding: 32px;
}
.modal__date {
  font-size: 14px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 12px;
}
.modal__title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(22px, 4vw, 32px);
  color: var(--green);
  margin-bottom: 20px;
  line-height: 1.3;
}
.modal__text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}
@media (max-width: 720px) {
  .modal__body { padding: 24px 20px; }
  .modal__image-wrap img { max-height: 250px; }
}