/*
Theme Name: Centro Congressi Alessandria
Theme URI: https://centrocongressialessandria.it
Author: Diomira
Description: Tema a blocchi su misura per Centro Congressi Alessandria, nel blu del logo.
Version: 1.1.1
Requires at least: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: cca
*/

/* ---- base ---- */
:root { --cca-r: 10px; --cca-shadow: 0 1px 2px rgba(15,23,32,.06), 0 8px 24px rgba(15,23,32,.06); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--wp--preset--color--gold); outline-offset: 2px; }
img { height: auto; }
.has-tabular { font-variant-numeric: tabular-nums; }

.cca-eyebrow {
	font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
	color: var(--wp--preset--color--muted); margin: 0;
}
.cca-eyebrow.is-light { color: #c9d4de; }
.cca-lead { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--muted); max-width: 60ch; }

/* ---- header ---- */
.cca-header { position: sticky; top: 0; z-index: 50; background: var(--wp--preset--color--surface); border-bottom: 1px solid var(--wp--preset--color--line); }
.admin-bar .cca-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .cca-header { top: 0; position: relative; } }
.cca-header .wp-block-site-logo img { width: auto; max-height: 48px; }
.cca-header .wp-block-navigation .wp-block-navigation-item__content { padding: .35rem 0; }
.cca-header .wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--blue); }
.cca-header .wp-block-navigation__submenu-container { border: 1px solid var(--wp--preset--color--line) !important; border-radius: 8px; padding: .4rem 0; box-shadow: var(--cca-shadow); min-width: 230px !important; }
.cca-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .5rem 1rem !important; }
.cca-header .wp-block-button__link { padding: .6rem 1.1rem; font-size: .92rem; white-space: nowrap; }
@media (max-width: 600px) { .cca-header .cca-header-cta { display: none; } }
.wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem max(16px, env(safe-area-inset-left, 0px)); }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.15rem; }

/* ---- hero ---- */
.cca-hero.wp-block-cover { min-height: 0 !important; }
.cca-hero .wp-block-cover__background { background: linear-gradient(90deg, rgba(8,14,22,.88) 0%, rgba(8,14,22,.58) 50%, rgba(8,14,22,.12) 100%) !important; opacity: 1 !important; }
.cca-hero h1 { color: #fff; max-width: 14ch; letter-spacing: -.025em; font-size: var(--wp--preset--font-size--huge); }
.cca-hero h1 mark { background: none; color: #8ccaf5; }
.cca-hero .cca-lead { color: #e3e9ef; max-width: 46ch; }
.is-style-outline-light .wp-block-button__link, .wp-block-button.is-style-outline-light .wp-block-button__link { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.55); }
.wp-block-button.is-style-outline-light .wp-block-button__link:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--wp--preset--color--ink); border: 1.5px solid var(--wp--preset--color--line); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--wp--preset--color--ink); }

