/*
Theme Name: Divi Montecatini Child
Theme URI: https://www.montecatinifestival.it
Description: Child theme di Divi per Montecatini Festival — branding istituzionale (Verde Terme + oro), header, footer e tipografia per la bacheca eventi dell'Associazione Free Music APS.
Author: CodyCloud Srls
Author URI: https://www.codycloud.it
Template: Divi
Version: 1.1.0
Text Domain: divi-montecatini-child
*/

:root {
	--mc-ink: #18302E;
	--mc-green: #0E5B54;
	--mc-green-dark: #0B3D3A;
	--mc-green-deep: #0A2C29;
	--mc-gold: #C79A3E;
	--mc-cream: #F6F2E9;
	--mc-line: #E6E0D3;
}

/* ============ GLOBAL TYPOGRAPHY ============ */
body {
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	background: var(--mc-cream);
	color: var(--mc-ink);
}
h1, h2, h3, h4, h5, h6,
.et_pb_module h1, .et_pb_module h2, .et_pb_module h3,
.entry-title, .footer-widget h4 {
	font-family: "Sora", "Inter", sans-serif;
	letter-spacing: -.01em;
}
a { color: var(--mc-green); }
a:hover { color: var(--mc-gold); }
::selection { background: rgba(199,154,62,.22); }

/* ============ HEADER ============ */
#main-header, .et-l--header {
	background: #ffffff;
	box-shadow: 0 6px 28px -18px rgba(11,61,58,.45);
	border-bottom: 1px solid var(--mc-line);
}
#logo { max-height: 62px; }
.et-fixed-header #logo { max-height: 48px; }
/* Menu */
#top-menu li a, .et-menu li a, .et_pb_menu .et-menu li a {
	color: var(--mc-ink) !important;
	font-family: "Sora", sans-serif;
	font-weight: 600;
	font-size: 15px;
}
#top-menu li a:hover, .et-menu li a:hover { color: var(--mc-gold) !important; opacity: 1; }
#top-menu li.current-menu-item > a,
#top-menu li.current_page_item > a,
.et-menu li.current-menu-item > a { color: var(--mc-green) !important; }
/* Underline accent on hover/active */
#top-menu > li { position: relative; }
#top-menu > li > a::after {
	content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px;
	background: var(--mc-gold); transition: right .25s ease;
}
#top-menu > li:hover > a::after,
#top-menu > li.current-menu-item > a::after { right: 0; }
/* Search icon removed from header */
#et_top_search, #et_search_icon, .et_search_form_container, li#et_search_icon { display: none !important; }
/* Mobile menu */
#et_mobile_nav_menu .mobile_nav .select_page { color: var(--mc-ink); }
.et_mobile_menu li a { color: var(--mc-ink); }
.et_mobile_menu { border-color: var(--mc-gold); }

