/*
Theme Name: Su Ali D'Aquila
Theme URI: https://sualidaquila.netsons.org/
Description: Tema del blog di Padre Giovanni Boer. Omelie, catechesi, canale YouTube e presentazioni dei libri.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Author: Su Ali D'Aquila
License: GPL-2.0-or-later
Text Domain: sualidaquila
*/

:root {
	--ink: #1d1a16;
	--paper: #f6f2ea;
	--paper-2: #ece5d8;
	--paper-hover: #efe9de;
	--line: #ddd5c8;
	--line-2: #cfc6b7;
	--body: #4f483f;
	--muted: #6f675c;
	--navy: oklch(0.22 0.045 255);
	--navy-2: oklch(0.28 0.045 255);
	--navy-3: oklch(0.30 0.04 255);
	--navy-deep: oklch(0.18 0.04 255);
	--gold: oklch(0.78 0.11 75);
	--gold-hi: oklch(0.84 0.1 75);
	--gold-ink: oklch(0.55 0.12 70);
	--link-hover: oklch(0.62 0.12 70);
	--cream: #f3efe7;
	--mist: #c4c9d3;
	--slate: #9aa2b1;
	--navlink: #cfd3dc;
	--serif: 'EB Garamond', Georgia, serif;
	--sans: 'Hanken Grotesk', system-ui, sans-serif;
	--mono: 'IBM Plex Mono', ui-monospace, monospace;
	--wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	-webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 100; top: 8px; left: 8px;
	padding: 10px 16px; background: var(--cream); color: var(--ink); border-radius: 999px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* ---------- Tipografia comune ---------- */
.eyebrow {
	font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
	text-transform: uppercase; color: var(--gold-ink);
}
.on-dark .eyebrow, .eyebrow--gold { color: var(--gold); }
.h-section {
	margin: 0; font-family: var(--serif); font-weight: 400;
	font-size: clamp(40px, 5vw, 60px); line-height: 1; letter-spacing: -.01em;
}
.lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--body); max-width: 32em; text-wrap: pretty; }
.u-link { font-size: 14px; font-weight: 600; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* ---------- Bottoni ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
	border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.btn--light { background: var(--cream); color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--ink); }
.btn--ghost { border-color: rgba(243, 239, 231, .3); font-weight: 500; }
.btn--ghost:hover { border-color: var(--cream); color: var(--cream); }
.btn--gold { background: var(--gold); color: var(--ink); font-size: 13px; padding: 10px 18px; }
.btn--gold:hover { background: var(--gold-hi); color: var(--ink); }

/* ---------- Header / nav ---------- */
.site-top { background: var(--navy); color: var(--cream); }
.site-nav {
	padding-top: 22px; padding-bottom: 22px;
	display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand:hover { color: inherit; }
.brand__name { font-family: var(--serif); font-size: 26px; line-height: 1; }
.brand__tag { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--slate); text-transform: uppercase; }
.menu { display: flex; gap: 28px; font-size: 14px; flex-wrap: wrap; color: var(--navlink); list-style: none; margin: 0; padding: 0; }
.menu a:hover, .menu .current-menu-item > a, .menu .current_page_item > a, .menu .current-page-ancestor > a { color: var(--gold); }
.menu .sub-menu { display: none; }

/* ---------- Hero (home) ---------- */
.hero {
	padding-top: 64px; padding-bottom: 96px;
	display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
	gap: 64px; align-items: center;
}
.hero__text { display: flex; flex-direction: column; gap: 28px; }
.hero__title {
	margin: 0; font-family: var(--serif); font-weight: 400;
	font-size: clamp(52px, 7vw, 96px); line-height: .95; letter-spacing: -.02em; text-wrap: balance;
}
.hero__title em, .h-gold em { color: var(--gold); }
.hero__lead { margin: 0; max-width: 30em; font-size: 18px; line-height: 1.6; color: var(--mist); text-wrap: pretty; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__quote {
	margin: 12px 0 0; padding-top: 24px; border-top: 1px solid rgba(243, 239, 231, .15);
	font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.5; color: var(--mist); max-width: 30em;
}
.hero__quote cite { font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--gold); }

.now-card {
	display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
	background: var(--navy-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.now-card__img { aspect-ratio: 16 / 10; background: var(--navy-3); overflow: hidden; }
.now-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.now-card__body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 18px; }
.now-card__meta { display: flex; flex-direction: column; gap: 6px; }
.now-card__label { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--gold); }
.now-card__title { font-family: var(--serif); font-size: 28px; line-height: 1.15; }
.now-card__sub { font-size: 14px; color: var(--slate); }
.now-card__player iframe { display: block; width: 100%; height: 152px; border: 0; border-radius: 12px; background: var(--navy-3); }

