/* =========================================================
   MACRIGI 2027 — PROGRAMMA AFFILIATO WEB
   V2.1 — HERO MOBILE CORRETTA
   ========================================================= */

.macrigi-aff-web-2027{
  --navy:#0f2f4f;
  --navy-dark:#0b2741;
  --blue:#6fb3d6;
  --blue-dark:#4c9cc6;
  --blue-soft:#eaf4f9;
  --text:#1c3148;
  --muted:#526273;
  --border:#d8e5ee;
  --panel:#f4f8fb;
  --white:#ffffff;
  --max:1510px;

  width:100%;
  overflow:hidden;
  font-family:inherit;
  color:var(--text);
}

.macrigi-aff-web-2027 *,
.macrigi-aff-web-2027 *::before,
.macrigi-aff-web-2027 *::after{
  box-sizing:border-box;
}

.macrigi-aff-web-2027 img{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
}

.macrigi-aff-web-2027 a{
  text-decoration:none;
}

.macrigi-aff-web-2027 h1,
.macrigi-aff-web-2027 h2,
.macrigi-aff-web-2027 h3,
.macrigi-aff-web-2027 p{
  margin-top:0;
}

.macrigi-aff-web-2027 .maw-container{
  width:min(var(--max),calc(100% - 40px));
  margin:0 auto;
}

.macrigi-aff-web-2027 .maw-section{
  padding:82px 0;
}

.macrigi-aff-web-2027 .maw-light{
  background:var(--panel);
}

.macrigi-aff-web-2027 .maw-eyebrow{
  margin:0 0 15px;
  color:var(--blue);
  font-size:14px;
  line-height:1.3;
  letter-spacing:.10em;
  font-weight:800;
  text-transform:uppercase;
}

.macrigi-aff-web-2027 .maw-heading{
  margin:0;
  color:var(--navy);
  font-size:40px;
  line-height:1.1;
  font-weight:800;
}

.macrigi-aff-web-2027 .maw-head{
  max-width:900px;
  margin:0 auto 40px;
  text-align:center;
}

.macrigi-aff-web-2027 .maw-intro{
  max-width:820px;
  margin:17px auto 0;
  color:var(--muted);
  font-size:18px;
  line-height:1.65;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.macrigi-aff-web-2027 .maw-actions{
  display:flex;
  flex-wrap:wrap;
  gap:15px;
  margin-top:30px;
}

.macrigi-aff-web-2027 .maw-btn{
  min-height:56px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:14px 28px;
  border-radius:10px;
  font-size:16px;
  line-height:1.2;
  font-weight:800;
  text-align:center;
  border:2px solid var(--blue);
}

.macrigi-aff-web-2027 .maw-btn-primary{
  background:var(--blue);
  color:#fff !important;
}

.macrigi-aff-web-2027 .maw-btn-secondary{
  background:#fff;
  color:var(--blue-dark) !important;
}


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

.macrigi-aff-web-2027 .maw-hero{
  padding:70px 0 74px;
  margin:0;
  background:#fff;
}

.macrigi-aff-web-2027 .maw-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(470px,.96fr);
  align-items:center;
  gap:54px;
}

.macrigi-aff-web-2027 .maw-hero h1{
  margin:0 0 22px;
  color:var(--navy);
  font-size:54px;
  line-height:1.04;
  font-weight:800;
  letter-spacing:-.025em;
}

.macrigi-aff-web-2027 .maw-hero-copy > p{
  max-width:660px;
  margin:0;
  color:var(--text);
  font-size:20px;
  line-height:1.6;
}

.macrigi-aff-web-2027 .maw-hero-image{
  overflow:hidden;
  border-radius:25px;
  background:#eef6fa;
}

.macrigi-aff-web-2027 .maw-hero-image img{
  width:100%;
  object-fit:cover;
}


/* =========================================================
   CARDS
   ========================================================= */

.macrigi-aff-web-2027 .maw-grid{
  display:grid;
  gap:20px;
}

