/*
 * Chara Tavern – site chrome for Divi 5.
 * Recreates the Joomla "Loyale" template (style 1 + custom CSS) around the
 * native Divi modules. Module-level styling (fonts, colours, spacing) is set
 * on the modules themselves and stays editable in the Visual Builder.
 */

:root {
	--chara-gold: #b1934a;
	--chara-gold-dark: #9c8140;
	--chara-sidebar-bg: rgba(148, 122, 60, 0.9);
	--chara-text: #444;
	--chara-dark: #1a1a1a;
	--chara-page-bg: #d9d9d9;
	--chara-sidebar-w: 270px;
	--chara-head-font: "Alegreya", Georgia, "Times New Roman", serif;
	--chara-body-font: "Lucida Sans Unicode", "Lucida Grande", "Segoe UI", Tahoma, sans-serif;
}

/* ---------- Base ---------------------------------------------------- */

body.chara-site {
	background: var(--chara-page-bg);
	color: var(--chara-text);
	font-family: var(--chara-body-font);
	font-size: 16px;
	line-height: 26px;
}

body.chara-site h1,
body.chara-site h2,
body.chara-site h3,
body.chara-site h4,
body.chara-site h5,
body.chara-site h6,
body.chara-site .et_pb_module_header {
	font-family: var(--chara-head-font);
	font-weight: 400;
}

body.chara-site a,
body.chara-site h1,
body.chara-site h2 {
	color: var(--chara-gold);
}

body.chara-site #page-container {
	padding-top: 0 !important;
}

.chara-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ---------- Fixed left sidebar (Theme Builder header) --------------- */

.chara-sidebar,
.et-l--header .chara-sidebar {
	background-color: var(--chara-sidebar-bg);
}

.chara-sidebar-col {
	text-align: center;
}

.chara-sidebar .et_pb_text,
.chara-sidebar .et_pb_text p {
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	padding-bottom: 0;
	margin-bottom: 0;
}

