:root {
	--green-dark: #3B5336;
	--green-light: #8FA882;
	--beige: #F5EBE6;
	--beige-dark: #D7C4B7;
	--pink: #E3B7B3;
	--brown: #5C4033;
	--text-color: #4A4A4A;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'Montserrat', sans-serif;
	color: var(--text-color);
	background-color: var(--beige);
	line-height: 1.6;
	overflow-x: hidden;
}

.container {
	width: 100%;
	max-width: 800px;
	margin: 0 auto;
	padding: 0 20px;
}

h2 {
	font-family: 'Caveat', cursive;
	font-size: 3rem;
	color: var(--green-dark);
	text-align: center;
	margin-bottom: 20px;
}

.floral-decor {
	font-size: 1.5rem;
	margin-bottom: 10px;
	text-align: center;
	opacity: 0.8;
}

/* Изолированные контент-секции */
.welcome-text-section, .calendar-section, .countdown-section, .timeline-section, .dresscode-section, .rsvp-section {
	position: relative;
	z-index: 5;
}

/* Главный экран */
.hero {
	position: relative;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
	color: #fff;
	z-index: 1;
}

.hero-slideshow {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.slide {
	position: absolute;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transition: opacity 1.5s ease-in-out;
}

.slide.active {
	opacity: 1;
}

.hero-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(59, 83, 54, 0.4);
	z-index: 2;
}

.hero-content {
	position: relative;
	z-index: 3;
	padding: 20px;
}

.hero h1 {
	font-family: 'Caveat', cursive;
	font-size: 4.5rem;
	margin-bottom: 10px;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-date {
	font-size: 1.8rem;
	letter-spacing: 3px;
	margin-bottom: 15px;
}

.hero-subtitle {
	font-size: 1.2rem;
	margin-bottom: 30px;
}

/* Кнопки */
.btn {
	display: inline-block;
	padding: 12px 30px;
	background-color: var(--pink);
	color: var(--brown);
	text-decoration: none;
	border-radius: 25px;
	font-weight: 600;
	transition: all 0.3s ease;
	border: none;
	cursor: pointer;
}

.btn:hover {
	background-color: var(--green-light);
	color: white;
	transform: translateY(-2px);
}

/* Текстовый блок */
.welcome-text-section {
	padding: 80px 0 40px 0;
	background-color: white;
	text-align: center;
}

.text-container {
	max-width: 650px;
}

.welcome-paragraph {
	font-size: 1.1rem;
	margin-bottom: 20px;
}

.font-highlight {
	font-family: 'Caveat', cursive;
	font-size: 2.2rem;
	color: var(--green-dark);
	margin: 25px 0;
}

.wedding-details {
	background-color: var(--beige);
	padding: 20px;
	border-radius: 12px;
	margin-top: 30px;
	border-left: 4px solid var(--green-light);
	text-align: left;
	display: inline-block;
}

/* Календарь */
.calendar-section {
	padding: 40px 0 60px 0;
	text-align: center;
	background-color: white;
}

.calendar-subtitle {
	font-size: 1.4rem;
	font-weight: 600;
	color: var(--brown);
	margin-bottom: 20px;
	text-transform: uppercase;
	letter-spacing: 2px;
}

.calendar-wrapper {
	max-width: 350px;
	margin: 0 auto;
	background-color: var(--beige);
	padding: 20px;
	border-radius: 15px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	font-weight: 600;
	color: var(--green-dark);
	margin-bottom: 10px;
}

.calendar-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	row-gap: 12px;
}

.calendar-days div {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	position: relative;
}

.calendar-days div.wedding-day {
	color: white;
	font-weight: bold;
	z-index: 1;
}

