/* Navbar sticky */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    header.navbar.nav-open {
        position: sticky;
        top: 0;
    }
}

.nav-links {
    display: flex;
    gap: 20px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

/* Burger base (nascosto in desktop) */
.burger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 1rem;
}

.burger:focus { outline: 2px solid rgba(0,0,0,0.2); }
.burger-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: #111;
  transition: transform .2s ease, opacity .2s ease;
}

.nav-open .nav-links {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  padding: 1rem;
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}
.nav-open .auth-buttons {
  display: block;
  padding: 0 1rem 1rem;
}

.nav-open .burger-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .burger-bar:nth-child(2) { opacity: 0; }
.nav-open .burger-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-links { display: flex; gap: 1.25rem; align-items: center; }
.auth-buttons { display: flex; gap: 0.5rem; align-items: center; }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .auth-buttons { display: none; } 
    .burger { display: inline-flex; align-items:center; }
    header.nav-open { position: relative; }

    header.nav-open .nav-links { display: block; }

    .nav-links button{
        width: 100%;
    }

    header.nav-open .nav-links,
    header.nav-open .auth-buttons {
        display: flex;
        flex-direction: column;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        animation: fadeIn 0.2s ease-in-out;
    }

    header.nav-open .nav-links a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #eee;
    }

    header.nav-open .auth-buttons {
        display: flex;
        gap: 0.5rem;
        flex-direction: row;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-5px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

.hidden {
    display: none;
}

.burger svg {
    width: 32px;
    height: 32px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}


/* Hero Section */
.hero {
  position: relative;
  background-image: url('../img/hero.webp');
  background-size: cover;
  background-position: center;
  padding: 120px 20px;
  color: white;
  text-align: center;
  z-index: 0;
  overflow: hidden;
}

/* Overlay semitrasparente */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: color-mix(in srgb, var(--color-primary-600) 30%, transparent);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero .buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

@media (max-width: 768px) {
    .hero {
        padding: 80px 15px;
    }

    .hero .title {
        font-size: 2.5rem; 
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .hero .buttons {
        flex-direction: column;
        gap: 15px; 
        align-items: center;
    }

    .hero .btn {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 10px;
    }

    .hero .title {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }
}


/* Sezione Architettura */
.architecture {
    padding: 60px 10px;
}

.architecture .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px; 
    align-items: center;
    margin: 0 auto;
}

.architecture-left img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}


@media (max-width: 768px) {
    .architecture {
        padding: 30px 10px;
    }

    .architecture .container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .architecture-right {
        text-align: left;
    }
}

/* Sezione FilTipiC */
.filtipic {
    position: relative;
    padding: 60px 20px;
    background-image: url('../img/filtipic.webp');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.filtipic::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: color-mix(in srgb, var(--color-primary-600) 20%, transparent);
    z-index: 1;
}

/* Assicurati che il contenuto interno sia sopra l'overlay */
.filtipic > * {
    position: relative;
    z-index: 2;
}

.filtipic .container {
    margin: 0 auto;
}

.filtipic h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
}

.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
}

@media (min-width: 600px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .features {
        grid-template-columns: repeat(4, 1fr);
    }

    .feature:nth-last-child(2),
    .feature:nth-last-child(1) {
        grid-column: span 2;
    }
}

.feature .icon {
    font-size: 40px;
    margin-bottom: 20px;
}


/* Sezione Le PIS */
.pis {
    padding: 50px 20px;
}

.pis .container {
    margin: 0 auto;
}

.pis h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.pis-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Card */
.pis-item {
    display: flex;     
    align-items: center;   
    gap: 20px;             
    text-align: left;       
}

.pis-item > div:first-child {
    flex: 1;      
}

