/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-light {
    background-color: #f5faf6;
}

.section h2 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 50px;
    color: #9bb87a;
}

.section h2 i {
    margin-right: 15px;
}

/* Герой-баннер */
.hero {
    height: 100vh;
    background-image: url('https://familyfinenkovs.ru/images/story5_blur_13-15pct_r1p2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.4);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    z-index: 2;
    padding: 20px;
}

.names {
    font-family: 'Marck Script', cursive;
    font-size: 5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero .date {
    font-size: 2rem;
    margin-bottom: 20px;
    letter-spacing: 3px;
}

.hero .subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.countdown {
    margin-top: 50px;
}

.countdown p {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

#timer {
    font-size: 2rem;
    font-weight: bold;
}

#timer span {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 5px;
    margin: 0 5px;
}

/* Навигация */
.navbar {
    background-color: #fff;
	box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

.navbar li {
    margin: 0;
}

.navbar a {
    display: block;
    padding: 20px 25px;
    text-decoration: none;
    color: #9bb87a;
    font-weight: 600;
    transition: all 0.3s ease;
}

.navbar a:hover {
    background-color: #9bb87a;
    color: #f5faf6;
}

/* Наша история */
.story-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.story-text {
    flex: 1;
    min-width: 300px;
}

.story-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.story-image {
    flex: 1;
    min-width: 300px;
}

.story-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Детали мероприятия */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.detail-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-10px);
}

.detail-icon {
    font-size: 2.5rem;
    color: #9bb87a;
    margin-bottom: 20px;
}

.detail-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #9bb87a;
}

.detail-card p {
    margin-bottom: 10px;
}

.map-link {
    display: inline-block;
    margin-top: 15px;
    color: #9bb87a;
    text-decoration: none;
    font-weight: 600;
}

.map-link:hover {
    text-decoration: underline;
}

.color-palette {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ddd;
}

/* Расписание дня */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #9bb87a;
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-time {
    flex: 1;
    padding: 20px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: #9bb87a;
}

.timeline-content {
    flex: 1;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.timeline-content h3 {
    margin-bottom: 10px;
    color: #9bb87a;
}

/* Галерея */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 10px;
    height: 300px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Форма RSVP */
.rsvp-subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #555;
}

.rsvp-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
    transition: border 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #9bb87a;
    outline: none;
}

.radio-group {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-label input {
    width: auto;
    margin-right: 10px;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #9bb87a;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #9bb87a;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    display: none;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.faq-question {
    padding: 15px 0;
    font-weight: 600;
    font-size: 1.2rem;
    color: #9bb87a;
    cursor: pointer;
    position: relative;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 0;
    font-size: 1.5rem;
}

.faq-question.active::after {
    content: '-';
}

.faq-answer {
    padding: 0 0 20px;
    display: none;
}

.faq-answer.active {
    display: block;
}

/* Подвал */
.footer {
    background-color: #444;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-text h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #9bb87a;
}

.footer-contact p {
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #9bb87a;
}

/* Адаптивность */
/*@media (max-width: 768px) {
    .hero {
        height: 80vh;
    }
    
    .names {
        font-size: 3.5rem;
    }
    
    .hero .date {
        font-size: 1.5rem;
    }
    
    .navbar ul {
        flex-direction: column;
        align-items: center;
    }
    
    .navbar a {
        padding: 15px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section h2 {
        font-size: 2.2rem;
    }
    
    .story-content {
        flex-direction: column;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
    }
    
    .timeline-time {
        flex: 0 0 80px;
        text-align: left;
        padding-left: 0;
    }
    
    .footer-content {
        flex-direction: column;
    }
}
*/

@media (max-width: 768px) {
  .navbar {
    position: static;   /* вместо sticky */
    top: auto;
  }

  /* можно оставить колонку как есть */
}

/* Навигация в лайтбоксе */

/* ===== Lightbox для галереи ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 2000;
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 95vw;
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  touch-action: pan-y; /* вертикальный скролл не ломаем */
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}

