/*
 * site.css — tutto ciò che non si imposta dai pannelli di Elementor free:
 *  1. header, menu e footer (in codice nel tema)
 *  2. form contatti, player video e schede generate dagli shortcode del plugin
 *  3. rifiniture per i widget Elementor (classi ag-*, assegnate in Avanzate → Classi CSS)
 *
 * Colori, font, spaziature e layout delle pagine si modificano in Elementor;
 * il design di base (titoli, schede, pagine singole) è in base.css.
 */

/* ============================ 1. HEADER · MENU · FOOTER ============================ */

.site-header { position: relative; z-index: 20; }
.site-header #nav a { font-family: 'Bebas Kai', 'BebasKai', sans-serif; font-size: 21px; }
.site-footer .footer-logo img { width: 80px; height: auto; }
.admin-bar .site-header { top: 0; }

@media (max-width: 1400px) {
	.site-header .menu { display: flex; flex-direction: column; justify-content: center; gap: 5px; align-items: center; width: 46px; height: 46px; }
	.site-header .menu span { display: block; width: 25px; height: 2px; background: currentColor; }
	.site-header #nav { display: none; position: absolute; top: 100%; right: 24px; width: min(420px, calc(100vw - 48px)); padding: 24px; background: #f2eee5; border: 1px solid #d5cfc2; box-shadow: 0 14px 28px #20272115; box-sizing: border-box; }
	.site-header #nav.open { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
	.site-header #nav a { white-space: normal; }
}
@media (max-width: 450px) {
	.site-header #nav.open { grid-template-columns: 1fr; }
	.site-header #nav a { font-size: 22px; }
}