/* numeri chiave */
.cca-facts { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px !important; background: rgba(255,255,255,.18); border-radius: var(--cca-r); overflow: hidden; }
.cca-facts > * { background: rgba(10,18,27,.62); backdrop-filter: blur(6px); padding: 16px 18px; margin: 0 !important; }
.cca-facts strong { display: block; font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.cca-facts span { font-size: .86rem; color: #c9d4de; }
@media (max-width: 700px) { .cca-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- card spazi (cover in griglia) ---- */
.cca-spaces { display: grid !important; grid-template-columns: 1.35fr 1fr 1fr; grid-auto-rows: minmax(250px, auto); gap: 16px !important; }
.cca-spaces > .wp-block-cover { margin: 0 !important; border-radius: var(--cca-r); overflow: hidden; min-height: 250px !important; align-items: flex-end; padding: 20px !important; }
.cca-spaces > .wp-block-cover .wp-block-cover__background { background: linear-gradient(0deg, rgba(6,10,16,.9), rgba(6,10,16,.05) 65%) !important; opacity: 1 !important; }
.cca-spaces > .wp-block-cover img { transition: transform .5s; }
.cca-spaces > .wp-block-cover:hover img { transform: scale(1.04); }
.cca-spaces > .wp-block-cover:first-child { grid-row: span 2; }
.cca-spaces > .wp-block-cover:last-child { grid-column: span 2; }
.cca-spaces h3 { color: #fff; margin: 0; font-size: 1.5rem; }
.cca-spaces > .wp-block-cover:first-child h3 { font-size: 2rem; }
.cca-spaces h3 a { color: inherit; text-decoration: none; }
.cca-spaces h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.cca-spaces p { color: #d6dee6; margin: .3rem 0 0; font-size: .92rem; }
@media (max-width: 860px) { .cca-spaces { grid-template-columns: 1fr 1fr; } .cca-spaces > .wp-block-cover:first-child { grid-column: span 2; grid-row: auto; min-height: 340px !important; } }
@media (max-width: 520px) { .cca-spaces { grid-template-columns: 1fr; } .cca-spaces > .wp-block-cover:first-child, .cca-spaces > .wp-block-cover:last-child { grid-column: auto; } }

/* ---- servizi ---- */
.cca-services { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 2.5rem !important; }
.cca-services > * { margin: 0 !important; }
.cca-services h3 { margin: 0 0 .35rem; display: flex; gap: .6rem; align-items: center; }
.cca-services h3::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--wp--preset--color--blue); flex: none; }
.cca-services p { color: var(--wp--preset--color--muted); margin: 0; }
@media (max-width: 860px) { .cca-services { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cca-services { grid-template-columns: 1fr; } }

/* ---- come funziona ---- */
ol.cca-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--wp--preset--color--ink); counter-reset: s; }
ol.cca-steps li { counter-increment: s; padding: 1.25rem 1.4rem 0 0; color: var(--wp--preset--color--muted); }
ol.cca-steps li::before { content: counter(s); display: block; font: 800 2.6rem/1 var(--wp--preset--font-family--display); color: var(--wp--preset--color--blue); margin-bottom: .75rem; }
ol.cca-steps li strong { display: block; color: var(--wp--preset--color--ink); font-family: var(--wp--preset--font-family--display); font-size: 1.25rem; margin-bottom: .35rem; }
@media (max-width: 820px) { ol.cca-steps { grid-template-columns: 1fr 1fr; row-gap: 1.25rem; } }
@media (max-width: 480px) { ol.cca-steps { grid-template-columns: 1fr; } }

/* ---- bande ---- */
.cca-band { background: var(--wp--preset--color--surface); border-block: 1px solid var(--wp--preset--color--line); }
.cca-cta { background: var(--wp--preset--color--blue); }
.cca-cta h2 { color: #fff; max-width: 22ch; }
.cca-cta .wp-block-button__link { background: #fff !important; color: var(--wp--preset--color--blue-dark) !important; }
.cca-cta .wp-block-button__link:hover { background: var(--wp--preset--color--blue-soft) !important; }

/* ---- foto ---- */
.cca-rounded img, .cca-rounded.wp-block-image img { border-radius: var(--cca-r); }
.cca-gallery.wp-block-gallery img { border-radius: 8px; }
.cca-gallery.wp-block-gallery.has-nested-images figure.wp-block-image figcaption { border-radius: 0 0 8px 8px; }
.wp-block-image figcaption, .wp-block-gallery figcaption { font-size: .85rem; color: var(--wp--preset--color--muted); }

/* eventi ospitati */
.cca-hosted figure { position: relative; margin: 0; }
.cca-hosted figure img { aspect-ratio: 16/10; object-fit: cover; width: 100%; border-radius: var(--cca-r); }
.cca-hosted figcaption { position: absolute; left: 12px; bottom: 12px; margin: 0 !important; background: var(--wp--preset--color--surface); color: var(--wp--preset--color--ink) !important; padding: 6px 12px; border-radius: 999px; font-size: .86rem !important; font-weight: 600; }

/* loghi */
.cca-logos.wp-block-gallery { gap: 12px !important; }
.cca-logos.wp-block-gallery figure.wp-block-image { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 8px; padding: 14px; display: flex; align-items: center; justify-content: center; aspect-ratio: 3/2; }
.cca-logos.wp-block-gallery figure.wp-block-image img { object-fit: contain !important; max-height: 72px; width: auto !important; height: auto !important; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.cca-logos.wp-block-gallery figure.wp-block-image:hover img { filter: none; opacity: 1; }

/* ---- pagina sala ---- */
.cca-facts-card { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: var(--cca-r); padding: 1.4rem !important; }
@media (min-width: 782px) { .cca-sticky { position: sticky; top: 96px; } }
.cca-kv { width: 100%; border-collapse: collapse; font-size: .95rem; margin: .5rem 0 1rem; }
.cca-kv td { padding: .5rem 0; border-bottom: 1px solid var(--wp--preset--color--line); vertical-align: top; }
.cca-kv td:first-child { color: var(--wp--preset--color--muted); padding-right: 1rem; }
.cca-kv td:last-child { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.wp-block-table.cca-kv-wrap table { border: 0; }
.wp-block-table.cca-kv-wrap td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: .5rem 0; }
.wp-block-table.cca-kv-wrap td:first-child { color: var(--wp--preset--color--muted); }
.wp-block-table.cca-kv-wrap td:last-child { font-weight: 600; text-align: right; }

ul.cca-checks { list-style: none; padding: 0; columns: 2; column-gap: 2rem; }
ul.cca-checks li { break-inside: avoid; padding: .55rem 0 .55rem 1.7rem; border-bottom: 1px solid var(--wp--preset--color--line); position: relative; }
ul.cca-checks li::before { content: ""; position: absolute; left: 3px; top: 1.05rem; width: 12px; height: 7px; border-left: 2px solid var(--wp--preset--color--blue); border-bottom: 2px solid var(--wp--preset--color--blue); transform: rotate(-45deg); }
@media (max-width: 700px) { ul.cca-checks { columns: 1; } }

/* intestazione pagine interne */
.cca-pagehead { background: var(--wp--preset--color--surface); border-bottom: 1px solid var(--wp--preset--color--line); }
.cca-pagehead .wp-block-post-title { margin-top: .4rem; }
.cca-crumb { font-size: .86rem; color: var(--wp--preset--color--muted); }
.cca-crumb a { color: var(--wp--preset--color--muted); }

/* card generiche */
.cca-card { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: var(--cca-r); }
.cca-quote { background: var(--wp--preset--color--blue-soft); border-radius: var(--cca-r); }
.cca-quote blockquote { margin: 0; padding: 0; }
.cca-quote cite { font-family: var(--wp--preset--font-family--body); font-size: .9rem; font-weight: 400; color: var(--wp--preset--color--muted); font-style: normal; }

/* post griglia */
.cca-posts .wp-block-post { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: var(--cca-r); overflow: hidden; }
.cca-posts .wp-block-post-featured-image img { aspect-ratio: 16/10; object-fit: cover; }
.cca-posts .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.cca-posts .wp-block-post-title a:hover { color: var(--wp--preset--color--blue); }

/* dettagli (come raggiungerci) */
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--line); padding: .9rem 0; }
.wp-block-details summary { font-weight: 700; font-family: var(--wp--preset--font-family--display); font-size: 1.15rem; cursor: pointer; }
.wp-block-details > *:not(summary) { color: var(--wp--preset--color--muted); }

/* testimonianze dal portale */
.cca-testimonials { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cca-testimonials figure { margin: 0; background: var(--wp--preset--color--blue-soft); border-radius: var(--cca-r); padding: 1.5rem; }
.cca-testimonials blockquote { margin: 0; font: 600 1.15rem/1.4 var(--wp--preset--font-family--display); }
.cca-testimonials figcaption { margin-top: .75rem; color: var(--wp--preset--color--muted); font-size: .9rem; }

/* footer */
.cca-footer { background: var(--wp--preset--color--night); color: #c9d4de; }
.cca-footer a { color: #e7edf3; }
.cca-footer a:hover { color: #fff; }
.cca-footer h2, .cca-footer h3 { color: #8fa0b1; font-family: var(--wp--preset--font-family--body); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.cca-footer p { margin: .2rem 0; font-size: .95rem; }
.cca-footer .cca-network img { max-height: 44px; width: auto; background: #fff; border-radius: 6px; padding: 6px 8px; }
.cca-footer .wp-block-site-logo img { background: #fff; border-radius: 8px; padding: 8px 10px; }

/* mappa contatti */
.cca-map iframe { display: block; width: 100%; aspect-ratio: 16/7; min-height: 320px; border: 0; border-radius: var(--cca-r); background: var(--wp--preset--color--line); }
@media (max-width: 600px) { .cca-map iframe { aspect-ratio: 4/5; } }
