/* =========================================================
   MACRIGI 2027 — INFORMAZIONI LEGALI
   RESPONSIVE COMPATTA + CTA VISIVA
   VERSIONE MOBILE RIFINITA
   ========================================================= */

.m27-legal{
  --navy:#162b39;
  --navy-deep:#0d2638;
  --blue:#5faece;
  --soft:#edf7fb;
  --text:#1d2a36;
  --muted:#52636e;
  --border:#d6e5eb;

  width:100%;
  margin:0;
  padding:0;
  color:var(--text);
  font-family:inherit;
}

.m27-legal,
.m27-legal *{
  box-sizing:border-box;
}

.m27-legal a{
  text-decoration:none;
}

.m27-legal-shell{
  width:calc(100% - 96px);
  max-width:1660px;
  margin:0 auto;
}

/* =========================================================
   HERO
   ========================================================= */

.m27-legal-hero{
  position:relative;
  min-height:570px;
  display:flex;
  align-items:center;
  overflow:hidden;

  background:
    linear-gradient(
      90deg,
      rgba(7,35,62,.98) 0%,
      rgba(7,35,62,.94) 38%,
      rgba(7,35,62,.62) 58%,
      rgba(7,35,62,.12) 100%
    ),
    url("https://www.macrigi.com/wp-content/uploads/2026/09/hero-informazioni-legali-desktop-1450x650-1.webp")
    center center / cover no-repeat;
}

.m27-legal-hero-inner{
  position:relative;
  z-index:2;
  width:100%;
}

.m27-legal-hero-copy{
  width:min(590px,52%);
  color:#fff;
}

.m27-legal-eyebrow{
  margin:0 0 14px;
  color:#83c8e2;
  font-size:14px;
  line-height:1.3;
  font-weight:800;
  letter-spacing:.10em;
  text-transform:uppercase;
}

.m27-legal-hero h1{
  margin:0 0 18px;
  color:#fff;
  font-size:48px;
  line-height:1.08;
  font-weight:800;
}

.m27-legal-hero p{
  margin:0;
  max-width:560px;
  color:#fff;
  font-size:19px;
  line-height:1.65;
}

/* =========================================================
   SEZIONI
   ========================================================= */

.m27-legal-section{
  padding:70px 0;
}

.m27-legal-section.soft{
  background:var(--soft);
}

.m27-legal-section.white{
  background:#fff;
}

.m27-legal-heading{
  margin:0 0 36px;
}

.m27-legal-kicker{
  margin:0 0 9px;
  color:var(--blue);
  font-size:13px;
  line-height:1.3;
  font-weight:800;
  letter-spacing:.10em;
  text-transform:uppercase;
}

.m27-legal-heading h2{
  margin:0 0 10px;
  color:var(--navy);
  font-size:34px;
  line-height:1.15;
  font-weight:800;
}

.m27-legal-heading p{
  margin:0;
  max-width:760px;
  color:var(--muted);
  font-size:16px;
  line-height:1.6;
}

/* =========================================================
   CARD
   ========================================================= */

.m27-legal-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px;
}

.m27-legal-card{
  min-height:225px;
  padding:25px;

  display:flex;
  flex-direction:column;

  background:#fff;

  border:1px solid var(--border);
  border-radius:14px;

  box-shadow:0 8px 24px rgba(22,43,57,.035);
}

.m27-legal-card-top{
  display:flex;
  align-items:center;
  gap:15px;
  margin-bottom:17px;
}

.m27-legal-icon{
  flex:0 0 54px;
  width:54px;
  height:54px;

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

  color:var(--blue);
  background:#f4fbfe;

  border:1px solid var(--blue);
  border-radius:50%;
}