/* Credits: note legali + firma dello studio */
.site-credits { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; padding: 22px 40px; border-top: 1px solid #d5cfc2; background: #f2eee5; font: 400 14px/1.5 Arial, Helvetica, sans-serif; color: #181818; }
.site-credits p { margin: 0; }
.site-credits__links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.site-credits a { color: inherit; text-decoration: none; }
.site-credits a:hover { color: #b62429; }
.site-credits__text a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 700px) { .site-credits { padding: 22px 20px; flex-direction: column; align-items: flex-start; } }

/* ============================ 2. PLUGIN: FORM, VIDEO, SCHEDE ============================ */

/* Form contatti: campi a filo, etichette come gli occhielli del sito, due colonne su desktop */
.ca-contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 32px; margin: 0; }
.ca-contact-form > * { min-width: 0; }
.ca-contact-form label { display: block; margin: 0; font: 600 10px/1.7 Arial, Helvetica, sans-serif; letter-spacing: .17em; text-transform: uppercase; color: #696b64; transition: color .15s; }
.ca-contact-form label:focus-within { color: #b62429; }
.ca-contact-form input:not([type=checkbox]),
.ca-contact-form textarea { display: block; width: 100%; box-sizing: border-box; margin: 4px 0 0; padding: 10px 0 12px; background: transparent; color: #181818; border: 0; border-bottom: 1px solid #181818; border-radius: 0; font: 400 19px/1.5 Georgia, serif; letter-spacing: 0; text-transform: none; transition: border-color .15s, box-shadow .15s; }
.ca-contact-form input:not([type=checkbox]):focus,
.ca-contact-form textarea:focus { outline: none; border-color: #b62429; box-shadow: 0 1px 0 #b62429; }
.ca-contact-form input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px #f7f4ef inset; -webkit-text-fill-color: #181818; }
.ca-contact-form label:has(textarea) { grid-column: 1 / -1; }
.ca-contact-form textarea { min-height: 170px; margin-top: 10px; padding: 16px 18px; background: #fff; border: 1px solid #d9dad2; resize: vertical; }
.ca-contact-form textarea:focus { border-color: #b62429; box-shadow: 0 0 0 1px #b62429; }
.ca-contact-form .ca-consent { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 14px; font: 400 15px/1.6 Georgia, serif; letter-spacing: 0; text-transform: none; color: #181818; }
.ca-contact-form .ca-consent input { flex: none; appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 2px 0 0; padding: 0; border: 1px solid #181818; border-radius: 0; background: transparent center / 14px no-repeat; cursor: pointer; transition: background-color .15s; }
.ca-contact-form .ca-consent input:checked { background-color: #181818; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M2 7.5l3.2 3L12 3.5'/%3E%3C/svg%3E"); }
.ca-contact-form .ca-consent input:focus-visible { outline: 2px solid #b62429; outline-offset: 3px; }
.ca-contact-form .ca-consent a { text-decoration: underline; text-underline-offset: 3px; }
.ca-contact-form .ca-consent a:hover { color: #b62429; }
.ca-contact-form button[type=submit] { grid-column: 1 / -1; justify-self: start; margin-top: 6px; padding: 18px 30px; background: #181818; color: #fff; border: 1px solid #181818; border-radius: 0; font: 400 12px/1.5 Arial, Helvetica, sans-serif; cursor: pointer; transition: background-color .15s, border-color .15s; }
.ca-contact-form button[type=submit]:hover { background: #b62429; border-color: #b62429; }
.ca-contact-form button[type=submit]:focus-visible { outline: 2px solid #b62429; outline-offset: 4px; }
.ca-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ca-form-status { margin: 0 0 30px; padding: 18px 22px; border-left: 4px solid #b62429; background: #e8eae4; font: 400 17px/1.55 Georgia, serif; }
@media (max-width: 640px) {
	.ca-contact-form { grid-template-columns: 1fr; gap: 26px; }
	.ca-contact-form input:not([type=checkbox]),
	.ca-contact-form textarea { font-size: 18px; }
	.ca-contact-form button[type=submit] { justify-self: stretch; text-align: center; }
}

.ca-youtube { width: 100%; }
.ca-youtube-load { display: block; position: relative; width: 100%; aspect-ratio: 16/9; padding: 0; border: 0; background: #202721; color: white; cursor: pointer; }
/* doppia classe: deve vincere su «.elementor img { height: auto }» dentro le pagine Elementor */
.ca-youtube .ca-youtube-load img { width: 100%; height: 100%; object-fit: contain; }
.ca-youtube-load span { position: absolute; bottom: 14px; left: 14px; padding: 10px 16px; background: #202721; color: white; }
.ca-youtube iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
/* Pagina Video: tessere verticali 3:4 (gli Shorts sono 9:16), come nel disegno originale */
.video-tile .ca-youtube .ca-youtube-load { aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; background: #e9eae5; }
.video-tile .ca-youtube .ca-youtube-load img { object-fit: cover; object-position: center 25%; transition: transform .2s; }
.video-tile:hover .ca-youtube-load img { transform: scale(1.025); }
.video-tile .ca-youtube iframe { aspect-ratio: 3/4; border-radius: 16px; }
@media (prefers-reduced-motion: reduce) { .video-tile .ca-youtube .ca-youtube-load img { transition: none; } }
video { display: block; width: 100%; max-height: 70vh; background: #202721; }
.video-tile { min-width: 0; }
.video-tile[hidden] { display: none !important; }
.video-tile .fine { font-size: 12px; line-height: 1.5; }
.ca-pagination, nav.ca-pagination { position: static; inset: auto; transform: none; display: flex; gap: 12px; flex-wrap: wrap; width: auto; margin: 25px 0; padding: 0; background: none; border: 0; box-shadow: none; }
.ca-pagination a { padding: 8px 12px; }
.ca-pagination [aria-current] { background: #202721; color: white; }
.prose img { max-width: 100%; height: auto; }

/* Rassegna stampa: schede generate da [ca_media_section] / [ca_timeline] */
.ca-press .ca-reader .pages img { display: block; max-width: 100%; height: auto; }
.ca-press .ca-reader { margin: 15px 0; }
.ca-press .ca-feature-image { width: 100%; height: auto; display: block; margin: 18px 0; }
.ca-press .original-frame video { height: 100%; object-fit: contain; }
.ca-press .minor .world-image { height: 220px; }
/* Scheda singola di un'uscita (index.php) */
.ca-press--single { background: #f5f1e9; padding: 30px 0 60px; }
.ca-press--single > p:first-child { margin-bottom: 24px; font: 12px Arial, sans-serif; }

/* ============================ 3. WIDGET ELEMENTOR ============================ */

/* L'ultimo paragrafo di un Editor di testo non aggiunge spazio: lo spazio è il margine del widget. */
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }
.elementor-widget-image figure { margin: 0; }
.elementor-widget-image .widget-image-caption { font-style: normal; }
.elementor-button { transition: color .15s, background-color .15s, border-color .15s; }

.ag-accent { color: var(--e-global-color-secondary, #b62429); }
.ag-num { color: var(--e-global-color-secondary, #b62429); margin-right: 20px; }
.ag-wrap-normal .elementor-heading-title { text-wrap: initial; }
.ag-wrap-pretty .elementor-heading-title { text-wrap: pretty; }

/* Home · ritratto: il soggetto resta nell'inquadratura */
.ag-portrait img { object-position: 64% center; display: block; }
@media (max-width: 767px) { .ag-portrait img { object-position: 64% 42%; } }

/* Home · riquadri «Continua a conoscermi»: titolo rosso al passaggio */
a.ag-card:hover h3 { color: var(--e-global-color-secondary, #b62429); }

/* Cornice tratteggiata + trattino rosso (fotografie editoriali) */
.ag-stitch { isolation: isolate; }
.ag-stitch::before { content: ""; position: absolute; inset: 13px; z-index: -1; pointer-events: none; border: 1px dashed #9a9f92; border-radius: 20px 20px 2px; }
.ag-stitch::after { content: ""; position: absolute; right: 30px; bottom: 18px; width: 44px; height: 3px; background: var(--e-global-color-secondary, #b62429); }
.ag-photo img { width: 100%; max-height: 620px; object-fit: cover; display: block; }
.ag-photo .widget-image-caption { padding-right: 60px; }
@media (max-width: 600px) { .ag-photo img { max-height: 480px; } }

/* Foto a filo (chiusura delle pagine servizi) */
.ag-photo-flat img { width: 100%; height: auto; display: block; }
.ag-photo-flat .widget-image-caption { padding: 0 20px 12px; }

/* Riquadro con contorno tratteggiato interno (Chi sono · firma) */
.ag-outline { outline: 1px dashed #929889; outline-offset: -12px; }
.ag-caption-inset .widget-image-caption { padding: 0 5px 5px; }

/* Traguardi · prima foto dell'album: intera, mai tagliata */
.ag-album-wide img { width: 100%; max-height: 640px; object-fit: contain; background: #eee; }

/* Dicono di me · indice delle sezioni */
.ag-press-nav b { color: #ab302c; margin-right: 8px; font-weight: 700; }

/* ============================ 4. BANNER COOKIE (plugin CookieAdmin) ============================ */

body .cookieadmin_law_container .cookieadmin_btn.cookieadmin_accept_btn,
body .cookieadmin_cookie_modal .cookieadmin_btn.cookieadmin_accept_btn { background: #181818 !important; border-color: #181818 !important; color: #fff !important; }
body .cookieadmin_law_container .cookieadmin_btn.cookieadmin_accept_btn:hover,
body .cookieadmin_cookie_modal .cookieadmin_btn.cookieadmin_accept_btn:hover { background: #b62429 !important; border-color: #b62429 !important; }
body .cookieadmin_remark, body .cookieadmin_showmore, body .cookieadmin_header .cookieadmin_act { color: #181818 !important; }
body input:checked + .cookieadmin_slider, body input:disabled + .cookieadmin_slider { background-color: #181818 !important; }

/* Filtri dei Pensieri: campi uniformi, uguali su ogni browser (anche iOS) */
.filters label { display: block; font: 600 10px/1.7 Arial, Helvetica, sans-serif; letter-spacing: .17em; text-transform: uppercase; color: #696b64; }
.filters input, .filters select { display: block; width: 100%; max-width: none; height: 52px; margin: 8px 0 0; padding: 0 16px; box-sizing: border-box; background-color: #fff; color: #181818; border: 1px solid #b5b8af; border-radius: 0; font: 400 16px/1.2 Georgia, serif; letter-spacing: 0; text-transform: none; -webkit-appearance: none; appearance: none; }
.filters input:focus, .filters select:focus { outline: none; border-color: #b62429; box-shadow: 0 0 0 1px #b62429; }
.filters select { padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23181818' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 12px; }
.filters button { height: 52px; margin: 0; padding: 0 28px; }
@media (max-width: 767px) {
	.filters { display: grid; gap: 18px; }
	.filters button { width: 100%; margin: 0; }
}

/* ============================ 5. RIFINITURE MOBILE ============================ */

@media (max-width: 767px) {
	/* Banner cookie: più compatto, non copre metà schermo */
	body .cookieadmin_law_container { max-height: 70vh; overflow-y: auto; }
	body .cookieadmin_law_container .cookieadmin_consent_inside { padding: 14px 16px 10px !important; }
	body .cookieadmin_law_container .cookieadmin_notice_con,
	body .cookieadmin_law_container .cookieadmin_notice_con * { font-size: 13px !important; line-height: 1.45 !important; }
	body .cookieadmin_law_container .cookieadmin_consent_btns { display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: 8px !important; margin-top: 10px !important; }
	body .cookieadmin_law_container .cookieadmin_consent_btns .cookieadmin_btn { flex: 1 1 0; min-width: 0; margin: 0 !important; padding: 11px 6px !important; font-size: 13px !important; white-space: nowrap; }
	body .cookieadmin_law_container .cookieadmin_consent_btns .cookieadmin_customize_btn { flex: 1 1 100%; order: 3; }
	body .cookieadmin_law_container .cookieadmin_consent_btns .cookieadmin_accept_btn { order: 1; }
	body .cookieadmin_law_container .cookieadmin_consent_btns .cookieadmin_reject_btn { order: 2; }

	/* Footer: voci più comode da toccare */
	.site-footer div a { display: inline-block; padding: 9px 0; font-size: 14px; }
	.site-credits__links a { display: inline-block; padding: 6px 0; }

}