.calendar-days div.wedding-day::before {
	content: "❤";
	position: absolute;
	font-size: 2.6rem;
	color: var(--pink);
	z-index: -1;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

/* Таймер */
.countdown-section {
	padding: 60px 20px;
	background-color: white;
	text-align: center;
}

.timer {
	display: flex;
	justify-content: center;
	gap: 20px;
	margin-top: 30px;
}

.timer-item {
	background: var(--beige);
	padding: 15px 20px;
	border-radius: 10px;
	min-width: 80px;
}

.timer-item span {
	font-size: 2rem;
	font-weight: 600;
	color: var(--green-dark);
}

/* Расписание */
.timeline-section {
	padding: 80px 0;
	background-color: var(--beige);
}

.days-switcher {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-bottom: 40px;
}

.day-btn {
	padding: 10px 25px;
	font-family: 'Montserrat', sans-serif;
	font-size: 1rem;
	font-weight: 600;
	border: 2px solid var(--green-light);
	background: transparent;
	color: var(--green-dark);
	border-radius: 20px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.day-btn.active, .day-btn:hover {
	background-color: var(--green-dark);
	color: white;
	border-color: var(--green-dark);
}

.timeline-container {
	display: none;
}
.timeline-container.active {
	display: block;
}

.timeline {
	position: relative;
	max-width: 700px;
	margin: 0 auto;
	padding-left: 50px;
}

.timeline::before {
	content: '';
	position: absolute;
	left: 20px;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--green-light);
}

.timeline-item {
	position: relative;
	margin-bottom: 40px;
}

.timeline-icon {
	position: absolute;
	left: -50px;
	width: 40px;
	height: 40px;
	background: white;
	border: 2px solid var(--pink);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	z-index: 2;
}

.timeline-content {
	background: white;
	padding: 20px;
	border-radius: 12px;
	box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Дресс-код */
.dresscode-section {
	padding: 80px 0;
	background-color: var(--beige-dark);
	text-align: center;
}

.dresscode-intro {
	margin-bottom: 40px;
}

.dresscode-days {
	display: flex;
	gap: 30px;
	justify-content: center;
	flex-wrap: wrap;
}

.dresscode-day-card {
	background: white;
	padding: 30px;
	border-radius: 15px;
	flex: 1;
	min-width: 280px;
	max-width: 450px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.style-name {
	font-weight: 600;
	color: var(--brown);
	margin-bottom: 15px;
	font-style: italic;
}

.palette-title {
	margin: 20px 0 10px 0;
	font-weight: 600;
}

.color-palette {
	display: flex;
	justify-content: center;
	gap: 12px;
}

.color-circle {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	position: relative;
}

.color-circle::after {
	content: attr(data-color);
	position: absolute;
	bottom: -22px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 0.7rem;
	opacity: 0;
	transition: opacity 0.3s;
	color: var(--brown);
}

.color-circle:hover::after {
	opacity: 1;
}

.folk-style-description {
	text-align: left;
}
.folk-style-description p {
	margin-bottom: 10px;
	font-size: 0.95rem;
}

/* Анкета RSVP */
.rsvp-section {
	padding: 80px 0;
	background-color: white;
}

.form-container {
	background-color: #f5f5f5;
	padding: 40px;
	border-radius: 15px;
}

.form-group {
	margin-bottom: 25px;
}

label {
	display: block !important;
	margin-bottom: 10px;
	font-weight: 600;
	color: var(--green-dark);
}

input[type="text"] {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--beige-dark);
	border-radius: 8px;
}

.radio-group, .checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.radio-label, .checkbox-label {
	display: flex !important;
	align-items: center !important;
	gap: 12px;
	font-weight: 400;
	cursor: pointer;
}

input[type="checkbox"], input[type="radio"] {
	width: 20px;
	height: 20px;
	cursor: pointer;
	accent-color: var(--green-dark);
}

.btn-submit {
	width: 100%;
	background-color: var(--green-dark);
	color: white;
}

.hidden-message {
	display: none;
	text-align: center;
	color: var(--green-dark);
	font-size: 1.2rem;
	font-weight: 600;
}

footer {
	padding: 40px 0;
	background-color: var(--green-dark);
	color: var(--beige);
	text-align: center;
	font-family: 'Caveat', cursive;
	font-size: 2rem;
}

/* Полное решение проблемы некликабельности анимированных блоков */
.reveal {
	opacity: 0;
	transform: translateY(30px);
	transition: all 0.8s ease-out;
	pointer-events: none; /* Пропускает клики, пока элемент скрыт */
}

/* Когда блок докручен и стал активным */
.reveal.active {
	opacity: 1 !important;
	transform: translateY(0) !important;
	pointer-events: auto !important; /* Полностью возвращает кликабельность */
}
}

@media (max-width: 768px) {
	/* Заголовки */
	.hero h1 {
		font-size: 3rem;
	}
	h2 {
		font-size: 2.3rem;
	}
	
	/* Секции и контейнеры */
	.welcome-text-section {
		padding: 50px 0 30px 0;
	}
	.timeline-section, .dresscode-section, .rsvp-section {
		padding: 50px 0;
	}
	.container {
		padding: 0 15px; /* Уменьшаем боковые отступы, освобождая место */
	}

	/* Таймер обратного отсчета (Фикс съезжающих букв) */
	.timer {
		gap: 6px; /* Немного уменьшаем зазор между карточками на мобильных */
		padding: 0;
		max-width: 100%;
	}
	.timer-item {
		padding: 8px 2px; /* Минимальные отступы внутри карточки, чтобы тексту было просторно */
		min-width: 0; /* Разрешаем элементам гибко сжиматься */
		flex: 1; 
	}
	.timer-item span {
		font-size: 1.5rem; /* Оптимальный размер цифр для экранов смартфонов */
		display: block;
	}
	/* Таргетируем именно тег p, который используется в HTML */
	.timer-item p {
		font-size: 0.7rem !important; /* Уменьшаем шрифт, чтобы слова «секунд», «минут» гарантированно влезали в одну строку */
		white-space: nowrap; /* Запрещаем перенос букв на новую строку */
		letter-spacing: -0.3px; /* Слегка сжимаем расстояние между буквами для надежности */
		margin: 0;
	}

	/* Расписание (Программа) */
	.timeline {
		padding-left: 35px; /* Сдвигаем линию левее, чтобы контент не зажимался */
	}
	.timeline::before {
		left: 15px;
	}
	.timeline-icon {
		left: -45px;
		width: 34px;
		height: 34px;
		font-size: 1rem;
	}
	.timeline-content {
		padding: 15px;
	}
	.timeline-content h3 {
		font-size: 1rem;
	}

	/* Дресс-код */
	.dresscode-days {
		flex-direction: column;
		align-items: center;
		gap: 20px;
	}
	.dresscode-day-card {
		width: 100%;
		max-width: 100%;
		padding: 20px;
	}
	.folk-style-description {
		text-align: center;
	}
	.color-palette {
		gap: 8px;
	}
	.color-circle {
		width: 42px;
		height: 42px;
	}

	/* Анкета RSVP (Подложка) */
	.form-container {
		padding: 25px 15px;
	}
}

/* Дополнительный фикс для совсем маленьких экранов (смартфоны до 375px) */
@media (max-width: 360px) {
	.hero h1 {
		font-size: 2.5rem;
	}
	.timer-item {
		min-width: 55px;
	}
	.timer-item span {
		font-size: 1.3rem;
	}
}

/* ==========================================
   ФИКСЫ И КЛИКАБЕЛЬНОСТЬ ЭЛЕМЕНТОВ
   ========================================== */

/* Принудительно возвращаем кликабельность всем интерактивным элементам */
.rsvp-section form,
.rsvp-section input,
.rsvp-section label,
.rsvp-section button {
	pointer-events: auto !important;
	cursor: pointer;
}

/* Возвращаем обычный текстовый курсор для поля ввода имени */
.rsvp-section input[type="text"] {
	cursor: text;
}

/* Кнопка музыкального плеера */
.music-btn {
	position: fixed;
	bottom: 25px;
	right: 25px;
	width: 50px;
	height: 50px;
	background-color: white;
	border: 2px solid var(--green-light);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.3rem;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
	cursor: pointer;
	z-index: 99999;
	transition: all 0.3s ease;
	pointer-events: auto !important;
}

.music-btn:hover {
	transform: scale(1.1);
	background-color: var(--beige);
}

/* Эффект пульсации, когда музыка играет */
.music-btn.playing {
	animation: pulse 2s infinite;
	background-color: var(--green-light);
	border-color: var(--green-dark);
}

@keyframes pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(143, 168, 130, 0.5);
	}
	70% {
		box-shadow: 0 0 0 10px rgba(143, 168, 130, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(143, 168, 130, 0);
	}
}

/* Разрешаем клики внутри секции анкеты и фрейма */
.rsvp-section,
.rsvp-section iframe,
.rsvp-section div {
	pointer-events: auto !important;
}

/* Принудительно отображаем секцию анкеты */
.rsvp-section.reveal {
	opacity: 1 !important;
	transform: none !important;
	pointer-events: auto !important;
}

.rsvp-section iframe {
	width: 100% !important;
	pointer-events: auto !important;
}

/* Поднимаем текстовые блоки над фоном, если он будет использоваться */
.welcome-text-section,
.calendar-section,
.dresscode-section,
.rsvp-section,
.countdown-section,
.timeline-section {
	position: relative;
	z-index: 2;
}