.pis-item > div:first-child img {
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.pis-item > div:last-child {
    flex: 1; 
}

@media (max-width: 1024px) {
    .pis-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pis-items {
        grid-template-columns: 1fr;
    }

    .pis-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .pis-item > div:first-child img {
        height: 200px;
    }
}


html{
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden;
}

body {
    overflow-y: scroll;
}


/* SEZIONE GLI ATTREZZI */
.tools {
    padding: 50px 20px;
    position: relative;
    background-image: url('../img/bg-attrezzi.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}


.tools::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: color-mix(in srgb, var(--color-primary-600) 20%, transparent);
    z-index: 1;
}


.tools .container {
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

.tools .space-y-6 > * + * {
     margin-top: 1.5rem;
}


.tools .flex:hover {
    transform: translateY(-2px);
}

.tools img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 0.5rem;
}

@media (max-width: 768px) {
  .tools .flex {
    flex-direction: column;
    align-items: flex-start;
  }

  .tools img {
    margin-bottom: 1rem;
  }
}

/* FOOTER */
footer {
    padding: 50px 20px;
    padding-bottom: 0;
}

footer .container {
  margin: 0 auto;
}

footer img {
  height: auto;
  object-fit: contain;
  filter: grayscale(10%);
  transition: opacity 0.3s ease;
}

footer ul li {
  transition: color 0.2s ease;
  cursor: pointer;
}

footer ul li:hover {
  color: var(--color-primary-600)
}

@media (max-width: 768px) {
  footer .flex {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  footer .flex > div {
    margin-bottom: 1.5rem;
  }

  footer img {
    height: auto;
    margin: 0.5rem 0;
  }
}

@media (max-width: 1024px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 80px 15px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .tools .flex {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .tools img {
    margin-bottom: 1rem;
  }

  footer .flex {
    flex-direction: column;
    text-align: center;
  }

  footer .flex > div {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.4rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .hero .buttons button {
    display: block;
    width: 100%;
    margin: 8px 0;
  }

  .tools {
    padding: 3rem 1rem;
  }

  footer ul li {
    font-size: 0.8rem;
  }
}

/* Pagina Iniziale ModGeot */
.hero-modgeot {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    background-size: cover;
    background-position: center;
    text-align: center;
    z-index: 0;
    overflow: hidden;
}

.hero-modgeot::before {
    content: "";
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--color-primary-600) 20%, transparent);
    z-index: 1;
}

.hero-modgeot .hero-content {
    position: relative;
    z-index: 2;
}

.navbar-modgeot  {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Pagine ModGeot */
.pagina-flusso-modgeot {
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    background-size: cover;
    background-position: center;
    z-index: 0;
    overflow: hidden;
}

.pagina-flusso-modgeot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: color-mix(in srgb, var(--color-primary-600) 20%, transparent);
  z-index: 1;
}

.flusso-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  margin: 5rem;
}

.card-flusso {
  width: 100%;
  height: 80%;
  padding: 6rem;
}

.pagina-flusso-modgeot .buttons {
    display: flex;
    justify-content: start;
    gap: 10px;
}

/* Stile per lo stepper modgeot */
.stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 1.5rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.step .circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--color-neutral-300);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-neutral-50);
    z-index: 1;
    font-weight: bold;
    color: var(--color-neutral-400);
}

.step.completed .circle {
    border-color: var(--color-primary-800);
    background-color: var(--color-primary-800);
    color: var(--color-neutral-50);
}

.step.current .circle {
    border-color: var(--color-primary-600); /*  più scuro */
    background-color: var(--color-primary-600);
    color: var(--color-neutral-50);
}

.step .title {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    text-align: center;
    color: var(--color-neutral-300);
}

.step.completed .title {
    color: var(--color-primary-800);
    font-weight: 600;
}

.step.current .title {
    color: var(--color-primary-600);
    font-weight: 700;
}

.step .line {
    position: absolute;
    top: 16px; /* metà altezza cerchio */
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: var(--color-neutral-300);
    z-index: 0;
}

.step.completed + .step .line {
    background-color: var(--color-primary-800);
}

/* Privacy policy */
.policy {
    padding: 20px 10px;
    padding-bottom: 3rem;
}

.policy .container {
    gap: 40px; 
    align-items: center;
    margin: 0 auto;
}


.richtext h1,
.richtext h2,
.richtext h3,
.richtext h4,
.richtext h5,
.richtext h6 {
    font-size: revert !important;
}

/* Elenco Loghi */
.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* i loghi vanno a capo se serve */
    gap: 3rem; /* spazio più ampio tra i loghi */
    padding: 2.5rem 0;
}

.footer-logos img {
    height: 60px; /* mantiene le proporzioni */
    object-fit: contain;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.footer-logos img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}


.finanziamenti{
    padding-left: 18rem; 
    padding-right: 18rem; 
    padding-bottom: 4rem; 
    padding-top: 4rem;
}

@media (max-width: 768px) {
    .footer-logos {
        gap: 2rem; /* spazio leggermente ridotto su mobile */
    }

    .footer-logos img {
        height: 45px;
    }

    .finanziamenti{
        padding: 0;
    }
}


