/* 
================================================
HORIZON GLOBAL THEME CSS
Palette: estratta dal logo
Font: XITS (titoli), Inter (testo), Allura (accenti)
================================================
*/

/* ===================== */
/*      ROOT VARS        */
/* ===================== */
:root {
  /* Font family */
  --font-base: 'Inter', sans-serif;   /* corpo testo */
  --font-heading: 'XITS', serif;      /* titoli */
  --font-script: 'Allura', cursive;   /* opzionale per accenti */

  /* Font sizes */
  --font-size-sm: 1rem;
  --font-size-base: 1.2rem;
  --font-size-lg: 1.4rem;
  --font-size-xl: 1.5rem;
  --font-size-xxl: 2.8rem;

  /* Font weights */
  --fw-regular: 400;
  --fw-bold: 700;
  --fw-black: 800;

  /* Colors (dal logo) */
  --color-dark: #1E2A2F;     /* ardesia scuro */
  --color-light: #F7F9FA;    /* sfondo chiaro */
  --color-primary: #137D8B;  /* teal principale */
  --color-hover: #0F6A76;    /* teal più scuro per hover */
  --color-accent: #CDBD93;   /* sabbia/oro chiaro */
  --color-muted: #8E8E8E;    /* grigio “firma” */
  --color-primary-2: #2BA1B3;/* teal chiaro secondario */
  --color-white: #FFFFFF;
  --color-soft-bg: #f5f5f5;  /* sfondo grigio chiarissimo */

  /* Gradient ispirato al logo “HORIZON” */
  --gradient-brand: linear-gradient(
    90deg,
    #CDBD93 0%,
    #7FB6AE 45%,
    #2BA1B3 100%
  );

  /* Spacing */
  --spacing-xs: 0.4rem;
  --spacing-sm: 0.8rem;
  --spacing-md: 1.2rem;
  --spacing-lg: 2rem;

  /* Heights stimate */
  --topbar-height: 66px;
  --topbar-height-mobile: 64px;
  --header-height: 88px;
  --header-height-mobile: 60px;
}

/* ===================== */
/*     BASE TYPOGRAPHY   */
/* ===================== */
body {
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-black);
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: 0.5em;
  letter-spacing: 0.5px;
}

h1 { font-size: var(--font-size-xxl); }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: 1.2rem; }
h6 { font-size: var(--font-size-sm); }

p, li, span, label {
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  color: var(--color-dark);
}

/* Link */
a:not(.btn-dark):not(.btn-light):not(.btn-dark-compact):not(.btn-light-compact):not(.desktop-nav-ul a):not(.mobile-nav-menu a){
  color: var(--color-primary);
  transition: color 0.3s ease;
}
a:hover { color: var(--color-hover); }

/* ============================ */
/*    Scroll & Header sticky    */
/* ============================ */
html { 
  scroll-behavior: auto;
  background-color: var(--color-light);	
}
[id] { 
  scroll-margin-top: calc(var(--sticky-offset, 88px));
}
@media (min-width: 981px) {
  :root { --sticky-offset: 96px; }
}
@media (max-width: 980px) {
  :root { --sticky-offset: 88px; }
}	

/* ============================ */
/*      SOCIAL ICONS GLOBAL     */
/* ============================ */
.social-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}
.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: var(--color-primary);
  border-radius: 50%; /* cerchi perfetti */
  text-decoration: none;
  transition: background-color 0.3s ease, transform .2s ease;
}
.social-icons svg {
  width: 24px;
  height: 24px;
  color: var(--color-white);
  transition: fill 0.3s ease, transform 0.3s ease;
}
.social-icons svg *[fill]:not([fill="none"]),
.social-icons svg path,
.social-icons svg rect,
.social-icons svg circle,
.social-icons svg polygon,
.social-icons svg line,
.social-icons svg polyline {
  fill: currentColor !important;
  stroke: currentColor !important;
}
.social-icons a:hover {
  background-color: var(--color-hover);
  transform: translateY(-1px);
}
.social-icons a:hover svg {
  transform: scale(1.1);
}

/* ============================ */
/*        CUSTOM BUTTONS        */
/* ============================ */
.btn-light,
.btn-dark {
  padding: 0.75em 1.5em;
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
  cursor: pointer;
}

