/* styles.css — полный файл
   ПАЛИТРА:
   --forest: #A7AF81
   --sand:   #E8DABA
   --purple: #492A39
   --text:   #3D2E23
   --accent: #987A56
*/

/* ========== ПЕРЕМЕННЫЕ ========== */
:root{
  --forest: #A7AF81;
  --sand:   #E8DABA;
  --purple: #492A39;
  --text:   #3D2E23;
  --accent: #987A56;

  --max-width: 1200px;
  --gap: 20px;
  --radius: 12px;

  --shadow-soft: 0 8px 26px rgba(73,42,57,0.06);
  --shadow-mid: 0 12px 30px rgba(0,0,0,0.12);
}

/* ========== RESET / БАЗОВЫЕ ========== */
* { box-sizing: border-box; }
html,body { height:100%; }
body{
  margin:0;
  font-family: "Lora", Georgia, serif;
  background:   #f2e6cf 100%;
  color: #3b1f2b;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
  font-size:16px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    url("https://www.transparenttextures.com/patterns/paper-fibers.png"); /* можно заменить на свою текстуру */
  opacity: 0.25; /* прозрачность текстуры — можно регулировать */
  mix-blend-mode: multiply;
  z-index: -1;
}


/* контейнер */
.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ссылки */
a { color: inherit; }
a:hover { text-decoration: underline; }

/* ========== HEADER ========== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: url(/img/header_bg_from_logo.png) center / cover no-repeat;
  background-color: rgba(232, 218, 186, 0.96);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(4px);
}

.header-inner{
  display:flex;
  align-items:center;
  gap:18px;
  padding:16px 0;
}
.logo{ display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--purple) }
.logo-img{ height:56px; width:auto; display:block; }
.logo-text{ font-family:"Playfair Display", serif; font-weight:700; font-size:20px; color:var(--purple) }

/* навигация */
.main-nav{
  margin-left: 24px;
  display:flex;
  gap:18px;
  flex:1;
  align-items:center;
}
.main-nav a{
  text-decoration:none;
  color: var(--text);
  padding:6px 8px;
  border-radius:8px;
  font-weight:600;
}
.main-nav a:hover,
.main-nav a:focus{ background: rgba(73,42,57,0.06); color:var(--purple); outline:none; }

/* кнопка связаться */
.header-actions{ flex-shrink:0; }
.btn-contact{
  display:inline-block;
  padding:10px 16px;
  background: var(--purple);
  color: var(--sand);
  border-radius:12px;
  text-decoration:none;
  font-weight:700;
  box-shadow: var(--shadow-soft);
}

/* ========== HERO ========== */
.hero{
  position:relative;
  overflow:hidden;
  min-height: 560px;
  display:flex;
  align-items:center;
  padding:56px 0;
}


/* контент поверх фона */
.hero-content{ position:relative; z-index:3; width:100%; padding: 28px 0; text-align:center; }
.hero-title{
  font-family:"Merriweather", serif;
  font-size: clamp(28px, 4vw, 56px);
  color: var(--purple);
  margin: 0 0 40px 0;
  max-width: 72ch;
  margin-left:auto; margin-right:auto;
}

/* блок услуг в герое (иконки) */
.services{
  list-style:none; padding:0; margin:0 auto;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap:22px;
  max-width: 1000px;
}
.service{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  text-align:center;
}
.service-icon{
  width:96px; height:96px; object-fit:contain;
  border-radius:18px; 
  transition: all .25s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: rgba(255,255,255,0.0);
  filter: brightness(1);
}

.service:hover .service-icon{ 
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 20px 40px rgba(107, 70, 193, 0.35);
  filter: brightness(1.1);
}
.service span{ color:var(--purple); font-weight:700 }

/* ========== EVENTS (КАРУСЕЛЬ + ОПИСАНИЕ) ========== */
.events{
  padding:44px 0;
}
.events .section-title{
  text-align:left;
  font-family:"Merriweather", serif;
  color:var(--purple);
  margin-bottom:12px;
}

/* каркас карусели */
.carousel{
  position: relative;
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  max-width:100%;
  margin-bottom:18px;
}

