/*
Theme Name: Studio Gambi
Theme URI: https://studiogambi.it/
Description: Child theme istituzionale per Studio Gambi (basato su Twenty Twenty-Five).
Author: Studio Gambi
Template: twentytwentyfive
Version: 1.0.0
Text Domain: studiogambi
*/

/*
 * Nota: lo stile principale è gestito da theme.json (block theme).
 * Qui aggiungiamo il layer di UI/UX luxury per lo Studio Gambi.
 */

/* Font (opzionale: richiede caricamento lato client) */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --sg-bg-primary: #252525;
  --sg-bg-surface: #252525;
  --sg-border-soft: rgba(230, 179, 75, 0.3);
  --sg-text-main: #f5f1e8;
  --sg-text-muted: #bbbbbb;
  --sg-text-subtle: #8b8790;
  --sg-gold: #e6b34b;
  --sg-gold-hover: #c99a2e;
  --sg-charcoal: #252525;
  --sg-success: #3fae7c;
  --sg-danger: #d85d57;
  --sg-font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --sg-font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: var(--sg-bg-primary);
  color: var(--sg-text-muted);
  font-family: var(--sg-font-sans);
  padding-top: 57px; /* spazio per header fisso */
}

.wp-site-blocks {
  overflow-x: hidden;
  background: none;
}

.wp-block-post-content a:where(:not(.wp-element-button)) {
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s ease;
}

.wp-block-post-content a:where(:not(.wp-element-button)):hover {
  text-decoration-color: rgba(199, 161, 90, 0.9);
}

/* Editorial helpers */
.sg-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 0.85rem;
  color: rgba(36, 52, 71, 0.75);
  margin-bottom: 8px !important;
}

.sg-page .wp-block-post-content > h1,
.sg-page .wp-block-post-content > h2 {
  margin-top: 0;
}

/* Keyboard accessibility */
:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid rgba(176, 141, 87, 0.75);
  outline-offset: 2px;
}

.sg-skip-link {
  position: absolute;
  left: 12px;
  top: 10px;
  transform: translateY(-160%);
  background: #0b1f3a;
  color: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
}

.sg-skip-link:focus {
  transform: translateY(0);
}

.wp-block-post-content h1,
.wp-block-post-content h2,
.wp-block-post-content h3 {
  letter-spacing: 0.2px;
}

.wp-block-post-content p {
  max-width: 75ch;
}

/* Allow sections (columns/cards) to breathe while keeping text readable */
.wp-block-post-content .wp-block-columns,
.wp-block-post-content .wp-block-group {
  max-width: 100%;
}

.sg-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
}

.sg-header-dark {
  background: var(--sg-charcoal) !important;
  backdrop-filter: none;
  border-bottom: 1px solid rgba(230, 179, 75, 0.25);
}

/* Footer compatto: padding e font ridotti */
.sg-footer-dark {
  font-size: 0.8125rem;
  line-height: 1.5;
}
.sg-footer-dark .wp-block-heading,
.sg-footer-dark h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.sg-footer-dark p {
  margin-bottom: 6px;
  font-size: inherit;
}
.sg-footer-dark .wp-block-columns {
  gap: 12px;
}
.sg-footer-dark .wp-block-column p:last-child {
  margin-bottom: 0;
}

.sg-header__inner {
  gap: 14px;
}

.sg-header__title,
.sg-header__title a {
  color: var(--sg-gold) !important;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--sg-font-serif);
}

.sg-header__title a:hover {
  color: var(--sg-gold-hover) !important;
  opacity: 1;
}

/* Nav con divisori verticali come nel layout */
.sg-header__nav {
  gap: 0;
}

.sg-header__nav-dividers .wp-block-navigation-item:not(:last-child) .wp-block-navigation-item__content {
  padding-right: 18px;
  margin-right: 10px;
  border-right: 1px solid rgba(230, 179, 75, 0.4);
}

.sg-header__nav .wp-block-navigation-item__content {
  position: relative;
  padding: 0;
  margin-left: 0;
  border-radius: 0;
  text-decoration: none;
  font-family: var(--sg-font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sg-gold);
}

.sg-header__nav .wp-block-navigation-item__content::after {
  display: none;
}

.sg-header__nav .wp-block-navigation-item__content:hover,
.sg-header__nav .current-menu-item > .wp-block-navigation-item__content,
.sg-header__nav .current_page_item > .wp-block-navigation-item__content {
  color: var(--sg-text-main);
}

