/*
Theme Name: EDUCO
Theme URI: https://www.educoitalia.it
Author: Enrico Rossomando
Description: Tema a blocchi per i siti EDUCO (educoitalia.it, educoitaly.com). Replica la grafica storica realizzata con Elementor, senza page builder.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Version: 1.2.4
License: GNU General Public License v2 or later
Text Domain: educo
Domain Path: /languages
*/

/* ---------- Generale ---------- */
/* I titoli che sono link mantengono il colore del titolo (come in Elementor). */
:where(h1, h2, h3, h4, h5, h6) a:where(:not(.wp-element-button)) {
	color: inherit;
}

/* ---------- Header ---------- */
.educo-header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 10px 15px;
	color: var(--wp--preset--color--menu);
	font-weight: 300;
	position: relative;
}
.educo-header .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 15px;
	right: 15px;
	bottom: 0;
	height: 3px;
	background: var(--wp--preset--color--rosso);
	opacity: 0;
	transition: opacity .2s;
}
.educo-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.educo-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.educo-header .wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--rosso);
	text-decoration: none;
}
.educo-header .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content::after,
.educo-header .wp-block-navigation > .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content::after,
.educo-header .wp-block-navigation > .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content::after {
	opacity: 1;
}
.educo-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background: #f2f2f2;
	border: 0;
	min-width: 260px;
	text-transform: none;
}
.educo-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	color: #000;
	font-size: 0.8125rem;
	font-weight: 300;
	padding: 12px 20px;
}
.educo-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: #ededed;
}
.educo-header .wp-block-navigation__responsive-container.is-menu-open {
	text-transform: none;
}

/* ---------- Fascia blu con titolo e briciole ---------- */
.educo-briciole,
.educo-briciole a {
	color: var(--wp--preset--color--bianco);
	font-size: var(--wp--preset--font-size--piccolo);
	text-align: center;
}

/* ---------- Scheda contenuto ---------- */
/* La scheda e l'elenco articoli risalgono di 80px sulla fascia blu: devono stare sopra. */
.educo-scheda,
main > .wp-block-query {
	position: relative;
	z-index: 1;
}
.educo-scheda img {
	border-radius: 6px;
}
.educo-scheda .wp-block-table td,
.educo-scheda .wp-block-table th {
	border-color: #e5e5e5;
}

/* ---------- Elenco articoli ---------- */
.educo-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}
.educo-card .educo-card__testo {
	flex: 1;
}
.educo-card .wp-block-post-title a {
	color: #000;
}
.educo-card .wp-block-post-excerpt__more-link {
	display: inline-block;
	margin-top: 1em;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--wp--preset--color--rosso);
}
.educo-card .wp-block-post-featured-image img {
	border-radius: 6px 6px 0 0;
}
.wp-block-query-pagination {
	justify-content: center;
}
.wp-block-query-pagination .page-numbers.current {
	color: var(--wp--preset--color--rosso);
	font-weight: 600;
}

/* ---------- Footer ---------- */
.educo-footer-scuro a {
	color: var(--wp--preset--color--bianco);
}
.educo-footer-scuro .wp-block-navigation .wp-block-navigation-item a.wp-block-navigation-item__content {
	color: var(--wp--preset--color--rosso);
	padding: 0.2em 0;
}
.educo-footer-scuro .wp-block-navigation .wp-block-navigation-item::before {
	content: "•";
	color: var(--wp--preset--color--rosso);
	margin-right: 0.5em;
}
.educo-bottone-bordato .wp-block-button__link {
	border: 5px solid rgba(255, 255, 255, .36);
}
.educo-badge img {
	transition: transform .2s;
}
.educo-badge a:hover img {
	transform: scale(1.04);
}
.educo-condividi .wp-block-button__link {
	font-size: 0.8125rem;
	padding: 0.7em 1.4em;
}

/* ---------- Moduli (Contact Form 7) ---------- */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	padding: 0.7em 0.9em;
	border: 1px solid var(--wp--preset--color--bordo);
	border-radius: 3px;
	font: inherit;
	color: var(--wp--preset--color--testo);
	background: #fff;
	box-sizing: border-box;
}
.wpcf7 input:focus,
.wpcf7 textarea:focus {
	outline: 2px solid var(--wp--preset--color--blu);
	outline-offset: 0;
}
.wpcf7 input[type="submit"] {
	background: var(--wp--preset--color--rosso);
	color: #fff;
	border: 0;
	border-radius: 3px;
	padding: 0.75em 2em;
	font: inherit;
	font-weight: 500;
	cursor: pointer;
}
.wpcf7 input[type="submit"]:hover {
	background: #d13e2d;
}

/* ---------- Home ---------- */
.educo-recensione img {
	border-radius: 50%;
}
.educo-icona {
	font-size: 2.5rem;
	line-height: 1;
}
.educo-foto-bordata img {
	border: 3px solid var(--wp--preset--color--blu);
}
/* Titoli dopo immagini affiancate (testimonianze): ripartono sotto l'immagine, tranne subito dopo l'immagine stessa. */
.wp-block-post-content :where(h2, h3) {
	clear: both;
}
.wp-block-post-content .alignleft + :where(h2, h3),
.wp-block-post-content .alignright + :where(h2, h3) {
	clear: none;
}
.wp-block-post-content .wp-block-image.alignleft {
	margin-bottom: 1em;
}

/* Foto della home: sui telefoni prende le proporzioni della foto (4:3), così si vede tutto il gruppo. */
@media (max-width: 781px) {
	.educo-hero.wp-block-cover {
		min-height: 75vw !important;
	}
}

/* Pulsante WhatsApp del footer: sempre visibile in basso a destra, sopra il badge reCAPTCHA (alto ~60px, a 14px dal fondo). */
.educo-whatsapp-fisso {
	position: fixed;
	right: 16px;
	bottom: 90px;
	z-index: 50;
	margin: 0 !important;
}
.educo-whatsapp-fisso .wp-block-button__link {
	box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