/* ---------- Podcast ---------- */
.podcast { padding-top: 112px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section-head__text { display: flex; flex-direction: column; gap: 14px; }
.section-head__text p { margin: 0; font-size: 16px; color: var(--body); max-width: 34em; }
.section-head__text strong { font-weight: 600; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
	padding: 9px 16px; border-radius: 999px; font-size: 13px; cursor: pointer;
	border: 1px solid var(--line-2); background: transparent; color: var(--ink);
}
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.episodes { display: flex; flex-direction: column; border-top: 1px solid var(--line); list-style: none; margin: 0; padding: 0; }
.episode { border-bottom: 1px solid var(--line); }
.episode[hidden] { display: none; }
.episode__row {
	width: 100%; text-align: left; border: 0; color: inherit; cursor: pointer;
	display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 20px; align-items: center;
	padding: 20px 12px; background: transparent;
}
.episode__row:hover, .episode.is-open .episode__row { background: var(--paper-hover); }
.episode__icon {
	width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-size: 14px; background: var(--ink); color: var(--paper);
}
.episode.is-open .episode__icon { background: var(--gold); color: var(--ink); }
.episode__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.episode__title { font-family: var(--serif); font-size: 23px; line-height: 1.2; }
.episode__sub { font-size: 14px; color: var(--muted); }
.episode__date { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.episode__player { padding: 4px 12px 20px 80px; background: var(--paper-hover); }
.episode__player iframe { display: block; width: 100%; height: 152px; border: 0; border-radius: 12px; }
.episode__player a { font-size: 13px; font-weight: 600; }
.podcast__more { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }

/* ---------- Catechesi ---------- */
.catechesi { background: var(--paper-2); }
.catechesi__inner { padding-top: 112px; padding-bottom: 112px; display: flex; flex-direction: column; gap: 56px; }
.split-head {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: 32px; align-items: end;
}
.split-head > div { display: flex; flex-direction: column; gap: 14px; }
.block { display: flex; flex-direction: column; gap: 20px; }
.block__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.block__head h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.block__head a { font-size: 13px; font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.text-card {
	display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
	padding: 22px 24px; min-height: 140px; background: var(--paper); border-radius: 14px; transition: background .15s;
}
.text-card:hover { background: #fff; color: var(--ink); }
.text-card__n { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--gold-ink); }
.text-card__title { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 20px; }

.thumb {
	display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
	background: #d6ccbc; position: relative;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.thumb:hover img { transform: scale(1.03); }
.play {
	position: absolute; left: 14px; bottom: 14px; width: 44px; height: 44px; border-radius: 50%;
	background: rgba(29, 26, 22, .85); color: var(--paper);
	display: flex; align-items: center; justify-content: center; font-size: 13px;
}

/* ---------- YouTube ---------- */
.youtube { padding-top: 112px; padding-bottom: 112px; }
.youtube__box {
	border-radius: 28px; background: var(--navy); color: var(--cream); padding: clamp(32px, 5vw, 64px);
	display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 48px; align-items: center;
}
.youtube__text { display: flex; flex-direction: column; gap: 20px; }
.youtube__text h2 { font-size: clamp(38px, 4.5vw, 56px); line-height: 1.02; }
.youtube__text p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--mist); max-width: 28em; }
.youtube__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.youtube__grid .thumb { background: var(--navy-3); }
.youtube__grid .thumb:first-child { grid-column: 1 / -1; border-radius: 14px; }
.youtube__grid .thumb:first-child .play {
	left: 16px; bottom: 16px; width: 52px; height: 52px; background: var(--gold); color: var(--ink); font-size: 15px;
}

/* ---------- Libri ---------- */
.libri { padding-bottom: 112px; display: flex; flex-direction: column; gap: 48px; }
.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 32px; }
.book { display: flex; flex-direction: column; gap: 16px; }
.book .thumb { aspect-ratio: 4 / 3; border-radius: 10px; background: #e6dfd2; box-shadow: 0 20px 40px rgba(60, 45, 25, .14); }
.book .play { left: 12px; bottom: 12px; width: 40px; height: 40px; font-size: 12px; }
.book__title { font-family: var(--serif); font-size: 24px; line-height: 1.15; text-wrap: pretty; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--slate); }
.site-footer__inner {
	padding-top: 56px; padding-bottom: 56px;
	display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-end;
}
.site-footer__brand { display: flex; flex-direction: column; gap: 8px; }
.site-footer__brand span:first-child { font-family: var(--serif); font-size: 30px; color: var(--cream); }
.site-footer__brand span:last-child { font-size: 14px; }
.site-footer__links { display: flex; gap: 24px; font-size: 14px; flex-wrap: wrap; }
.site-footer__copy { width: 100%; font-size: 12px; }
.newsletter { width: 100%; padding-top: 32px; border-top: 1px solid rgba(243, 239, 231, .1); color: var(--mist); }
.newsletter h2 { margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--cream); }
.newsletter input[type="email"], .newsletter input[type="text"] {
	padding: 12px 16px; border-radius: 999px; border: 1px solid rgba(243, 239, 231, .25);
	background: transparent; color: var(--cream); font: inherit; min-width: min(100%, 280px);
}
.newsletter input[type="submit"], .newsletter button {
	padding: 12px 22px; border-radius: 999px; border: 0; background: var(--gold); color: var(--ink);
	font: inherit; font-weight: 600; cursor: pointer;
}
.newsletter .mc4wp-form-fields p { margin: 0 0 10px; }