/* Кнопки влево/вправо */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }


.music-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 2500;

  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;

  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);

  font-size: 14px;
}

.music-toggle:active {
  transform: scale(0.98);
}

/* Фото и карта внутри карточки "Детали" */
.detail-media {
  margin-top: 14px;
}

.detail-photo {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* Обёртка карты, чтобы выглядело аккуратно */
.map-wrap {
  margin-top: 14px;
  border-radius: 12px;
  overflow: hidden;
}

/* На телефоне можно сделать карту пониже */
@media (max-width: 768px) {
  .map-wrap iframe {
    height: 240px;
  }
}

/* Чтобы фото в "Детали" никогда не вылезало из карточки */
.detail-card { 
  overflow: hidden; 
}

.detail-card img.detail-photo {
  width: 100%;
  height: 220px;      /* подгони как нравится */
  object-fit: cover;  /* чтобы не растягивалось */
  border-radius: 12px;
}


/* ===== Детали: одинаковая высота карточек + аккуратные фото ===== */

/* Сетка "Детали": карточки растягиваются на одинаковую высоту */
.details-grid {
  align-items: stretch;
}

/* Карточка — колонка, чтобы медиа можно было "прижать" вниз */
.detail-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Блок с фото (и картой, если есть) — уходит вниз карточки 
.detail-media,
.map-wrap {
  margin-top: auto;
}*/

/* Фото как "обложка": одинаковая высота, без растяжения */
.detail-photo {
  width: 100%;
  height: 220px;     /* можешь поменять, например 200/240 */
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

/* На мобиле делаем пониже, чтобы не занимало пол-экрана */
@media (max-width: 768px) {
  .detail-photo {
    height: 180px;
  }
}

/* Reveal-анимации */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* Чуть разная задержка для карточек */
.reveal.delay-1 { transition-delay: .08s; }
.reveal.delay-2 { transition-delay: .16s; }
.reveal.delay-3 { transition-delay: .24s; }

/* Уважение к тем, кто не любит анимации */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.show { transition: none; transform: none; opacity: 1; }
}

/* Декоративный разделитель секций */
.section {
  position: relative;
}

.section::after {
  content: "❦";
  display: block;
  text-align: center;
  margin: 34px 0 0;
  opacity: 0.35;
  font-size: 22px;
  letter-spacing: 10px;
}

/* Лепестки в hero */
.hero { position: relative; overflow: hidden; }
.petal {
  position: absolute;
  top: -10vh;
  font-size: 18px;
  opacity: 0.22;
  animation: fall linear infinite;
  user-select: none;
  pointer-events: none;
}

@keyframes fall {
  0%   { transform: translate3d(var(--x), -10vh, 0) rotate(0deg); }
  100% { transform: translate3d(calc(var(--x) + 40px), 110vh, 0) rotate(220deg); }
}

@media (prefers-reduced-motion: reduce) {
  .petal { display: none; }
}

/* ===== RSVP: дополнительные гости (красивые поля) ===== */

#extra-guests-wrap {
  margin-top: 14px;
}

#extra-guests-wrap strong {
  display: block;
  margin-bottom: 10px;
}

.extra-guest-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

/* Стили инпутов в доп. гостях — повторяют форму */
.extra-guest-row input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.9);
  border-color: #9bb87a;
  font-size: 16px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.extra-guest-row input:focus {
  border-color: #9bb87a; 
  box-shadow: 0 0 0 4px rgba(155, 184, 122, 0.25);
}

/* На телефоне — в колонку */
@media (max-width: 768px) {
  .extra-guest-row {
    grid-template-columns: 1fr;
  }
}

/* ===== GLOBAL NEON THEME (#9bb87a) ===== */
:root{
  --neon: #9bb87a;
  --neon-strong: rgba(155,184,122,.55);
  --neon-mid: rgba(155,184,122,.32);
  --neon-soft: rgba(155,184,122,.18);
  --neon-ultra: rgba(155,184,122,.10);
}