/* ============ BUTTONS (Divi modules) ============ */
.et_pb_button, a.et_pb_button {
	background: var(--mc-green) !important;
	color: #fff !important;
	border: 2px solid var(--mc-green) !important;
	border-radius: 999px !important;
	padding: .7em 1.6em !important;
	font-family: "Sora", sans-serif !important;
	font-weight: 600 !important;
	transition: all .2s ease !important;
}
.et_pb_button:hover, a.et_pb_button:hover {
	background: var(--mc-gold) !important;
	border-color: var(--mc-gold) !important;
	color: #1a1206 !important;
}
.et_pb_button:after, .et_pb_button:before { color: #fff !important; }

/* ============ FOOTER ============ */
#main-footer, .et-l--footer { background: var(--mc-green-deep); }
#footer-widgets { padding: 76px 0 48px; }
#footer-widgets .footer-widget { color: rgba(246,242,233,.82); line-height: 1.65; }
.mc-foot-logo { max-width: 230px; height: auto; margin-bottom: 18px; }
.mc-foot-about { font-size: 14.5px; color: rgba(246,242,233,.78); }
.footer-widget h4, .mc-foot-title {
	color: var(--mc-gold) !important;
	font-family: "Sora", sans-serif; font-weight: 700;
	font-size: 1.05rem; text-transform: none; margin-bottom: 16px; padding-bottom: 0;
	border: none;
}
.footer-widget h4::after { display: none; }
.mc-foot-links, .mc-foot-contact { list-style: none; margin: 0; padding: 0; }
.mc-foot-links li, .mc-foot-contact li { margin-bottom: 10px; }
.mc-foot-links a { color: rgba(246,242,233,.85); text-decoration: none; transition: .18s; }
.mc-foot-links a:hover { color: var(--mc-gold); padding-left: 4px; }
.mc-foot-contact li { display: flex; gap: .55em; align-items: flex-start; font-size: 14.5px; }
.mc-foot-contact a { color: rgba(246,242,233,.9); }
.mc-foot-contact a:hover { color: var(--mc-gold); }
#footer-widgets .footer-widget li::before { display: none; }

/* Bottom bar + replace default credits */
#footer-bottom { background: rgba(0,0,0,.28); padding: 16px 0; }
#footer-bottom .container { position: relative; }
#footer-info { font-size: 0 !important; color: transparent; }
#footer-info a { font-size: 0 !important; }
#footer-info::after {
	content: "© Associazione Free Music APS · Montecatini Festival — Tutti i diritti riservati. Realizzato da CodyCloud.";
	font-size: 13px; color: rgba(246,242,233,.7); font-family: "Inter", sans-serif;
}
/* Hide default Divi social icons in footer (also disabled via Theme Options) */
#footer-bottom #et-footer-nav, #footer-bottom .et-social-icons { display: none; }

/* ============ PAGE TITLE polish ============ */
.page .entry-title, .single-evento .entry-title { font-family: "Sora", sans-serif; letter-spacing: -.02em; color: var(--mc-ink); }
/* Our shortcode pages have their own styled heading: hide Divi's redundant page
   title visually but keep it in the DOM as the page H1 (SEO/accessibility). */
.me-fullwidth .entry-title {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* Home hero already supplies a visible H1 — remove the duplicate entirely */
.home .entry-title, .home .et_pb_title_container, .home .et_post_meta_wrapper > h1 { display: none; }
.page-template-default .et_pb_post, .page-template-default #content-area { width: 100%; }
.mc-page .entry-content { max-width: none; }

/* Legal/policy readability (compliance plugin output) */
.spcp-policy, .spcp-policy-content, .entry-content .spcp-policy { max-width: 860px; margin-inline: auto; line-height: 1.7; }

/* Accessibility focus */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
	outline: 3px solid rgba(14,91,84,.5); outline-offset: 2px;
}

/* ============ RESPONSIVE (mobile / tablet) ============ */
/* Prevent any accidental horizontal scroll from full-bleed sections */
html, body { overflow-x: hidden; max-width: 100%; }

/* Tablet & mobile: smaller logo so it never crowds the hamburger */
@media (max-width: 980px) {
	#logo { max-height: 46px; }
	#footer-widgets { padding: 56px 0 36px; }
}
@media (max-width: 767px) {
	#logo { max-height: 42px; }
	/* Footer columns stack with clear separation */
	#footer-widgets .footer-widget { margin-bottom: 30px; text-align: left; }
	#footer-bottom { text-align: center; }
	#footer-info::after { font-size: 12px; }
}
/* Policy tables (cookie/privacy) scroll instead of overflowing on phones */
.entry-content table { max-width: 100%; }
@media (max-width: 680px) {
	.spcp-policy .spcp-table-wrap, .entry-content .wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.spcp-policy table, .entry-content table { font-size: .85rem; }
}

/* Remove big default top/bottom gap on our shortcode pages so sections breathe evenly */
/* Breathing room between page content and the footer */
.page-template-default #main-content .container { padding-top: 0; padding-bottom: 60px; }
/* Full-width rendering for our shortcode/HTML pages (tagged me-fullwidth) + single events.
   Inner sections keep their own max-width and center themselves. */
.single-evento #main-content > .container,
.me-fullwidth #main-content > .container { width: 100%; max-width: none; padding: 0 0 60px; }
