/* Custom theme styles (Tailwind-friendly) */

:root {
	/* Header Height Variables (устанавливаются динамически через header-height.js) */
	--header-height: 80px; /* Значение по умолчанию, будет обновлено JS */
	--vh-without-header: calc(100vh - var(--header-height)); /* Высота viewport без хедера */
	
	/* Theme Colors */
	--color-primary: #d79a2b;
	--color-surface: #ffffff;
	--color-text: #0f172a;
	--color-muted: #475569;
	--shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.07);
	--container-max-width: 1280px;
}

/* ================================================
   CONTAINER SYSTEM
   ================================================ */

/* CSS Variables for Container Padding */
:root {
	--container-padding: 1rem; /* 16px - default */
}

@media (min-width: 640px) {
	:root {
		--container-padding: 1.5rem; /* 24px */
	}
}

@media (min-width: 768px) {
	:root {
		--container-padding: 2rem; /* 32px */
	}
}

@media (min-width: 1024px) {
	:root {
		--container-padding: 2.5rem; /* 40px */
	}
}

@media (min-width: 1280px) {
	:root {
		--container-padding: 3rem; /* 48px */
	}
}

/* Universal Container Class - центрированный контейнер с max-width */
.container {
	width: 100%;
	max-width: var(--container-max-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--container-padding);
	padding-right: var(--container-padding);
}

/* Fluid Container - полноширинный контейнер без max-width */
.container-fluid {
	width: 100%;
	padding-left: var(--container-padding);
	padding-right: var(--container-padding);
}

/* Container без отступов (для секций с background) */
.container-flush {
	width: 100%;
	max-width: var(--container-max-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: 0;
	padding-right: 0;
}

/* Fluid Container без отступов */
.container-fluid-flush {
	width: 100%;
	padding-left: 0;
	padding-right: 0;
}

/* Utility Classes - Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 0.75rem;
	transition: all 0.2s ease;
	cursor: pointer;
	border: none;
	font-size: 1rem;
	line-height: 1.5;
}

.btn-primary {
	background-color: var(--color-primary);
	color: #ffffff;
}

.btn-primary:hover {
	background-color: #c0891f;
	transform: translateY(-1px);
	box-shadow: 0 10px 20px rgba(215, 154, 43, 0.25);
}

.btn-secondary {
	background-color: #ffffff;
	color: var(--color-primary);
	border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
	background-color: var(--color-primary);
	color: #ffffff;
	transform: translateY(-1px);
}

.btn-outline {
	background-color: transparent;
	color: var(--color-text);
	border: 1px solid #e5e7eb;
}

.btn-outline:hover {
	background-color: #f8fafc;
	border-color: var(--color-primary);
	color: var(--color-primary);
}

.btn-sm {
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
}

.btn-lg {
	padding: 1rem 2rem;
	font-size: 1.125rem;
}

/* Utility Classes - Cards */
.card {
	background-color: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 1rem;
	padding: 1.5rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	transition: all 0.2s ease;
}

.card:hover {
	box-shadow: var(--shadow-soft);
	transform: translateY(-2px);
}

.card-body {
	padding: 1.5rem;
}

.card-header {
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid #e5e7eb;
	font-weight: 600;
	font-size: 1.125rem;
}

.card-footer {
	padding: 1rem 1.5rem;
	border-top: 1px solid #e5e7eb;
	background-color: #f8fafc;
	border-radius: 0 0 1rem 1rem;
}

/* Utility Classes - Sections */
.section {
	padding: 4rem 0;
}

.section-sm {
	padding: 2rem 0;
}

.section-lg {
	padding: 6rem 0;
}

.section-xl {
	padding: 8rem 0;
}

@media (max-width: 768px) {
	.section {
		padding: 2.5rem 0;
	}
	.section-lg {
		padding: 4rem 0;
	}
	.section-xl {
		padding: 5rem 0;
	}
}

/* Utility Classes - Grid Layouts */
.grid-2 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
}

.grid-3 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 2rem;
}

.grid-4 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
}

/* Utility Classes - Badges */
.badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: 0.5rem;
	background-color: #e0f2fe;
	color: #0369a1;
}

.badge-success {
	background-color: #dcfce7;
	color: #15803d;
}

.badge-warning {
	background-color: #fef3c7;
	color: #b45309;
}