.macrigi-aff-web-2027 .maw-grid-2{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.macrigi-aff-web-2027 .maw-grid-3{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.macrigi-aff-web-2027 .maw-grid-4{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.macrigi-aff-web-2027 .maw-card{
  height:100%;
  padding:30px 25px;
  border:1px solid var(--border);
  border-radius:20px;
  background:#fff;
  text-align:center;
}

.macrigi-aff-web-2027 .maw-card-icon{
  width:61px;
  height:61px;
  margin:0 auto 19px;
  color:var(--blue);
}

.macrigi-aff-web-2027 .maw-card-icon svg{
  display:block;
  width:100%;
  height:100%;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.macrigi-aff-web-2027 .maw-card h3{
  margin:0 0 11px;
  color:var(--navy);
  font-size:21px;
  line-height:1.25;
  font-weight:800;
}

.macrigi-aff-web-2027 .maw-card p{
  margin:0;
  color:var(--muted);
  font-size:16px;
  line-height:1.55;
}


/* =========================================================
   COME FUNZIONA
   ========================================================= */

.macrigi-aff-web-2027 .maw-how{
  background:#fff;
}


/* =========================================================
   OPPORTUNITÀ
   ========================================================= */

.macrigi-aff-web-2027 .maw-opportunity{
  background:linear-gradient(180deg,#173b5e 0%,#0b2b49 100%);
}

.macrigi-aff-web-2027 .maw-opportunity .maw-heading{
  color:#fff;
}

.macrigi-aff-web-2027 .maw-opportunity .maw-card{
  background:rgba(255,255,255,.055);
  border-color:rgba(255,255,255,.18);
}

.macrigi-aff-web-2027 .maw-opportunity .maw-card h3{
  color:#fff;
}

.macrigi-aff-web-2027 .maw-opportunity .maw-card-icon{
  color:#76bce0;
}


/* =========================================================
   WORKSPACE
   ========================================================= */

.macrigi-aff-web-2027 .maw-workspace{
  background:#f1f7fa;
}

.macrigi-aff-web-2027 .maw-workspace-grid{
  display:grid;
  grid-template-columns:.95fr 1.05fr;
  gap:48px;
  align-items:center;
}

.macrigi-aff-web-2027 .maw-workspace-copy .maw-heading{
  margin-bottom:18px;
}

.macrigi-aff-web-2027 .maw-workspace-copy > p{
  margin:0 0 30px;
  color:var(--muted);
  font-size:18px;
  line-height:1.65;
}

.macrigi-aff-web-2027 .maw-dashboard-image{
  overflow:hidden;
  border-radius:24px;
  background:#fff;
}

.macrigi-aff-web-2027 .maw-dashboard-image img{
  width:100%;
  object-fit:cover;
}


/* =========================================================
   PROMOTE
   ========================================================= */

.macrigi-aff-web-2027 .maw-promote{
  background:#fff;
}

.macrigi-aff-web-2027 .maw-economic-note{
  max-width:800px;
  margin:30px auto 0;
  text-align:center;
  color:var(--muted);
  font-size:17px;
  line-height:1.65;
}


/* =========================================================
   PROFESSIONAL
   ========================================================= */

.macrigi-aff-web-2027 .maw-professional{
  background:#f1f7fa;
}

.macrigi-aff-web-2027 .maw-prof-note{
  max-width:840px;
  margin:32px auto 0;
  text-align:center;
  color:var(--muted);
  font-size:17px;
  line-height:1.65;
}


/* =========================================================
   BEFORE
   ========================================================= */

.macrigi-aff-web-2027 .maw-before{
  background:#fff;
}

.macrigi-aff-web-2027 .maw-before-note{
  max-width:800px;
  margin:30px auto 0;
  text-align:center;
  color:var(--muted);
  font-size:17px;
  line-height:1.65;
}

.macrigi-aff-web-2027 .maw-before .maw-actions{
  justify-content:center;
}


/* =========================================================
   FINAL CTA
   ========================================================= */

.macrigi-aff-web-2027 .maw-final{
  position:relative;
  padding:88px 0;
  color:#fff;

  background:
    linear-gradient(
      180deg,
      rgba(5,37,63,.74) 0%,
      rgba(5,37,63,.88) 100%
    ),
    url("https://www.macrigi.com/wp-content/uploads/2026/09/01-hero-affiliato-desktop-1450x850-1.webp");

  background-size:cover;
  background-position:center;
}

.macrigi-aff-web-2027 .maw-final-inner{
  max-width:850px;
  margin:0 auto;
  text-align:center;
}

.macrigi-aff-web-2027 .maw-final h2{
  margin:0 0 20px;
  color:#fff;
  font-size:45px;
  line-height:1.12;
  font-weight:800;
}

.macrigi-aff-web-2027 .maw-final p{
  max-width:760px;
  margin:0 auto;
  color:#fff;
  font-size:20px;
  line-height:1.65;
}

.macrigi-aff-web-2027 .maw-final .maw-actions{
  justify-content:center;
}


/* =========================================================
   DESKTOP WIDE — aligned to Direttore / Home geometry
   ========================================================= */

@media (min-width:1181px){

  .macrigi-aff-web-2027 .maw-hero{
    padding:34px 0 44px;
  }

  .macrigi-aff-web-2027 .maw-hero .maw-container{
    width:100%;
    max-width:none;
    margin:0;
    padding-inline:clamp(30px,4.6vw,92px);
  }

  .macrigi-aff-web-2027 .maw-hero-grid{
    grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);
    gap:clamp(40px,3.6vw,74px);
    align-items:center;
  }

  .macrigi-aff-web-2027 .maw-hero-copy{
    width:100%;
    max-width:760px;
    justify-self:start;
  }

  .macrigi-aff-web-2027 .maw-hero h1{
    font-size:clamp(38px,3.05vw,54px);
    line-height:1.06;
    max-width:760px;
  }

  .macrigi-aff-web-2027 .maw-hero-image{
    width:100%;
    min-width:0;
  }

  .macrigi-aff-web-2027 .maw-hero-image img{
    width:100%;
    aspect-ratio:16/9;
    object-fit:cover;
    object-position:center;
  }
}


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

@media(max-width:1050px){

  .macrigi-aff-web-2027 .maw-container{
    width:calc(100% - 48px);
  }

  .macrigi-aff-web-2027 .maw-section{
    padding:68px 0;
  }

  .macrigi-aff-web-2027 .maw-hero-grid{
    grid-template-columns:1fr 1fr;
    gap:35px;
  }

  .macrigi-aff-web-2027 .maw-hero h1{
    font-size:43px;
  }

  .macrigi-aff-web-2027 .maw-heading{
    font-size:34px;
  }

  .macrigi-aff-web-2027 .maw-grid-4{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .macrigi-aff-web-2027 .maw-workspace-grid{
    grid-template-columns:1fr;
  }

  .macrigi-aff-web-2027 .maw-dashboard-image{
    max-width:700px;
    margin:0 auto;
    order:-1;
  }

}


/* =========================================================
   IPHONE / MOBILE
   ========================================================= */

@media(max-width:767px){

  .macrigi-aff-web-2027 .maw-container{
    width:calc(100% - 38px);
  }

  .macrigi-aff-web-2027 .maw-section{
    padding:50px 0;
  }

  .macrigi-aff-web-2027 .maw-head{
    margin-bottom:28px;
  }

  .macrigi-aff-web-2027 .maw-heading{
    font-size:29px;
    line-height:1.13;
  }

  .macrigi-aff-web-2027 .maw-intro{
    font-size:16px;
    line-height:1.55;
  }


  /* HERO MOBILE — NO SPAZIO ARTIFICIALE */

  .macrigi-aff-web-2027 .maw-hero{
    padding:18px 0 46px;
    margin:0;
    min-height:0;
  }

  .macrigi-aff-web-2027 .maw-hero-grid{
    display:flex;
    flex-direction:column;
    gap:28px;
  }

  .macrigi-aff-web-2027 .maw-hero-copy{
    width:100%;
  }

  .macrigi-aff-web-2027 .maw-hero h1{
    margin:0 0 20px;
    font-size:37px;
    line-height:1.07;
  }

  .macrigi-aff-web-2027 .maw-hero-copy > p{
    font-size:17px;
    line-height:1.6;
  }

  .macrigi-aff-web-2027 .maw-eyebrow{
    font-size:12px;
  }

  .macrigi-aff-web-2027 .maw-actions{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top:26px;
  }

  .macrigi-aff-web-2027 .maw-btn{
    width:100%;
    min-height:57px;
  }

  .macrigi-aff-web-2027 .maw-hero-image{
    width:100%;
    border-radius:20px;
  }


  /* CARDS */

  .macrigi-aff-web-2027 .maw-grid-2,
  .macrigi-aff-web-2027 .maw-grid-3,
  .macrigi-aff-web-2027 .maw-grid-4{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:13px;
  }

  .macrigi-aff-web-2027 .maw-card{
    padding:23px 15px;
    border-radius:18px;
  }

  .macrigi-aff-web-2027 .maw-card-icon{
    width:44px;
    height:44px;
    margin-bottom:14px;
  }

  .macrigi-aff-web-2027 .maw-card h3{
    font-size:17px;
  }

  .macrigi-aff-web-2027 .maw-card p{
    font-size:14px;
  }


  /* 2 + 1 */

  .macrigi-aff-web-2027 .maw-how .maw-card:last-child,
  .macrigi-aff-web-2027 .maw-professional .maw-card:last-child,
  .macrigi-aff-web-2027 .maw-before .maw-card:last-child{
    grid-column:1/-1;
    width:calc(50% - 7px);
    justify-self:center;
  }


  /* OPPORTUNITY */

  .macrigi-aff-web-2027 .maw-opportunity .maw-card{
    min-height:190px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
  }


  /* WORKSPACE */

  .macrigi-aff-web-2027 .maw-workspace-grid{
    gap:27px;
  }

  .macrigi-aff-web-2027 .maw-workspace-copy{
    text-align:center;
  }

  .macrigi-aff-web-2027 .maw-workspace-copy > p{
    margin-bottom:25px;
    font-size:16px;
  }

  .macrigi-aff-web-2027 .maw-dashboard-image{
    width:100%;
    border-radius:20px;
  }


  /* PROMOTE */

  .macrigi-aff-web-2027 .maw-promote .maw-card{
    min-height:230px;
  }

  .macrigi-aff-web-2027 .maw-economic-note,
  .macrigi-aff-web-2027 .maw-prof-note,
  .macrigi-aff-web-2027 .maw-before-note{
    margin-top:25px;
    font-size:15px;
  }


  /* FINAL */

  .macrigi-aff-web-2027 .maw-final{
    padding:56px 0;

    background:
      linear-gradient(
        180deg,
        rgba(5,37,63,.71) 0%,
        rgba(5,37,63,.89) 100%
      ),
      url("https://www.macrigi.com/wp-content/uploads/2026/09/01-hero-affiliato-mobile-800x900-1.webp");

    background-size:cover;
    background-position:center;
  }

  .macrigi-aff-web-2027 .maw-final h2{
    font-size:32px;
  }

  .macrigi-aff-web-2027 .maw-final p{
    font-size:17px;
  }

}


@media(max-width:390px){

  .macrigi-aff-web-2027 .maw-container{
    width:calc(100% - 30px);
  }

  .macrigi-aff-web-2027 .maw-hero{
    padding-top:14px;
  }

  .macrigi-aff-web-2027 .maw-hero h1{
    font-size:34px;
  }

  .macrigi-aff-web-2027 .maw-card h3{
    font-size:16px;
  }

  .macrigi-aff-web-2027 .maw-card p{
    font-size:13.5px;
  }

}


/* v0.7.121 — PAGE-SPECIFIC FINAL WIDTH CONTRACT */
@media (min-width:1440px){.macrigi-aff-web-2027 .maw-container{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){.macrigi-aff-web-2027 .maw-container{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){.macrigi-aff-web-2027 .maw-container{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){.macrigi-aff-web-2027 .maw-container{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){.macrigi-aff-web-2027 .maw-container{margin-left:11px!important;margin-right:11px!important}}

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