/*
Theme Name: Pelosoni
Theme URI: https://h-web.it
Author: Helios Web
Author URI: https://h-web.it
Description: Tema a blocchi per il portale di animali smarriti, trovati e da adottare. Sfondo bianco, blu del logo Pelosoni, stile da bacheca/volantino. Pensato per il plugin Pelosoni Core. Font ospitati in locale.
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.2.0
License: GNU General Public License v2 or later
Text Domain: pelosoni-theme
*/

/* ---------- Intestazione ---------- */
.pelo-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--wp--preset--color--line); }
.admin-bar .pelo-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .pelo-header { top: 0; } }
.pelo-logo { display: block; line-height: 0; }
.pelo-logo img { height: 62px; width: auto; display: block; }
@media (max-width: 600px) { .pelo-logo img { height: 44px; } }
.pelo-header .wp-block-navigation-item__content { padding: .3em 0; border-bottom: 2px solid transparent; }
.pelo-header .wp-block-navigation-item__content:hover { border-bottom-color: var(--wp--preset--color--brand); color: var(--wp--preset--color--brand); }
.pelo-header .wp-block-navigation__responsive-container.is-menu-open { background: #fff !important; }
.pelo-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.4rem; }

/* ---------- Titoli di sezione ---------- */
.pelo-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; border-bottom: 2px solid var(--wp--preset--color--ink); padding-bottom: .5rem; margin-bottom: 1.4rem !important; }
.pelo-section-head h2 { margin: 0; }
.pelo-section-head p { margin: 0; font-weight: 700; }
.pelo-section-head a { text-decoration: none; }
.pelo-section-head a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hero ---------- */
.pelo-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.pelo-hero h1 { font-size: var(--wp--preset--font-size--huge); line-height: .92; margin: 0 0 1.2rem; letter-spacing: -.005em; }
.pelo-hero h1 span { color: var(--wp--preset--color--brand); display: block; }
.pelo-hero__lead { font-size: 1.2rem; max-width: 40ch; margin: 0 0 1.6rem; }
.pelo-hero__ctas { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.pelo-hero__ctas .pelo-btn { font-size: 1.05rem; padding: .9em 1.3em; }
.pelo-btn--lost { background: #c8102e !important; border-color: #c8102e !important; }
.pelo-btn--lost:hover { background: #9e0c24 !important; border-color: #9e0c24 !important; }
.pelo-btn--found { background: #1b7a36 !important; border-color: #1b7a36 !important; }
.pelo-btn--found:hover { background: #135c28 !important; border-color: #135c28 !important; }
.pelo-hero__links { margin: 1.1rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-weight: 700; }
.pelo-hero__links a { text-underline-offset: 3px; }
.pelo-hero__poster { position: relative; }
.pelo-hero__poster::before { content: "Ultimo appello"; position: absolute; top: -1.9rem; right: 0; font-family: var(--wp--preset--font-family--display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; color: var(--wp--preset--color--muted); }
@media (max-width: 900px) {
	.pelo-hero { grid-template-columns: 1fr; }
	.pelo-hero__poster { margin-top: 2.2rem; }
	.pelo-hero__poster::before { left: 0; right: auto; }
}

/* ---------- Fascia "cerca con una foto" ---------- */
.pelo-photo-band { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem 3.5rem; align-items: center; }
.pelo-photo-band h2 { color: #fff; margin: 0 0 .8rem; }
.pelo-photo-band p { color: #dfe7f7; margin: 0 0 1rem; max-width: 52ch; }
.pelo-photo-band .pelo-btn { background: #fff; color: #0745b5 !important; border-color: #fff; }
.pelo-photo-band .pelo-btn:hover { background: #e6ecf8; border-color: #e6ecf8; }
.pelo-photo-band ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: .9rem; }
.pelo-photo-band li { counter-increment: s; display: grid; grid-template-columns: 2.2rem 1fr; gap: .8rem; color: #fff; border-top: 1px solid rgba(255,255,255,.28); padding-top: .9rem; }
.pelo-photo-band li::before { content: counter(s, decimal-leading-zero); font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 1.5rem; line-height: 1; color: #fff; opacity: .7; }
.pelo-photo-band li strong { display: block; }
@media (max-width: 860px) { .pelo-photo-band { grid-template-columns: 1fr; } }

/* ---------- Consigli ---------- */
.pelo-tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.pelo-tips > div { border-top: 2px solid var(--wp--preset--color--ink); padding-top: .9rem; }
.pelo-tips h3 { margin: 0 0 .5rem; font-size: 1.45rem; text-transform: uppercase; }
.pelo-tips p, .pelo-tips li { color: #2c2f34; }
.pelo-tips ul { padding-left: 1.1rem; margin: 0; }
@media (max-width: 860px) { .pelo-tips { grid-template-columns: 1fr; } }

/* ---------- Articoli e commenti ---------- */
.wp-block-post-featured-image img { border-radius: var(--wp--custom--radius); }
.wp-block-comments { margin-top: 2.4rem; border-top: 2px solid var(--wp--preset--color--ink); padding-top: 1rem; }
.wp-block-post-comments-form input:not([type=submit]):not([type=checkbox]), .wp-block-post-comments-form textarea { border: 1.5px solid #c4c9d1; border-radius: 4px; padding: .68em .8em; font: inherit; }
.wp-block-post-comments-form input:not([type=submit]):not([type=checkbox]):focus, .wp-block-post-comments-form textarea:focus { outline: none; border-color: var(--wp--preset--color--brand); box-shadow: 0 0 0 3px rgba(7,69,181,.18); }
.wp-block-query .wp-block-post .wp-block-post-featured-image img { aspect-ratio: 16/10; object-fit: cover; }

/* ---------- Footer ---------- */
.pelo-footer a { color: #fff; text-decoration: none; }
.pelo-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pelo-footer h3 { text-transform: uppercase; letter-spacing: .03em; }
.pelo-footer ul { list-style: none; padding: 0; margin: 0; }
.pelo-footer__mark { width: 84px; height: auto; margin-bottom: .6rem; }

/* ---------- Accessibilità ---------- */
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }

/* Mobile: il pulsante "Pubblica annuncio" è già nell'hero e nel menu */
.pelo-header .wp-block-button__link { white-space: nowrap; }
@media (max-width: 520px) { .pelo-header .wp-block-buttons { display: none; } }
