/*
Theme Name: FAILP
Description: Child theme minimale per FAILP CISAL Enna, basato su Nextawards.
Author: FAILP CISAL Enna
Template: nextawards
Version: 0.2.1
Text Domain: failp
*/

/*
 * Design system FAILP CISAL Enna.
 * I token principali sono definiti in theme.json; qui restano solo gli stati
 * interattivi e le classi di composizione non esprimibili in modo affidabile
 * tramite Gutenberg/theme.json.
 */

body {
	background: var(--wp--preset--color--base, #ffffff);
	color: var(--wp--preset--color--text, #1f2933);
	font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: clamp(1.0625rem, 1vw + 0.8rem, 1.125rem);
	line-height: 1.6;
}

h1,
.h1 {
	line-height: 1.1;
}

h2,
.h2 {
	line-height: 1.15;
}

h3,
h4,
.h3,
.h4 {
	line-height: 1.25;
}

small,
.has-small-font-size {
	line-height: 1.5;
}

/* I link nei contenuti devono essere distinguibili anche senza il colore. */
#content :where(p, li, figcaption, td, th) a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--primary, #123a63);
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.16em;
}

#content :where(p, li, figcaption, td, th) a:not(.wp-block-button__link):hover {
	color: var(--wp--preset--color--deep-blue, #0b2742);
}

/* CTA Gutenberg: primaria blu, 48 px di altezza minima e focus visibile. */
.wp-block-button__link {
	align-items: center;
	background-color: var(--wp--preset--color--primary, #123a63);
	border-radius: 0.5rem;
	color: #ffffff;
	display: inline-flex;
	font-size: 1rem;
	font-weight: 700;
	justify-content: center;
	line-height: 1.2;
	min-height: 3rem;
	padding: 0.875rem 1.25rem;
	text-decoration: none;
}

.wp-block-button__link:hover,
.wp-block-button__link:active {
	background-color: var(--wp--preset--color--deep-blue, #0b2742);
	color: #ffffff;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	background-color: transparent;
	border-color: var(--wp--preset--color--deep-blue, #0b2742);
	color: var(--wp--preset--color--deep-blue, #0b2742);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:active {
	background-color: var(--wp--preset--color--surface-info, #eff7fb);
	color: var(--wp--preset--color--deep-blue, #0b2742);
}

/* Focus coerente e sufficiente per mouse, tastiera e campi modulo. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--deep-blue, #0b2742);
	outline-offset: 2px;
}

:where(.has-primary-background-color, .has-deep-blue-background-color, .has-text-color.has-primary-color, .has-text-color.has-deep-blue-color) :focus-visible {
	outline-color: var(--wp--preset--color--accent-yellow, #f2c94c);
}

/* Classi Gutenberg disponibili per le sezioni e card del progetto. */
.failp-surface-warm {
	background-color: var(--wp--preset--color--warm-base, #fafaf7);
}

.failp-surface-info {
	background-color: var(--wp--preset--color--surface-info, #eff7fb);
}

.failp-card {
	background-color: #ffffff;
	border: 1px solid var(--wp--preset--color--border, #d9e2ec);
	border-radius: 0.75rem;
	box-shadow: 0 2px 10px rgb(11 39 66 / 6%);
	padding: 1.5rem;
}

.failp-card:is(a, button):hover {
	border-color: var(--wp--preset--color--border-strong, #7b8794);
	box-shadow: 0 4px 14px rgb(11 39 66 / 9%);
}

@media (prefers-reduced-motion: no-preference) {
	.wp-block-button__link,
	.failp-card {
		transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
	}
}
/*
 * Override mirati delle regole inline del parent Nextawards.
 * Mantengono il design system FAILP senza modificare il parent.
 */
html body,
html body :is(p, ul, ol, li, .wp-block, .wp-block-button__link) {
	font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

html body :is(h1, h2, h3, h4, h5, h6, .wp-block-heading, .wp-block-post-title) {
	font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

html body .wp-block-button .wp-block-button__link {
	border-radius: 8px !important;
}

html body .wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background-color: var(--wp--preset--color--primary, #123a63) !important;
	color: #ffffff !important;
}

html body .wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent !important;
	border-color: var(--wp--preset--color--deep-blue, #0b2742) !important;
	color: var(--wp--preset--color--deep-blue, #0b2742) !important;
}
/* Correzione overflow orizzontale del footer Nextawards. */
.footer-content {
    margin-right: 0;
    margin-left: 0;
    width: 100%;
    max-width: none;
}

body.single-post #comments { display: none; }


/* Etichetta della card prioritaria nella Home. */
body.home .failp-home-featured-label {
	display: inline-block;
	margin-right: 0.5rem;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	background: var(--wp--preset--color--primary, #123a63);
	color: #ffffff;
	font-size: 0.68em;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.4;
	text-transform: uppercase;
	vertical-align: middle;
}

/* Voce Contatti secondaria: visibile soltanto nel menu mobile. */
@media (min-width: 1191px) {
  .header nav .menu > li.failp-mobile-secondary { display: none; }
}
@media (max-width: 1190px) {
  .header nav .menu > li.failp-mobile-secondary {
    border-top: 2px solid var(--wp--preset--color--primary, #123a63);
    margin-top: 0.75rem;
  }
  .header nav .menu > li.failp-mobile-secondary a {
    color: var(--wp--preset--color--primary, #123a63);
  }
}

/* WhatsApp globale: Quick Menu desktop e barra mobile, Passo 1. */
.header__quick .failp-whatsapp-desktop > a,
.failp-whatsapp-mobile > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--wp--preset--color--primary, #123a63);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}
.header__quick .failp-whatsapp-desktop > a:hover,
.failp-whatsapp-mobile > a:hover {
  background: var(--wp--preset--color--deep-blue, #0b2742);
  color: #fff;
}
.header__quick .failp-whatsapp-desktop > a:focus-visible,
.failp-whatsapp-mobile > a:focus-visible {
  outline: 3px solid var(--wp--preset--color--accent-yellow, #f2c94c);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #0b2742;
}
.failp-whatsapp-mobile { display: none; }
@media (max-width: 1190px) {
  body.failp-has-whatsapp-bar { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .failp-whatsapp-mobile {
    display: block;
    position: fixed;
    inset: auto 0 0;
    z-index: 90;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--wp--preset--color--border, #d9e2ec);
  }
  .failp-whatsapp-mobile > a { display: flex; width: 100%; }
}
@media print {
  .failp-whatsapp-mobile, .header__quick .failp-whatsapp-desktop { display: none; }
  body.failp-has-whatsapp-bar { padding-bottom: 0; }
}
/* INIZIO FAILP HEADER PASSO 3 — aggiungere in fondo a style.css del child. */
/* Logo desktop completo; icona mobile dallo stesso PNG gia caricato (media 82).
 * La sostituzione CSS mantiene l'ALT del logo e il collegamento alla Home.
 * Per ripristinare: rimuovere soltanto questo blocco.
 */
html body .header {
  background-color: #ffffff;
}
html body .header .header__content {
  box-sizing: border-box;
  height: 80px;
  padding: 3px 0;
  align-items: center;
  border-bottom: 1px solid var(--wp--preset--color--border, #d9e2ec);
}
html body .header .header__logo {
  flex-shrink: 0;
}
html body .header .header__logo-img {
  display: block;
  width: auto;
  height: 72px;
  max-width: none;
  max-height: 100%;
  object-fit: contain;
}
/* Riserva coerente con l'header fisso, anche nei template senza titolo. */
html body .wrapper > .spacer {
  height: 80px;
}
@media (max-width: 1190px) {
  html body .header .header__content {
    height: 64px;
    padding: 7px 56px 7px 0;
  }
  html body .header .header__logo-img {
    content: url("https://failp-enna.it/wp-content/uploads/2026/10/failp-cisal-enna-icona-5121-300x300.png");
    width: 48px;
    height: 48px;
  }
  html body .header .icon-hamburger {
    top: 8px;
    right: 0;
    width: 48px;
    height: 48px;
  }
  html body .header nav .menu {
    top: 64px;
    background-color: #ffffff;
  }
  html body .header__quick .failp-whatsapp-desktop {
    display: none;
  }
  html body .wrapper > .spacer {
    height: 64px;
  }
}
/* FINE FAILP HEADER PASSO 3 */