/* Light full */
.btn-light {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn-light span { color: var(--color-dark); }
.btn-light:hover {
  background-color: var(--color-primary-2);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* Dark full */
.btn-dark {
  background-color: var(--color-primary);
  color: var(--color-white);
}
.btn-dark span { color: var(--color-white); }
.btn-dark:hover {
  background-color: var(--color-hover);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-light svg,
.btn-dark svg {
  width: 20px;
  height: 20px;
  color: currentColor;
}

/* ============================ */
/*     COMPACT BUTTONS PILL     */
/* ============================ */
.btn-light-compact,
.btn-dark-compact {
  padding: 0.5em 1.4em;
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  border-radius: 50px; /* pill shape */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none; /* niente cornice */
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,.08);
  cursor: pointer;
}

/* Light pill */
.btn-light-compact {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn-light-compact span { color: var(--color-dark); }
.btn-light-compact:hover {
  background-color: var(--color-primary-2);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* Dark pill */
.btn-dark-compact {
  background-color: var(--color-primary);
  color: var(--color-white);
}
.btn-dark-compact span { color: var(--color-white); }
.btn-dark-compact:hover {
  background-color: var(--color-hover);
  color: var(--color-white); /* rimane bianco */
  transform: translateY(-1px);
}

/* Rimuove eventuali SVG */
.btn-light-compact svg,
.btn-dark-compact svg {
  display: none;
}

/* ========================== */
/*         TOP BAR            */
/* ========================== */
.riga-top-bar {
  padding: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 5%;
  background-color: var(--color-dark);
  color: var(--color-white);
  font-family: var(--font-base);
  gap: 24px;
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.top-bar .social-icons {
  display: flex;
  gap: 12px;
  flex-shrink: 1;
  flex-wrap: nowrap;
}

/* ============================ */
/*        RESPONSIVE RULES      */
/* ============================ */
@media (max-width: 980px) {
  .top-bar {
    padding: 12px 16px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .top-bar .social-icons {
    flex: 1;
    justify-content: flex-start;
    gap: 8px;
  }
  .top-bar .social-icons a {
    width: 40px;
    height: 40px;
  }
  .top-bar .social-icons svg {
    width: 22px;
    height: 22px;
  }
  .top-bar .btn-dark-compact {
    font-size: 0.85rem;
    padding: 0.6em 1.1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ============================ */
/*   LARGHEZZA PERSONALIZZATA   */
/* ============================ */
.larghezza-custom.et_pb_row {
  width: 90% !important;
  max-width: 1400px !important; /* limite massimo desktop */
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}

/* Tablet */
@media (max-width: 980px) {
  .larghezza-custom.et_pb_row {
    width: 90% !important;
    max-width: 90% !important;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .larghezza-custom.et_pb_row {
    width: 95% !important;
    max-width: 95% !important;
  }
}

/* ============================ */
/*     ROW FULL WIDTH CUSTOM    */
/* ============================ */
.riga-full-width.et_pb_row {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}


/* ============================ */
/*   DIVIDER GRAFICO SEZIONI    */
/* ============================ */
hr.section-divider {
  width: 100%;
  height: 2px; /* linea sottile */
  background: linear-gradient(
    to right,
    rgba(30,42,47,.08) 0%,
    rgba(19,125,139,.35) 45%,
    rgba(43,161,179,.45) 55%,
    rgba(30,42,47,.08) 100%
  );
  margin: 2rem 0; /* più respiro rispetto ai 3px */
  border: 0;
  border-radius: 2px;
}

/* Divider invertito - versione slim */
.section-divider-inverted {
  width: 100%;
  height: 3px; /* più sottile */
  margin: 2.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.section-divider-inverted::before,
.section-divider-inverted::after {
  content: "";
  flex: 1;
  height: 3px;
  border-radius: 50px;
}
.section-divider-inverted::before {
  margin-right: 0.6rem;
  background: linear-gradient(to left, var(--color-primary), var(--color-accent));
}
.section-divider-inverted::after {
  margin-left: 0.6rem;
  background: linear-gradient(to right, var(--color-primary), var(--color-accent));
}
.section-divider-inverted span {
  width: 10px;
  height: 10px;
  background: var(--color-primary);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

/* ============================ */
/*   DIVIDER GENERICO TITOLI    */
/* ============================ */

/* Contenitore del divider */
.title-divider {
  display: flex;                /* imposta un flexbox per distribuire le linee e il pallino */
  align-items: center;          /* centra verticalmente tutto */
  justify-content: center;      /* centra orizzontalmente il contenuto */
  width: 100%;                  /* prende tutta la larghezza disponibile */
  max-width: 260px;             /* ma resta compatto (non si allunga troppo) */
  margin: 0 auto 1.5rem;        /* centrato orizzontalmente con spazio sotto */
}

/* Le due linee ai lati del pallino centrale */
.title-divider::before,
.title-divider::after {
  content: "";                  /* genera gli elementi grafici */
  flex: 1;                      /* le linee si espandono simmetricamente */
  height: 3px;                  /* spessore sottile delle linee */
  border-radius: 50px;          /* linee arrotondate alle estremità */
}

/* Linea a sinistra (gradient da sinistra a destra invertito) */
.title-divider::before {
  margin-right: .6rem;          /* spazio tra linea e pallino centrale */
  background: linear-gradient(to left, #CDBD93, #7FB6AE, #137D8B);
}

/* Linea a destra (gradient regolare) */
.title-divider::after {
  margin-left: .6rem;           /* spazio tra pallino e linea */
  background: linear-gradient(to right, #CDBD93, #7FB6AE, #137D8B);
}

/* Pallino centrale */
.title-divider span {
  width: 10px;                  /* diametro */
  height: 10px;                 /* diametro */
  background: var(--color-accent); /* colore personalizzabile (accent) */
  border-radius: 50%;           /* forma rotonda */
  display: inline-block;        /* mantiene le dimensioni */
  box-shadow: 0 1px 4px rgba(0,0,0,.15); /* leggera ombra per profondità */
}

/* Variante divider allineato a sinistra */
.title-divider.left {
  justify-content: flex-start;
  margin-left: 0;
  margin-right: 0;
}

/* ============================ */
/*         UTILITIES            */
/* ============================ */
.font-script { 
  font-family: var(--font-script);
  color: var(--color-muted);
}
.text-gradient-brand { 
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}