/* =================================================
   RESET & BASE
================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  background-color: #f8f9fa;
  color: #111827;
}

a {
  color: inherit;
  text-decoration: none;
}

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


/* =================================================
   COLOR SYSTEM
================================================= */
:root {
  --blue-dark: #0d2a5c;
  --blue-dark-hover: #0b234d;
  --blue-soft: #102f66;
  --text-muted: #374151;
  --border-light: rgba(255,255,255,.85);
}

/* =================================================
   HEADER / NAVBAR
================================================= */
.site-header {
  background-color: #212529;
}

.main-navbar {
  background-color: #000;
}

.header-logo {
  height: 90px;
}

.main-navbar .navbar-nav {
  gap: 10px;
}

.nav-btn-custom {
  background-color: #000;
  color: #fff !important;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  font-weight: 600;
  transition: .25s ease;
}

.nav-btn-custom:hover,
.nav-btn-custom.active {
  background-color: var(--blue-dark);
  border-color: var(--blue-dark);
}

@media (max-width: 991px) {
  .nav-btn-custom {
    width: 100%;
  }
}

/* =================================================
   DROPDOWN
================================================= */
.dropdown-menu {
  background-color: #000;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.25);
}

.dropdown-item {
  color: #fff;
  font-weight: 600;
}

.dropdown-item:hover {
  background-color: var(--blue-dark);
}

/* =================================================
   BUTTONS
================================================= */
.btn,
.cookie-btn {
  border-radius: 14px;
  font-weight: 600;
  transition: .25s ease;
}

.btn-dark,
.cookie-btn {
  background-color: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
}

.btn-dark:hover,
.cookie-btn:hover {
  background-color: var(--blue-dark-hover);
  transform: translateY(-1px);
}


