/* ==========================================================================
   Aranciablu – stile del tema
   Valori ripresi dal vecchio tema ed-school (opzioni Redux + child CSS).
   ========================================================================== */

:root {
	--ab-text: #6c83a2;
	--ab-heading: #2d1d54;
	--ab-menu: #0f2a5b;
	--ab-accent: #2690b1;
	--ab-accent-2: #e6be1e;
	--ab-link-hover: #fcc92f;
	--ab-orange: #f95800;
	--ab-orange-2: #ff6600;
	--ab-green: #9acd32;
	--ab-purple: #9f2b68;
	--ab-blue: #244585;
	--ab-dark: #221c35;
	--ab-container: 1280px;
	--ab-header-h: 89px;
	--ab-font-body: "Inter", system-ui, sans-serif;
	--ab-font-head: "Montserrat", system-ui, sans-serif;
	--ab-admin-bar: 0px;
}
.admin-bar { --ab-admin-bar: 32px; }
@media (max-width: 782px) { .admin-bar { --ab-admin-bar: 46px; } }

/* --- Base ---------------------------------------------------------------- */
body {
	font-family: var(--ab-font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--ab-text);
	background: #fff;
}
a { color: var(--ab-heading); transition: color .2s; }
a:hover, a:focus, a:active { color: var(--ab-link-hover); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ab-font-head);
	font-weight: 500;
	color: var(--ab-heading);
}
h1 { font-size: 44px; line-height: 45px; margin: 25px 0 15px; }
h2 { font-size: 34px; line-height: 43px; margin: 22px 0 15px; }
h3 { font-size: 30px; line-height: 37px; margin: 22px 0 12px; }
h4 { font-size: 20px; line-height: 30px; margin: 20px 0 12px; }
h5 { font-size: 16px; line-height: 26px; margin: 15px 0 10px; }
h6 { font-size: 14px; line-height: 24px; margin: 15px 0 20px; }

.ab-container {
	max-width: var(--ab-container);
	margin-inline: auto;
}
.ab-content { padding: 20px; }
/* Le pagine col modello predefinito nel vecchio tema occupavano 3/4 del contenitore. */
@media (min-width: 768px) {
	.ab-content--page { width: 75%; }
	.page-id-413 .ab-content--page { width: 100%; } /* Media: galleria a tutta larghezza */
}
.page-id-413 .gallery-item img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}
.ab-home { overflow-x: clip; }

/* Hero home (ex Slider Revolution): stesse altezze della griglia dello slider
   (desktop 572px · ≤1239px 1240×768 · ≤1023px 778×960 · ≤777px 480×720, in proporzione alla larghezza).
   Il riquadro col titolo, come nello slider, compare solo su desktop. */
@media (max-width: 1239px) {
	.ab-hero > .elementor-container { min-height: 61.9vw !important; }
	.ab-hero .ab-hero-box { display: none; }
}
@media (max-width: 1023px) {
	.ab-hero > .elementor-container { min-height: 123.4vw !important; }
}
@media (max-width: 777px) {
	.ab-hero > .elementor-container { min-height: 150vw !important; }
}

/* Sezioni Elementor "estese": 20px di margine ai lati come nel vecchio tema. */
.elementor-section.elementor-section-boxed.elementor-section-stretched > .elementor-container {
	width: calc(100% - 40px);
}

/* --- Header -------------------------------------------------------------- */
.ab-header {
	position: sticky;
	top: var(--ab-admin-bar);
	z-index: 999;
	background: #fff;
	border-bottom: 1px solid #eee;
}
.ab-header__inner {
	display: flex;
	align-items: center;
	min-height: calc(var(--ab-header-h) - 1px);
	padding: 5px 20px;
}
.ab-header__logo img,
.ab-header__logo .custom-logo {
	display: block;
	height: 70px;
	width: auto;
}
.ab-header__sitename {
	font-family: var(--ab-font-head);
	font-weight: 700;
	font-size: 20px;
	text-decoration: none;
}

