/* ==========================================================
   Modern CSS Theme for Le Gîte du Cheiron (giteducheiron.fr)
   ========================================================== */

:root {
	/* Color Palette (Preserving original warm & organic mountain theme) */
	--primary: #0F67A1;         /* Warm Deep Blue */
	--primary-hover: #0d547d;
	--primary-light: #eef7fc;
	--accent-green: #2e7d32;     /* Warm Forest Green */
	--bg-page: #8a9a7a;          /* Rich, warm organic olive green background */
	--bg-card: #ffffff;
	--text-main: #2d353c;        /* High-contrast soft dark grey */
	--text-muted: #5e6973;       /* Muted grey */
	--footer-bg: #0F1923;        /* Midnight Dark Blue */
	
	/* Layout & Effects */
	--radius: 12px;
	--radius-sm: 6px;
	--shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
	--shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.03);
	--transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Global Styles & Reset overrides */
body {
	background: var(--bg-page);
	font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--text-main);
	line-height: 1.6;
	margin: 0;
	padding: 10px 0;
	-webkit-font-smoothing: antialiased;
}

img, iframe, video, embed {
	max-width: 100%;
	height: auto;
}

#pageContent {
	width: 92%;
	max-width: 1140px;
	margin: 30px auto;
	box-shadow: var(--shadow);
	border-radius: var(--radius);
	overflow: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	color: var(--text-main);
	line-height: 1.3;
	margin-bottom: 0.5em;
}

/* Header & Banner Banner */
#pageHeader {
	height: auto;
	padding: 0;
	position: relative;
	background: var(--bg-card);
}

#pageLogo {
	display: block;
	position: relative;
	width: 100%;
	line-height: 0;
}

#pageLogo img {
	width: 100%;
	height: auto;
	max-height: 290px;
	object-fit: cover;
	display: block;
}

/* Language Toggles */
#pageLanguage {
	position: absolute;
	top: 15px;
	right: 20px;
	background: rgba(15, 25, 35, 0.85);
	backdrop-filter: blur(4px);
	padding: 4px;
	border-radius: 50px;
	z-index: 10;
	box-shadow: var(--shadow-sm);
}

#pageLanguage ul {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

#pageLanguage li a {
	display: inline-block;
	padding: 6px 16px;
	color: #ffffff;
	font-weight: 600;
	font-size: 1.2em;
	text-decoration: none;
	border-radius: 50px;
	transition: var(--transition);
}

#pageLanguage li.pageCurrent a {
	background: var(--primary);
	color: #ffffff;
	box-shadow: var(--shadow-sm);
}

#pageLanguage li a:hover:not(.pageCurrent a) {
	background: rgba(255, 255, 255, 0.2);
}

/* Header Navigation Bar */
#headerNavigation {
	width: 100%;
	background: var(--footer-bg);
	padding: 12px 20px;
	box-sizing: border-box;
}

.nav-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	margin: 0 auto;
}

.nav-brand a {
	text-decoration: none;
}

#headerNavigation h1 {
	font-family: 'Montserrat', sans-serif;
	font-weight: 800;
	font-size: 1.85em;
	color: #ffffff;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: block;
}

/* Hide Hamburger Menu Button on Desktop */
.mobile-menu-btn {
	display: none;
}

#headerNavigation ul {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

#headerNavigation li {
	margin: 0 5px;
}

#headerNavigation li a {
	display: block;
	padding: 10px 18px;
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 1.25em;
	color: #d1d5db;
	text-decoration: none;
	border-radius: var(--radius-sm);
	transition: var(--transition);
}

#headerNavigation li.pageCurrent a, 
#headerNavigation li a:hover {
	color: #ffffff;
	background: var(--primary);
}

#headerNavigation li.navigationBooking a {
	background: var(--accent-green);
	color: #ffffff;
}

#headerNavigation li.navigationBooking a:hover {
	background: #225e25;
}

/* Main Content Wrapper */
#content {
	background: var(--bg-card);
	padding: 40px;
	display: flex;
	flex-direction: column;
	gap: 40px;
	border-bottom: 1px solid #f0f0f0;
}

/* Introduction Text (Main Column) */
#introductionText {
	width: 100%;
	max-width: 100%;
	margin-bottom: 0;
}

#introductionText h2 {
	font-size: 2.4em;
	color: var(--text-main);
	border-bottom: 3px solid var(--primary);
	padding-bottom: 10px;
	display: inline-block;
	margin-bottom: 0.8em;
}

#introductionText p {
	font-size: 1.45em;
	margin: 0 0 1.2em;
	color: #374151;
	line-height: 1.7;
}