/* =================================================
   BASE SLIDER & LAYOUT
================================================= */
.effect-slider {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 450px;
    margin: 40px auto;
    overflow: hidden;
    border-radius: 15px;
    background: #000; /* Sfondo nero per evitare flash bianchi tra slide */
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Caption */
.caption {
    position: absolute;
    bottom: 30px;
    left: 30px;
    font-size: 1.4rem;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    color: #fff;
    z-index: 10;
    pointer-events: none;
}

/* =================================================
   CONTROLLI (Frecce & Dots)
================================================= */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 100;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.prev { left: 20px; }
.next { right: 20px; }

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 10px;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dots .dot.active {
    background: #fff;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* =================================================
   EFFETTO PUZZLE (Logica Tiles)
================================================= */
.puzzle-grid {
    position: absolute;
    inset: 0;
    display: grid;
    z-index: 5;
    pointer-events: none;
}

.puzzle-tile {
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    opacity: 0;
    animation: puzzleEntry 0.7s ease-out forwards;
}

@keyframes puzzleEntry {
    0% { 
        opacity: 0; 
        transform: scale(1.2) rotate(5deg); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
}

/* Nasconde l'immagine originale quando il puzzle è attivo */
.slide.puzzle.active img {
    opacity: 0;
    transition: opacity 0.3s;
}

/* =================================================
   ANIMAZIONI EFFETTI (Sincronizzate con JS)
================================================= */

/* Fade & Zoom */
.fade { animation: fadeZoom 1.2s ease forwards; }
@keyframes fadeZoom {
    0% { opacity: 0; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

/* Flip 3D */
.flip3d, .flip { animation: flip3D 0.8s ease-out forwards; backface-visibility: hidden; }
@keyframes flip3D {
    0% { transform: perspective(1000px) rotateX(-90deg); opacity: 0; }
    100% { transform: perspective(1000px) rotateX(0); opacity: 1; }
}

/* Blur Soft */
.blursoft { animation: blurSoft 1s ease forwards; }
@keyframes blurSoft {
    0% { filter: blur(20px); opacity: 0; }
    100% { filter: blur(0); opacity: 1; }
}

/* Cube Effect */
.cube { animation: cubeAnim 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards; transform-origin: center left; }
@keyframes cubeAnim {
    0% { transform: perspective(1000px) rotateY(-90deg); opacity: 0; }
    100% { transform: perspective(1000px) rotateY(0); opacity: 1; }
}

/* Mask / Curtain */
.mask { animation: maskAnim 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards; }
@keyframes maskAnim {
    0% { clip-path: inset(0 50% 0 50%); }
    100% { clip-path: inset(0 0 0 0); }
}

/* =================================================
   RESPONSIVE
================================================= */
@media (max-width: 768px) {
    .effect-slider {
        height: 250px;
        margin: 20px auto;
    }

    .caption {
        font-size: 1rem;
        bottom: 15px;
        left: 15px;
        padding: 8px 16px;
    }

    .arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}


/* =================================================
   CHI SONO – FIX VISIBILITÀ
================================================= */
.card-section.chi-sono {
  background: linear-gradient(180deg, var(--blue-dark), var(--blue-soft));
  color: #ffffff;
}

/* Testi */
.card-section.chi-sono h1,
.card-section.chi-sono p,
.card-section.chi-sono strong {
  color: #ffffff;
  opacity: 1;
}

/* =================================================
   SEZIONI
================================================= */
.card-section {
  padding: 3.5rem 1rem;
  background-color: #ffffff;
}

.section-title {
  text-align: center;
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
}

/* =================================================
   CARD SYSTEM (UNICO E CORRETTO)
================================================= */
.card-box {
  height: 100%;
  padding: 28px 26px;
  border-radius: 20px;

  background-color: #ffffff;
  border: 1px solid rgba(13,42,92,.12);

  box-shadow: 0 10px 26px rgba(0,0,0,.10);

  transition:
    transform .25s ease,
    box-shadow .25s ease,
    border-color .2s ease,
    background-color .2s ease;
}

/* =================================================
   STATO INTERATTIVO (DESKTOP + MOBILE)
================================================= */
.card-box:hover,
.card-box:active,
.card-box:focus-visible {
  transform: translateY(-6px);

  background-color: rgba(13,42,92,.05);
  border-color: var(--blue-dark);

  box-shadow:
    0 24px 56px rgba(13,42,92,.35),
    0 0 0 1px rgba(13,42,92,.35);
}

/* =================================================
   CONTENUTO CARD
================================================= */
.card-icon {
  font-size: 1.9rem;
  margin-bottom: 16px;
  color: var(--blue-dark);

  transition:
    transform .25s ease,
    color .2s ease;
}

.card-box:hover .card-icon,
.card-box:active .card-icon,
.card-box:focus-visible .card-icon {
  transform: scale(1.2);
  color: var(--blue-dark-hover);
}

.card-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  transition: color .2s ease;
}

.card-box:hover h3,
.card-box:active h3,
.card-box:focus-visible h3 {
  color: var(--blue-dark);
}

.card-box p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* =================================================
   CTA DENTRO LE CARD
================================================= */
.card-box .btn-outline-primary {
  margin-top: 14px;
  border-width: 2px;

  transition:
    background-color .2s ease,
    color .2s ease,
    border-color .2s ease;
}

.card-box:hover .btn-outline-primary,
.card-box:active .btn-outline-primary,
.card-box:focus-visible .btn-outline-primary {
  background-color: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #ffffff;
}

/* =================================================
   VARIANTE CARD SU SFONDO BLU (CHI SONO)
================================================= */
.card-section.chi-sono .card-box {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.25);
  box-shadow: none;
}

.card-section.chi-sono .card-box:hover,
.card-section.chi-sono .card-box:active,
.card-section.chi-sono .card-box:focus-visible {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.7);
  box-shadow: 0 20px 44px rgba(0,0,0,.35);
}

/* =================================================
   CONTENUTI & IMMAGINI
================================================= */

#main-content {
  margin-bottom: 80px; /* Aggiunge uno spazio tra il contenuto e il footer */
}

.content-wrapper {
  padding: 4rem 1rem;
 
}

.content-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .content-split {
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
  }
}