.badge-danger {
	background-color: #fee2e2;
	color: #b91c1c;
}

/* Utility Classes - Typography */
.heading-1 {
	font-size: 3rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--color-text);
}

.heading-2 {
	font-size: 2.25rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--color-text);
}

.heading-3 {
	font-size: 1.875rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--color-text);
}

.text-lead {
	font-size: 1.25rem;
	line-height: 1.75;
	color: var(--color-muted);
}

@media (max-width: 768px) {
	.heading-1 {
		font-size: 2rem;
	}
	.heading-2 {
		font-size: 1.75rem;
	}
	.heading-3 {
		font-size: 1.5rem;
	}
	.text-lead {
		font-size: 1.125rem;
	}
}

body {
	background-color: #f8fafc;
	color: var(--color-text);
}

[x-cloak] {
	display: none !important;
}

.skip-link {
	position: absolute;
	left: -999px;
	top: auto;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	background: #111827;
	color: #ffffff;
	font-weight: 600;
	z-index: 100;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.skip-link:focus {
	left: 1rem;
	top: 1rem;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	clip: auto;
	overflow: visible;
}

/* Navigation */
#primary-menu,
#mobile-primary-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

#primary-menu {
	display: flex;
	align-items: center;
	gap: 2rem;
}

#primary-menu > li {
	position: relative;
}

#primary-menu a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.5rem 0;
	color: var(--color-muted);
	font-weight: 600;
	text-decoration: none;
	transition: color 0.15s ease, transform 0.15s ease;
}

#primary-menu a:hover,
#primary-menu a:focus {
	color: var(--color-primary);
}

#primary-menu li.current-menu-item > a,
#primary-menu li.current_page_item > a {
	color: var(--color-primary);
}

#primary-menu .sub-menu {
	position: absolute;
	top: 100%;
	right: 0;
	min-width: 14rem;
	margin-top: 0.35rem;
	background-color: #ffffff;
	border: 1px solid #e5e7eb;
	box-shadow: var(--shadow-soft);
	border-radius: 0.75rem;
	padding: 0.5rem 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
	z-index: 50;
}

#primary-menu li:hover > .sub-menu,
#primary-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

#primary-menu .sub-menu li {
	position: relative;
}

#primary-menu .sub-menu li a {
	display: block;
	padding: 0.5rem 1rem;
	color: var(--color-text);
	font-weight: 500;
	white-space: nowrap;
}

#primary-menu .sub-menu li a:hover,
#primary-menu .sub-menu li a:focus {
	background-color: #f8fafc;
	color: var(--color-primary);
}

#primary-menu .sub-menu .sub-menu {
	right: 100%;
	top: 0;
	margin-right: 0.25rem;
	margin-top: 0;
	left: auto;
}

/* Mobile navigation */
#mobile-primary-menu li {
	margin: 0;
}

#mobile-primary-menu li a {
	display: block;
	padding: 0.75rem 1rem;
	color: var(--color-text);
	font-weight: 600;
	text-decoration: none;
	border-radius: 0.75rem;
	transition: background-color 0.15s ease, color 0.15s ease;
}

#mobile-primary-menu li a:hover,
#mobile-primary-menu li a:focus {
	background-color: #f3f4f6;
	color: var(--color-primary);
}

#mobile-primary-menu li.current-menu-item > a,
#mobile-primary-menu li.current_page_item > a {
	background-color: #fef3e2;
	color: var(--color-primary);
}

#mobile-primary-menu .sub-menu {
	list-style: none;
	margin: 0.25rem 0 0.5rem;
	padding-left: 1rem;
	border-left: 2px solid #e5e7eb;
}

#mobile-primary-menu .sub-menu li a {
	padding: 0.5rem 1rem;
	font-size: 0.95rem;
}

.custom-logo {
	max-height: 62px;
	width: auto;
	height: auto;
}

/* Typography for post content */
.entry-content {
	color: var(--color-text);
	line-height: 1.75;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	color: #0f172a;
	font-weight: 700;
	line-height: 1.2;
	margin: 1.5rem 0 0.75rem;
}

.entry-content p {
	margin: 1rem 0;
	color: #0f172a;
}

.entry-content a {
	color: var(--color-primary);
	font-weight: 600;
	text-decoration: none;
}

