/* library/css/site.css */

/* ---- Design tokens ---- */
:root{
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --text: #0b1220;
  --muted: #5b6476;

  --brand: #0b6bcb;
  --brand-2: #0ea5a4;
  --brand-dark: #084a8c;

  --border: rgba(15, 23, 42, .10);
  --shadow: 0 12px 40px rgba(2, 6, 23, .08);
  --shadow-sm: 0 8px 24px rgba(2, 6, 23, .08);

  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 26px;

  --container-pad: 1.1rem;
}

@media (min-width: 992px){
  :root{ --container-pad: 1.25rem; }
}

/* ---- Base ---- */
html, body { background: var(--bg); color: var(--text); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
.text-secondary { color: var(--muted) !important; }
.bg-light { background: var(--bg-soft) !important; }
.border-top, .border-bottom, .border { border-color: var(--border) !important; }

/* ---- Container spacing ---- */
.container { padding-left: var(--container-pad); padding-right: var(--container-pad); }
.py-lg-6 { padding-top: 5.5rem !important; padding-bottom: 5.5rem !important; }

/* ---- Buttons ---- */
.btn{ border-radius: var(--r-sm); padding: .72rem 1rem; }
.btn-lg{ padding: .9rem 1.1rem; border-radius: var(--r-md); }
.btn-primary{
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: 0;
  box-shadow: 0 12px 30px rgba(11, 107, 203, .18);
}
.btn-primary:hover{ filter: brightness(.98); transform: translateY(-1px); }
.btn-outline-secondary{
  border-color: rgba(15,23,42,.18);
}
.btn-outline-secondary:hover{
  background: rgba(11,107,203,.06);
  border-color: rgba(11,107,203,.25);
}

/* ---- Cards ---- */
.card{ border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.card.border-0{ border: 1px solid var(--border) !important; }
.shadow-sm{ box-shadow: var(--shadow-sm) !important; }

/* ---- Header / Navbar ---- */
.site-header .navbar{
  position: sticky;
  top: 0;
  z-index: 1020;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.86) !important;
}
.navbar-brand img{ max-height: 46px; width: auto; }
.nav-link{ border-radius: 12px; padding: .55rem .75rem !important; }
.nav-link:hover{ background: rgba(11,107,203,.07); }
.dropdown-menu{
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: .5rem;
}
.dropdown-item{
  border-radius: 12px;
  padding: .6rem .75rem;
}
.dropdown-item:hover{ background: rgba(11,107,203,.08); }

/* ---- Hero ---- */
.hero{
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-height: 420px;
}
.hero-media{
  position:absolute; inset:0;
  background-size: cover; background-position: center;
  filter: saturate(1.05);
}
.hero::after{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(900px 380px at 15% 20%, rgba(14,165,164,.28), transparent 60%),
    radial-gradient(900px 380px at 85% 25%, rgba(11,107,203,.32), transparent 60%),
    linear-gradient(90deg, rgba(11,18,32,.72), rgba(11,18,32,.18));
}
.hero-content{
  position: relative;
  padding: 2.2rem;
  color: #fff;
}
@media(min-width: 992px){
  .hero-content{ padding: 3rem; }
  .hero{ min-height: 520px; }
}
.hero .badge{
  border-radius: 999px;
  padding: .55rem .8rem;
  font-weight: 600;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
}

/* ---- Trust bar ---- */
.trustbar{
  display:flex; flex-wrap:wrap; gap:.75rem;
}
.trust-pill{
  display:inline-flex; align-items:center; gap:.5rem;
  padding: .55rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  font-weight: 600;
  font-size: .95rem;
}

/* ---- Section headings ---- */
.section-title{
  font-weight: 800;
  letter-spacing: -.02em;
}
.kicker{
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .78rem;
}

/* ---- Image ratio helpers ---- */
.ratio-cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Footer polish ---- */
footer a.text-decoration-none:hover{ text-decoration: underline !important; }

/* HERO carousel layer */
.hero-media{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}

.hero .carousel,
.hero .carousel-inner,
.hero .carousel-item{
  height:100%;
}

.hero-overlay{
  position:absolute;
  inset:0;
  z-index: 1;
  /*background:
    radial-gradient(900px 380px at 15% 20%, rgba(14,165,164,.28), transparent 90%),
    radial-gradient(900px 380px at 85% 25%, rgba(11,107,203,.32), transparent 90%),
    linear-gradient(90deg, rgba(11,18,32,.72), rgba(11,18,32,.18));
    */
}

.hero-content{
  position:relative;
  z-index: 2;
}

/* Optional: indicatori discreti (se li aggiungi dopo) */
.hero .carousel-indicators [data-bs-target]{
  width: 10px; height: 10px;
  border-radius: 999px;
}