.content-image-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 12px;
  background: #0b1f3a;
  border-radius: 18px;
}

.content-image-card img {
  border-radius: 12px;
}




/* =================================================
   FOOTER
================================================= */
.site-footer-fixed {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: linear-gradient(90deg, #020617, #0f172a);
  color: #e5e7eb;
  border-top: 1px solid rgba(255,255,255,.12);
  z-index: 1000;

}


.footer-fixed-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

/* ===============================
   LINK LEGALI (sx)
================================ */
.footer-fixed-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-fixed-left a,
.footer-link-btn {
  color: #e5e7eb;
  opacity: .85;
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.footer-fixed-left a:hover,
.footer-link-btn:hover {
  opacity: 1;
  text-decoration: none;
}

.footer-link-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ===============================
   CENTRO
================================ */
.footer-fixed-center {
  text-align: center;
  white-space: nowrap;
}

/* ===============================
   DESTRA
================================ */
.footer-fixed-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  height: 28px;
  width: auto;
}

/* =================================================
   BACK TO TOP BUTTON
================================================= */
.back-to-top-footer {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #0d2a5c;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}

.back-to-top-footer.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top-footer:hover {
  background-color: #0b234d;
}

/* =================================================
   RESPONSIVE (MOBILE)
================================================= */
@media (max-width: 768px) {
  .site-footer-fixed {
    position: static;
  }

  .footer-fixed-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 8px;
  }

  .footer-fixed-left,
  .footer-fixed-right {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer-fixed-center {
    white-space: normal;
  }
}

/* =================================================
   COOKIE BANNER
================================================= */
.cookie-banner {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #000;
  color: #fff;
  transform: translateY(100%);
  transition: transform .35s ease;
  z-index: 2000;
}

.cookie-banner.show {
  transform: translateY(0);
}

/* =================================================
   CMS LOGOS ORIZZONTALI
================================================= */
.cms-logos-horizontal {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.cms-logo-horizontal {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px 18px;
  background-color: #ffffff;
  border-radius: 14px;

  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  text-decoration: none;
  color: #111827;
  font-weight: 600;

  transition: transform .25s ease, box-shadow .25s ease;
}

.cms-logo-horizontal:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0,0,0,.18);
}

.cms-logo-horizontal img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* =================================================
   PORTFOLIO (TESTO ONLY)
================================================= */
.portfolio-card {
  height: 100%;
  padding: 32px 28px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0d2a5c, #001b44);
  color: #ffffff;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  transition: transform .3s ease, box-shadow .3s ease;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 70px rgba(0,0,0,.45);
}

.portfolio-card h3 {
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.portfolio-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e5e7eb;
}

/* BUTTON */
.portfolio-btn {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 20px;
  background-color: #ffffff;
  color: #0d2a5c;

  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;

  transition: background-color .25s ease, color .25s ease;
}

.portfolio-btn:hover {
  background-color: #000;
  color: #ffffff;
}
/* ============================
   CONTATTI – FORM BOX
============================ */
.contact-box {
  background: linear-gradient(180deg, #0d2a5c, #102f66);
  padding: 32px;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
}

.contact-box label {
  color: #000;
  font-weight: 600;
}

.contact-box p {
  color: #000;
}

.contact-box .form-control {
  background-color: #ffffff;
  color: #000000;
  border-radius: 10px;
  border: 1px solid #d1d5db;
}

.contact-box .form-control:focus {
  border-color: #0d2a5c;
  box-shadow: none;
}

/* Aggiungi questo al tuo CSS per lo stile del link */
.privacy-link {
  color: #007bff;  /* colore blu del link */
  text-decoration: none; /* rimuove la sottolineatura di default */
}

.privacy-link:hover {
  color: #0056b3;  /* colore blu scuro quando si passa sopra */
  text-decoration: underline; /* aggiunge la sottolineatura quando si passa sopra */
}