#introductionText a {
	color: var(--primary);
	text-decoration: underline;
	font-weight: 500;
	transition: var(--transition);
}

#introductionText a:hover {
	color: var(--primary-hover);
}

/* Lists (both legacy jq-list and standard markdown lists inside content) */
#introductionText ul {
	margin: 1.5em 0;
	padding-left: 20px;
	list-style: none;
}

#introductionText ul li {
	position: relative;
	font-size: 1.45em;
	margin-bottom: 0.8em;
	padding-left: 25px;
	color: #374151;
}

#introductionText ul li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--accent-green);
	font-weight: bold;
}

/* Prevent double-scaling font sizes when Markdown lists wrap contents in paragraph tags */
#introductionText li p {
	font-size: 1em !important;
	margin: 0;
	display: inline;
}

/* Prevent double-scaling font sizes on nested sub-lists (li li) */
#introductionText li li {
	font-size: 1em !important;
}

/* Use a subtle bullet for nested sub-lists instead of a green checkmark */
#introductionText ul li li::before {
	content: "•";
	color: var(--text-muted);
	font-size: 1.2em;
}

/* Sidebar Column styled as modern highlights section under content */
#info {
	background: #fcfdfb;
	border: 1px solid #e9eee8;
	padding: 30px;
	border-radius: var(--radius);
	width: 100%;
	box-sizing: border-box;
}

#info h2 {
	font-size: 1.4em;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--text-muted);
	margin-bottom: 20px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e9eee8;
}

#info ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

#info li {
	background: var(--bg-card);
	border: 1px solid #e2e8f0;
	border-radius: var(--radius);
	padding: 20px;
	display: flex;
	flex-direction: column; /* Modern vertical card components side-by-side */
	align-items: stretch;
	gap: 15px;
	box-shadow: var(--shadow-sm);
	transition: var(--transition);
}

#info li:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 20px rgba(0,0,0,0.06);
	border-color: #cbd5e1;
}

#info a.sidebar-thumb {
	display: block;
	width: 100%;
	height: 130px;
	border-radius: var(--radius-sm);
	overflow: hidden;
	margin-bottom: 0;
	flex-shrink: 0;
}

#info a.sidebar-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: var(--transition);
}

#info li:hover img {
	transform: scale(1.05);
}

.sidebar-card-content {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	justify-content: space-between;
}

#info h3 {
	font-size: 1.25em;
	margin: 5px 0;
	line-height: 1.3;
}

#info h3 a {
	color: var(--text-main);
	text-decoration: none;
}

#info .sidebar-desc {
	font-size: 1.05em;
	color: var(--text-muted);
	margin-bottom: 15px;
	line-height: 1.4;
}

#info a.sidebar-btn {
	display: block;
	width: 100%;
	box-sizing: border-box; /* Keeps the padding within the 100% width, preventing border overflows */
	background: var(--primary);
	color: #ffffff !important;
	text-align: center;
	text-decoration: none;
	font-weight: 600;
	font-size: 1em;
	padding: 8px 15px;
	border-radius: var(--radius-sm);
	transition: var(--transition);
	margin-top: auto; /* Push button to bottom of card */
	align-self: stretch;
}

#info a.sidebar-btn:hover {
	background: var(--primary-hover);
}

/* Home Section Interactive Grid */
#secondary-heading-container {
	grid-column: 1 / -1;
	margin-top: 10px;
}

#secondary-heading-container h2.secondary-heading {
	background: var(--primary);
	color: #ffffff;
	font-family: 'Montserrat', sans-serif;
	font-size: 1.6em;
	font-weight: 700;
	text-transform: none;
	padding: 12px 20px;
	margin: 0;
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-sm);
}

#location-info {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 280px 1fr; /* Sized to let the map take all remaining desktop space */
	gap: 40px;
	padding: 20px 0;
	border-top: 1px solid #f0f0f0;
}

#address-info h2 {
	font-size: 1.8em;
	color: var(--text-main);
	margin-bottom: 10px;
}

#address-info p {
	font-size: 1.4em;
	color: var(--text-muted);
	line-height: 1.6;
}

#map-container h2 {
	font-size: 1.4em;
	background: var(--footer-bg) !important;
	color: #ffffff;
	padding: 10px 15px;
	border-radius: var(--radius-sm);
	margin-bottom: 15px;
}

#map-container iframe {
	width: 100% !important;
	max-width: 100%;
	aspect-ratio: 1 / 1; /* Forces the map area to be perfectly square on all viewports */
	height: auto !important; /* Overrides iframe element's height attributes and mobile heights */
	border-radius: var(--radius-sm);
	border: 1px solid #e2e8f0;
	box-shadow: var(--shadow-sm);
}

