/**
 * REI — Pagina Moduli
 * Stessa palette/criterio della pagina Pagamenti (crema, verde, ink).
 *
 * @since 1.2.0
 */

body.rei-static-page--moduli {
    background: var(--rei-cream, #FFF4E6);
}

.rei-moduli {
    background: var(--rei-cream, #FFF4E6);
    color: var(--rei-ink, #0B1733);
    position: relative;
    overflow-x: hidden;
}

.rei-moduli * { box-sizing: border-box; }

.rei-moduli__container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ==========================================================================
   DECORAZIONI DI SFONDO (glow + documenti fluttuanti)
   ========================================================================== */
.rei-moduli__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.rei-moduli__glow {
    position: absolute;
    width: 540px;
    height: 540px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}
.rei-moduli__glow--tl { top: -180px; left: -180px; background: radial-gradient(circle, rgba(34,202,1,0.55) 0%, rgba(34,202,1,0) 70%); }
.rei-moduli__glow--tr { top: -200px; right: -200px; background: radial-gradient(circle, rgba(255,180,0,0.45) 0%, rgba(255,180,0,0) 70%); }
.rei-moduli__glow--bl { bottom: -180px; left: -200px; background: radial-gradient(circle, rgba(255,180,0,0.45) 0%, rgba(255,180,0,0) 70%); }
.rei-moduli__glow--br { bottom: -180px; right: -180px; background: radial-gradient(circle, rgba(34,202,1,0.55) 0%, rgba(34,202,1,0) 70%); }

/* Documenti in filigrana che pulsano in loop (v1.2.4: come banconote Pagamenti) */
.rei-moduli__note {
    position: absolute;
    color: var(--rei-green, #22ca01);
    opacity: 0.20;
    pointer-events: none;
    will-change: transform, opacity;
    filter: drop-shadow(0 0 22px rgba(34, 202, 1, 0.5));
    animation: rei-moddoc-pulse 4s ease-in-out infinite;
}
.rei-moduli__note svg { width: 100%; height: 100%; display: block; }

/* 7 documenti sparsi, dimensioni grandi (filigrana), delay sfalsati */
.rei-moduli__note--1 { top: 8%;  left: 3%;  width: 130px; height: 162px; animation-delay: 0s; }
.rei-moduli__note--2 { top: 26%; right: 2%; width: 160px; height: 200px; animation-delay: 0.6s; }
.rei-moduli__note--3 { top: 46%; left: 5%;  width: 110px; height: 138px; animation-delay: 1.2s; }
.rei-moduli__note--4 { top: 64%; right: 4%; width: 170px; height: 212px; color: var(--rei-yellow, #FFB400); filter: drop-shadow(0 0 22px rgba(255, 180, 0, 0.45)); animation-delay: 1.8s; }
.rei-moduli__note--5 { top: 80%; left: 7%;  width: 120px; height: 150px; animation-delay: 2.4s; }
.rei-moduli__note--6 { top: 14%; left: 46%; width: 100px; height: 125px; animation-delay: 3s; }
.rei-moduli__note--7 { top: 90%; right: 16%; width: 140px; height: 175px; animation-delay: 3.6s; }
.rei-moduli__note--8 { top: 4%;  right: 22%; width: 105px; height: 131px; animation-delay: 0.9s; }
.rei-moduli__note--9 { top: 34%; left: 24%;  width: 120px; height: 150px; animation-delay: 1.5s; }
.rei-moduli__note--10 { top: 52%; right: 24%; width: 135px; height: 169px; color: var(--rei-yellow, #FFB400); filter: drop-shadow(0 0 22px rgba(255, 180, 0, 0.45)); animation-delay: 2.1s; }
.rei-moduli__note--11 { top: 70%; left: 40%;  width: 115px; height: 144px; animation-delay: 2.7s; }
.rei-moduli__note--12 { top: 20%; left: 14%;  width: 100px; height: 125px; animation-delay: 3.3s; }

@keyframes rei-moddoc-pulse {
    0%   { transform: scale(0.5) rotate(-6deg); opacity: 0.07; }
    50%  { transform: scale(1.1) rotate(5deg);  opacity: 0.26; }
    100% { transform: scale(0.5) rotate(-6deg); opacity: 0.07; }
}

.rei-moduli > section { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
    .rei-moduli__note { animation: none; opacity: 0.14; }
}

/* ==========================================================================
   SEZIONE 1 — HERO
   ========================================================================== */
.rei-moduli__hero { padding: 80px 0 56px; background: transparent; }

.rei-moduli__eyebrow {
    display: inline-block;
    background: #d9f5dd;
    color: var(--rei-green-deep, #0a7d2c);
    padding: 8px 22px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 28px;
    border: 1px solid rgba(34,202,1,0.25);
    line-height: 1.2;
}

.rei-moduli__title {
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 24px;
    color: var(--rei-ink, #0B1733);
}
.rei-moduli__title-green { color: var(--rei-green, #22ca01); }

.rei-moduli__intro {
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 720px;
    margin: 0 0 32px;
}

.rei-moduli__hero-icons {
    display: flex;
    gap: 16px;
}
.rei-moduli__hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--rei-green, #22ca01);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px -6px rgba(34,202,1,0.5);
}
.rei-moduli__hero-icon svg { width: 32px; height: 32px; }

/* ==========================================================================
   SEZIONE 2 — CATEGORIE + MODULI
   ========================================================================== */
.rei-moduli__cats { padding: 32px 0 72px; background: transparent; }

.rei-moduli__cat { margin-bottom: 56px; }
.rei-moduli__cat:last-child { margin-bottom: 0; }

.rei-moduli__cat-title {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    color: var(--rei-ink, #0B1733);
    margin: 0 0 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(11,23,51,0.1);
}

.rei-moduli__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.rei-moduli__item { margin: 0; }

.rei-moduli__link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--rei-ink, #0B1733);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.rei-moduli__link:hover {
    background: #fff;
    transform: translateX(4px);
    box-shadow: 0 8px 22px -8px rgba(11,23,51,0.18);
    color: var(--rei-green-deep, #0a7d2c);
}

.rei-moduli__dl-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #d9f5dd;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--rei-green, #22ca01);
    transition: background 0.15s ease;
}
.rei-moduli__link:hover .rei-moduli__dl-icon {
    background: var(--rei-green, #22ca01);
    color: #fff;
}
.rei-moduli__dl-icon svg { width: 20px; height: 20px; }

.rei-moduli__item-name {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 500;
}

/* ==========================================================================
   SEZIONE 3 — COME RESTITUIRE (verde scuro)
   ========================================================================== */
.rei-moduli__restituzione {
    background: linear-gradient(135deg, #eafbe7 0%, #d4f5c2 100%);
    border-top: 2px solid #22ca01;
    border-bottom: 2px solid #22ca01;
    color: #2a3548;
    padding: 72px 0;
    position: relative;
    overflow: hidden;
}
/* v1.21.4: shine hover stile Tutela utenti (verde soft) */
.rei-moduli__restituzione::before {
    content: '';
    position: absolute;
    top: -50%; right: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(34,202,1,0.20) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}
.rei-moduli__restituzione:hover::before { opacity: 1; }
.rei-moduli__restituzione > .rei-moduli__container { position: relative; z-index: 1; }

.rei-moduli__rest-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #0B1733;
    margin: 0 0 12px;
}
.rei-moduli__rest-intro {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #2a3548;
    margin: 0 0 48px;
    max-width: 760px;
}

.rei-moduli__rest-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.rei-moduli__rest-method {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rei-moduli__rest-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22ca01 0%, #16a300 100%);
    box-shadow: 0 12px 24px -6px rgba(34,202,1,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: #fff;
}
.rei-moduli__rest-icon svg { width: 40px; height: 40px; }

.rei-moduli__rest-method-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0B1733;
    margin: 0 0 10px;
}
.rei-moduli__rest-method-text {
    font-size: 0.95rem;
    line-height: 1.55;
    color: #2a3548;
    margin: 0;
    max-width: 300px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .rei-moduli__container { padding: 0 20px; }
    .rei-moduli__hero { padding: 56px 0 40px; }
    .rei-moduli__cats { padding: 24px 0 48px; }
    .rei-moduli__restituzione { padding: 56px 0; }
    .rei-moduli__cat { margin-bottom: 40px; }
    .rei-moduli__rest-methods {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .rei-moduli__link { padding: 12px 14px; }
    .rei-moduli__item-name { font-size: 0.95rem; }
}