.ab-nav { margin-left: auto; }
.ab-menu,
.ab-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ab-menu { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.ab-menu > li { position: relative; }
.ab-menu a {
	display: block;
	font-family: var(--ab-font-head);
	font-size: 12px;
	font-weight: 600;
	line-height: 15px;
	color: var(--ab-menu);
	text-decoration: none;
}
.ab-menu > li > a {
	position: relative;
	padding: 10px 10px 10px 0;
	margin: 0 8px;
}
/* Tra 1101 e 1300px il menu si compatta per restare su una riga. */
@media (min-width: 1101px) and (max-width: 1300px) {
	.ab-menu > li > a { margin: 0 4px; padding-right: 8px; font-size: 11px; }
}
.ab-menu > li.menu-item-has-children > a::after {
	content: "";
	position: absolute;
	right: 0;
	top: 50%;
	margin-top: -2px;
	border: 4px solid transparent;
	border-top-color: currentColor;
	border-bottom: 0;
}
.ab-menu > li > a:hover,
.ab-menu > .current-menu-item > a,
.ab-menu > .current-menu-ancestor > a { color: var(--ab-menu); opacity: .75; }

.ab-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 12px;
	min-width: 220px;
	padding: 6px 0;
	background: #fff;
	box-shadow: 0 10px 30px rgba(15, 42, 91, .12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .18s, transform .18s, visibility .18s;
}
.ab-menu .sub-menu .sub-menu { top: -6px; left: 100%; }
.ab-menu li:hover > .sub-menu,
.ab-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.ab-menu .sub-menu li { position: relative; }
.ab-menu .sub-menu a { padding: 10px 13px; }
.ab-menu .sub-menu a:hover,
.ab-menu .sub-menu .current-menu-item > a {
	background: var(--ab-orange);
	color: #fff;
}

.ab-burger {
	display: none;
	margin-left: auto;
	width: 44px;
	height: 44px;
	padding: 10px;
	border: 0;
	background: none;
	cursor: pointer;
}
.ab-burger span:not(.screen-reader-text) {
	display: block;
	height: 2px;
	margin: 5px 0;
	background: #000;
	transition: transform .2s, opacity .2s;
}
.ab-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ab-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ab-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.ab-burger:hover span:not(.screen-reader-text) { background: #999; }

.ab-submenu-toggle { display: none; }

@media (max-width: 767px) {
	.ab-header__inner { min-height: 77px; }
	.ab-header__logo img,
	.ab-header__logo .custom-logo { height: 58px; }
}
@media (max-width: 1100px) {
	.ab-burger { display: block; }
	.ab-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		max-height: calc(100vh - var(--ab-header-h) - var(--ab-admin-bar));
		overflow-y: auto;
		background: #fff;
		border-top: 1px solid #eee;
		box-shadow: 0 20px 30px rgba(0, 0, 0, .08);
		display: none;
	}
	.ab-nav.is-open { display: block; }
	.ab-menu { display: block; }
	.ab-menu li { border-bottom: 1px solid #f1f1f1; }
	.ab-menu a,
	.ab-menu > li > a {
		margin: 0;
		padding: 14px 56px 14px 20px;
		font-size: 13px;
		color: #000;
	}
	.ab-menu > li.menu-item-has-children > a::after { display: none; }
	.ab-menu .sub-menu {
		position: static;
		min-width: 0;
		padding: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		display: none;
		background: #fafafa;
	}
	.ab-menu .sub-menu a { padding-left: 36px; }
	.ab-menu .sub-menu .sub-menu a { padding-left: 52px; }
	.ab-menu li.is-open > .sub-menu { display: block; }
	.ab-submenu-toggle {
		display: block;
		position: absolute;
		top: 0;
		right: 0;
		width: 52px;
		height: 43px;
		border: 0;
		background: none;
		cursor: pointer;
	}
	.ab-submenu-toggle::before {
		content: "";
		display: block;
		margin: auto;
		border: 5px solid transparent;
		border-top-color: #000;
		border-bottom: 0;
		transition: transform .2s;
	}
	li.is-open > .ab-submenu-toggle::before { transform: rotate(180deg); }
}

/* --- Barra titolo -------------------------------------------------------- */
.wh-page-title-bar {
	min-height: 50vh;
	background-color: transparent;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	border-bottom: 1px solid #e1e1e1;
}
.wh-page-title-wrapper { padding: 5px 15px 60px 20px; }
.page-title {
	display: inline-block;
	width: 50%;
	margin: 60px 0 10px;
	padding: 30px 35px;
	font-family: var(--ab-font-head);
	font-size: 44px;
	font-weight: 600;
	line-height: 54px;
	color: #fff;
	background: rgba(255, 125, 0, .53);
}
.page-title::after {
	content: "";
	display: block;
	width: 0;
	height: 0;
	margin-top: 10px;
	border-left: 9px solid transparent;
	border-right: 9px solid transparent;
	border-top: 10px solid currentColor;
}
.wh-breadcrumbs,
.wh-breadcrumbs a,
.wh-page-title-bar .entry-meta,
.wh-page-title-bar .entry-meta a { color: #fff; font-size: 14px; }
.wh-page-title-bar .entry-meta span + span::before { content: " · "; }

@media (max-width: 600px) {
	.page-title {
		width: 100%;
		font-size: 30px;
		line-height: 40px;
	}
}

/* Pagine "Card corsi" */
.page-template-template-course-cards .wh-page-title-bar {
	min-height: 30vh;
	background-color: var(--ab-dark);
}
.page-template-template-course-cards .ab-content { padding-left: 20px; padding-right: 20px; }

/* Colori titolo per sezione (ripresi dal vecchio child theme) */
.page-id-424 .page-title, .page-id-2596 .page-title, .page-id-403 .page-title,
.page-id-413 .page-title, .page-id-411 .page-title { background: #f75a00; }
.page-id-1174 .page-title, .page-id-1114 .page-title, .page-id-1964 .page-title { background: var(--ab-orange-2); }
.page-id-1599 .page-title, .page-id-1885 .page-title { background: var(--ab-green); }
.page-id-1882 .page-title, .page-id-1939 .page-title, .page-id-1941 .page-title { background: var(--ab-purple); }
.page-id-1982 .page-title { background: var(--ab-blue); }
.term-musica .page-title { background: var(--ab-orange); }
.term-recitazione .page-title { background: #a9c349; }
.term-lingue-straniere .page-title { background: #9e1b66; }
.term-yoga .page-title { background: #42a5c4; }

/* Corso singolo */
.single-course .page-title {
	color: var(--ab-blue);
	background: rgba(255, 255, 255, .9);
}

/* Articoli */
.single-post .wh-page-title-bar {
	background-image: none !important;
	background-color: #ff8700;
}
.single-post .page-title { background: #ff87; }

/* --- Card corsi ---------------------------------------------------------- */
.course-cards-page-content { margin-bottom: 30px; }
.course-cards-empty { margin-top: 30px; }
.course-category-cards-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	margin-top: 30px;
}
.course-category-card,
.ab-teacher {
	margin: 0;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
}
.course-category-card:hover,
.ab-teacher:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 38px rgba(0, 0, 0, .12);
}
.course-category-card__link {
	display: block;
	height: 100%;
	color: inherit;
	text-decoration: none;
}
.course-category-card__link:hover { color: inherit; }
.course-category-card__image {
	min-height: 230px;
	background: #d0dae3 center / cover no-repeat;
}
.course-category-card__content { padding: 22px 24px 26px; }
.course-category-card__title {
	margin: 0;
	font-size: 16px;
	line-height: 1.3;
}
@media (max-width: 959px) {
	.course-category-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.course-category-cards-grid { grid-template-columns: 1fr; }
}

/* --- Scheda corso (campi + descrizione Gutenberg) ------------------------ */
.ab-course-sheet {
	padding: 20px;
	border: 2px solid var(--ab-orange);
}
.ab-course-sheet__cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
}
.ab-course-sheet__cols > ul + ul { padding-left: 20px; }
.ab-course-sheet__cols > ul:first-child:not(:last-child) { border-right: 2px solid var(--ab-orange); }
.ab-course-sheet__list { list-style: none; margin: 0; padding: 0; }
.ab-course-sheet__list li {
	display: flex;
	align-items: flex-start;
	padding: 5px 0;
	border-bottom: 1px solid #ddd;
}
.ab-course-sheet__list li:first-child { padding-top: 0; }
.ab-course-sheet__list li:last-child { border-bottom: 0; }
.ab-course-sheet__list .ab-icon {
	flex: none;
	width: 18px;
	height: 14px;
	margin-top: 6px;
	color: var(--ab-orange);
}
.ab-course-sheet__list span { padding-left: 5px; }
.ab-course-sheet__list b { font-weight: 700; }
.ab-course-sheet__divider {
	margin: 15px 0;
	border: 0;
	border-top: 1px solid var(--ab-orange);
}
.ab-course-sheet__text > :last-child { margin-bottom: 0; }
.ab-course-sheet__text p { margin: 0 0 14.4px; }
@media (max-width: 767px) {
	.ab-course-sheet__cols { grid-template-columns: 1fr; }
	.ab-course-sheet__cols > ul + ul { padding-left: 0; }
	.ab-course-sheet__cols > ul + ul li:first-child { padding-top: 5px; }
	.ab-course-sheet__cols > ul:first-child:not(:last-child) { border-right: 0; border-bottom: 1px solid #ddd; }
}

/* --- Docenti ------------------------------------------------------------- */
.ab-teachers {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 25px;
	padding-top: 50px;
}
.ab-teacher__photo { display: block; aspect-ratio: 1; overflow: hidden; }
.ab-teacher__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ab-teacher__body { padding: 5px 20px 15px; }
.ab-teacher__name { margin: 15px 0 5px; }
.ab-teacher__name a { color: var(--ab-heading); text-decoration: none; }
.ab-teacher__job {
	margin: 0 0 10px;
	font-family: var(--ab-font-body);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
	color: #5f8fdf;
}
@media (max-width: 767px) { .ab-teachers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ab-teachers { grid-template-columns: 1fr; } }

.ab-teacher-single {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 40px;
	align-items: start;
}
.ab-teacher-single__photo img { width: 100%; height: auto; border-radius: 14px; }
.ab-teacher-single .job-title { color: #5f8fdf; font-size: 15px; margin-top: 0; }
@media (max-width: 767px) { .ab-teacher-single { grid-template-columns: 1fr; } }

/* --- News (home) --------------------------------------------------------- */
/* Ripresa del layout "Post List – layout 4" del vecchio tema: immagine 30% + testo 70% */
.ab-news__item {
	display: flex;
	align-items: flex-start;
	min-height: 117px;
	padding: 15px;
}
.ab-news__img { width: 30%; flex: none; overflow: hidden; }
.ab-news__img img { display: block; width: 100%; height: auto; transition: transform .3s ease-in-out; }
.ab-news__img:hover img { transform: scale(1.1); }
.ab-news__data { width: 70%; padding: 0 35px; margin-top: -9px; }
.ab-news__data--full { width: 100%; padding: 0; }
.ab-news__date {
	font-family: var(--ab-font-head);
	font-size: 12px;
	line-height: 17px;
	text-transform: uppercase;
	color: #878787;
}
.ab-news__date::before {
	content: "";
	display: inline-block;
	margin-right: 6px;
	vertical-align: 1px;
	border: 4px solid transparent;
	border-left: 5px solid currentColor;
	border-right: 0;
}
.ab-news__title { margin: 5px 0 11px; font-size: 16px; line-height: 20px; }
.ab-news__title a { text-decoration: none; }
.ab-news__text { margin-bottom: 15px; font-size: 15px; line-height: 23px; }
.ab-news hr { width: 30px; margin: 0 0 15px; border: 0; border-top: 4px solid var(--ab-accent); }
.ab-news__cats { font-size: 14px; }
.ab-news__cats span { margin-right: 3px; }
@media (max-width: 600px) {
	.ab-news__data { padding: 0 0 0 15px; }
}

/* --- Video con play (home) ----------------------------------------------- */
.ab-video {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 285px;
	border-radius: 5px;
	overflow: hidden;
	background: #2d1d54 center / cover no-repeat;
}
.ab-video::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(45, 29, 84, .66);
	transition: background .2s;
}
.ab-video:hover::before { background: rgba(45, 29, 84, .5); }
.ab-video__play {
	position: relative;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .56);
	transition: transform .2s;
}
.ab-video:hover .ab-video__play { transform: scale(1.06); }
.ab-video__play::before {
	content: "";
	position: absolute;
	inset: 14px;
	border-radius: 50%;
	background: #ff8700;
}
.ab-video__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -11px 0 0 -6px;
	border-style: solid;
	border-width: 11px 0 11px 18px;
	border-color: transparent transparent transparent rgba(255, 255, 255, .96);
}

/* --- Moduli Contact Form 7 (classi "one half" / "pull-right" del vecchio tema) --- */
.wpcf7 form { display: flex; flex-wrap: wrap; gap: 0 30px; }
.wpcf7 form > .one.half { flex: 1 1 calc(50% - 15px); min-width: 260px; }
.wpcf7 form > .wpcf7-response-output { flex-basis: 100%; }
.wpcf7 label { display: block; width: 100%; margin-bottom: 10px; }
.wpcf7 label > div:has(> label) { gap: 10px; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
	width: 100%;
	height: 47px;
	padding: 14px;
	font-family: var(--ab-font-body);
	font-size: 15px;
	color: #141412;
	background: #fff;
	border: 2px solid #bdc3d2;
	border-radius: 0;
}
.wpcf7 textarea { height: 211px; }
.wpcf7 input:focus,
.wpcf7 textarea:focus { outline: none; border-color: #ff8700; }
.wpcf7 p { margin: 0 0 10px; overflow: hidden; }
.wpcf7 .wpcf7-acceptance .wpcf7-list-item { margin: 0 0 15px; }
.wpcf7 button,
.wpcf7 .wpcf7-submit {
	padding: 21px 35px;
	font-family: var(--ab-font-head);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #fff;
	background: #ff8700;
	border: 1px solid #ff8700;
	border-radius: 0;
	cursor: pointer;
	transition: background .2s;
}
.wpcf7 button:hover,
.wpcf7 .wpcf7-submit:hover { background: var(--ab-orange); border-color: var(--ab-orange); }
.wpcf7 .pull-right { float: right; }

/* --- Articoli con sidebar ------------------------------------------------ */
.ab-content--with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
	gap: 40px;
}
.single-post .ab-sidebar { margin-top: -10%; }
.single-post .ab-sidebar .custom-html-widget {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 50vh;
	padding: 5%;
	text-align: center;
	background: #fff;
	border: 2px solid #ff8700;
}
@media (max-width: 959px) {
	.ab-content--with-sidebar { grid-template-columns: 1fr; }
	.single-post .ab-sidebar { margin-top: 0; }
}
._pulsante a { color: #fff !important; }
._pulsante:hover { background: var(--ab-orange-2); }

/* --- Archivi ------------------------------------------------------------- */
.ab-archive {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 30px;
}
.ab-archive__img img { width: 100%; height: auto; display: block; }
.ab-archive__title { font-size: 20px; line-height: 1.4; }
.ab-archive__title a { text-decoration: none; }

/* --- Footer -------------------------------------------------------------- */
.ab-footer { background: #fff; }
.ab-footer__fallback { padding: 30px 20px; font-size: 14px; }

/* --- Varie --------------------------------------------------------------- */
.screen-reader-text:focus {
	position: fixed !important;
	top: 10px;
	left: 10px;
	z-index: 100000;
	padding: 10px 15px;
	background: #fff;
	clip: auto !important;
	clip-path: none;
	width: auto;
	height: auto;
}