#map-container small a {
	display: inline-block;
	margin-top: 8px;
	font-size: 1.1em;
	color: var(--primary);
	text-decoration: none;
}

#map-container small a:hover {
	text-decoration: underline;
}

/* Footer Section */
#footer {
	background: var(--footer-bg);
	padding: 40px 40px 60px;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	box-sizing: border-box;
}

#footer #contact {
	max-width: 400px;
}

#footer p#name a {
	font-family: 'Montserrat', sans-serif;
	font-size: 2em;
	font-weight: 700;
	color: #ffffff;
	text-decoration: none;
}

#footer p#address {
	font-size: 1.3em;
	color: #9ca3af;
	line-height: 1.6;
	margin-top: 15px;
}

#footer p#address a {
	color: var(--primary-light);
	text-decoration: none;
	font-weight: 500;
}

#footer p#address a:hover {
	text-decoration: underline;
}

#footer #footerNavigation {
	background: none;
	padding: 0;
	margin: 0;
}

#footer #footerNavigation ul {
	display: flex;
	gap: 15px;
	padding: 0;
	margin: 0;
	list-style: none;
}

#footer #footerNavigation li a {
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 1.25em;
	color: #9ca3af;
	text-decoration: none;
	transition: var(--transition);
}

#footer #footerNavigation li a:hover {
	color: #ffffff;
}

/* ==========================================================
   Modern Lightweight Slideshow Styles
   ========================================================== */
.modern-slideshow {
	position: relative;
	margin: 30px auto;
	width: 100%;
	max-width: 900px; /* Expands beautifully to match the primary column width */
	overflow: hidden;
	background: #000;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.slides-wrapper {
	position: relative;
	width: 100%;
}
.modern-slide {
	display: none;
	width: 100%;
	position: relative;
}
.modern-slide.active {
	display: block;
}
.modern-slide img {
	width: 100%;
	height: auto;
	display: block;
}
.modern-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	background: rgba(15, 25, 35, 0.8);
	backdrop-filter: blur(2px);
	color: #fff;
	padding: 12px 15px;
	font-size: 1.35em;
	box-sizing: border-box;
	text-align: center;
}
.modern-caption p {
	margin: 0;
	color: #fff !important;
	font-weight: 500;
}
.modern-prev, .modern-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(15, 25, 35, 0.6);
	backdrop-filter: blur(2px);
	color: #fff !important;
	padding: 12px 18px;
	font-size: 24px;
	font-weight: bold;
	text-decoration: none;
	cursor: pointer;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	user-select: none;
	z-index: 10;
	transition: var(--transition);
	margin: 0 10px;
}
.modern-next {
	right: 0;
}
.modern-prev {
	left: 0;
}
.modern-prev:hover, .modern-next:hover {
	background: var(--primary);
	transform: translateY(-50%) scale(1.05);
}
.modern-dots {
	text-align: center;
	padding: 15px;
	background: var(--footer-bg);
}
.modern-dot {
	cursor: pointer;
	height: 10px;
	width: 10px;
	margin: 0 5px;
	background-color: #4b5563;
	border-radius: 50%;
	display: inline-block;
	transition: var(--transition);
}
.modern-dot.active, .modern-dot:hover {
	background-color: var(--primary);
	transform: scale(1.2);
}

.modern-fullscreen-btn {
	position: absolute;
	top: 15px;
	right: 15px;
	z-index: 20;
	background: rgba(15, 25, 35, 0.65);
	backdrop-filter: blur(2px);
	color: #fff !important;
	border: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	transition: var(--transition);
	outline: none;
	box-shadow: var(--shadow-sm);
}
.modern-fullscreen-btn:hover {
	background: var(--primary);
	transform: scale(1.05);
}

/* Native Fullscreen API styling overrides */
.modern-slideshow:fullscreen {
	max-width: 100% !important;
	width: 100vw !important;
	height: 100vh !important;
	border-radius: 0 !important;
	margin: 0 !important;
	display: flex;
	flex-direction: column;
	background: #000;
	border: none !important;
	box-shadow: none !important;
}
.modern-slideshow:fullscreen .slides-wrapper {
	flex-grow: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	height: calc(100vh - 50px);
	overflow: hidden;
}
.modern-slideshow:fullscreen .modern-slide {
	width: 100%;
	height: 100%;
	display: none;
}
.modern-slideshow:fullscreen .modern-slide.active {
	display: flex;
	align-items: center;
	justify-content: center;
}
.modern-slideshow:fullscreen .modern-slide img {
	max-height: 100vh;
	max-width: 100vw;
	width: auto;
	height: auto;
	object-fit: contain;
	margin: 0 auto;
	box-shadow: none;
}
.modern-slideshow:fullscreen .modern-caption {
	display: none !important; /* Hide captions completely in fullscreen mode per user request */
}
.modern-slideshow:fullscreen .modern-dots {
	background: #000;
	border-top: 1px solid #111;
	padding: 15px 0;
	z-index: 10;
}
.modern-slideshow:fullscreen .modern-prev,
.modern-slideshow:fullscreen .modern-next {
	width: 56px;
	height: 56px;
	font-size: 28px;
}