.entry-content a:hover {
	text-decoration: underline;
}

.entry-content ul,
.entry-content ol {
	margin: 1rem 0 1rem 1.25rem;
	padding: 0;
	color: #0f172a;
}

.entry-content li + li {
	margin-top: 0.35rem;
}

.entry-content blockquote {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--color-primary);
	background: #fef3e2;
	border-radius: 0.75rem;
	color: #0f172a;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.entry-content th,
.entry-content td {
	padding: 0.75rem;
	border: 1px solid #e5e7eb;
}

.entry-content th {
	background: #f8fafc;
	text-align: left;
}

.entry-content code {
	background: #0f172a;
	color: #e0f2fe;
	border-radius: 0.4rem;
	padding: 0.15rem 0.4rem;
	font-size: 0.9rem;
}

.entry-content pre {
	background: #0f172a;
	color: #e2e8f0;
	border-radius: 1rem;
	padding: 1rem;
	overflow: auto;
}

.entry-content img {
	border-radius: 1rem;
}

/* Forms */
:where(input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
textarea,
select) {
	width: 100%;
	border: 1px solid #d1d5db;
	border-radius: 0.75rem;
	padding: 0.65rem 0.9rem;
	background-color: #ffffff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

:where(input:focus,
textarea:focus,
select:focus) {
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
	outline: none;
}

:where(button,
input[type="submit"],
input[type="button"]) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	background-color: var(--color-primary);
	color: #ffffff;
	padding: 0.65rem 1rem;
	border: none;
	border-radius: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

:where(button:hover,
input[type="submit"]:hover,
input[type="button"]:hover) {
	background-color: #c0891f;
	box-shadow: 0 10px 18px rgba(215, 154, 43, 0.22);
	transform: translateY(-1px);
}

:where(button:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible) {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

/* Widgets */
.widget {
	padding: 1.25rem;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 1rem;
	box-shadow: 0 5px 18px rgba(0, 0, 0, 0.04);
}

.widget-title {
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
	font-weight: 700;
	color: #0f172a;
}

.widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 0.4rem;
}

.widget a {
	color: #0f172a;
	text-decoration: none;
	font-weight: 600;
}

.widget a:hover {
	color: var(--color-primary);
}

/* Pagination / navigation */
.navigation {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.navigation .nav-links {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
}

.navigation .nav-previous,
.navigation .nav-next {
	flex: 1;
}

.navigation a {
	color: var(--color-primary);
	font-weight: 600;
	text-decoration: none;
}

.navigation a:hover {
	text-decoration: underline;
}

.navigation.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.75rem;
	border: 1px solid #e5e7eb;
	color: #0f172a;
	font-weight: 600;
}

.navigation.pagination .page-numbers.current {
	background: #d79a2b;
	border-color: #d79a2b;
	color: #ffffff;
}

.cat-links,
.tags-links,
.comments-link,
.edit-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.cat-links a,
.tags-links a,
.comments-link a,
.edit-link a {
	color: var(--color-primary);
	font-weight: 600;
	text-decoration: none;
}

.cat-links a:hover,
.tags-links a:hover,
.comments-link a:hover,
.edit-link a:hover {
	text-decoration: underline;
}

/* Comments */
.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1rem;
}

.comment-list .comment {
	padding: 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 1rem;
	background: #ffffff;
	box-shadow: 0 5px 18px rgba(0, 0, 0, 0.04);
}

.comment-metadata {
	font-size: 0.9rem;
	color: #64748b;
}

.comment-reply-link {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	margin-top: 0.5rem;
	font-weight: 600;
	color: var(--color-primary);
	text-decoration: none;
}

.comment-reply-link:hover {
	text-decoration: underline;
}

/* ================================================
   ПРИМЕРЫ ИСПОЛЬЗОВАНИЯ CSS ПЕРЕМЕННЫХ --header-height
   ================================================ */