/* Subtle cards (used across content) */
.wp-block-post-content .sg-card {
  background: var(--sg-bg-surface);
  border: 1px solid var(--sg-border-soft);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: none;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.wp-block-post-content .sg-card:hover {
  border-color: var(--sg-gold);
  background: #161e2a;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(-2px);
}

/* Card team/professionisti: stessa altezza */
.wp-block-column .sg-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Card team: area/qualifica (riga 1), competenze (riga 2), email (riga 3) */
.wp-block-column .sg-card .sg-card-role {
  margin-bottom: 0.35em;
  font-weight: 600;
}
.wp-block-column .sg-card .sg-card-competenze {
  margin-bottom: 0.35em;
}
.wp-block-column .sg-card .sg-card-email {
  margin-bottom: 0;
  margin-top: auto;
}
/* Markup con un solo paragrafo: strong = riga 1, testo = riga 2, link = riga 3 */
.wp-block-column .sg-card p strong {
  display: block;
  margin-bottom: 0.25em;
}
.wp-block-column .sg-card p a[href^="mailto:"] {
  display: block;
  margin-top: 0.5em;
}

.wp-block-post-content .sg-card .wp-block-button__link {
  width: 100%;
  justify-content: center;
}

/* Lo Studio (intro): titolo oro come hero, testi giustificati */
.sg-studio-v2 h1 {
  color: var(--sg-gold) !important;
  font-family: var(--sg-font-serif);
  font-weight: 600;
}

.sg-studio-v2 p {
  text-align: justify;
}

/* Lo Studio: tre card stessa altezza, testo ridotto e giustificato */
.sg-studio-cards .wp-block-columns {
  align-items: stretch;
}

.sg-studio-cards .wp-block-column {
  display: flex;
}

.sg-studio-cards .sg-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  border-radius: 12px;
}

.sg-studio-cards .sg-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.25;
}

.sg-studio-cards .sg-card p {
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: justify;
  margin-bottom: 0;
  flex: 1;
}

/* A chi ci rivolgiamo – stesso stile titolo di Diritto e pratica, centrato alla pagina */
.sg-studio-a-chi h2 {
  font-family: var(--sg-font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-top: 28px;
  margin-bottom: 28px;
  position: relative;
  padding-bottom: 20px;
  text-align: center;
}

/* Se il titolo è ancora dentro una colonna (pagine già salvate), centralo alla pagina */
.sg-studio-cards .wp-block-column.sg-studio-a-chi h2 {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  box-sizing: border-box;
}

.sg-studio-a-chi h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--sg-gold);
}

/* A chi ci rivolgiamo – stesso stile titolo di Diritto e pratica (anche se h2 è in sg-studio-a-chi-text) */
.sg-studio-a-chi-text h2 {
  font-family: var(--sg-font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-top: 28px;
  margin-bottom: 28px;
  position: relative;
  padding-bottom: 20px;
  text-align: center;
}

.sg-studio-a-chi-text h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--sg-gold);
}

/* Sezione A chi ci rivolgiamo: stesso sfondo e spacing di Diritto e pratica */
.sg-studio-a-chi {
  background: var(--sg-bg-primary);
}

/* Testo "A chi ci rivolgiamo" a tutta larghezza */
.sg-studio-a-chi-text p {
  max-width: none;
}

/* Better rhythm for sections */
.wp-block-post-content > :where(.wp-block-group, .wp-block-columns) {
  margin-top: 28px;
  margin-bottom: 28px;
}

/* (Contact v2 styles removed — reverted to previous contact layout) */

/* Hero */
.sg-hero {
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 55%),
    linear-gradient(135deg, rgba(11, 18, 32, 0.98), rgba(11, 18, 32, 0.92), rgba(11, 18, 32, 0.9));
  color: var(--sg-text-main);
}

.sg-hero .wp-block-column:first-child {
  padding-right: 28px;
}

.sg-hero h1 {
  font-family: var(--sg-font-serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 3.2vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 14px;
}

.sg-hero p.has-large-font-size {
  color: var(--sg-text-muted);
  max-width: 34rem;
}

.sg-hero .wp-block-button__link {
  font-family: var(--sg-font-sans);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.9rem 1.9rem;
  font-size: 0.95rem;
  transition: background-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.sg-hero .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border: 1px solid var(--sg-border-soft);
  color: var(--sg-text-main);
}

.sg-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: var(--sg-gold);
  color: #0b1220;
}

.sg-hero .wp-block-button__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.sg-hero img {
  border-radius: 18px;
  object-fit: cover;
  filter: saturate(0.65) contrast(1.05);
}

