*, *::before, *::after {
    box-sizing: border-box;
}

:root {
  /* Colors */
  --c-ivory: #fcfbf9;
  --c-pearl: #f4f4f4;
  --c-silver: #c0c0c0;
  --c-platinum: #e5e4e2;
  --c-champagne: #f7eedf;
  --c-charcoal: #333333;
  --c-text-light: #666666;
  --c-white: #ffffff;
  
  /* Synergy Floral Colors */
  --synergy-ivory: #f7f3ec;
  --synergy-pearl: #ece9e2;
  --synergy-silver: #c9c9c9;
  --synergy-platinum: #d7d8da;
  --synergy-champagne: #e6d7bd;
  --synergy-soft-gold: #cdbb96;
  --synergy-charcoal: #202020;
  --synergy-white: #ffffff;
  --synergy-branch: rgba(120, 108, 92, 0.45);
  --synergy-text: #242424;
  
  /* Silver gradients & details */
  --g-silver-light: linear-gradient(135deg, #fdfdfd 0%, #e5e4e2 100%);
  --g-silver-metal: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 50%, #d4d4d4 100%);
  
  /* Typography */
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Inter', sans-serif;
  
  /* Layout & Spacing */
  --max-width: 1420px;
  --spacing-section: 100px;
  --spacing-section-mobile: 60px;
  
  /* Utilities */
  --transition-smooth: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.08);
  --radius-soft: 8px;
}

/* Reset and Base */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Niente scroll orizzontale, su html e su body. `hidden` e non `clip`:
     su WebKit la propagazione di `clip` dalla radice al viewport non e'
     affidabile e il sintomo restava. L'header e' position: fixed, quindi
     non viene toccato da questo. */
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  color: var(--c-charcoal);
  background-color: var(--c-ivory);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--c-charcoal);
  margin-top: 0;
  line-height: 1.2;
}

a {
  color: var(--c-charcoal);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--c-silver);
}

/* Utility di posizionamento usate nel markup ma mai definite.
   `.relative` compare su 8 sezioni e `.relative-z` su 9 contenitori: senza
   queste regole le sezioni restavano `static`, quindi i loro sfondi
   decorativi in `position: absolute` non trovavano un antenato posizionato,
   si agganciavano al viewport e sfuggivano a QUALSIASI overflow, compreso
   quello di html e body. E' cosi' che .promo-bg-glow (500px, centrato)
   allargava il layout viewport a 445px su un telefono da 390, rendendo tutta
   la pagina trascinabile di lato. Il footer se le era gia' ridefinite per
   conto suo: qui valgono per tutti. */
.relative {
  position: relative;
}
.relative-z {
  position: relative;
  z-index: 2;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--spacing-section) 0;
}