.chara-hline,
.chara-hline .et_pb_divider_internal {
	width: 10px !important;
	max-width: 10px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Vertical, centred menu – Alegreya 18px uppercase white, active item dark. */
.chara-sidebar-menu,
.chara-sidebar-menu .et_pb_menu_inner_container,
.chara-sidebar-menu .et_pb_menu__wrap {
	background: transparent !important;
	justify-content: center;
	width: 100%;
}

.chara-sidebar-menu .et-menu,
.chara-sidebar-menu nav > ul {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	padding: 0;
}

.chara-sidebar-menu .et-menu > li,
.chara-sidebar-menu nav > ul > li {
	padding: 0 !important;
	margin: 0 !important;
	line-height: 30px;
}

.chara-sidebar-menu .et-menu > li > a,
.chara-sidebar-menu nav > ul > li > a {
	padding: 0 !important;
	color: #fff !important;
	font-family: var(--chara-head-font);
	font-size: 18px;
	font-weight: 300;
	line-height: 30px;
	text-transform: uppercase;
	opacity: 1 !important;
}

.chara-sidebar-menu .et-menu > li > a:hover,
.chara-sidebar-menu .et-menu > li.current-menu-item > a,
.chara-sidebar-menu .et-menu > li.current_page_item > a,
.chara-sidebar-menu nav > ul > li.current-menu-item > a {
	color: #333 !important;
}

/* Language flags (Joomla mod_languages) */
.chara-lang-switcher {
	display: flex;
	justify-content: center;
	gap: 8px;
	list-style: none !important;
	margin: 0;
	padding: 0 !important;
}

.chara-lang-switcher li {
	list-style: none;
	line-height: 26px;
}

.chara-lang-switcher img {
	display: block;
	width: 18px;
	height: 12px;
	opacity: 0.75;
	transition: opacity 0.2s;
}

.chara-lang-switcher .current-lang img,
.chara-lang-switcher a:hover img {
	opacity: 1;
}

/* Social icons */
.chara-social-icons p {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 10px !important;
}

.chara-social {
	display: inline-block;
	width: 32px;
	height: 32px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	font-size: 0 !important;
	color: transparent !important;
	background: no-repeat center / 16px 16px;
	transition: background-color 0.2s;
}

.chara-social:hover {
	background-color: rgba(0, 0, 0, 0.15);
}

.chara-social-facebook {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M14 8.5V6.6c0-.9.6-1.1 1-1.1h2.6V1.6L14 1.5c-4 0-4.9 3-4.9 4.9v2.1H6.8v4h2.3v10h4.9v-10h3.3l.4-4H14z'/%3E%3C/svg%3E");
}

.chara-social-instagram {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 7a5 5 0 100 10 5 5 0 000-10zm0 8.2a3.2 3.2 0 110-6.4 3.2 3.2 0 010 6.4zM17.3 5.5a1.2 1.2 0 100 2.4 1.2 1.2 0 000-2.4zM12 2.2c2.7 0 3 0 4 .1 2.7.1 4 1.4 4.1 4.1.1 1 .1 1.4.1 4s0 3-.1 4c-.1 2.7-1.4 4-4.1 4.1-1 .1-1.4.1-4 .1s-3 0-4-.1c-2.7-.1-4-1.4-4.1-4.1-.1-1-.1-1.4-.1-4s0-3 .1-4C4 3.6 5.3 2.4 8 2.3c1-.1 1.3-.1 4-.1z'/%3E%3C/svg%3E");
}

.chara-copyright,
.chara-copyright p {
	color: #fff !important;
	line-height: 1.5 !important;
}

.chara-copyright a {
	color: #ffffff;
	opacity: 0.85;
}

/* Desktop: the header becomes the fixed 270px column of the Loyale design. */
@media (min-width: 981px) {
	.et-l--header {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		width: var(--chara-sidebar-w);
		z-index: 1000;
		overflow-x: hidden;
		overflow-y: auto;
		scrollbar-width: none;
	}

	.et-l--header .chara-sidebar {
		min-height: 100vh;
		display: flex;
		flex-direction: column;
	}

	.et-l--header .chara-sidebar-row {
		flex: 1 1 auto;
		display: flex;
		width: 100% !important;
	}

	.et-l--header .chara-sidebar-col {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		width: 100% !important;
		min-height: calc(100vh - 60px);
	}

	/* logo top · menu vertically centred · languages/social/copyright at the bottom */
	.et-l--header .chara-hline-menu,
	.et-l--header .chara-langs {
		margin-top: auto !important;
	}

	.chara-logo-mobile {
		display: none !important;
	}

	.chara-sidebar-menu .et_mobile_nav_menu {
		display: none !important;
	}

	.chara-sidebar-menu .et_pb_menu__menu {
		display: flex !important;
		justify-content: center;
	}

	/* Page sections already reserve 290px on the left (set on the Divi section). */
	.chara-page-section {
		background-attachment: fixed !important;
	}
}

/* Tablet / phone: compact top bar with the mobile logo + Divi hamburger. */
@media (max-width: 980px) {
	.et-l--header {
		position: relative;
		z-index: 1000;
	}

	.chara-logo-desktop,
	.chara-sidebar .chara-hline,
	.chara-sidebar .chara-copyright {
		display: none !important;
	}

	.et-l--header .chara-sidebar-col {
		display: grid !important;
		grid-template-columns: 1fr auto;
		grid-template-areas: "logo menu" "langs social";
		align-items: center;
		gap: 4px 12px;
	}

	.chara-logo-mobile { grid-area: logo; justify-self: start; }
	.chara-sidebar-menu { grid-area: menu; justify-self: end; width: auto; }
	.chara-langs { grid-area: langs; justify-self: start; }
	.chara-social-icons { grid-area: social; justify-self: end; }
	.chara-langs .chara-lang-switcher,
	.chara-social-icons p { justify-content: flex-start; margin: 0 !important; }

	.chara-sidebar-menu .et_mobile_nav_menu .mobile_menu_bar::before {
		color: #fff !important;
	}

	.chara-sidebar-menu .et_mobile_menu {
		background: #fff;
		border-top-color: var(--chara-gold) !important;
		left: auto;
		right: 0;
		width: min(320px, 90vw);
	}

	.chara-sidebar-menu .et_mobile_menu li a {
		color: var(--chara-dark) !important;
		font-family: var(--chara-head-font);
		text-transform: uppercase;
		text-align: center;
	}
}

/* ---------- Homepage hero slider ------------------------------------ */

.chara-hero-section,
.chara-hero-section .chara-hero-row,
.chara-hero-section .chara-hero-col {
	padding: 0 !important;
}

.chara-hero-slider,
.chara-hero-slider .et_pb_slides,
.chara-hero-slider .et_pb_slide {
	min-height: 100vh;
}

.chara-hero-slider .et_pb_slide {
	position: relative;
	padding: 0 !important;
}

/* white inset frame (".sequence .slide-overlay::after" in the Joomla custom CSS) */
.chara-hero-slider .et_pb_slide::after {
	content: "";
	position: absolute;
	inset: 30px 30px 30px calc(var(--chara-sidebar-w) + 30px);
	border: 3px solid rgba(255, 255, 255, 0.4);
	pointer-events: none;
	z-index: 1;
}

.chara-hero-slider .et_pb_container {
	height: 100vh !important;
	max-width: none !important;
	width: 100% !important;
}

.chara-hero-slider .et_pb_slider_container_inner {
	display: flex !important;
	align-items: flex-end;
	justify-content: flex-end;
	height: 100%;
	width: 100%;
}

.chara-hero-slider .et_pb_slide_description {
	width: auto !important;
	padding: 0 0 110px !important;
	text-align: right !important;
	z-index: 2;
	position: relative;
}

.chara-hero-slider .et_pb_slide_title:empty,
.chara-hero-slider .et_pb_slide_content:empty {
	display: none;
}

.chara-hero-slider .et_pb_button,
.chara-hero-slider .et_pb_more_button {
	background: var(--chara-gold) !important;
	border: 0 !important;
	border-radius: 0 !important;
	color: #fff !important;
	font-family: var(--chara-head-font) !important;
	font-size: 28px !important;
	line-height: 1.2 !important;
	letter-spacing: 0 !important;
	padding: 14px 28px !important;
	margin: 0 !important;
}

.chara-hero-slider .et_pb_button::after {
	display: none !important;
}

.chara-hero-slider .et_pb_button:hover {
	background: var(--chara-gold-dark) !important;
}

.chara-hero-slider .et-pb-controllers {
	bottom: 50px;
	z-index: 3;
}

.chara-hero-slider .et-pb-slider-arrows a {
	color: #fff;
	z-index: 3;
}

.chara-hero-slider .et-pb-active-slide {
	animation: chara-hero-in 1.2s ease-out both;
}

@keyframes chara-hero-in {
	from { opacity: 0.6; }
	to { opacity: 1; }
}

@media (min-width: 981px) {
	.chara-hero-slider .et_pb_slide_description {
		margin-right: 30px;
	}
}

@media (max-width: 980px) {
	.chara-hero-slider .et_pb_slide::after {
		inset: 15px;
	}
	.chara-hero-slider,
	.chara-hero-slider .et_pb_slides,
	.chara-hero-slider .et_pb_slide,
	.chara-hero-slider .et_pb_container {
		min-height: calc(100vh - 110px);
		height: calc(100vh - 110px) !important;
	}
	.chara-hero-slider .et_pb_slider_container_inner {
		align-items: center;
		justify-content: center;
	}
	.chara-hero-slider .et_pb_slide_description {
		padding: 0 20px !important;
		text-align: center !important;
	}
	.chara-hero-slider .et_pb_button {
		font-size: 20px !important;
	}
}

/* ---------- Inner pages --------------------------------------------- */

.chara-content-panel p {
	padding-bottom: 0;
	margin-bottom: 26px;
}

.chara-content-panel h1 {
	margin-bottom: 26px;
}

.chara-images-row .et_pb_column {
	margin-right: 0 !important;
}

.chara-map iframe {
	display: block;
}

/* Gallery: show all photos (Simple Image Gallery behaviour), lightbox on click. */
.chara-gallery .et_pb_gallery_item {
	display: block !important;
}

.chara-gallery .et_pb_gallery_pagination {
	display: none !important;
}

.chara-gallery .et_pb_gallery_image img {
	transition: transform 0.35s ease, opacity 0.35s ease;
}

.chara-gallery .et_pb_gallery_image:hover img {
	transform: scale(1.04);
	opacity: 0.9;
}

/* Menu/price list accordion (Joomla pagebreak "sliders") */
.chara-accordion .et_pb_toggle {
	background: #fff !important;
	border: 1px solid #e2e2e2 !important;
	padding: 0 !important;
	margin: 0 0 -1px !important;
}

.chara-accordion .et_pb_toggle_title,
.chara-accordion h5.et_pb_toggle_title,
.chara-accordion h3.et_pb_toggle_title {
	padding: 0 40px 0 15px !important;
	font-family: var(--chara-head-font) !important;
	font-size: 16px !important;
	line-height: 60px !important;
	color: #202020 !important;
}

.chara-accordion .et_pb_toggle_title::before {
	right: 15px !important;
	color: #202020 !important;
}

.chara-accordion .et_pb_toggle_open {
	background: #1f1f1f !important;
	border-color: #1f1f1f !important;
}

.chara-accordion .et_pb_toggle_open .et_pb_toggle_title,
.chara-accordion .et_pb_toggle_open .et_pb_toggle_title::before {
	color: #fff !important;
}

.chara-accordion .et_pb_toggle_content {
	background: #fff;
	padding: 26px 15px !important;
	text-align: center;
	margin: 0 -1px -1px;
}

.chara-accordion .et_pb_toggle_content h3 {
	font-size: 24px;
	line-height: 36px;
	color: var(--chara-dark);
	margin: 0 0 13px;
	padding: 0;
}

.chara-accordion .et_pb_toggle_content h4 {
	font-size: 18px;
	line-height: 30px;
	color: var(--chara-dark);
	margin: 0 0 26px;
	padding: 0;
}

.chara-accordion .et_pb_toggle_content hr {
	border: 0;
	border-top: 1px solid #eee;
	border-bottom: 1px solid #fff;
	margin: 26px 0;
	height: 0;
}

/* ---------- Back to top --------------------------------------------- */

body.chara-site .et_pb_scroll_top.et-pb-icon {
	background: #262626;
	color: #eee;
	border-radius: 0;
	right: 20px;
	bottom: 20px;
}

/* ---------- Accessibility -------------------------------------------- */

body.chara-site a:focus-visible,
body.chara-site button:focus-visible {
	outline: 2px solid var(--chara-gold);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.chara-hero-slider .et-pb-active-slide { animation: none; }
	.chara-gallery .et_pb_gallery_image img { transition: none; }
}