.m27-legal-icon svg{
  width:27px;
  height:27px;

  stroke:currentColor;
  fill:none;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.m27-legal-card h3{
  margin:0;
  color:var(--navy);
  font-size:20px;
  line-height:1.28;
  font-weight:800;
}

.m27-legal-card p{
  margin:0 0 22px;
  color:var(--muted);
  font-size:15px;
  line-height:1.6;
}

/* =========================================================
   BUTTON
   ========================================================= */

.m27-legal-button{
  width:100%;
  min-height:48px;

  margin-top:auto;
  padding:12px 18px;

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

  color:#fff!important;
  background:var(--blue);

  border-radius:7px;

  font-size:13px;
  line-height:1.2;
  font-weight:800;

  text-align:center;

  transition:
    background .2s ease,
    transform .2s ease;
}

.m27-legal-button:hover{
  color:#fff!important;
  background:#4d9dbd;
  transform:translateY(-1px);
}

/* =========================================================
   DATI SOCIETARI
   ========================================================= */

.m27-company{
  padding:70px 0;
  background:var(--soft);
}

.m27-company-header{
  margin-bottom:28px;
}

.m27-company-header h2{
  margin:0;
  color:var(--navy);
  font-size:34px;
  line-height:1.15;
  font-weight:800;
}

.m27-company-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.m27-company-item{
  min-height:105px;
  padding:22px;

  display:flex;
  align-items:center;
  gap:15px;

  background:#fff;

  border:1px solid var(--border);
  border-radius:12px;
}

.m27-company-item.address{
  grid-column:1 / -1;
}

.m27-company-check{
  flex:0 0 42px;

  width:42px;
  height:42px;

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

  color:var(--blue);

  border:2px solid var(--blue);
  border-radius:50%;
}

.m27-company-check svg{
  width:22px;
  height:22px;

  stroke:currentColor;
  fill:none;

  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.m27-company-item p{
  margin:0;
  color:var(--text);
  font-size:15px;
  line-height:1.5;
}

.m27-company-item strong{
  color:var(--navy);
}

/* =========================================================
   CTA FINALE CON IMMAGINE
   ========================================================= */

.m27-legal-help{
  position:relative;

  min-height:400px;

  display:flex;
  align-items:center;

  overflow:hidden;

  background:
    linear-gradient(
      90deg,
      rgba(6,34,58,.97) 0%,
      rgba(6,34,58,.92) 42%,
      rgba(6,34,58,.72) 68%,
      rgba(6,34,58,.38) 100%
    ),
    url("https://www.macrigi.com/wp-content/uploads/2026/09/03-cta-affiliato-desktop-1450x520-1.webp")
    center center / cover no-repeat;
}

.m27-help-inner{
  width:100%;
  padding:64px 0;

  position:relative;
  z-index:2;
}

.m27-help-content{
  max-width:570px;
}

.m27-help-kicker{
  margin:0 0 10px;

  color:#8ed1ea;

  font-size:13px;
  line-height:1.3;
  font-weight:800;

  letter-spacing:.10em;
  text-transform:uppercase;
}

.m27-help-content h2{
  margin:0 0 12px;

  color:#fff;

  font-size:36px;
  line-height:1.15;
  font-weight:800;
}

.m27-help-content p{
  margin:0 0 25px;

  max-width:500px;

  color:#e2edf2;

  font-size:16px;
  line-height:1.6;
}

.m27-help-button{
  width:auto;
  min-width:190px;

  display:inline-flex;

  margin:0;
}

/* =========================================================
   TABLET
   ========================================================= */

@media(max-width:1024px){

  .m27-legal-shell{
    width:calc(100% - 56px);
  }

  .m27-legal-hero{
    min-height:500px;

    background:
      linear-gradient(
        90deg,
        rgba(7,35,62,.97) 0%,
        rgba(7,35,62,.90) 45%,
        rgba(7,35,62,.38) 70%,
        rgba(7,35,62,.08) 100%
      ),
      url("https://www.macrigi.com/wp-content/uploads/2026/09/hero-informazioni-legali-tablet-1100x620-1.webp")
      center center / cover no-repeat;
  }

  .m27-legal-hero-copy{
    width:60%;
  }

  .m27-legal-hero h1{
    font-size:42px;
  }

}

/* =========================================================
   IPHONE / SMARTPHONE
   ========================================================= */

@media(max-width:767px){

  .m27-legal-shell{
    width:calc(100% - 28px);
  }

  /* HERO */

  .m27-legal-hero{
    min-height:0;
    display:block;
    background:var(--navy-deep);
  }

  .m27-legal-hero-inner{
    padding:30px 8px 24px;
  }

  .m27-legal-hero-copy{
    width:100%;
  }

  .m27-legal-eyebrow{
    margin-bottom:8px;
    font-size:10px;
  }

  .m27-legal-hero h1{
    margin-bottom:11px;
    font-size:30px;
    line-height:1.08;
  }

  .m27-legal-hero p{
    font-size:14px;
    line-height:1.5;
  }

  .m27-legal-hero::after{
    content:"";

    display:block;

    width:calc(100% - 28px);

    margin:0 auto 20px;

    aspect-ratio:16 / 7;

    background:
      url("https://www.macrigi.com/wp-content/uploads/2026/09/hero-informazioni-legali-desktop-1450x650-1.webp")
      69% center / cover no-repeat;

    border-radius:10px;
  }

  /* SEZIONI */

  .m27-legal-section{
    padding:32px 0;
  }

  .m27-legal-heading{
    margin-bottom:18px;
  }

  .m27-legal-kicker{
    margin-bottom:5px;
    font-size:9px;
  }

  .m27-legal-heading h2{
    margin-bottom:6px;
    font-size:24px;
    line-height:1.12;
  }

  .m27-legal-heading p{
    font-size:12.5px;
    line-height:1.45;
  }

  /* CARD MOBILE — 2 COLONNE */

  .m27-legal-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .m27-legal-card{
    min-height:215px;

    padding:15px 11px;

    align-items:center;
    text-align:center;

    border-radius:11px;
  }

  .m27-legal-card-top{
    display:block;
    margin-bottom:10px;
  }

  .m27-legal-icon{
    width:44px;
    height:44px;

    margin:0 auto 10px;

    flex-basis:auto;
  }

  .m27-legal-icon svg{
    width:22px;
    height:22px;
  }

  .m27-legal-card h3{
    font-size:14px;
    line-height:1.18;
  }

  .m27-legal-card p{
    margin-bottom:12px;

    font-size:11px;
    line-height:1.38;
  }

  .m27-legal-button{
    min-height:38px;

    padding:8px 6px;

    border-radius:6px;

    font-size:9px;
    line-height:1.15;
  }

  /* DATI SOCIETARI */

  .m27-company{
    padding:32px 0;
  }

  .m27-company-header{
    margin-bottom:16px;
  }

  .m27-company-header h2{
    font-size:24px;
  }

  .m27-company-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .m27-company-item{
    min-height:94px;

    padding:13px 10px;

    display:block;

    text-align:center;

    border-radius:10px;
  }

  .m27-company-item.address{
    grid-column:1 / -1;

    min-height:96px;

    display:flex;
    flex-direction:column;

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

    text-align:center;
  }

  .m27-company-check{
    width:34px;
    height:34px;

    margin:0 auto 8px;

    flex-basis:auto;
  }

  .m27-company-item.address .m27-company-check{
    flex:0 0 34px;
    margin:0 auto 8px;
  }

  .m27-company-check svg{
    width:18px;
    height:18px;
  }

  .m27-company-item p{
    font-size:11px;
    line-height:1.35;
  }

  .m27-company-item.address p{
    width:100%;
    max-width:520px;
    margin:0 auto;

    text-align:center;
  }

  /* CTA FINALE MOBILE */

  .m27-legal-help{
    min-height:300px;

    align-items:flex-end;

    background:
      linear-gradient(
        180deg,
        rgba(6,34,58,.28) 0%,
        rgba(6,34,58,.64) 42%,
        rgba(6,34,58,.97) 100%
      ),
      url("https://www.macrigi.com/wp-content/uploads/2026/09/03-cta-affiliato-desktop-1450x520-1.webp")
      center center / cover no-repeat;
  }

  .m27-help-inner{
    padding:105px 0 28px;
  }

  .m27-help-content{
    max-width:none;
  }

  .m27-help-kicker{
    margin-bottom:6px;
    font-size:9px;
  }

  .m27-help-content h2{
    margin-bottom:7px;

    font-size:23px;
    line-height:1.12;
  }

  .m27-help-content p{
    margin-bottom:16px;

    max-width:310px;

    font-size:12px;
    line-height:1.4;
  }

  .m27-help-button{
    width:100%;
    min-width:0;

    min-height:42px;

    font-size:11px;
  }

}

/* =========================================================
   IPHONE MOLTO STRETTO
   ========================================================= */

@media(max-width:390px){

  .m27-legal-shell{
    width:calc(100% - 22px);
  }

  .m27-legal-grid,
  .m27-company-grid{
    gap:8px;
  }

  .m27-legal-card{
    padding:13px 9px;
  }

  .m27-legal-card h3{
    font-size:13px;
  }

  .m27-legal-card p{
    font-size:10.5px;
  }

  .m27-legal-button{
    font-size:8.5px;
  }

}


/* v0.7.121 — PAGE-SPECIFIC FINAL WIDTH CONTRACT */
@media (min-width:1440px){.m27-legal-shell{box-sizing:border-box!important;width:auto!important;max-width:none!important;margin-left:clamp(140px,10vw,190px)!important;margin-right:clamp(140px,10vw,190px)!important;padding-left:0!important;padding-right:0!important}}
@media (min-width:1025px) and (max-width:1439px){.m27-legal-shell{box-sizing:border-box!important;width:auto!important;max-width:none!important;margin-left:36px!important;margin-right:36px!important;padding-left:0!important;padding-right:0!important}}
@media (min-width:768px) and (max-width:1024px){.m27-legal-shell{box-sizing:border-box!important;width:auto!important;max-width:none!important;margin-left:24px!important;margin-right:24px!important;padding-left:0!important;padding-right:0!important}}
@media (max-width:767px){.m27-legal-shell{box-sizing:border-box!important;width:auto!important;max-width:none!important;margin-left:14px!important;margin-right:14px!important;padding-left:0!important;padding-right:0!important}}
@media (max-width:430px){.m27-legal-shell{margin-left:11px!important;margin-right:11px!important}}

/* v0.7.121 — PAGE-SPECIFIC IPHONE CARD CONTRACT */
@media (max-width:767px){
.m27-legal-grid,
.m27-company-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
.m27-legal-grid > *,
.m27-company-grid > *{min-width:0!important;text-align:center!important}
.m27-legal-grid > *:nth-child(odd):last-child,
.m27-company-grid > *:nth-child(odd):last-child{grid-column:1/-1!important;width:calc(50% - 6px)!important;justify-self:center!important}
}
@media (max-width:430px){
.m27-legal-grid,
.m27-company-grid{gap:10px!important}
.m27-legal-grid > *:nth-child(odd):last-child,
.m27-company-grid > *:nth-child(odd):last-child{width:calc(50% - 5px)!important}
}
