/**
 * 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-cand { position: relative; min-height: 60vh; overflow: hidden; padding-bottom: 80px; }
.rei-cand__container { max-width: 1200px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }

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

/* Filigrane animate pulse 4s (pattern Servizi v1.20.0) */
.rei-cand__particle { position: absolute; opacity: 0.13; animation: rei-cand-float 4s ease-in-out infinite; }
.rei-cand__particle svg { width: 100%; height: 100%; display: block; }
@keyframes rei-cand-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-cand__particle { animation: none; opacity: 0.11; } }

/* 14 particelle posizioni standard */
.rei-cand__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-cand__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-cand__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-cand__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-cand__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-cand__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-cand__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-cand__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-cand__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-cand__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-cand__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-cand__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-cand__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-cand__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-cand__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-cand__hero { padding: 72px 0 32px; }
.rei-cand__title {
    font-size: 56px; line-height: 1.05; font-weight: 800;
    margin: 0 0 32px; color: #157155;
    letter-spacing: -0.02em;
}
.rei-cand__title-green { color: #20A47B; }

/* ===== INTRO (Hero card piena soft-verde con shine v1.21.4) ===== */
.rei-cand__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-cand__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-cand__intro:hover::before { opacity: 1; }
.rei-cand__intro p { margin: 0; position: relative; z-index: 1; color: #3C3C3B; }
.rei-cand__intro p + p { margin-top: 14px; }
.rei-cand__intro strong { font-weight: 800; color: #157155; }

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

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

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

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

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

/* ===== BOX EVIDENZA (card soft gialla con shine, pattern v1.21.4) ===== */
.rei-cand__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-cand__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-cand__box:hover::before { opacity: 1; }
.rei-cand__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-cand__box-body { position: relative; z-index: 1; }
.rei-cand__box-title {
    font-size: 19px; font-weight: 800;
    color: #157155;
    margin: 0 0 10px; line-height: 1.3;
}
.rei-cand__box-text { color: #3C3C3B; font-size: 15px; line-height: 1.65; }
.rei-cand__box-text p { margin: 0 0 8px; }
.rei-cand__box-text p:last-child { margin-bottom: 0; }
.rei-cand__box-text strong { color: #157155; font-weight: 700; }
.rei-cand__box-text a {
    color: #20A47B;
    text-decoration: underline;
    font-weight: 700;
    word-break: break-all;
}
.rei-cand__box-text a:hover { color: #157155; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .rei-cand__container { padding: 0 20px; }
    .rei-cand__hero { padding: 48px 0 24px; }
    .rei-cand__title { font-size: 34px; }
    .rei-cand__intro { font-size: 15px; padding: 20px 22px; }
    .rei-cand__h2 { font-size: 22px; margin-bottom: 12px; }
    .rei-cand__block { margin-bottom: 24px; }
    .rei-cand__info { padding: 12px 0 24px; }
    .rei-cand__contatti { padding: 12px 0 0; }
    .rei-cand__box { flex-direction: column; gap: 14px; padding: 22px; }
}

/* ==========================================================================
   v1.28.2 — Form candidatura GNE-style
   ========================================================================== */
.rei-cand__form-section {
    background: linear-gradient(135deg, #f7f7f7 0%, #ececec 100%);
    border-radius: 16px;
    padding: 44px 0;
    margin: 36px 0 24px;
    position: relative;
    z-index: 2;
}
.rei-cand__form-section .rei-cand__container { padding: 0 28px; }
.rei-cand__form-title {
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #20A47B;
    margin: 0 0 14px;
    text-align: left;
}
.rei-cand__form-intro {
    color: #3C3C3B;
    font-size: 0.98rem;
    line-height: 1.55;
    margin-bottom: 28px;
}
.rei-cand__form-intro p { margin: 0 0 10px; }
.rei-cand__feedback {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 22px;
    font-weight: 600;
    line-height: 1.5;
}
.rei-cand__feedback.is-ok  { background: #D2F0E6; color: #157155; border-left: 4px solid #20A47B; }
.rei-cand__feedback.is-err { background: #fde2e2; color: #D63638; border-left: 4px solid #D63638; }
.rei-cand__form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.rei-cand__hp { position: absolute; left: -9999px; top: -9999px; opacity: 0; pointer-events: none; }
.rei-cand__form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}
.rei-cand__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rei-cand__field--full { grid-column: 1 / -1; }
.rei-cand__label {
    font-size: 14px;
    font-weight: 600;
    color: #157155;
}
.rei-cand__label--legend { display: block; margin-bottom: 12px; }
.rei-cand__required { color: #D63638; }
.rei-cand__hint {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}
.rei-cand__field input[type="text"],
.rei-cand__field input[type="email"],
.rei-cand__field input[type="tel"],
.rei-cand__field input[type="file"] {
    padding: 11px 14px;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rei-cand__field input:focus {
    outline: none;
    border-color: #20A47B;
    box-shadow: 0 0 0 3px rgba(32,164,123,0.15);
}
.rei-cand__fieldset {
    border: none;
    padding: 0;
    margin: 0;
}
.rei-cand__checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 22px;
}
.rei-cand__check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #157155;
    cursor: pointer;
    line-height: 1.4;
}
.rei-cand__check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #20A47B;
    cursor: pointer;
}
.rei-cand__privacy {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px 20px;
}
.rei-cand__radio-row {
    display: flex;
    gap: 18px;
}
.rei-cand__radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}
.rei-cand__radio input[type="radio"] {
    accent-color: #20A47B;
    cursor: pointer;
}
.rei-cand__submit-wrap {
    text-align: center;
    margin-top: 8px;
}
.rei-cand__submit {
    display: inline-block;
    background: #20A47B;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 56px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 18px rgba(32,164,123,0.32);
}
.rei-cand__submit:hover {
    background: #20A47B;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(32,164,123,0.42);
}
@media (max-width: 720px) {
    .rei-cand__form-grid { grid-template-columns: 1fr; gap: 18px; }
    .rei-cand__checkboxes { grid-template-columns: 1fr; }
    .rei-cand__form-section { padding: 32px 0; margin: 24px 0; }
    .rei-cand__form-section .rei-cand__container { padding: 0 20px; }
}

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

/* v1.2.2 — leggibilità box intro dentro/sotto la fascia hero: testo scuro su bianco */
.rei-cand__intro {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid #20A47B !important;
}
.rei-cand__intro,
.rei-cand__intro p,
.rei-cand__intro li,
.rei-cand__intro strong,
.rei-cand__intro b,
.fe-page-hero .rei-cand__intro,
.fe-page-hero .rei-cand__intro p,
.fe-page-hero .rei-cand__intro strong {
    color: #3C3C3B !important;
}