/* ---------- Pagine interne ---------- */
.page-head { padding-top: 40px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 16px; }
.page-head h1 {
	margin: 0; font-family: var(--serif); font-weight: 400;
	font-size: clamp(40px, 6vw, 72px); line-height: 1; letter-spacing: -.01em; text-wrap: balance;
}
.page-head p { margin: 0; color: var(--mist); font-size: 17px; line-height: 1.6; max-width: 36em; }
.page-head .eyebrow { color: var(--gold); }
.breadcrumb { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--slate); text-transform: uppercase; }
.breadcrumb a:hover { color: var(--gold); }

.main { padding-top: 72px; padding-bottom: 112px; }
.prose { max-width: 760px; margin: 0 auto; font-size: 18px; line-height: 1.7; color: #2c2822; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; color: var(--ink); margin-top: 1.8em; }
.prose h2 { font-size: 38px; }
.prose h3 { font-size: 30px; }
.prose h4 { font-size: 24px; }
.prose a { color: var(--gold-ink); border-bottom: 1px solid currentColor; }
.prose a:hover { color: var(--ink); }
.prose blockquote {
	margin-left: 0; padding-left: 24px; border-left: 2px solid var(--gold);
	font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.5;
}
.prose img { border-radius: 12px; }
.prose iframe { max-width: 100%; border: 0; border-radius: 12px; }
.prose figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; text-align: center; }
.prose .wp-block-embed { margin: 2em 0; }
.prose pre, .prose code { font-family: var(--mono); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.prose pre { background: var(--paper-2); padding: 16px 20px; border-radius: 12px; }
.prose .wp-block-latest-posts { padding: 0; list-style: none; border-top: 1px solid var(--line); }
.prose .wp-block-latest-posts li { padding: 18px 4px; border-bottom: 1px solid var(--line); margin: 0; }
.prose .wp-block-latest-posts__post-title { font-family: var(--serif); font-size: 24px; line-height: 1.2; border: 0; color: var(--ink); }
.prose .wp-block-latest-posts__post-title:hover { color: var(--gold-ink); }
.prose .wp-block-latest-posts__post-date { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 4px; }
.prose .wp-block-latest-posts__post-full-content { margin-top: 12px; font-size: 17px; }
.prose .alignwide { max-width: 1040px; margin-left: 50%; transform: translateX(-50%); width: calc(100vw - 64px); }

.child-nav { max-width: 760px; margin: 56px auto 0; }
.child-nav h2 { margin: 0 0 16px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

.post-list { list-style: none; margin: 0 auto; padding: 0; max-width: 900px; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a {
	display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 20px 12px;
}
.post-list a:hover { background: var(--paper-hover); color: var(--ink); }

.pagination { margin-top: 48px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers {
	min-width: 40px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
	display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.pagination .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination .page-numbers.dots { border: 0; }

.post-nav { max-width: 760px; margin: 64px auto 0; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }

.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form input[type="search"] {
	flex: 1; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font: inherit;
}
.search-form button { padding: 12px 20px; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); font: inherit; font-weight: 600; cursor: pointer; }

@media (max-width: 640px) {
	.wrap { padding-left: 16px; padding-right: 16px; }
	.menu { gap: 16px; }
	.hero { padding-top: 32px; padding-bottom: 64px; gap: 40px; }
	.podcast, .youtube { padding-top: 72px; padding-bottom: 72px; }
	.catechesi__inner { padding-top: 72px; padding-bottom: 72px; }
	.libri { padding-bottom: 72px; }
	.episode__row, .post-list a { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 16px 4px; }
	.episode__date { grid-column: 2; }
	.episode__player { padding: 4px 4px 16px; }
	.youtube__box { border-radius: 20px; }
	.main { padding-top: 48px; padding-bottom: 72px; }
}

/* ---------- Omelia: introduzione ---------- */
.prose .episode-intro { font-family: var(--serif); font-size: 22px; line-height: 1.5; color: var(--body); }
.prose .episode-intro a { color: var(--gold-ink); }