/* Hero секция на всю высоту экрана минус хедер */
.hero-fullscreen {
	height: var(--vh-without-header);
	min-height: var(--vh-without-header);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Hero секция на 80% высоты экрана минус хедер */
.hero-large {
	height: calc(var(--vh-without-header) * 0.8);
	min-height: 600px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ================================================
   HERO SECTION STYLES
   ================================================ */

.hero-title {
	font-family: 'Roboto Serif', serif;
	font-size: clamp(3.5rem, 10vw, 7rem);
	font-weight: 700;
	text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero-status {
	text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.btn-book-now, .btn-hero {
	box-shadow: 0 4px 14px 0 rgba(209, 163, 49, 0.39);
}

.btn-hero {
	letter-spacing: 0.2em;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.animate-fade-in-up {
	animation: fadeInUp 0.8s ease-out forwards;
}

/* Adjusting header for transparency/blur as seen in screen */
.site-header {
	background-color: rgba(255, 255, 255, 0.7);
	backdrop-filter: blur(10px);
}

.main-navigation a {
	color: #333 !important;
	text-transform: uppercase;
	font-size: 0.85rem;
	letter-spacing: 0.05em;
}

/* ================================================
   ABOUT SECTION STYLES
   ================================================ */

.about-title {
	font-family: 'Roboto Serif', serif;
	line-height: 1.2;
}

.about-description {
	max-width: 600px;
}

.about-image img {
	transition: transform 0.3s ease;
}

.about-image img:hover {
	transform: scale(1.02);
}

/* ================================================
   FEATURES SECTION STYLES
   ================================================ */

.features-title {
	font-family: 'Roboto Serif', serif;
}

.features-text {
	max-width: 600px;
}

.features-highlight p {
	line-height: 1.6;
}

.feature-image img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* ================================================
   BEST FOODS SECTION STYLES
   ================================================ */

.best-foods-title {
	font-family: 'Roboto Serif', serif;
}

.menu-card {
	cursor: pointer;
}

.menu-card-title {
	font-family: 'Roboto Serif', serif;
}

.menu-card-content {
	z-index: 10;
}

.menu-card:hover .menu-card-image img {
	transform: scale(1.05);
	transition: transform 0.5s ease;
}

.menu-card-image img {
	transition: transform 0.5s ease;
}

.menu-card-time {
	justify-content: center;
}

.btn-menu {
	display: inline-block;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-menu:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	transform: translateY(-2px);
}

/* ================================================
   HAPPENINGS SECTION STYLES
   ================================================ */

.happenings-title {
	font-family: 'Roboto Serif', serif;
}

.happening-card {
	cursor: pointer;
}

.happening-card-title {
	font-family: 'Roboto Serif', serif;
}

.happening-image {
	position: relative;
	overflow: hidden;
}

.happening-description {
	line-height: 1.6;
}

/* ================================================
   RESERVATION SECTION STYLES
   ================================================ */

.reservation-title {
	font-family: 'Roboto Serif', serif;
}

.reservation-info p {
	line-height: 1.6;
}

.btn-reservation-circle {
	display: inline-block;
	position: relative;
}

.reservation-circle {
	position: relative;
	z-index: 2;
}

.reservation-lines {
	z-index: 1;
}

.btn-reservation-circle:hover .reservation-circle {
	box-shadow: 0 10px 30px rgba(209, 163, 49, 0.5);
}

/* ================================================
   FOOTER STYLES
   ================================================ */

.site-footer {
	background-color: #000000;
}

.footer-heading {
	font-weight: 600;
	letter-spacing: 0.05em;
}

.footer-column a:hover {
	color: #d79a2b;
}

.footer-bottom {
	background-color: rgba(0, 0, 0, 0.3);
}

/* Sticky элемент с учетом высоты хедера */
.sticky-below-header {
	position: sticky;
	top: var(--header-height);
	z-index: 40;
}

/* Отступ сверху равный высоте хедера */
.margin-top-header {
	margin-top: var(--header-height);
}

/* Padding сверху равный высоте хедера */
.padding-top-header {
	padding-top: var(--header-height);
}

/* Контент с учетом sticky хедера */
.content-with-fixed-header {
	padding-top: calc(var(--header-height) + 2rem);
}

/* Полноэкранный overlay с учетом хедера */
.fullscreen-overlay {
	position: fixed;
	top: var(--header-height);
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 45;
}

/* Модальное окно с центрированием с учетом хедера */
.modal-centered {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, calc(-50% + var(--header-height) / 2));
	z-index: 50;
}

/* Пример использования в медиа-запросах */
@media (max-width: 768px) {
	.hero-fullscreen {
		min-height: calc(var(--vh-without-header) - 2rem);
	}
}