@media (max-width: 768px) {
  .section {
    padding: var(--spacing-section-mobile) 0;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
}

.btn-primary {
  background: var(--c-charcoal);
  color: var(--c-ivory);
  border: 1px solid var(--c-charcoal);
}

.btn-primary:hover {
  background: transparent;
  color: var(--c-charcoal);
}

.btn-outline {
  background: transparent;
  color: var(--c-charcoal);
  border: 1px solid var(--c-silver);
}

.btn-outline:hover {
  background: var(--g-silver-light);
  border-color: var(--c-platinum);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-light { color: var(--c-text-light); }
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Floating shapes / background elements */
.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
}

/* ==================================================
   GLOBAL COMPONENT: TEAM SECTION
================================================== */
.team-section {
    position: relative;
    background: #fbfaf8; /* Matches chisiamo background */
    padding: 100px 0;
    overflow: hidden;
    border-top: 1px solid rgba(212,175,55,0.1);
}

.team-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.team-glow {
    position: absolute;
    top: 0;
    left: 50%;
    width: 80vw;
    height: 80vw;
    transform: translate(-50%, -30%);
    background: radial-gradient(circle, rgba(212,175,55,0.03) 0%, rgba(212,175,55,0) 70%);
    border-radius: 50%;
    filter: blur(80px);
}

.team-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.team-header h2 {
    font-size: 2.8rem;
    color: var(--c-charcoal);
    margin-bottom: 20px;
}

.team-header p {
    font-size: 1.1rem;
    color: var(--c-text-light);
    line-height: 1.7;
}

.team-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.team-card {
    flex: 1;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-portrait-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: 20px;
    margin-bottom: -40px; /* Overlap for the info box */
    z-index: 1;
}

.team-portrait {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    transition: transform 0.6s ease;
    filter: sepia(0.05) contrast(0.95); /* Slight editorial filter */
}

.team-portrait-wrapper:hover .team-portrait {
    transform: scale(1.03);
}

.team-placeholder {
    background: linear-gradient(135deg, #f4eee6 0%, var(--c-champagne) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-placeholder span {
    font-size: 3rem;
    color: rgba(255,255,255,0.8);
    font-weight: 300;
    letter-spacing: 2px;
}

.team-frame {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(212,175,55,0.4);
    border-radius: 20px;
    pointer-events: none;
    z-index: 2;
    transition: all 0.4s ease;
}

.team-portrait-wrapper:hover .team-frame {
    border-color: rgba(212,175,55,0.8);
    transform: scale(0.97);
}

.team-info-box {
    position: relative;
    z-index: 3;
    width: 85%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.team-card:hover .team-info-box {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0,0,0,0.1);
}

.info-content h3 {
    font-size: 1.4rem;
    color: var(--c-charcoal);
    margin: 0 0 5px 0;
    font-weight: 500;
}

.info-content .team-role {
    font-size: 0.95rem;
    color: var(--c-silver);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Specializzazione sotto il ruolo. Era inline con --c-champagne (#f7eedf):
   crema su scheda bianca, contrasto 1,1:1 — illeggibile. Qui usa il bronzo
   scuro del brand, 4,8:1 su bianco (AA per testo piccolo). */
.info-content .team-subrole {
    display: block;
    margin-top: 3px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #8a6d3b;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-footer {
    text-align: center;
    margin-top: 60px;
}

@media (max-width: 992px) {
    .team-grid {
        flex-direction: column;
        align-items: center;
        gap: 60px;
    }
    
    .team-card {
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .team-section {
        padding: 80px 0;
    }
    
    .team-header h2 {
        font-size: 2.2rem;
    }
    
    .team-info-box {
        width: 90%;
        padding: 15px;
    }

}

/* ==================================================
   GLOBAL COMPONENT: CONTACT SECTION
================================================== */
.contatti-section {
    padding: 100px 0;
    overflow: hidden;
    background: var(--c-white);
}

.contatti-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contatti-title {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.contatti-desc {
    font-size: 1.15rem;
    color: var(--color-text-light, #666);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 90%;
}

/* Contact Cards Grid */
.contact-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.contact-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(206,189,173,0.3);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.contact-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border-color: rgba(206,189,173,0.6);
}

.cc-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(206,189,173,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary, #333);
}

.cc-text h4 {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin: 0 0 5px 0;
}

.cc-text p {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    color: var(--color-text, #333);
}

.contact-link {
    color: var(--color-text, #333);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
.contact-link:hover {
    color: var(--color-primary, #111);
    text-decoration: underline;
}

.contatti-ctas {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Premium Map Placeholder */
.contatti-map-col {
    position: relative;
    height: 100%;
    min-height: 450px;
}

.premium-map-placeholder {
    position: absolute;
    inset: 0;
    background: #fdfcfb;
    border-radius: 28px;
    border: 1px solid rgba(206,189,173,0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 992px) {
    .contatti-grid {
        flex-direction: column;
        gap: 40px;
    }
    .contatti-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .contatti-section {
        padding: var(--spacing-section-mobile) 0;
    }
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }
    .contatti-ctas {
        flex-direction: column;
    }
    .contatti-ctas .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .contatti-map-col {
        min-height: 240px;
    }
}

/* ==========================================================================
   Toast Notification (AJAX Cart)
   ========================================================================== */
.synergy-toast {
    position: fixed;
    bottom: -100px; /* Hidden initially */
    right: 24px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.synergy-toast.show {
    bottom: 24px;
    opacity: 1;
    visibility: visible;
}

.synergy-toast-inner {
    background: var(--synergy-white);
    border: 1px solid var(--synergy-platinum);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    max-width: 400px;
    position: relative;
}

.synergy-toast-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.synergy-toast-content h4 {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
    color: var(--synergy-charcoal);
}

.synergy-toast-content p {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
    color: var(--synergy-muted);
    line-height: 1.4;
}

.synergy-toast-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-toast-link {
    background-color: var(--synergy-charcoal);
    color: var(--synergy-white);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-toast-link:hover {
    background-color: var(--synergy-muted);
}

.btn-toast-close-action {
    background: none;
    border: none;
    color: var(--synergy-charcoal);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.synergy-toast-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--synergy-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.synergy-toast-close:hover {
    color: var(--synergy-charcoal);
}

@media (max-width: 480px) {
    .synergy-toast {
        left: 16px;
        right: 16px;
        bottom: -150px;
    }
    .synergy-toast-inner {
        max-width: 100%;
        padding: 20px;
    }
    .synergy-toast-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --------------------------------------------------------------------------
   Email delle contact card su una riga sola  (1.6.71)

   "info@synergy-aesthetics.com" andava a capo sul trattino di
   "synergy-aesthetics": la colonna di testo della card e' stretta (larghezza
   card meno 20px di padding per lato, meno i 40px dell'icona e i 15px di gap)
   e la stringa la satura. Il trattino e' un punto di interruzione valido, cosi'
   il browser spezzava li'.

   nowrap impedisce l'interruzione; il corpo leggermente ridotto assicura che
   ci stia davvero invece di traboccare dalla card. Sotto i 900px la griglia
   diventa a una colonna e lo spazio abbonda, quindi si torna al corpo pieno.
   -------------------------------------------------------------------------- */
.cc-text a[href^="mailto:"] {
    white-space: nowrap;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .cc-text a[href^="mailto:"] {
        font-size: 1rem;
    }
}

/* Qualifiche del team: elenco sotto nome, ruolo e specializzazione.
   Vive in global.css perche' il team compare sia in home sia su Chi siamo. */
.team-qualifiche {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
  display: inline-block;
}
.team-qualifiche li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 5px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--c-text-light, #666);
}
.team-qualifiche li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 1px;
  background: var(--synergy-soft-gold, #cdbb96);
}
.team-qualifiche li:last-child { margin-bottom: 0; }
