/**
 * REI — Pagina Rimborso CMOR a favore dell'utenza (Tutela utenti)
 * Diciottesima REI Static Page. Form di richiesta rimborso con upload doc.
 *
 * Standing rules v1.21.4 applicate:
 * - Filigrane pulse 4s (scale+rotate+opacity)
 * - Intro card soft verde + box contatti soft giallo
 * - Form section con sfondo soft (pattern adattato per fondo chiaro)
 * - Shine ::before su tutte le card piene
 * - Ombre dual-layer profonde
 * - 14 particelle posizioni standard (icona wallet)
 *
 * @since 1.22.0
 */

body.rei-static-page--rimborso-cmor,
body.rei-static-page--rimborsi-cmor { background: var(--rei-cream, #F4F8F6); }

.rei-pi { position: relative; min-height: 60vh; overflow: hidden; padding-bottom: 80px; }
.rei-pi__container { max-width: 1200px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }

/* ===== SFONDO DECORATIVO ===== */
.rei-pi__bg { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.rei-pi__glow { position: absolute; width: 600px; height: 600px; border-radius: 50%; filter: blur(120px); opacity: 0.22; }
.rei-pi__glow--tl { top: -200px; left: -180px; background: radial-gradient(circle, #20A47B 0%, transparent 70%); }
.rei-pi__glow--tr { top: -150px; right: -200px; background: radial-gradient(circle, #D1E000 0%, transparent 70%); opacity: 0.16; }
.rei-pi__glow--bl { bottom: -240px; left: -160px; background: radial-gradient(circle, #D1E000 0%, transparent 70%); opacity: 0.16; }
.rei-pi__glow--br { bottom: -200px; right: -180px; background: radial-gradient(circle, #20A47B 0%, transparent 70%); }

/* Filigrane animate pulse 4s (pattern Servizi v1.20.0) */
.rei-pi__particle { position: absolute; opacity: 0.13; animation: rei-pi-float 4s ease-in-out infinite; }
.rei-pi__particle svg { width: 100%; height: 100%; display: block; }
@keyframes rei-pi-float {
    0%   { transform: scale(0.5) rotate(-6deg); opacity: 0.05; }
    50%  { transform: scale(1.1) rotate(5deg);  opacity: 0.22; }
    100% { transform: scale(0.5) rotate(-6deg); opacity: 0.05; }
}
@media (prefers-reduced-motion: reduce) { .rei-pi__particle { animation: none; opacity: 0.11; } }

/* 14 particelle posizioni standard */
.rei-pi__particle--1  { top:  3%; left:  1%; width: 200px; height: 200px; color: #20A47B; filter: drop-shadow(0 0 24px rgba(32,164,123,0.5)); }
.rei-pi__particle--2  { top: 11%; right: 2%; width: 225px; height: 225px; color: #D1E000; filter: drop-shadow(0 0 24px rgba(209,224,0,0.5)); }
.rei-pi__particle--3  { top: 23%; left:  6%; width: 170px; height: 170px; color: #20A47B; filter: drop-shadow(0 0 24px rgba(32,164,123,0.5)); animation-delay: 0.8s; }
.rei-pi__particle--4  { top: 30%; right: 7%; width: 150px; height: 150px; color: #20A47B; filter: drop-shadow(0 0 24px rgba(32,164,123,0.5)); animation-delay: 1.2s; }
.rei-pi__particle--5  { top: 40%; left:  2%; width: 190px; height: 190px; color: #20A47B; filter: drop-shadow(0 0 24px rgba(32,164,123,0.5)); animation-delay: 2s; }
.rei-pi__particle--6  { top:  7%; left: 43%; width: 160px; height: 160px; color: #D1E000; filter: drop-shadow(0 0 24px rgba(209,224,0,0.5)); animation-delay: 0.5s; }
.rei-pi__particle--7  { top: 51%; right: 3%; width: 215px; height: 215px; color: #20A47B; filter: drop-shadow(0 0 24px rgba(32,164,123,0.5)); animation-delay: 1.5s; }
.rei-pi__particle--8  { top: 35%; left: 29%; width: 150px; height: 150px; color: #20A47B; filter: drop-shadow(0 0 24px rgba(32,164,123,0.5)); animation-delay: 3s; }
.rei-pi__particle--9  { top: 61%; left:  8%; width: 180px; height: 180px; color: #20A47B; filter: drop-shadow(0 0 24px rgba(32,164,123,0.5)); animation-delay: 2.2s; }
.rei-pi__particle--10 { top: 69%; right: 20%; width: 165px; height: 165px; color: #20A47B; filter: drop-shadow(0 0 24px rgba(32,164,123,0.5)); animation-delay: 0.9s; }
.rei-pi__particle--11 { top: 47%; left: 47%; width: 170px; height: 170px; color: #D1E000; filter: drop-shadow(0 0 24px rgba(209,224,0,0.5)); animation-delay: 1.8s; }
.rei-pi__particle--12 { top: 79%; left: 31%; width: 200px; height: 200px; color: #20A47B; filter: drop-shadow(0 0 24px rgba(32,164,123,0.5)); animation-delay: 2.6s; }
.rei-pi__particle--13 { top: 87%; right: 5%; width: 185px; height: 185px; color: #20A47B; filter: drop-shadow(0 0 24px rgba(32,164,123,0.5)); animation-delay: 1.1s; }
.rei-pi__particle--14 { top: 92%; left:  4%; width: 155px; height: 155px; color: #20A47B; filter: drop-shadow(0 0 24px rgba(32,164,123,0.5)); animation-delay: 3.4s; }

/* ===== EYEBROW ===== */
.rei-pi__eyebrow {
    display: inline-block;
    background: #E4F6F0; color: #20A47B;
    border: 1px solid #D2F0E6;
    padding: 6px 16px; border-radius: 999px;
    font-size: 13px; font-weight: 600;
    margin: 0 0 24px;
}

/* ===== HERO ===== */
.rei-pi__hero { padding: 72px 0 32px; }
.rei-pi__title {
    font-size: 56px; line-height: 1.05; font-weight: 800;
    margin: 0 0 32px; color: #157155;
    letter-spacing: -0.02em;
}
.rei-pi__title-green { color: #20A47B; }

/* ===== INTRO (Hero card piena soft-verde con shine v1.21.4) ===== */
.rei-pi__intro {
    max-width: 960px;
    border-radius: 18px;
    padding: 26px 30px;
    background: linear-gradient(135deg, #E4F6F0 0%, #D2F0E6 100%);
    border: 2px solid #20A47B;
    color: #157155;
    box-shadow: 0 26px 64px rgba(0,0,0,0.28), 0 8px 20px rgba(0,0,0,0.14);
    position: relative;
    overflow: hidden;
    font-size: 16px; line-height: 1.75;
}
.rei-pi__intro::before {
    content: '';
    position: absolute;
    top: -50%; right: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(32,164,123,0.20) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.rei-pi__intro:hover::before { opacity: 1; }
.rei-pi__intro p { margin: 0; position: relative; z-index: 1; color: #3C3C3B; }
.rei-pi__intro p + p { margin-top: 14px; }
.rei-pi__intro strong { font-weight: 800; color: #157155; }

/* ===== H2 ===== */
.rei-pi__h2 {
    font-size: 26px; line-height: 1.2; font-weight: 800;
    margin: 0 0 16px; color: #20A47B; letter-spacing: -0.01em;
}

/* ===== BLOCCO TESTO ===== */
.rei-pi__block {
    max-width: 960px;
    margin: 0 0 32px;
}
.rei-pi__block:last-child { margin-bottom: 0; }

.rei-pi__rich {
    font-size: 16px; line-height: 1.75; color: #3C3C3B;
}
.rei-pi__rich p { margin: 0 0 14px; }
.rei-pi__rich p:last-child { margin-bottom: 0; }
.rei-pi__rich strong { font-weight: 700; color: #157155; }
.rei-pi__rich em { font-style: italic; color: #3C3C3B; }
.rei-pi__rich a {
    color: #20A47B;
    text-decoration: underline;
    font-weight: 600;
}
.rei-pi__rich a:hover { color: #157155; }
.rei-pi__rich ul {
    margin: 0 0 14px 0;
    padding-left: 28px;
}
.rei-pi__rich ul li {
    margin: 0 0 8px;
    padding-left: 8px;
    line-height: 1.7;
}
.rei-pi__rich ul li::marker { color: #20A47B; }

/* ===== SEZIONI ===== */
.rei-pi__info { padding: 16px 0 32px; }

/* ===== CONTATTI ===== */
.rei-pi__contatti { padding: 16px 0 0; }

/* ===== BOX EVIDENZA (card soft gialla con shine, pattern v1.21.4) ===== */
.rei-pi__box {
    display: flex; align-items: flex-start; gap: 22px;
    border-radius: 18px;
    padding: 26px 30px;
    margin: 8px 0 0;
    max-width: 960px;
    background: linear-gradient(135deg, #F4F8F6 0%, #EDF5D2 100%);
    border: 2px solid #D1E000;
    color: #157155;
    box-shadow: 0 26px 64px rgba(0,0,0,0.28), 0 8px 20px rgba(0,0,0,0.14);
    position: relative;
    overflow: hidden;
}
.rei-pi__box::before {
    content: '';
    position: absolute;
    top: -50%; right: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(209,224,0,0.20) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.rei-pi__box:hover::before { opacity: 1; }
.rei-pi__box-icon {
    width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #D1E000 0%, #B5C400 100%);
    box-shadow: 0 12px 24px -6px rgba(209,224,0,0.6);
    position: relative; z-index: 1;
}
.rei-pi__box-body { position: relative; z-index: 1; }
.rei-pi__box-title {
    font-size: 19px; font-weight: 800;
    color: #157155;
    margin: 0 0 10px; line-height: 1.3;
}
.rei-pi__box-text { color: #3C3C3B; font-size: 15px; line-height: 1.65; }
.rei-pi__box-text p { margin: 0 0 8px; }
.rei-pi__box-text p:last-child { margin-bottom: 0; }
.rei-pi__box-text strong { color: #157155; font-weight: 700; }
.rei-pi__box-text a {
    color: #20A47B;
    text-decoration: underline;
    font-weight: 700;
    word-break: break-all;
}
.rei-pi__box-text a:hover { color: #157155; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .rei-pi__container { padding: 0 20px; }
    .rei-pi__hero { padding: 48px 0 24px; }
    .rei-pi__title { font-size: 34px; }
    .rei-pi__intro { font-size: 15px; padding: 20px 22px; }
    .rei-pi__h2 { font-size: 22px; margin-bottom: 12px; }
    .rei-pi__block { margin-bottom: 24px; }
    .rei-pi__info { padding: 12px 0 24px; }
    .rei-pi__contatti { padding: 12px 0 0; }
    .rei-pi__box { flex-direction: column; gap: 14px; padding: 22px; }
}

/* v1.29.2: stacco card finale dalla bandiera tricolore — override mobile */
@media (max-width: 720px) {
    .rei-pi { padding-bottom: 40px !important; }
}

/* ==========================================================================
   v1.89.0 — Pagine /esim/ e /community/: tabelle nel corpo (.rei-pi__rich)
   ========================================================================== */
.rei-pi__rich table,
.rei-pi__rich .rei-ecp-table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0 28px;
    font-size: 0.98rem;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(8, 42, 122, 0.08);
}
.rei-pi__rich table thead th {
    background: linear-gradient(135deg, #20A47B, #157155);
    color: #fff;
    text-align: left;
    font-weight: 700;
    padding: 12px 14px;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}
.rei-pi__rich table td {
    padding: 11px 14px;
    border-top: 1px solid #e8eef0;
    vertical-align: top;
    line-height: 1.45;
}
.rei-pi__rich table tbody tr:nth-child(even) td { background: #F4F8F6; }
.rei-pi__rich table tbody tr:hover td { background: #E4F6F0; }
.rei-pi__rich h3 { margin-top: 34px; }
.rei-pi__rich h4 { margin-top: 22px; }
.rei-pi__rich h3:first-child { margin-top: 0; }
@media (max-width: 640px) {
    .rei-pi__rich table { display: block; overflow-x: auto; }
}