/* Hero layout (dark, titolo oro, bottoni outline) – sfondo ufficio a tutta pagina */
.sg-hero-layout {
  position: relative;
  overflow: hidden;
  background: var(--sg-charcoal);
  min-height: calc(100vh - 57px);
  display: flex;
  align-items: center;
}

.sg-hero-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url(assets/images/office-bg.png);
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.sg-hero-layout::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(37, 37, 37, 0.62);
  z-index: 1;
}

.sg-hero-layout > * {
  position: relative;
  z-index: 2;
  width: 100%;
}

.sg-hero-layout h1 {
  font-family: var(--sg-font-serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.15;
  margin-bottom: 18px;
  color: var(--sg-gold) !important;
}

.sg-hero-layout .wp-block-buttons {
  gap: 16px;
  margin-top: 28px;
}

.sg-btn-outline .wp-block-button__link {
  background: transparent !important;
  border: 1px solid var(--sg-gold) !important;
  color: var(--sg-gold) !important;
  border-radius: 0 !important;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sg-btn-outline .wp-block-button__link:hover {
  background: rgba(230, 179, 75, 0.12) !important;
  color: var(--sg-gold-hover) !important;
  border-color: var(--sg-gold-hover) !important;
}

/* Hero Full-Width (legacy) */
.sg-hero-full {
  position: relative;
  overflow: hidden;
}

.sg-hero-full .wp-block-cover__image-background {
  filter: blur(8px) brightness(0.4);
  transform: scale(1.1);
}

.sg-hero-full .wp-block-cover__inner-container {
  position: relative;
  z-index: 1;
}

.sg-hero-full h1 {
  font-family: var(--sg-font-serif);
  font-weight: 600;
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 20px;
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sg-hero-full p.has-large-font-size {
  font-family: var(--sg-font-serif);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: rgba(255, 255, 255, 0.95) !important;
  margin-bottom: 32px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.sg-hero-full .sg-btn-hero-primary .wp-block-button__link,
.sg-hero-full .sg-btn-hero-secondary .wp-block-button__link {
  border-radius: 0 !important;
}

/* Home band + intro */
.sg-home-band .wp-block-cover__image-background {
  filter: brightness(0.35);
}

.sg-intro-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Servizi layout */
.sg-service-featured {
  padding: 28px 0;
  border-bottom: 1px solid rgba(230, 179, 75, 0.2);
}

.sg-service-featured ul {
  margin: 16px 0 20px;
  padding-left: 1.2em;
}

.sg-service-block {
  background: var(--sg-bg-surface);
  border: 1px solid rgba(230, 179, 75, 0.2);
  padding: 24px;
  border-radius: 0;
  height: 100%;
}

.sg-service-block .wp-block-button {
  margin-top: 16px;
}

/* Cosa facciamo – layout come Studio Gagliano (sezioni H3 + elenchi in colonna) */
.sg-services-gagliano-style .sg-service-section {
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(230, 179, 75, 0.15);
}

.sg-services-gagliano-style .sg-service-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sg-services-gagliano-style .sg-service-section h3 {
  font-family: var(--sg-font-serif);
  font-weight: 600;
  margin-bottom: 0;
}

.sg-services-gagliano-style .sg-service-section ul {
  margin: 12px 0 20px;
  padding-left: 1.5em;
  line-height: 1.6;
}

.sg-services-gagliano-style .sg-service-section li {
  margin-bottom: 6px;
}

.sg-services-gagliano-style .sg-service-section .wp-block-buttons {
  margin-top: 4px;
}

/* Cosa facciamo – card affiancate + modale */
.sg-services-cards-modal .wp-block-heading.has-gold-color,
.sg-services-cards-modal h1 {
  color: #ffffff !important;
  font-family: var(--sg-font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-bottom: 0;
  position: relative;
  padding-bottom: 20px;
  text-align: center;
}

.sg-services-cards-modal h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--sg-gold);
}

.sg-services-cards-modal > p,
.sg-services-cards-modal p.has-text-align-justify.has-warm-gray-color {
  text-align: justify;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.sg-services-cards-modal > .wp-block-group.is-layout-constrained {
  margin-top: 24px;
}

.sg-services-cards-modal .sg-service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 20px 20px;
  border: 1px solid rgba(230, 179, 75, 0.35);
  background: rgba(37, 37, 37, 0.6);
  height: 100%;
  min-height: 140px;
  cursor: pointer;
}

.sg-services-cards-modal .sg-service-card:hover {
  border-color: var(--sg-gold);
}

.sg-services-cards-modal .sg-service-card__icon {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  margin-top: 8px;
  margin-bottom: 12px;
  color: var(--sg-gold);
}

.sg-services-cards-modal .sg-service-card__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sg-services-cards-modal .sg-service-card__title {
  font-family: var(--sg-font-serif);
  font-weight: 600;
  color: var(--sg-gold);
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.sg-services-cards-modal .sg-service-card__link {
  display: block;
  margin-top: auto;
  padding-top: 16px;
  font-size: 0.8rem;
  color: var(--sg-gold);
  text-decoration: none;
}

.sg-services-cards-modal .sg-service-card__link:hover {
  text-decoration: underline;
}

.sg-modal__body .sg-modal__intro {
  margin: 0 0 12px;
}

.sg-modal__body ul {
  margin: 0 0 1em;
  padding-left: 1.5em;
  line-height: 1.6;
}

.sg-modal__body li {
  margin-bottom: 6px;
}

/* Team layout: card con nome oro, ruolo grigio */
.sg-team-layout h1.wp-block-heading,
.sg-team-layout h3.wp-block-heading,
.sg-founders-v3 h3.wp-block-heading {
  color: var(--sg-gold) !important;
}

/* Titoli "I fondatori" e "Team" – stesso stile di Diritto e pratica (centrato, bianco, linea oro) */
.sg-team-layout h2,
.sg-team-layout h2.wp-block-heading,
.sg-founders-v3 h2,
.sg-founders-v3 h2.wp-block-heading,
.sg-team-section h2,
.sg-team-section h2.wp-block-heading,
/* Titolo "Team": gruppo che ha come figlio diretto .wp-block-columns (card team) – senza dipendere da sg-team-layout */
.wp-block-post-content .wp-block-group:has(> .wp-block-columns) > h2,
.entry-content .wp-block-group:has(> .wp-block-columns) > h2 {
  font-family: var(--sg-font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-bottom: 0;
  position: relative;
  padding-bottom: 20px;
  text-align: center;
  color: #ffffff !important;
}

.sg-team-layout h2::after,
.sg-founders-v3 h2::after,
.sg-team-section h2::after,
.sg-team-layout .wp-block-group:has(> .wp-block-columns) > h2::after,
.wp-block-post-content .wp-block-group:has(> .wp-block-columns) > h2::after,
.entry-content .wp-block-group:has(> .wp-block-columns) > h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--sg-gold);
}

/* Immagine centrata nella colonna (fit-content + margin auto) */
.sg-founders-v3 figure.wp-block-image {
  margin-left: auto !important;
  margin-right: auto !important;
  display: block;
  width: fit-content !important;
  max-width: 100%;
  align-self: center;
}

.sg-founders-v3 figure.wp-block-image img {
  display: block;
  vertical-align: top;
}

.sg-founders-v3 .wp-block-column h3.wp-block-heading,
.sg-founders-v3 h3.wp-block-heading {
  text-align: center;
}

.sg-founders-v3 .wp-block-buttons {
  justify-content: center;
}

.sg-founders-v3 .wp-block-column p {
  text-align: justify;
}

.sg-founders-v3 .wp-block-columns > .wp-block-column {
  border: 1px solid var(--sg-gold);
  border-radius: 8px;
  padding: 24px;
  box-sizing: border-box;
}

.sg-team-layout .sg-card h3,
.sg-founders-v3 .sg-card h3,
.sg-founders-v3 .wp-block-group h3,
.wp-block-column .sg-card h3 {
  color: var(--sg-gold) !important;
  font-family: var(--sg-font-serif);
}

.sg-team-layout .sg-card p,
.sg-founders-v3 .sg-card p {
  color: var(--sg-text-muted);
}

/* Contatti layout: dettagli con icone, form scuro */
.sg-contact-icon {
  margin-right: 8px;
  opacity: 0.9;
}

.sg-contacts-layout .sg-contact-form .sg-field,
.sg-contact-form .sg-field {
  text-align: left;
}

.sg-contacts-layout .sg-contact-form .sg-field label,
.sg-contact-form .sg-field label {
  text-align: left !important;
}

.sg-contacts-layout .wp-block-group p a,
.sg-contact-details a {
  color: var(--sg-gold);
  text-decoration: none;
}

.sg-contacts-layout .wp-block-group p a:hover {
  text-decoration: underline;
}

.sg-contacts-layout input[type="text"],
.sg-contacts-layout input[type="email"],
.sg-contacts-layout input[type="tel"],
.sg-contacts-layout textarea {
  background: #252525 !important;
  border: 1px solid rgba(230, 179, 75, 0.4) !important;
  color: var(--sg-text-muted) !important;
  border-radius: 0 !important;
  padding: 12px 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  box-sizing: border-box;
}

.sg-contacts-layout .sg-contact-form .sg-field,
.sg-contact-form .sg-field {
  min-width: 0;
}

.sg-contacts-layout .sg-contact-form .sg-field input[type="text"],
.sg-contacts-layout .sg-contact-form .sg-field input[type="email"],
.sg-contacts-layout .sg-contact-form .sg-field input[type="tel"],
.sg-contacts-layout .sg-contact-form .sg-field textarea {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  box-sizing: border-box;
}

.sg-contacts-layout input::placeholder,
.sg-contacts-layout textarea::placeholder {
  color: var(--sg-text-subtle);
}

.sg-contacts-layout button[type="submit"],
.sg-contacts-layout input[type="submit"] {
  background: transparent !important;
  border: 1px solid var(--sg-gold) !important;
  color: var(--sg-gold) !important;
  border-radius: 0 !important;
  padding: 14px 28px !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sg-lady-justice {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  opacity: 0.9;
}

.sg-lady-justice svg {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* Separator */
.sg-sep-gold {
  border-top: 1px solid var(--sg-gold);
  opacity: 0.4;
  margin: 0;
}

/* Specializations Section */
.sg-specializations {
  background: var(--sg-bg-primary);
}

.sg-specializations h2 {
  font-family: var(--sg-font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-bottom: 0;
  position: relative;
  padding-bottom: 20px;
}

.sg-specializations h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--sg-gold);
}

/* Approfondimenti tematici – stesso stile titolo di Diritto e pratica */
.sg-highlights {
  background: var(--sg-bg-primary);
}

.sg-highlights h2 {
  font-family: var(--sg-font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-bottom: 0;
  position: relative;
  padding-bottom: 20px;
}

.sg-highlights h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--sg-gold);
}

/* Card Approfondimenti: dimensioni ridotte, testo giustificato */
.sg-highlights .sg-card {
  padding: 16px 20px;
  border-radius: 12px;
}

.sg-highlights .sg-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.25;
}

.sg-highlights .sg-card p {
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: justify;
  margin-bottom: 10px;
}

.sg-highlights .sg-card p:last-of-type {
  margin-bottom: 0;
}

.sg-highlights .sg-card a {
  font-size: 0.8125rem;
}

.sg-spec-card {
  background: var(--sg-bg-surface);
  border: 1px solid var(--sg-gold);
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sg-spec-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(199, 161, 90, 0.2);
  border-color: var(--sg-gold-hover);
}

.sg-spec-icon {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sg-spec-icon svg {
  width: 56px;
  height: 56px;
}

.sg-spec-card h3 {
  font-family: var(--sg-font-serif);
  font-weight: 600;
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: #ffffff !important;
}

.sg-spec-card p {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

/* Generic modal (used for founders bios) */
.sg-modal[hidden] {
  display: none !important;
}

.sg-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 18px;
}

.sg-modal-open {
  overflow: hidden;
}

.sg-modal__panel {
  width: min(920px, 100%);
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(36, 52, 71, 0.16);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.sg-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(36, 52, 71, 0.12);
}

.sg-modal__header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.sg-modal__close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #0b1f3a;
}

.sg-modal__body {
  padding: 14px 16px 18px 16px;
  font-family: var(--sg-font-sans);
  font-size: 0.9rem;
  line-height: 1.6;
  color: #1a1a1a;
  text-align: justify;
}

.sg-modal__body p {
  margin: 0 0 1em;
}

.sg-modal__body p:last-child {
  margin-bottom: 0;
}

.sg-modal__open {
  display: inline-block;
  margin-top: 8px;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 900px) {
  .sg-header__brand img {
    width: 220px !important;
  }
}

/* Mobile: keep header clean and prevent wrapping into tall stacks */
@media (max-width: 720px) {
  .sg-header__inner {
    flex-wrap: nowrap;
  }
  .sg-header__nav {
    margin-left: auto;
  }
}

/* Mobile sticky contact bar */
.sg-mobile-cta {
  display: none;
}

@media (max-width: 720px) {
  .sg-mobile-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(36, 52, 71, 0.14);
    backdrop-filter: blur(10px);
  }

  .sg-mobile-cta__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 960px;
    margin: 0 auto;
  }

  .sg-mobile-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 6px;
    padding: 12px 12px;
    font-weight: 800;
  }

  .sg-mobile-cta__call {
    background: #0b1f3a;
    color: #ffffff;
  }

  .sg-mobile-cta__contact {
    background: #b08d57;
    color: #0b1f3a;
  }

  /* reserve space so content isn't hidden behind the bar */
  .wp-site-blocks {
    padding-bottom: 82px;
  }
}

