/* ===========================
   Font Inter self-hosted
   =========================== */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/Inter-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/Inter-Italic-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Font globale + dimensione navbar */
:root {
  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
                        "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans",
                        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --nav-h: 56px;
  font-synthesis-weight: none;
  font-optical-sizing: auto;
}

/* Tema chiaro: secondario più scuro per contrasto */
:root[data-bs-theme="light"],
[data-bs-theme="light"] {
  --bs-secondary-color: #4b5563;
  --bs-secondary-rgb: 75, 85, 99;
}

/* Tema scuro: secondario più chiaro su fondo scuro */
:root[data-bs-theme="dark"],
[data-bs-theme="dark"] {
  --bs-secondary-color: #e5e7eb;
  --bs-secondary-rgb: 229, 231, 235;
}

@media (min-width: 992px) {
  :root { --nav-h: 64px; }
}

body { padding-top: var(--nav-h); }

/* Brand con logo a sinistra */
.navbar-brand {
  display: flex;
  align-items: center;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
  border-radius: 8px;
}

@media (min-width: 992px) {
  .brand-logo { height: 32px; }
}

/* Tipografia “bold & clean” */
h1,
.display-1, .display-2, .display-3,
.display-4, .display-5, .display-6 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lead { font-weight: 450; }

.navbar .nav-link {
  font-size: 1.05rem;
  font-weight: 600;
}

/* ===== Hero & componenti home ===== */

.hero {
  min-height: calc(100vh - var(--nav-h) - 120px);
  display: flex;
  align-items: center;
  padding: 1rem 0 1rem;
}

.hero h1 {
  line-height: 1.06;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
}

.hero .lead {
  color: var(--bs-secondary-color);
  max-width: 60ch;
  font-size: clamp(1.125rem, 2.2vw, 1.4rem);
}

.btn-pill { border-radius: 999px; }

#backToTop {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: none;
  z-index: 1080;
}

/* ===== Card “highlights” ===== */

.quick-links .btn {
  border-radius: 999px;
  padding: .5rem .9rem;
}

.high-card {
  border: none;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--bs-body-bg);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}

.high-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
}

.high-card picture {
  display: block;
  padding: 0;
  background-color: var(--bs-body-bg);
}

.high-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ===== Carosello (edge-to-edge) ===== */

.showcase {
  background-color: var(--bs-body-bg);
}

.showcase .carousel {
  --cap-pad: .75rem;
  border-radius: 1rem;
  overflow: hidden;
}

.showcase .item-img {
  width: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
}

@media (min-width: 992px) {
  .showcase .item-img {
    aspect-ratio: 21/9;
    max-height: 420px;
  }
}

@media (max-width: 991.98px) {
  .showcase .item-img {
    aspect-ratio: 16/9;
    max-height: 360px;
  }
}

.showcase .carousel-caption {
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.45);
  border-radius: .75rem;
  padding: .5rem .75rem;
}

.showcase .carousel-control-prev-icon,
.showcase .carousel-control-next-icon {
  filter: drop-shadow(0 0 4px rgba(0,0,0,.6));
}

@media (prefers-reduced-motion: reduce) {
  .showcase .carousel { transition: none !important; }
}

/* ===== Mini cards ultimo contenuto ===== */

.post-mini {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}

.post-mini .thumb {
  width: 112px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: .5rem;
  flex: 0 0 112px;
}

.post-mini .meta {
  font-size: .85rem;
  color: var(--bs-secondary-color);
}

.cta-slim {
  background: var(--bs-primary-bg-subtle);
  border: 1px solid var(--bs-primary-border-subtle);
  border-radius: 1rem;
}

/* ===== Styling Modal Cookie ===== */

.cookie-modal {
  border-radius: 1.25rem;
}

.cookie-modal .modal-header {
  padding: 1.25rem 1.5rem 0.5rem;
}

.cookie-modal .modal-body {
  padding: 0.75rem 1.5rem 1.25rem;
}

.cookie-modal .modal-footer {
  padding: 0.75rem 1.5rem 1.25rem;
}

/* Centra il seal LegalBlink sotto il footer */
lb-seal.lb-seal-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Breadcrumb generico (come articoli/detail) ===== */

.article-breadcrumb {
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
}

.article-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

/* ===== Footer IntelligenzaSmart ===== */

.footer-main {
  background: var(--bs-tertiary-bg); /* stesso bg dell'header */
  border-top: 1px solid var(--bs-border-color);
}

.footer-brand .footer-logo {
  height: 32px;
  width: auto;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--bs-secondary-color);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--bs-primary);
  text-decoration: underline;
}

/* Icone social stile “pillole” */
.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--bs-secondary-color);
  text-decoration: none;
  transition:
    background-color .2s ease,
    color .2s ease,
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease;
}

.footer-social-link:hover {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(13, 110, 253, .35);
}

/* ===== Pagina "Chi sono" ===== */

.about-hero {
  /* attacco la sezione all'header fisso, come per gli articoli */
  margin-top: -2.25rem;
  padding: 3.5rem 0 3.5rem;
  background-color: #e9f4ff; /* azzurrino come il dettaglio articolo */
}

@media (min-width: 992px) {
  .about-hero {
    margin-top: -2.75rem;
    padding: 4rem 0 4rem;
  }
}

/* ====================================
   Pagina Contatti
   ==================================== */

.contact-hero {
  padding: 4rem 0;
  background-color: var(--bs-body-bg); /* stesso fondo del sito */
}

@media (min-width: 992px) {
  .contact-hero {
    padding: 5rem 0;
  }
}

/* overlay non più usato: lo teniamo neutro nel DOM */
.contact-overlay {
  display: none;
}

.contact-container {
  position: relative;
  z-index: 1;
}

.contact-card {
  border-radius: 1.75rem;
  background-color: #ffffff;
  overflow: hidden;
}

/* lato illustrazione */
.contact-illu-wrapper {
  background: radial-gradient(circle at top left, #f8f5ff 0, #ffffff 55%);
}

.contact-illu {
  max-width: 260px;
}

/* lato form */
.contact-form-wrapper {
  background-color: #ffffff;
}

.contact-input {
  border-radius: 999px;
  border: none;
  background-color: #f1f2f5;
  padding: 0.85rem 1.15rem;
  font-size: 0.95rem;
  box-shadow: none;
}

.contact-input:focus {
  outline: 0;
  border: 1px solid rgba(13, 110, 253, 0.45); /* blu primary */
  background-color: #ffffff;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.18);
}

.contact-textarea {
  border-radius: 1.25rem;
  resize: vertical;
}

/* bottone pill con colori IntelligenzaSmart */
.contact-submit {
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background-color: var(--bs-primary);
  border: none;
  box-shadow: 0 10px 24px rgba(13, 110, 253, 0.35);
}

.contact-submit:hover {
  background-color: #0b5ed7; /* variante hover del primary */
}

.contact-submit:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.35);
}

@media (max-width: 575.98px) {
  .contact-card {
    border-radius: 1.25rem;
  }

  .contact-hero {
    padding: 3rem 0;
  }
}