/* Секции — тонкая неоновая линия-разделитель */
.section{
  position: relative;
}

.section::after{
  content:"";
  display:block;
  height: 2px;
  width: min(520px, 80%);
  margin: 34px auto 0;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  box-shadow: 0 0 16px var(--neon-soft);
  opacity: .9;
  border-radius: 999px;
}

/* Галерея: неоновая рамка на hover */
.gallery-item img{
  border-radius: 12px;
  transition: transform .25s ease, box-shadow .25s ease;
}

.gallery-item:hover img{
  box-shadow:
    0 0 18px rgba(155,184,122,.18),
    0 0 50px rgba(155,184,122,.10);
  transform: scale(1.01);
}

/* Яндекс карта рамка */
.map-wrap{
  box-shadow:
    0 0 0 1px rgba(155,184,122,.18),
    0 0 22px rgba(155,184,122,.10);
}

/* На случай: меньше анимаций у тех, кто их не любит */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; }
}

/* ===== Lightbox: красивое перелистывание ===== */
.lightbox-stage{
  position: relative;
  width: min(92vw, 980px);
  height: min(86vh, 720px);
  display: grid;
  place-items: center;
}

.lightbox-img{
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}

/* Анимации смены */
.lightbox-img.anim-out-left  { animation: lbOutLeft  .18s ease forwards; }
.lightbox-img.anim-out-right { animation: lbOutRight .18s ease forwards; }
.lightbox-img.anim-in-left   { animation: lbInLeft   .22s ease forwards; }
.lightbox-img.anim-in-right  { animation: lbInRight  .22s ease forwards; }

@keyframes lbOutLeft  { to { transform: translateX(-40px); opacity: 0; } }
@keyframes lbOutRight { to { transform: translateX( 40px); opacity: 0; } }
@keyframes lbInLeft   { from { transform: translateX( 40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes lbInRight  { from { transform: translateX(-40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Drag-свайп */
.lightbox.dragging .lightbox-img{
  transition: none !important;
  opacity: 1;
}

/* ===== FIX: lightbox controls + sizing ===== */
.lightbox-close,
.lightbox-nav{
  z-index: 2105; /* всегда выше картинки */
}

/* Сцена */
.lightbox-stage{
  position: relative;
  width: min(92vw, 980px);
  height: min(86vh, 720px);
  display: grid;
  place-items: center;
}

/* Картинка: никогда не растягиваем насильно */
.lightbox-img{
  width: auto !important;
  height: auto !important;
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
}

/* Чтобы на телефоне было легче попасть по крестику */
@media (max-width: 768px){
  .lightbox-close{
    top: 8px;
    right: 10px;
    font-size: 52px;
  }
}

/* FIX: фон шапки на телефонах */
@media (max-width: 768px), (hover: none) {
  .hero{
    background-attachment: scroll; /* вместо fixed */
    background-position: center;
    background-size: cover;
  }
}

/* RSVP: чекбоксы алкоголь */
.checkbox-group{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.checkbox-label{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(155,184,122,.28);
  background: rgba(255,255,255,0.9);
}

.checkbox-label input{
  width: 18px;
  height: 18px;
  accent-color: #9bb87a;
}

@media (max-width: 768px){
  .checkbox-group{ grid-template-columns: 1fr; }
}

/* ✅ Чекбокс и текст в одну линию (ровно "квадратик + текст") */
.checkbox-label{
  display: inline-flex;     /* чтобы выглядело как строка */
  align-items: center;      /* ровно по центру текста */
  gap: 14px;
  line-height: 1;           /* убираем прыжки baseline */
}

.checkbox-label input[type="checkbox"]{
  display: inline-block;
  vertical-align: middle;
  margin: 0;                /* важно */
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  accent-color: #9bb87a;
}

.checkbox-label span{
  display: inline-block;
  line-height: 1.2;         /* нормальная высота текста */
  .checkbox-label span{
  margin-left: 6px;
}
}