/*
 * CSS PRINCIPALE Casearia Pugliese: header, footer, griglia Betheme, home.
 * Misure prese dall'originale dal vivo (1366px): vedi EFFETTI-ORIGINALE.md.
 */

/* ---------- Base ---------- */
html { background: #fcfcfc; }
body { font-family: var(--cp-font-body); font-size: var(--cp-fs-body); line-height: var(--cp-lh-body); color: var(--cp-color-text); background: var(--cp-color-bg); }
h1, h2, h3, h4, h5 { font-family: var(--cp-font-heading); color: var(--cp-color-heading); margin: 0 0 15px; letter-spacing: normal; }
h1 { font-size: var(--cp-fs-h1); line-height: var(--cp-lh-h1); font-weight: 600; }
h2 { font-size: var(--cp-fs-h2); line-height: var(--cp-lh-h2); font-weight: 600; }
h4 { font-size: var(--cp-fs-h4); line-height: var(--cp-lh-h4); font-weight: 400; }
h5 { font-size: var(--cp-fs-h5); line-height: var(--cp-lh-h5); font-weight: 400; }
p { margin: 0 0 15px; }
.cp-big { font-size: var(--cp-fs-big); line-height: var(--cp-lh-big); color: var(--cp-color-muted); }
.cp-accent { color: var(--cp-color-accent); }
img { max-width: 100%; height: auto; }

/* ---------- Griglia Betheme: wrapper 1220, colonne con margine 12px ---------- */
.cp-wrap { max-width: var(--cp-width); margin-inline: auto; }
.cp-row { display: flex; flex-wrap: wrap; }
.cp-col { margin: 0 var(--cp-col-gap); width: calc(100% - 2 * var(--cp-col-gap)); }
.cp-col--1-3 { width: calc(33.333% - 2 * var(--cp-col-gap)); }
.cp-col--2-3 { width: calc(66.666% - 2 * var(--cp-col-gap)); }
.cp-col--1-2 { width: calc(50% - 2 * var(--cp-col-gap)); }
@media (min-width: 960px) and (max-width: 1239px) { .cp-wrap { max-width: 940px; } }
@media (min-width: 768px) and (max-width: 959px) { .cp-wrap { max-width: 728px; } }
@media (max-width: 767px) {
	.cp-wrap { max-width: none; padding-inline: 33px; }
	.cp-col, .cp-col--1-3, .cp-col--2-3, .cp-col--1-2 { width: 100%; margin: 0; }
}

/* ---------- Pulsante Betheme (button_size_2, animazione "slide right") ---------- */
.cp-button { position: relative; display: inline-block; overflow: hidden; padding: 0 20px; border-radius: var(--cp-radius-btn); background: var(--cp-color-accent); color: #fff; font-size: 15px; line-height: 18px; text-decoration: none; transition: color var(--cp-speed) var(--cp-ease), background-color var(--cp-speed) var(--cp-ease); }
.cp-button span { position: relative; z-index: 1; }
.cp-button::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(0, 0, 0, .05); transition: width .3s ease-in-out; }
.cp-button:hover { color: #fff; }
.cp-button:hover::after { width: 100%; }
.cp-btn-wrap { margin: 40px 0 0; }

/* ---------- Header ---------- */
.cp-header { position: sticky; top: 0; z-index: 100; background: var(--cp-color-header-sticky); }
.cp-header__inner { display: flex; align-items: center; justify-content: center; min-height: var(--cp-header-h-mobile); padding: 0 20px; position: relative; }
.cp-logo__img { display: block; width: 63px; height: 60px; max-height: none; object-fit: contain; }
.cp-nav-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #fff; }
.cp-nav { inset: var(--cp-header-h-mobile) 0 0 0; background: var(--cp-color-header-sticky); }
.cp-menu a { color: var(--cp-color-heading); font-weight: 400; font-size: 14px; }
.cp-menu .current-menu-item > a, .cp-menu a[aria-current="page"], .cp-menu a:hover { color: var(--cp-color-menu-active); }

@media (min-width: 1240px) {
	.cp-header { position: absolute; top: 0; left: 0; right: 0; background: transparent; transition: background-color .3s, box-shadow .3s; }
	.admin-bar .cp-header { top: 32px; }
	.cp-header__inner { justify-content: flex-start; min-height: var(--cp-header-h); padding: 0 20px; }
	.cp-logo { margin-right: 30px; }
	.cp-nav-toggle { display: none; }
	.cp-nav { position: static; visibility: visible; opacity: 1; transform: none; padding: 0; background: none; overflow: visible; }
	.cp-nav .cp-menu { display: flex; margin: 0; padding: 0; list-style: none; }
	.cp-menu a { padding: 0 20px; line-height: var(--cp-header-h); color: #fff; }
	.cp-menu .current-menu-item > a, .cp-menu a[aria-current="page"], .cp-menu a:hover { color: var(--cp-color-menu-active); }
	/* Header fisso dopo lo scroll (Betheme "sticky"): grigio chiaro, 60px, ombra */
	.cp-header.is-scrolled { position: fixed; background: var(--cp-color-header-sticky); box-shadow: var(--cp-shadow); }
	.cp-header.is-scrolled .cp-header__inner { min-height: var(--cp-header-h-scrolled); }
	.cp-header.is-scrolled .cp-logo__img { width: 37px; height: 35px; }
	.cp-header.is-scrolled .cp-menu a { line-height: var(--cp-header-h-scrolled); color: var(--cp-color-heading); }
	.cp-header.is-scrolled .cp-menu .current-menu-item > a, .cp-header.is-scrolled .cp-menu a:hover { color: var(--cp-color-menu-active); }
}

/* ---------- Slider iniziale (ex Revolution Slider, 1 slide fissa) ---------- */
.cp-hero { position: relative; display: flex; align-items: flex-start; justify-content: center; min-height: 100vh; background: #333 center / cover no-repeat; text-align: center; color: #fff; overflow: hidden; }
.cp-hero__inner { display: flex; flex-direction: column; align-items: center; padding: 176px 20px 40px; }
.cp-hero__logo img { width: 215px; height: auto; }
.cp-hero__title { max-width: 780px; margin: 80px 0 74px; color: #fff; font-size: 42px; line-height: 48px; font-weight: 600; }
.cp-hero__btn { padding: 12px 35px; font-family: var(--cp-font-button-slider); font-weight: 500; font-size: 17px; line-height: 17px; background: rgba(51, 190, 243, .75); }
.cp-hero__btn:hover { background: rgba(51, 190, 243, 1); }
.cp-hero__arrow { display: block; margin-top: 89px; animation: cp-bounce 2s ease-in-out infinite; }
.cp-hero__arrow img { width: 36px; height: auto; }
@keyframes cp-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(12px); } }
/* Entrata dei livelli come Revolution Slider: dal basso con dissolvenza, in sequenza */
.js .cp-reveal { opacity: 0; transform: translateY(40px); animation: cp-rise .9s cubic-bezier(.2, .7, .2, 1) forwards; }
.js .cp-hero__title.cp-reveal { animation-delay: .3s; }
.js .cp-hero__btn.cp-reveal { animation-delay: .6s; }
.js .cp-hero__arrow.cp-reveal { animation: cp-rise .9s cubic-bezier(.2, .7, .2, 1) .9s forwards, cp-bounce 2s ease-in-out 1.8s infinite; }
@keyframes cp-rise { to { opacity: 1; transform: none; } }
@media (max-width: 1239px) {
	.cp-hero { align-items: center; }
	.cp-hero__inner { padding: 20px 20px 30px; }
	.cp-hero__logo img { width: 160px; }
	.cp-hero__title { margin: 30px 0; font-size: 28px; line-height: 34px; }
	.cp-hero__arrow { margin-top: 30px; }
}

/* ---------- Sezioni ---------- */
.cp-intro { padding: 130px 0 100px; }
.cp-intro__sub { margin-bottom: 21px; }
.cp-intro__text { color: var(--cp-color-muted); }
.cp-ingredients { display: flex; gap: 24px; margin: 101px 0 0; padding: 0; list-style: none; }
.cp-ingredients li { flex: 1; text-align: center; }
.cp-ingredients img { height: 66px; width: auto; margin: 0 auto 21px; }
.cp-quality { padding: 0 0 141px; background-position: 50% 0; background-repeat: no-repeat; }
.cp-quality__title { font-size: var(--cp-fs-h1); line-height: var(--cp-lh-h1); }
.cp-pizzerie { padding: 110px 0 80px; background-position: 50% 0; background-repeat: no-repeat; }
.cp-products { padding: 120px 0 80px; background: #fff; }
.cp-pizzerie h2 + h4, .cp-products h2 + h4 { margin-top: 31px; }
.cp-products__img1 { display: block; width: 100%; }
.cp-products__wide { text-align: center; margin-top: 10px; }
.cp-products__img2 { display: inline-block; }
.cp-parallax { position: relative; height: 411px; overflow: hidden; background: var(--cp-color-bg-alt); }
.cp-parallax__img { position: absolute; left: 50%; top: 50%; width: 100%; min-width: 1920px; height: auto; max-width: none; transform: translate3d(-50%, calc(-50% + var(--cp-py, 0px)), 0); will-change: transform; }
.cp-reviews { padding: 100px 0 50px; background: var(--cp-color-bg-alt); text-align: center; }
.cp-review { margin: 0; }
.cp-review__photo { width: 83px; height: 83px; border-radius: 0; margin: 0 auto 37px; }
.cp-review blockquote { max-width: 973px; margin: 0 auto 25px; font-size: 17px; line-height: 25px; font-style: italic; color: var(--cp-color-quote); }
.cp-review__dots { display: flex; justify-content: center; gap: 6px; }
.cp-review__dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--cp-color-accent); }
.cp-reviews .cp-btn-wrap { margin-top: 65px; }
.cp-homemap { padding-bottom: 41px; }
.cp-homemap .cp-map iframe { display: block; width: 100%; height: 501px; border: 0; filter: grayscale(1) brightness(1.05); }


/* Tablet Betheme (768-1239): header 141px; sotto 960 testi scalati circa 0,86 */
@media (min-width: 768px) and (max-width: 1239px) { .cp-header__inner { min-height: 141px; } .cp-nav { inset: 141px 0 0 0; } }
@media (min-width: 768px) and (max-width: 959px) {
	:root { --cp-fs-h1: 77px; --cp-lh-h1: 77px; --cp-fs-h2: 36px; --cp-lh-h2: 40px; --cp-fs-h4: 19px; --cp-lh-h4: 26px; --cp-fs-h5: 17px; --cp-lh-h5: 21px; --cp-fs-big: 14px; --cp-lh-big: 24px; --cp-fs-body: 13px; --cp-lh-body: 18px; }
}
/* Mobile Betheme (sotto 768): testi scalati 0,6 con minimo 13px/19px, padding delle sezioni invariati */
@media (max-width: 767px) {
	:root { --cp-fs-h2: 25px; --cp-lh-h2: 28px; --cp-fs-h4: 13px; --cp-lh-h4: 19px; --cp-fs-h5: 13px; --cp-lh-h5: 19px; --cp-fs-big: 13px; --cp-lh-big: 19px; --cp-fs-body: 13px; --cp-lh-body: 19px; }
	.cp-ingredients { flex-direction: column; gap: 30px; }
	.cp-pizzerie, .cp-products { background-image: none !important; }
	.cp-parallax { height: 300px; }
	.cp-parallax__img { min-width: 0; width: auto; height: 100%; }
	.cp-review blockquote { max-width: 205px; font-size: 13px; line-height: 19px; }
	.cp-homemap .cp-map iframe { height: 350px; }
	.cp-footer { font-size: 13px; line-height: 19px; }
}

/* ---------- Footer ---------- */
.cp-footer { background: #fff; color: var(--cp-color-footer-text); padding: 0; font-size: 15px; line-height: 21px; }
.cp-footer a { color: var(--cp-color-primary); text-decoration: none; }
.cp-footer a:hover { color: var(--cp-color-primary-dark); }
.cp-footer__widgets { display: flex; flex-wrap: wrap; padding: 45px 0 15px; }
.cp-footer__col { width: calc(25% - 2 * var(--cp-col-gap)); margin: 0 var(--cp-col-gap) 30px; }
.cp-footer__col--logo { text-align: center; }
.cp-footer__logo { width: 150px; height: auto; display: inline-block; }
.cp-footer h4 { margin-bottom: 15px; }
.cp-footer address { font-style: normal; }
.cp-footer__social { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; }
.cp-footer__social img { width: 35px; height: 35px; display: block; }
.cp-footer__copy { padding: 45px 0 46px; text-align: center; }
.cp-footer__copy p { margin: 0; }
@media (max-width: 767px) {
	.cp-footer__widgets { padding-inline: 45px; }
	.cp-footer__col { width: 100%; margin: 0 0 30px; }
	.cp-footer__copy .cp-wrap { padding-inline: 45px; }
}
@media (prefers-reduced-motion: reduce) {
	.js .cp-reveal { opacity: 1; transform: none; animation: none !important; }
	.cp-hero__arrow { animation: none; }
}

/* Titoli della home su 3 righe come l originale (larghezza massima in em, scala con il font) */
.cp-intro h2, .cp-pizzerie h2 { max-width: 7.4em; }

/* Allineamento al menu originale (voci a 80px di passo, logo a 10px dalla prima voce) e al footer (colonna testi 225px, telefoni grigi) */
@media (min-width: 1240px) { .cp-menu { gap: 0; } .cp-logo { margin-right: 6px; } }
.cp-footer__col > p, .cp-footer address { max-width: 225px; }
.cp-footer a[href^="tel"] { color: inherit; }

/* Parole in evidenza dei titoli (campo con <em>): azzurro, senza corsivo; titolo azienda su 3 righe */
h1 em, h2 em, h3 em { font-style: normal; color: var(--cp-color-accent); }
.cp-story h2 { max-width: 6em; }

/* Mobile (sotto 1240): menu con margini come il contenuto, icona scura sul grigio (contrasto) */
@media (max-width: 1239px) { .cp-nav { padding: 20px 33px; } .cp-nav-toggle { color: var(--cp-color-heading); } }
/* Menu aperto: html con overflow hidden sposta lo sticky, quindi header fisso */
@media (max-width: 1239px) { html.nav-open .cp-header { position: fixed; top: 0; left: 0; right: 0; } }