.carousel:hover .carousel-slide:not(.hidden) img {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(107, 70, 193, 0.35);
  filter: brightness(1.05);
  transition: all .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* кнопки */
.carousel-btn{
  background: rgba(255,255,255,0.94);
  border:none;
  width:44px; height:44px; border-radius:8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  cursor:pointer;
  font-size:18px;
  display:flex; align-items:center; justify-content:center;
}
.carousel-btn:active{ transform: translateY(1px); }

/* обёртка с треком — scroll-snap */
.carousel-track-wrap{
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  width:100%;
  scrollbar-width: none; /* firefox */
}
.carousel-track-wrap::-webkit-scrollbar{ display:none; }

/* трек */
.carousel-track{
  display:flex;
  gap:16px;
  padding:8px 0;
  margin:0;
  list-style:none;
  align-items:flex-start;
}

/* слайды */
.carousel-slide{
  flex: 0 0 100%; /* занимает всю видимую ширину контейнера */
  box-sizing: border-box;
  scroll-snap-align: center;
  min-width: 0; /* важно при flex */
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align: center;
}

/* изображения слайда */
.carousel-slide img{
  width: 90%;
  height: 50rem; /* фиксированная высота */
  object-fit: contain; /* или contain если нужно показать полностью */
  border-radius: 12px;
  display: block;
  box-shadow: var(--shadow-mid);
  transition: all .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* подпись под слайдом */
.slide-caption{ margin-top:25px; color:#5a4b42; font-weight:600; text-align:center; }

/* точки */
.carousel-dots{ display:flex; gap:8px; justify-content:center; margin-top:12px; }
.carousel-dots .dot{
  width:10px; height:10px; background:rgba(0,0,0,0.12); border-radius:50%; border:none; cursor:pointer;
  transition: transform .12s ease, background .18s ease;
}
.carousel-dots .dot.active{ background:var(--purple); transform: scale(1.05); }

/* events description */
.events-desc{
  background: rgba(255,255,255,0.7);
  margin-top:20px;
  padding:16px;
  border-radius:12px;
  box-shadow: var(--shadow-soft);
}
.events-desc h3{ margin:0 0 8px 0; color:var(--purple); }
.events-list{ margin-top:12px; display:grid; gap:12px; }

/* ========== WHY (почему мы) ========== */
.why{
  padding:36px 0;
  background: rgba(255,255,255,0.3);
}
.reasons{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.reason {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 
    var(--shadow-soft),
    0 0 0 1px rgba(73, 42, 57, 0.08);
  transition: all 0.3s ease;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Фиолетовая дымка */
.reason::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(73, 42, 57, 0.1) 0%, rgba(73, 42, 57, 0.04) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Контент поверх дымки */
.reason > * {
  position: relative;
  z-index: 2;
}

/* Стили для заголовков и текста внутри reason */
.reason h3 {
  color: var(--purple);
  font-family: "Merriweather", serif;
  font-size: 1.25rem;
  margin: 0 0 12px 0;
  font-weight: 700;
}

.reason p {
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

/* Hover эффект для большей выразительности */
.reason:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 16px 40px rgba(73, 42, 57, 0.15),
    0 0 0 1px rgba(73, 42, 57, 0.12);
  background: rgba(255, 255, 255, 0.96);
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
  .reasons {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .reason {
    padding: 20px;
    min-height: 160px;
  }
}

/* ========== SPECIALISTS ========== */
.specialists{
  padding:32px 0;
}
.specialists .section-title{ margin-bottom:6px; }
.specialists-intro{ color:#6b584f; margin:0 0 12px 0; }

/* сетка специалистов (адаптивно: от 1 до 5 колонок) */
.specialists-grid{
  display:grid;
  gap:18px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items:start;
}

/* карточка специалиста */
.spec-card{
  background: rgba(255,255,255,0.85);
  border-radius:12px;
  overflow:hidden;
  box-shadow: var(--shadow-soft);
  text-align:left;
  transition: transform .18s ease, box-shadow .18s ease;
}
.spec-card:hover{ transform: translateY(-6px); box-shadow: 0 18px 36px rgba(73,42,57,0.12); }
.spec-link{ display:block; text-decoration:none; color:inherit; }
.spec-photo-wrap{ width:100%; height:0; padding-bottom:100%; position:relative; background:#efe6da; }
.spec-photo{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; object-position: center top;}
.spec-info{ padding:12px; }
.spec-name{ display:block; color:var(--purple); font-weight:700; }
.spec-role{ color:#6b584f; margin-top:6px; }

/* ========== FOOTER ========== */
.site-footer{
  position:relative;
  background: url("img/footer_bg_from_logo.png") center/cover no-repeat;
  color: var(--sand);
  padding:28px 0;
}
.footer-visual{ position:absolute; inset:0; background: linear-gradient(180deg, rgba(73,42,57,0.18), rgba(73,42,57,0.28)); mix-blend-mode:multiply; z-index:0; pointer-events:none; }
.footer-inner{ position:relative; z-index:2; display:flex; gap:16px; align-items:center; justify-content:space-between; flex-wrap:wrap; padding:12px 20px; max-width:var(--max-width); margin:0 auto; color: var(--text); }
.footer-nav{ display:flex; gap:14px; flex-wrap:wrap; }
.footer-nav a{ color:var(--text); text-decoration:none; }
.footer-contacts a{ color:var(--text); text-decoration:underline; }
.footer-bottom{ position:relative; z-index:2; border-top: 1px solid rgba(255,255,255,0.06); margin-top:18px; padding-top:12px; text-align:center; color:rgba(255,255,255,0.85); }

/* ========== ФОРМЫ (если используются) ========== */
input[type="text"], input[type="email"], textarea, select {
  width:100%;
  padding:10px;
  border-radius:8px;
  border:1px solid #e6dccc;
  background:#fff;
  font-size:14px;
}

/* ========== АДАПТИВ ========== */

/* Планшеты и маленькие ноутбуки */
@media (max-width: 1100px) {
  .main-nav { 
    display: none; /* можно заменить на бургер-меню */
  }
  
  .hero { 
    min-height: 480px; 
    padding: 40px 0;
  }
  
  .carousel-slide img { 
    height: 320px; 
  }
  
  .services {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 18px;
    max-width: 800px;
  }
  
  .service-icon {
    width: 84px;
    height: 84px;
  }
  
  .specialists-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
  }
  
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
}

/* Планшеты (вертикальная ориентация) */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  .hero { 
    min-height: 420px; 
    padding: 32px 0;
  }
  
  .hero-title {
    font-size: clamp(24px, 5vw, 36px);
    margin-bottom: 32px;
  }
  
  .services {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 400px;
  }
  
  .service-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
  }
  
  .carousel {
    gap: 8px;
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .carousel-slide img { 
    height: 240px; 
    width: 95%;
  }
  
  .events,
  .why,
  .specialists {
    padding: 28px 0;
  }
  
  .reasons {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .specialists-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .header-inner {
    padding: 12px 0;
    gap: 12px;
  }
  
  .logo-img {
    height: 48px;
  }
  
  .logo-text {
    font-size: 18px;
  }
  
  .btn-contact {
    padding: 8px 14px;
    font-size: 14px;
  }
}

/* Мобильные устройства */
@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }
  
  .hero { 
    min-height: 380px; 
    padding: 24px 0;
  }
  
  .hero-title {
    font-size: 22px;
    margin-bottom: 24px;
  }
  
  .services {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 280px;
  }
  
  .service {
    flex-direction: row;
    text-align: left;
    gap: 12px;
    padding: 8px;
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    flex-shrink: 0;
  }
  
  .service span {
    font-size: 14px;
  }
  
  .carousel-slide img { 
    height: 200px; 
    width: 98%;
  }
  
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .carousel-dots {
    gap: 6px;
  }
  
  .carousel-dots .dot {
    width: 8px;
    height: 8px;
  }
  
  .events-desc {
    padding: 12px;
    margin-top: 16px;
  }
  
  .specialists-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .spec-card {
    max-width: 280px;
    margin: 0 auto;
  }
  
  .header-inner {
    padding: 10px 0;
    gap: 8px;
  }
  
  .logo-img {
    height: 42px;
  }
  
  .logo-text {
    font-size: 16px;
  }
  
  .btn-contact {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 8px;
  }
  
  .footer-inner {
    padding: 16px 12px;
    gap: 16px;
  }
  
  .footer-nav {
    flex-direction: column;
    gap: 8px;
  }
  
  .site-footer {
    padding: 20px 0;
  }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
  .hero { 
    min-height: 340px; 
    padding: 20px 0;
  }
  
  .hero-title {
    font-size: 20px;
  }
  
  .service-icon {
    width: 52px;
    height: 52px;
  }
  
  .carousel-slide img { 
    height: 160px; 
  }
  
  .spec-card {
    max-width: 100%;
  }
  
  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .logo {
    flex: 1;
    justify-content: center;
  }
  
  .header-actions {
    width: 100%;
    text-align: center;
    margin-top: 8px;
  }
}

/* Высокие экраны (мобильные в горизонтальной ориентации) */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 300px;
    padding: 20px 0;
  }
  
  .services {
    grid-template-columns: repeat(3, 1fr);
    max-width: 500px;
  }
  
  .service {
    flex-direction: column;
    text-align: center;
  }
}

/* Поддержка тёмной темы */
@media (prefers-color-scheme: dark) {
  /* Можно добавить стили для тёмной темы при необходимости */
}

/* Поддержка редукции движения */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .service-icon,
  .spec-card {
    transition: none;
  }
}
/* ========== ДОП. УТИЛИТЫ ========== */
.hidden { display:none !important; }
.sr-only { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }

