/* ===================================================
 * Fiorentino Cabinet — Templates CSS
 * Stili condivisi per archivi e singoli CPT
 * Derivato dai mockup, reso responsive.
 * =================================================== */

/* RESET base sui template (non globale per non rompere altre pagine Elementor) */
.fc-template, .fc-template *, .fc-template *::before, .fc-template *::after { box-sizing: border-box; }

/* CONTAINER principale —
 * .fc-template è solo tipografia + reset (definito in style.css).
 * Lo sfondo crema si applica SOLO ai template di pagina full-page
 * tramite la classe modificatrice .fc-page. Gli shortcode embedded
 * dentro pagine Elementor restano trasparenti per ereditare il bg
 * della pagina ospitante.
 */
.fc-template.fc-page { background: var(--fc-cream); padding: 0; }
.fc-template .fc-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============== HERO ============== */
.fc-hero { position: relative; min-height: 380px; overflow: hidden; background: var(--fc-green); }
.fc-hero-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.fc-hero-ov { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,8,4,0.78) 0%, rgba(10,8,4,0.15) 65%, transparent 100%); }
.fc-hero-ct { position: relative; z-index: 2; padding: 120px 24px 40px; max-width: 1200px; margin: 0 auto; }
.fc-eyebrow { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--fc-gold); margin-bottom: 12px; font-weight: 500; }
.fc-hero-title { font-family: var(--fc-font-serif); font-size: clamp(32px, 5vw, 48px); font-weight: 400; color: #F0EBE0; line-height: 1.1; margin: 0; }
.fc-hero-sub { font-size: 14px; color: #C8BFA0; font-weight: 300; margin-top: 14px; max-width: 540px; line-height: 1.7; }

/* ============== BREADCRUMB ============== */
.fc-bc { padding: 14px 24px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--fc-border); flex-wrap: wrap; max-width: 1200px; margin: 0 auto; }
.fc-bc a { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fc-muted); }
.fc-bc a:hover { color: var(--fc-gold); }
.fc-bc .sep { font-size: 11px; color: var(--fc-border); }
.fc-bc .cur { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fc-gold); }

/* ============== INTRO ============== */
.fc-intro { padding: 56px 24px 48px; border-bottom: 1px solid var(--fc-border); max-width: 1200px; margin: 0 auto; }
.fc-intro p { font-size: 15px; line-height: 1.9; color: var(--fc-body); font-weight: 300; max-width: 680px; }
.fc-intro p + p { margin-top: 16px; }
.fc-intro strong { font-weight: 500; color: var(--fc-dark); }
.fc-intro em { font-style: italic; }

/* ============== SECTION DIVIDER ============== */
.fc-sd { display: flex; align-items: center; gap: 18px; padding: 48px 24px 28px; max-width: 1200px; margin: 0 auto; }
.fc-sd .line { flex: 1; height: 1px; background: var(--fc-border); }
.fc-sd .text { font-size: 9px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--fc-muted); font-weight: 500; }

/* ============== GRID OPERE (cards) ============== */
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; padding: 0 24px 64px; max-width: 1200px; margin: 0 auto; }
.fc-card { background: var(--fc-card); border: 1px solid var(--fc-border); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; display: block; }
.fc-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.fc-card-img { aspect-ratio: 4/3; background: #C8BEA0; background-size: cover; background-position: center; border-bottom: 1px solid var(--fc-border); }
.fc-card-body { padding: 22px 24px 26px; }
/* Eyebrow originale: artista uppercase oro (per aste/progetti) */
.fc-card-eyebrow { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fc-gold); font-weight: 500; margin-bottom: 8px; }
/* Eyebrow variante titolo opera: corsivo serif piccolo (per opere) */
.fc-card-eyebrow.fc-card-eyebrow-title { font-family: var(--fc-font-serif); font-size: 14px; font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--fc-muted); }
/* Card title: artista in bold serif (per opere) o titolo per aste/progetti */
.fc-card-title { font-family: var(--fc-font-serif); font-size: 18px; font-weight: 500; color: var(--fc-dark); margin-bottom: 8px; line-height: 1.3; font-style: normal; }
.fc-card-meta { font-size: 12px; color: var(--fc-muted); margin-bottom: 10px; }
.fc-card-text { font-size: 13px; line-height: 1.75; color: #4A4030; font-weight: 300; margin-bottom: 14px; }
.fc-card-loc { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fc-muted); font-weight: 500; }
.fc-card-loc::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--fc-gold); }

/* ============== ROW (riga orizzontale - per progetti/aste) ============== */
.fc-rows { display: flex; flex-direction: column; gap: 18px; padding: 0 24px 56px; max-width: 1200px; margin: 0 auto; }
.fc-row { display: grid; grid-template-columns: 380px 1fr; border: 1px solid var(--fc-border); overflow: hidden; background: var(--fc-card); transition: box-shadow .25s ease; }
.fc-row:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.06); }
.fc-row-img { background: #C8BEA0; background-size: cover; background-position: center; border-right: 1px solid var(--fc-border); min-height: 240px; }
.fc-row-body { padding: 32px 36px; display: flex; flex-direction: column; justify-content: center; }
.fc-row-tag { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fc-gold); font-weight: 500; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.fc-row-tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--fc-gold); }
.fc-row-title { font-family: var(--fc-font-serif); font-size: 24px; font-weight: 400; color: var(--fc-dark); margin-bottom: 8px; line-height: 1.3; }
.fc-row-meta { font-size: 13px; color: var(--fc-muted); margin-bottom: 14px; }
.fc-row-text { font-size: 14px; line-height: 1.85; color: #4A4030; font-weight: 300; margin-bottom: 18px; }
.fc-row-status { display: inline-block; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; padding: 4px 12px; border: 1px solid var(--fc-gold); color: var(--fc-gold); margin-bottom: 14px; align-self: flex-start; }
.fc-row-status.concluded { color: var(--fc-muted); border-color: var(--fc-muted); }
.fc-row-link { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; color: var(--fc-dark); border-bottom: 1px solid var(--fc-dark); padding-bottom: 4px; align-self: flex-start; transition: color .2s ease, border-color .2s ease; }
.fc-row:hover .fc-row-link { color: var(--fc-gold); border-color: var(--fc-gold); }

/* ============== SINGOLA OPERA / SINGOLO POST ============== */
.fc-single { padding-bottom: 64px; }
.fc-single-hd { padding: 56px 24px 44px; border-bottom: 1px solid var(--fc-border); max-width: 1200px; margin: 0 auto; }
.fc-single-tag { font-size: 9px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--fc-gold); font-weight: 500; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.fc-single-tag::before { content: ''; flex: 0 0 30px; height: 1px; background: var(--fc-gold); }
.fc-single-title { font-family: var(--fc-font-serif); font-size: clamp(28px, 4vw, 38px); font-weight: 400; color: var(--fc-dark); line-height: 1.15; margin-bottom: 6px; }
.fc-single-opera-title { font-family: var(--fc-font-serif); font-size: clamp(22px, 3vw, 30px); font-style: italic; color: var(--fc-muted); font-weight: 400; line-height: 1.25; margin: 0; }
.fc-single-date { font-size: 15px; color: var(--fc-muted); font-weight: 300; margin-top: 10px; }
.fc-single-artist { font-family: var(--fc-font-serif); font-size: 17px; font-style: italic; color: var(--fc-muted); }
.fc-single-meta { font-size: 14px; color: var(--fc-muted); font-weight: 300; margin-top: 6px; }

.fc-single-body { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding: 52px 24px; max-width: 1200px; margin: 0 auto; align-items: start; }
.fc-single-body.reverse { grid-template-columns: 1fr 1fr; }
.fc-single-img { width: 100%; aspect-ratio: 3/4; background: #C8BEA0; background-size: cover; background-position: center; border: 1px solid var(--fc-border); }
.fc-single-img.landscape { aspect-ratio: 4/3; }
.fc-single-img.auto { aspect-ratio: auto; min-height: 400px; }
.fc-single-cap { font-size: 11px; color: var(--fc-muted); font-weight: 300; margin-top: 12px; line-height: 1.6; font-style: italic; }
/* Testo descrittivo — EB Garamond 20pt (usato sia da single-body che dal nuovo layout) */
.fc-single-text { font-family: var(--fc-font-body-serif); font-size: 20px; line-height: 1.75; color: var(--fc-body); font-weight: 400; }
.fc-single-text > *:first-child { margin-top: 0; padding-top: 0; }
.fc-single-text p { margin: 0 0 16px 0; }
.fc-single-text p:last-child { margin-bottom: 0; }
.fc-single-text p + p { margin-top: 0; }

/* ============== LAYOUT OPERA — Immagine sopra, contenuto sotto ==============
 * Usato da single-opera.php (layout "catalogo museale").
 * L'immagine mantiene l'aspect-ratio originale dell'opera.
 * I dati sotto su 2 colonne: testo (sinistra) + scheda tecnica (destra).
 * ============================================================================ */
.fc-opera-image-block { max-width: 1200px; margin: 0 auto; padding: 40px 50px 0; text-align: center; }
.fc-opera-img-wrap { position: relative; display: inline-block; max-width: 100%; cursor: zoom-in; border: 1px solid var(--fc-border); background: #E8E4DA; }
.fc-opera-img-wrap:hover { opacity: 0.95; }
.fc-opera-img-wrap:focus-visible { outline: 2px solid var(--fc-gold); outline-offset: 4px; }
.fc-opera-img { display: block; max-width: 100%; max-height: 75vh; width: auto; height: auto; margin: 0 auto; }
.fc-opera-cap { font-size: 11px; color: var(--fc-muted); font-weight: 300; margin-top: 16px; line-height: 1.6; font-style: italic; text-align: left; max-width: 700px; }
.fc-opera-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 50px 32px;
    align-items: start;
    border-top: 1px solid var(--fc-gold);
}

/* Dentro il layout opera, la scheda tecnica non ha il suo border-top
 * perché la linea dorata è già sul container parent */
.fc-opera-content .fc-scheda { border-top: none; padding-top: 0; margin-top: 0; }

/* Testo descrittivo — EB Garamond 20px */
.fc-opera-text { font-family: var(--fc-font-body-serif); font-size: 20px; line-height: 1.75; color: var(--fc-body); font-weight: 400; }
.fc-opera-text > *:first-child { margin-top: 0; padding-top: 0; }
.fc-opera-text p { margin: 0 0 18px 0; }
.fc-opera-text p:last-child { margin-bottom: 0; }

/* Scheda tecnica: CSS Grid con baseline-allineata.
 *
 * Problema: con font-size diversi (10px label vs 13px valore),
 * align-items: start NON allinea le baseline perché ogni font
 * ha cap-height/x-height proporzionali alla propria size.
 *
 * Soluzione: line-height in pixel ASSOLUTI uguali per entrambi.
 * Così la prima riga di entrambi inizia allo stesso pixel verticale. */
.fc-scheda { border-top: 1px solid var(--fc-border); padding-top: 24px; margin-top: 28px; }
.fc-scheda-h { font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--fc-gold); font-weight: 500; margin-bottom: 18px; }
.fc-sr { display: grid; grid-template-columns: 140px 1fr; padding: 14px 0; border-bottom: 1px solid var(--fc-border); align-items: start; gap: 16px; }
.fc-sr:last-child { border-bottom: none; }
.fc-sl { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fc-muted); font-weight: 500; line-height: 22px; margin: 0; padding: 0; }
.fc-sv { font-size: 13px; color: var(--fc-dark); font-weight: 300; line-height: 22px; margin: 0; padding: 0; }
.fc-sv p { margin: 0; line-height: inherit; }

/* Box info casa d'asta */
.fc-info-box { background: var(--fc-card); border: 1px solid var(--fc-border); border-left: 3px solid var(--fc-gold); padding: 16px 20px; margin-top: 24px; }
.fc-info-box-h { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fc-gold); font-weight: 500; margin-bottom: 10px; }
.fc-info-box-t { font-size: 13px; color: #4A4030; font-weight: 300; line-height: 1.7; }
.fc-info-box-t p { margin: 0 0 8px; font-size: 13px; color: #4A4030; font-weight: 300; line-height: 1.7; }
.fc-info-box-t p:last-child { margin-bottom: 0; }
.fc-info-box-t em { font-style: italic; }
.fc-info-box-t a { color: var(--fc-green); border-bottom: 1px solid var(--fc-gold); padding-bottom: 1px; }
.fc-info-box-t a:hover { color: var(--fc-gold); }

/* ============== CTA BAR ==============
 * Layout centrato: titolo, sottotitolo e pulsante impilati
 * al centro (come da mockup call_to_action_modificata) */
.fc-cta { background: var(--fc-green); padding: 56px 24px; }
.fc-cta-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}
.fc-cta h3 { font-family: var(--fc-font-serif); font-size: 26px; color: #EDE8DB; font-weight: 400; margin: 0; }
.fc-cta p { font-size: 16px; color: #FFFFFF; font-weight: 300; line-height: 1.6; margin: 0 0 16px; }
.fc-cta-btn { border: none; border-bottom: 1px solid var(--fc-gold); color: var(--fc-gold); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; padding: 8px 0; font-weight: 500; background: transparent; transition: all .25s ease; }
.fc-cta-btn:hover { color: #EDE8DB; border-bottom-color: #EDE8DB; }

/* ============== POST NAV ============== */
.fc-post-nav { display: flex; justify-content: space-between; align-items: center; padding: 28px 50px; max-width: 1200px; margin: 0 auto; border-top: 1px solid var(--fc-gold); flex-wrap: wrap; gap: 16px; }
.fc-post-nav a { display: flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fc-muted); font-weight: 500; }
.fc-post-nav a:hover { color: var(--fc-gold); }
.fc-post-nav .fc-post-nav-back { flex-basis: 100%; text-align: center; justify-content: center; order: 3; }
.fc-post-nav > span:empty { width: 120px; }

@media (max-width: 768px) {
    .fc-post-nav { padding: 24px 20px; gap: 20px; display: grid; grid-template-columns: 1fr 1fr; justify-items: start; }
    .fc-post-nav a:first-child, .fc-post-nav > span:first-child { grid-column: 1; justify-self: start; }
    .fc-post-nav a:last-child, .fc-post-nav > span:last-child { grid-column: 2; justify-self: end; }
    .fc-post-nav .fc-post-nav-back { grid-column: 1 / -1; justify-self: center; order: 3; }
}

/* ============== RESPONSIVE ============== */
@media (max-width: 768px) {
  .fc-hero { min-height: 280px; }
  .fc-hero-ct { padding: 80px 20px 32px; }
  .fc-intro { padding: 40px 20px 36px; }
  .fc-row { grid-template-columns: 1fr; }
  .fc-row-img { border-right: none; border-bottom: 1px solid var(--fc-border); min-height: 220px; aspect-ratio: 16/10; }
  .fc-row-body { padding: 24px 20px; }
  .fc-row-text { word-wrap: break-word; overflow-wrap: break-word; }
  .fc-row-img { min-height: 220px; aspect-ratio: 16/10; border-right: none; border-bottom: 1px solid var(--fc-border); }
  .fc-single-body, .fc-single-body.reverse { grid-template-columns: 1fr; gap: 32px; padding: 40px 20px; }
  .fc-opera-image-block { padding: 32px 20px 0; }
  .fc-opera-content { grid-template-columns: 1fr; gap: 32px; padding: 32px 20px; }
  .fc-opera-img { max-height: 60vh; }
  .fc-grid { grid-template-columns: 1fr; gap: 18px; }
  .fc-cta-inner { flex-direction: column; align-items: center; }
  .fc-sr { grid-template-columns: 110px 1fr; }
}

/* ========================================================
 * HEADER (sticky + logo orizzontale + menu + hamburger mobile)
 * ======================================================== */
.fc-skip-link { position: absolute; left: -9999px; top: auto; }
.fc-skip-link:focus { left: 8px; top: 8px; background: var(--fc-gold); color: var(--fc-green); padding: 8px 14px; z-index: 9999; font-size: 12px; }

.fc-header { background: var(--fc-green); position: sticky; top: 0; z-index: 100; }
.fc-header-inner { max-width: 1200px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }

/* Logo orizzontale (~7:1 ratio) */
.fc-brand { display: flex; align-items: center; flex-shrink: 0; max-width: 280px; }
.fc-brand-logo { display: block; width: 100%; height: auto; max-height: 36px; transition: opacity .25s ease; }
.fc-brand:hover .fc-brand-logo { opacity: 0.85; }
.fc-logo-gold { fill: var(--fc-gold); }
.fc-logo-mark { fill: #FFFFFF; }
/* Quando il logo viene usato su sfondi chiari (es. sezioni pagine), basta:
   .fc-brand-logo.is-dark .fc-logo-mark { fill: #0f3928; } */

.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

.fc-nav { display: flex; }
.fc-nav-list { display: flex; gap: 32px; list-style: none; padding: 0; margin: 0; }
.fc-nav-list a { color: #9AAEA4; font-size: 10px; font-weight: 400; letter-spacing: 0.15em; text-transform: uppercase; text-decoration: none; padding-bottom: 2px; transition: color .2s ease; }
.fc-nav-list a:hover { color: var(--fc-gold); }
.fc-nav-list .current-menu-item a,
.fc-nav-list .current_page_item a,
.fc-nav-list .current-menu-parent a { color: var(--fc-gold); border-bottom: 1px solid var(--fc-gold); }

/* Hamburger mobile (nascosto su desktop) */
.fc-burger { display: none; background: transparent; border: 0; padding: 6px; cursor: pointer; flex-direction: column; gap: 4px; }
.fc-burger span { display: block; width: 22px; height: 2px; background: var(--fc-gold); transition: transform .3s ease, opacity .3s ease; }
.fc-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.fc-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.fc-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ========================================================
 * MAIN — sfondo crema solo se la pagina è un template del child theme
 * (archivi, singoli CPT, hub). Per pagine Elementor, il main è trasparente
 * e lo sfondo è quello che imposti in Elementor.
 * ======================================================== */
.fc-template.fc-page .fc-main { background: var(--fc-cream); min-height: 50vh; }
.fc-main { min-height: 50vh; }

/* ========================================================
 * FOOTER
 * ======================================================== */
.fc-footer { background: var(--fc-green); padding: 40px 0 20px; color: #3E5B4D; }
.fc-footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.fc-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; margin-bottom: 24px; }
.fc-fb-name { font-size: 12px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: #C8BFA0; margin-bottom: 3px; }
.fc-fb-sub { font-size: 9px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--fc-gold); margin-bottom: 12px; }
.fc-fb-desc { font-size: 12px; color: #3E5B4D; font-weight: 300; line-height: 1.8; }
.fc-fc-h { font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--fc-gold); margin-bottom: 12px; font-weight: 500; }
.fc-fc a, .fc-fc p { font-size: 12px; color: #3E5B4D; font-weight: 300; line-height: 2.1; display: block; text-decoration: none; transition: color .2s ease; }
.fc-fc a:hover { color: var(--fc-gold); }
.fc-footer-menu { list-style: none; padding: 0; margin: 0; }
.fc-footer-menu li { display: block; }
.fc-footer-menu a { font-size: 12px; color: #3E5B4D; font-weight: 300; line-height: 2.1; display: block; text-decoration: none; }
.fc-footer-menu a:hover { color: var(--fc-gold); }
.fc-footer-bottom { border-top: 1px solid #1E4935; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.fc-footer-bottom p { font-size: 10px; color: #223F33; }
.fc-footer-legal { display: flex; gap: 20px; }
.fc-footer-legal a { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: #223F33; text-decoration: none; }
.fc-footer-legal a:hover { color: var(--fc-gold); }

/* ========================================================
 * RESPONSIVE HEADER + FOOTER
 * ======================================================== */
@media (max-width: 900px) {
    .fc-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .fc-burger { display: flex; }
    .fc-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--fc-green); border-top: 1px solid #1E4935; padding: 20px 24px; }
    .fc-nav.is-open { display: flex; }
    .fc-nav-list { flex-direction: column; gap: 18px; width: 100%; }
    .fc-nav-list a { font-size: 12px; }
    .fc-header { position: relative; }
    .fc-header-inner { padding: 14px 18px; gap: 16px; }
    .fc-brand { max-width: 220px; }
    .fc-brand-logo { max-height: 30px; }
    .fc-footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .fc-footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .fc-brand { max-width: 180px; }
    .fc-brand-logo { max-height: 26px; }
}

/* ========================================================
 * HUB EXPERTISE (page-expertise.php)
 * ======================================================== */
.fc-hub { display: flex; flex-direction: column; gap: 20px; padding: 0 24px 56px; max-width: 1200px; margin: 0 auto; }
.fc-hub-row { display: grid; grid-template-columns: 360px 1fr; border: 1px solid var(--fc-border); background: var(--fc-card); overflow: hidden; transition: box-shadow .25s ease; text-decoration: none; color: inherit; }
.fc-hub-row.reverse { grid-template-columns: 1fr 360px; }
.fc-hub-row.reverse .fc-hub-body { order: 1; }
.fc-hub-row.reverse .fc-hub-img { order: 2; }
.fc-hub-row:hover { box-shadow: 0 10px 32px rgba(0,0,0,0.07); }
.fc-hub-img { background: #C8BEA0; background-size: cover; background-position: center; min-height: 280px; }
.fc-hub-body { padding: 40px 44px; display: flex; flex-direction: column; justify-content: center; }
.fc-hub-tag { display: flex; align-items: center; gap: 8px; font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--fc-muted); margin-bottom: 10px; font-weight: 500; }
.fc-hub-tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--fc-gold); flex-shrink: 0; }
.fc-hub-title { font-family: var(--fc-font-serif); font-size: 30px; font-weight: 400; color: var(--fc-dark); margin-bottom: 8px; line-height: 1.2; letter-spacing: -0.01em; }
.fc-hub-sub { font-size: 12px; color: var(--fc-muted); font-weight: 300; margin-bottom: 18px; }
.fc-hub-text { font-size: 14px; line-height: 1.85; color: #4A4030; font-weight: 300; margin-bottom: 28px; }
.fc-hub-link { display: inline-flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #7A6020; font-weight: 500; border-bottom: 1px solid var(--fc-gold); padding-bottom: 3px; width: fit-content; }
.fc-hub-link .arr { color: var(--fc-gold); font-size: 13px; }

/* Pagination */
.fc-pagination { padding: 0 24px 56px; max-width: 1200px; margin: 0 auto; display: flex; justify-content: center; }
.fc-pagination .nav-links { display: flex; gap: 12px; align-items: center; }
.fc-pagination a, .fc-pagination span { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fc-muted); padding: 8px 14px; border: 1px solid var(--fc-border); text-decoration: none; transition: all .2s ease; }
.fc-pagination a:hover { color: var(--fc-gold); border-color: var(--fc-gold); }
.fc-pagination .current { color: var(--fc-gold); border-color: var(--fc-gold); background: var(--fc-card); }

/* Empty state */
.fc-empty { padding: 60px 24px; text-align: center; max-width: 1200px; margin: 0 auto; }
.fc-empty p { font-size: 14px; color: var(--fc-muted); font-style: italic; }

/* Responsive Hub */
@media (max-width: 768px) {
    .fc-hub-row, .fc-hub-row.reverse { grid-template-columns: 1fr; }
    .fc-hub-row.reverse .fc-hub-body { order: 2; }
    .fc-hub-row.reverse .fc-hub-img { order: 1; }
    .fc-hub-img { min-height: 220px; }
    .fc-hub-body { padding: 28px 24px; }
    .fc-hub-title { font-size: 24px; }
}

/* ========================================================
 * SHORTCODE WRAPPER (per inserimento dentro Elementor)
 *
 * IMPORTANTE: lo shortcode wrapper deve essere SEMPRE trasparente
 * per ereditare lo sfondo della pagina ospitante. !important serve
 * a vincere su eventuali stili Elementor/Hello-elementor.
 * ======================================================== */
.fc-template.fc-shortcode,
.fc-shortcode { background: transparent !important; padding: 32px 0; }
.fc-shortcode .fc-grid,
.fc-shortcode .fc-rows { padding: 0; max-width: none; margin: 0; background: transparent; }
.fc-shortcode .fc-sd { padding: 0 0 28px; max-width: none; margin: 0; background: transparent; }

/* Modalità fullwidth: lo shortcode "esce" dal container Elementor
 * usando la tecnica viewport-width + margin negativo.
 * Questa tecnica forza lo shortcode a occupare l'intera larghezza
 * della finestra anche se è dentro un container con max-width.
 *
 * Il padding laterale è controllabile:
 *   - Con il parametro shortcode: padding="50"
 *   - Con CSS custom in Elementor: --fc-fw-pad: 50px;
 *   - Default: clamp(20px, 4vw, 64px) = responsive automatico */
.fc-shortcode-fullwidth {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 32px var(--fc-fw-pad, clamp(20px, 4vw, 64px));
    box-sizing: border-box;
}
.fc-shortcode-fullwidth .fc-grid,
.fc-shortcode-fullwidth .fc-rows {
    max-width: none !important;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}

/* Varianti colonne griglia (per shortcode)
 *
 * In modalità responsive normale (auto-fill): le colonne si adattano
 * alla larghezza del contenitore creando tracce vuote se serve.
 *
 * In modalità fullwidth: le colonne sono FISSE al numero richiesto,
 * così le card occupano l'intera larghezza disponibile. */
.fc-grid-cols-1 { grid-template-columns: 1fr; }
.fc-grid-cols-2 { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.fc-grid-cols-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.fc-grid-cols-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Override fullwidth: colonne fisse, no auto-fill */
.fc-shortcode-fullwidth .fc-grid-cols-1 { grid-template-columns: 1fr !important; }
.fc-shortcode-fullwidth .fc-grid-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.fc-shortcode-fullwidth .fc-grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.fc-shortcode-fullwidth .fc-grid-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }

/* CTA "esplora tutte" sotto gli shortcode */
.fc-shortcode-cta { display: flex; justify-content: center; padding: 32px 0 8px; }
.fc-shortcode-link { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: #7A6020; font-weight: 500; border-bottom: 1px solid var(--fc-gold); padding-bottom: 4px; text-decoration: none; transition: color .2s ease; }
.fc-shortcode-link:hover { color: var(--fc-gold); }
.fc-shortcode-link span { color: var(--fc-gold); font-size: 14px; }

@media (max-width: 768px) {
    .fc-grid-cols-2,
    .fc-grid-cols-3,
    .fc-grid-cols-4 { grid-template-columns: 1fr; }

    /* Override fullwidth su mobile: 1 colonna */
    .fc-shortcode-fullwidth .fc-grid-cols-2,
    .fc-shortcode-fullwidth .fc-grid-cols-3,
    .fc-shortcode-fullwidth .fc-grid-cols-4 { grid-template-columns: 1fr !important; }
}

/* Tablet: 2 colonne */
@media (min-width: 769px) and (max-width: 1024px) {
    .fc-grid-cols-3,
    .fc-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }

    .fc-shortcode-fullwidth .fc-grid-cols-3,
    .fc-shortcode-fullwidth .fc-grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ========================================================
 * TEMPLATE FULL WIDTH e CANVAS
 *
 * Quando Elementor è il padrone della pagina, rimuoviamo qualsiasi
 * container/padding parassita ereditato da Hello Elementor o dal main.
 * Le pagine archivio costruite in Elementor usano questi template.
 * ======================================================== */
body.page-template-page-fullwidth main,
body.page-template-page-canvas main,
body.page-template-page-fullwidth .site-main,
body.page-template-page-canvas .site-main { max-width: none !important; padding: 0 !important; margin: 0 !important; width: 100%; }

body.page-template-page-fullwidth .fc-main,
body.page-template-page-canvas .fc-main { background: transparent !important; padding: 0 !important; min-height: auto; }

/* Hello Elementor a volte aggiunge .ehf-template-* con padding: lo neutralizziamo */
body.page-template-page-fullwidth .ehf-header,
body.page-template-page-fullwidth .ehf-footer { display: none; }

/* Il body delle pagine fullwidth non deve avere padding eredetato */
body.page-template-page-fullwidth,
body.page-template-page-canvas { padding: 0 !important; }

/* Garantiamo che il main sia full-width anche se il tema parent fa CSS strano */
body.page-template-page-fullwidth #fc-main { width: 100%; max-width: none; }

/* ========================================================
 * LIGHTBOX immagini singola opera/asta
 * Click sull'immagine → apre overlay full-screen con immagine originale
 * ======================================================== */

/* Stato hover dell'immagine cliccabile */
.fc-lightbox-trigger { position: relative; cursor: zoom-in; transition: opacity .2s ease; }
.fc-lightbox-trigger:hover { opacity: 0.92; }
.fc-lightbox-trigger:focus-visible { outline: 2px solid var(--fc-gold); outline-offset: 4px; }

/* Icona zoom (appare on hover) */
.fc-lightbox-zoom {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(15, 57, 40, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fc-gold);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    transform: scale(0.85);
    pointer-events: none;
}
.fc-lightbox-trigger:hover .fc-lightbox-zoom,
.fc-lightbox-trigger:focus-visible .fc-lightbox-zoom { opacity: 1; transform: scale(1); }

/* Overlay lightbox */
.fc-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 12, 8, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.fc-lightbox-overlay.is-open { opacity: 1; visibility: visible; }

.fc-lightbox-img {
    max-width: 90vw;
    max-height: calc(90vh - 60px);
    object-fit: contain;
    border: 1px solid rgba(200, 168, 75, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.fc-lightbox-caption {
    color: #C8BFA0;
    font-size: 12px;
    font-style: italic;
    line-height: 1.6;
    margin-top: 18px;
    max-width: 800px;
    text-align: center;
    font-family: var(--fc-font-serif);
    letter-spacing: 0.01em;
}

.fc-lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--fc-green);
    border: 1px solid var(--fc-gold);
    color: var(--fc-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease;
    font-family: var(--fc-font-sans);
    font-size: 22px;
    line-height: 1;
    padding: 0;
}
.fc-lightbox-close:hover { background: var(--fc-gold); color: var(--fc-green); }
.fc-lightbox-close:focus-visible { outline: 2px solid var(--fc-gold); outline-offset: 2px; }

/* Body lock quando lightbox aperto */
body.fc-lightbox-open { overflow: hidden; }

/* Responsive */
@media (max-width: 600px) {
    .fc-lightbox-overlay { padding: 24px 12px; }
    .fc-lightbox-close { top: 16px; right: 16px; width: 38px; height: 38px; }
    .fc-lightbox-caption { font-size: 11px; margin-top: 14px; padding: 0 12px; }
}

/* ========================================================
 * SCROLL TO TOP — freccia angolo basso destra
 * Appare dopo 400px di scroll, scroll animato al click.
 * ======================================================== */
.fc-scroll-top {
    position: fixed;
    bottom: 32px;
    right: 24px;
    z-index: 900;
    width: 44px;
    height: 44px;
    background: var(--fc-green);
    border: 1px solid var(--fc-gold);
    color: var(--fc-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .3s ease, visibility .3s ease, transform .3s ease, background .2s ease;
}
.fc-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.fc-scroll-top:hover {
    background: var(--fc-gold);
    color: var(--fc-green);
}
.fc-scroll-top:focus-visible {
    outline: 2px solid var(--fc-gold);
    outline-offset: 3px;
}
.fc-scroll-top svg { width: 18px; height: 18px; }

@media (max-width: 600px) {
    .fc-scroll-top { bottom: 24px; right: 20px; width: 40px; height: 40px; }
}

/* ========================================================
 * CONTACT FORM — stile WPForms personalizzato
 *
 * Trasforma WPForms Lite nello stile Cabinet:
 * - Label uppercase con letter-spacing
 * - Campi con solo border-bottom (no box)
 * - Radio visibili come lista pulita
 * - Bottone verde pieno con freccia
 * ======================================================== */

/* Container */
.fc-template .wpforms-container,
body .wpforms-container { max-width: 900px; }

/* Label */
.wpforms-container .wpforms-field-label,
div.wpforms-container-full .wpforms-form .wpforms-field-label {
    font-family: var(--fc-font-sans) !important;
    font-size: 10px !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--fc-muted) !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
}

/* Campi input/textarea — solo border-bottom */
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="url"],
.wpforms-container input[type="number"],
.wpforms-container textarea,
.wpforms-container select,
div.wpforms-container-full .wpforms-form input[type="text"],
div.wpforms-container-full .wpforms-form input[type="email"],
div.wpforms-container-full .wpforms-form input[type="tel"],
div.wpforms-container-full .wpforms-form textarea,
div.wpforms-container-full .wpforms-form select {
    border: none !important;
    border-bottom: 1px solid var(--fc-border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 10px 0 !important;
    font-family: var(--fc-font-sans) !important;
    font-size: 14px !important;
    color: var(--fc-dark) !important;
    font-weight: 300 !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color .2s ease !important;
}

/* Focus */
.wpforms-container input:focus,
.wpforms-container textarea:focus,
.wpforms-container select:focus,
div.wpforms-container-full .wpforms-form input:focus,
div.wpforms-container-full .wpforms-form textarea:focus {
    border-bottom-color: var(--fc-gold) !important;
}

/* Placeholder */
.wpforms-container ::placeholder,
div.wpforms-container-full .wpforms-form ::placeholder {
    color: var(--fc-muted) !important;
    font-style: italic !important;
    font-weight: 300 !important;
}

/* Select dropdown */
.wpforms-container select,
div.wpforms-container-full .wpforms-form select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A7D60' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0 center !important;
    padding-right: 24px !important;
}

/* Radio buttons — lista pulita */
.wpforms-container .wpforms-field-radio ul,
div.wpforms-container-full .wpforms-form .wpforms-field-radio ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 4px 0 0 !important;
}
.wpforms-container .wpforms-field-radio li,
div.wpforms-container-full .wpforms-form .wpforms-field-radio li {
    margin-bottom: 10px !important;
}
.wpforms-container .wpforms-field-radio input[type="radio"],
div.wpforms-container-full .wpforms-form .wpforms-field-radio input[type="radio"] {
    accent-color: var(--fc-green) !important;
}
.wpforms-container .wpforms-field-radio label,
div.wpforms-container-full .wpforms-form .wpforms-field-radio label {
    font-size: 14px !important;
    color: var(--fc-dark) !important;
    font-weight: 300 !important;
    cursor: pointer !important;
}

/* Checkbox (privacy) */
.wpforms-container .wpforms-field-checkbox label,
.wpforms-container .wpforms-field-gdpr-checkbox label,
div.wpforms-container-full .wpforms-form .wpforms-field-checkbox label {
    font-size: 13px !important;
    color: var(--fc-muted) !important;
    font-weight: 300 !important;
    line-height: 1.6 !important;
}
.wpforms-container .wpforms-field-checkbox input[type="checkbox"],
div.wpforms-container-full .wpforms-form input[type="checkbox"] {
    accent-color: var(--fc-green) !important;
}

/* Pulsante invio — verde pieno */
.wpforms-container .wpforms-submit,
.wpforms-container button[type="submit"],
div.wpforms-container-full .wpforms-form .wpforms-submit,
div.wpforms-container-full .wpforms-form button[type="submit"] {
    background: var(--fc-green) !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 16px 40px !important;
    font-family: var(--fc-font-sans) !important;
    font-size: 10px !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background .25s ease !important;
}
.wpforms-container .wpforms-submit:hover,
div.wpforms-container-full .wpforms-form .wpforms-submit:hover {
    background: var(--fc-gold) !important;
    color: var(--fc-green) !important;
}

/* Rimuovi bordi box da WPForms default */
.wpforms-container .wpforms-field,
div.wpforms-container-full .wpforms-form .wpforms-field {
    padding: 8px 0 !important;
}

/* Required asterisk in oro */
.wpforms-container .wpforms-required-label,
div.wpforms-container-full .wpforms-form .wpforms-required-label {
    color: var(--fc-gold) !important;
}

/* ========================================================
 * POLYLANG Language Switcher — solo bandiere, allineate al menu
 * ======================================================== */

/* Nascondi il testo, mostra solo bandiera */
.fc-nav-list .menu-item-language .lang-item-text,
.fc-nav-list .lang-item span:not(.lang-flag),
.fc-header .menu-item-language .lang-item-text,
.fc-header .lang-item span:not(.lang-flag),
.fc-nav .lang-item-text { display: none !important; }

/* Bandiere: dimensione e allineamento verticale */
.fc-nav-list .lang-flag,
.fc-header .lang-flag,
.fc-nav .lang-flag { display: inline-block !important; width: 22px; height: 16px; vertical-align: middle; }

/* Le voci lingua nel menu devono avere gap ridotto tra loro */
.fc-nav-list li.lang-item { margin-left: -16px; }
.fc-nav-list li.lang-item:first-of-type { margin-left: 0; }

/* Link della bandiera: allinea verticalmente come le voci del menu */
.fc-nav-list li.lang-item a {
    display: flex;
    align-items: center;
    padding: 0;
    border: none !important;
    line-height: 1;
}

/* Rimuovi il border-bottom che si applica alla voce attiva */
.fc-nav-list li.lang-item.current-lang a { border: none !important; }

/* Hover: leggero opacity */
.fc-nav-list li.lang-item a:hover { opacity: 0.7; }

/* Immagini rotte fallback */
.fc-header .lang-item img[src=""],
.fc-header .lang-item img:not([src]),
.fc-nav .lang-item img[src=""],
.fc-nav .lang-item img:not([src]) { display: none; }

/* Mobile: bandiere in riga */
@media (max-width: 768px) {
    .fc-nav-list li.lang-item { margin-left: 0; }
    .fc-nav-list li.lang-item a { padding: 4px 0; }
}

/* Iubenda: il widget flottante va disattivato dalla dashboard iubenda.com,
 * non via CSS (è in iframe/shadow DOM). I link Privacy Policy e Gestione
 * cookie sono nel footer del sito. */

/* ========================================================
 * IUBENDA Footer links — stile coerente col sito
 * I pulsanti neri di default vengono sovrascritti per
 * integrarsi col footer scuro del Cabinet.
 * ======================================================== */

/* Reset stili default Iubenda sui link nel footer */
.iubenda-white.iubenda-noiframe.iubenda-embed.iubenda-noshadow,
a.iubenda-white.iubenda-noiframe.iubenda-embed.iubenda-noshadow,
.iubenda-white.iubenda-noiframe.iubenda-embed,
a.iubenda-white.no-brand.iubenda-noiframe.iubenda-embed {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Testo dei link Iubenda */
.iubenda-white.iubenda-noiframe.iubenda-embed.iubenda-noshadow .iubenda-tp-btn-txt,
a.iubenda-white.iubenda-noiframe.iubenda-embed .iubenda-tp-btn-txt,
.iubenda-embed .iubenda-tp-btn-txt {
    color: #9AAEA4 !important;
    font-family: var(--fc-font-sans) !important;
    font-size: 11px !important;
    letter-spacing: 0.08em !important;
    font-weight: 300 !important;
    text-transform: none !important;
}

/* Hover */
.iubenda-embed:hover .iubenda-tp-btn-txt {
    color: var(--fc-gold) !important;
}

/* Nascondi icona lucchetto Iubenda nei link */
.iubenda-embed .iubenda-tp-btn-icon,
.iubenda-embed svg,
.iubenda-embed img { display: none !important; }

/* Link "Gestione cookie" — stesso stile */
a.iubenda-cs-preferences-link {
    color: #9AAEA4 !important;
    font-family: var(--fc-font-sans) !important;
    font-size: 11px !important;
    letter-spacing: 0.08em !important;
    font-weight: 300 !important;
    text-decoration: none !important;
    transition: color .2s ease;
}
a.iubenda-cs-preferences-link:hover { color: var(--fc-gold) !important; }

/* Footer legal links — EB Garamond 18px */
.fc-footer-links a {
    font-family: var(--fc-font-body-serif) !important;
    font-size: 18px !important;
    color: #9AAEA4 !important;
    text-decoration: none !important;
    transition: color .2s ease;
}
.fc-footer-links a:hover { color: var(--fc-gold) !important; }