/* ==========================================================
   Responsive & Mobile Friendly Styles
   ========================================================== */
@media (max-width: 900px) {
	* {
		box-sizing: border-box;
	}
	html, body {
		padding: 0;
		overflow-x: clip; /* Prevent horizontal scroll leak while allowing position: sticky to work */
	}
	#pageContent {
		width: 100%;
		max-width: 100%;
		margin: 0;
		border-radius: 0;
		box-shadow: none;
		overflow: visible; /* Allows position: sticky to function on mobile */
	}
	#pageHeader {
		padding: 0;
	}
	#pageLogo img {
		max-height: 180px;
	}
	#pageLanguage {
		top: 10px;
		right: 10px;
	}
	#pageLanguage li a {
		padding: 4px 12px;
		font-size: 1.1em;
	}
	#headerNavigation {
		position: sticky;
		top: 0;
		padding: 12px 20px;
		z-index: 1000;
		box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Subtle shadow when sticking */
	}
	.nav-container {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 100%;
	}
	#headerNavigation h1 {
		font-size: 1.4em; /* slightly smaller for mobile screens */
	}
	/* Show and Style Hamburger Toggle */
	.mobile-menu-btn {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		width: 24px;
		height: 18px;
		background: none;
		border: none;
		padding: 0;
		cursor: pointer;
		outline: none;
		z-index: 100;
	}
	.mobile-menu-btn span {
		display: block;
		width: 100%;
		height: 2px;
		background-color: #ffffff;
		border-radius: 2px;
		transition: var(--transition);
	}
	/* Hamburger morphing to X when menu is open */
	.menu-open .mobile-menu-btn span:nth-child(1) {
		transform: translateY(8px) rotate(45deg);
	}
	.menu-open .mobile-menu-btn span:nth-child(2) {
		opacity: 0;
	}
	.menu-open .mobile-menu-btn span:nth-child(3) {
		transform: translateY(-8px) rotate(-45deg);
	}
	/* Hidden Dropdown Nav Links on Mobile */
	#headerNavigation ul {
		display: none; /* Hidden by default */
		flex-direction: column;
		gap: 8px;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0; /* Align perfectly with borders to prevent horizontal overflow */
		width: auto; /* Overrides 100% */
		background: var(--footer-bg);
		padding: 15px 20px;
		box-sizing: border-box;
		border-top: 1px solid #1f2937;
		z-index: 99;
		box-shadow: 0 10px 20px rgba(0,0,0,0.15);
	}
	/* Show dropdown on menu toggle */
	.menu-open #navLinks {
		display: flex;
	}
	#headerNavigation li {
		margin: 0;
		width: 100%;
	}
	#headerNavigation li a {
		text-align: left;
		padding: 12px 10px;
		font-size: 1.3em;
		border-radius: 4px;
	}
	#content {
		padding: 25px 15px;
		grid-template-columns: 1fr;
		gap: 30px;
	}
	#introductionText h2 {
		font-size: 2.1em;
		width: 100%;
		text-align: center;
	}
	#introductionText p {
		font-size: 1.35em;
	}
	#info {
		padding: 20px 15px;
	}
	#info ul {
		display: flex;
		flex-direction: column;
		gap: 15px;
	}
	#info li {
		padding: 15px;
	}
	#info a.sidebar-thumb {
		width: 100%;
		height: 120px;
	}
	#info h3 {
		font-size: 1.2em;
	}
	#info .sidebar-desc {
		font-size: 1em;
	}
	#location-info {
		grid-template-columns: 1fr;
		gap: 30px;
	}
	#map-container iframe {
		aspect-ratio: 1 / 1; /* Keep it square on mobile displays */
		height: auto !important;
	}
	#footer {
		padding: 30px 15px;
		flex-direction: column;
		align-items: center;
		gap: 30px;
	}
	#footer #contact {
		text-align: center;
	}
	#footer p#name a {
		font-size: 1.8em;
	}
	#footer #footerNavigation ul {
		flex-wrap: wrap;
		justify-content: center;
		gap: 10px;
	}
	#footer #footerNavigation li a {
		font-size: 1.2em;
	}
}
