/* 🧱 Pagine RSN sul sito (Thema 1.12.0). Colori e caratteri vengono dalla
   veste del sito (variabili --rsn-studio-*), così ogni pagina è uguale alle altre. */
.rp {
    --rp-bg: var(--rsn-studio-bg-color, #fff);
    --rp-text: var(--rsn-studio-body-text-color, #1f2937);
    --rp-head: var(--rsn-studio-heading-color, #0b1f3a);
    --rp-link: var(--rsn-studio-body-link-color, #1d5f93);
    --rp-acc: var(--rsn-studio-button-bg, #0b1f3a);
    --rp-acc-text: var(--rsn-studio-button-text, #fff);
    --rp-scuro: var(--rsn-studio-footer-bg, #0b1f3a);
    --rp-scuro-text: var(--rsn-studio-footer-text, #e5e7eb);
    --rp-r: var(--rsn-studio-button-radius, 8px);
    --rp-w: 1180px;
    --rp-card: color-mix(in srgb, var(--rp-text) 5%, var(--rp-bg));
    --rp-line: color-mix(in srgb, var(--rp-text) 14%, transparent);
    color: var(--rp-text);
    overflow-x: clip;
}
.rp-s { padding: clamp(44px, 7vw, 96px) 0; position: relative; }
.rp-in { max-width: var(--rp-w); margin: 0 auto; padding: 0 20px; position: relative; }
.rp-stretto { max-width: 800px; }
.rp-centro { text-align: center; }
.rp h1, .rp h2, .rp h3 { color: var(--rp-head); margin: 0 0 .5em; line-height: 1.2; }
.rp-h { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.rp-in > .rp-h, .rp-in > .rp-intro { text-align: center; }
.rp-centro > .rp-h { text-align: center; }
.rp-stretto:not(.rp-centro) > .rp-h { text-align: left; }
.rp-intro { max-width: 720px; margin: 0 auto 32px; font-size: 1.1em; opacity: .85; }
.rp-lead { font-size: clamp(1.05rem, 1.8vw, 1.3rem); opacity: .9; margin: 0 0 28px; }
.rp-testo { font-size: 1.05em; line-height: 1.7; }
.rp-testo a, .rp-scheda a, .rp-faq a { color: var(--rp-link); }
.rp-testo > :last-child { margin-bottom: 0; }

/* Sfondi */
.rp-bg-normale { background: var(--rp-bg); }
.rp-bg-tenue { background: var(--rp-card); --rp-card: var(--rp-bg); }
.rp-bg-scuro { background: var(--rp-scuro); color: var(--rp-scuro-text); --rp-head: #fff; --rp-link: #fbbf24; --rp-card: rgba(255, 255, 255, .06); --rp-line: rgba(255, 255, 255, .14); }
.rp-bg-colore { background: var(--rp-acc); color: var(--rp-acc-text); --rp-head: var(--rp-acc-text); --rp-link: var(--rp-acc-text); --rp-card: rgba(255, 255, 255, .1); --rp-line: rgba(255, 255, 255, .25); }
.rp-bg-colore .rp-btn { background: var(--rp-acc-text); color: var(--rp-acc); }
.rp-sfumato { background-color: var(--rp-scuro); }
.rp-bg-normale.rp-sfumato { --rp-card: rgba(255, 255, 255, .55); --rp-line: rgba(0, 0, 0, .1); }
.rp-titolo { padding-bottom: 0; }
.rp-titolo h1 { font-size: clamp(2rem, 4.4vw, 3rem); }

/* Pulsanti */
.rp-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: inherit; }
.rp-centro .rp-btns { justify-content: center; }
.rp-btn { display: inline-block; padding: 14px 28px; border-radius: var(--rp-r); background: var(--rp-acc); color: var(--rp-acc-text) !important; font-weight: 700; text-decoration: none !important; border: 2px solid transparent; transition: transform .15s, box-shadow .15s; }
.rp-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.rp-btn--2 { background: transparent !important; border-color: currentColor; color: inherit !important; }
.rp-tf-testo .rp-btn { margin-top: 18px; }

/* Copertina */
.rp-copertina { display: flex; align-items: center; min-height: 52vh; overflow: hidden; }
.rp-alt-bassa { min-height: 36vh; }
.rp-alt-piena { min-height: calc(100vh - 80px); }
.rp-copertina .rp-in { width: 100%; }
.rp-copertina .rp-in > .rp-h { text-align: left; }
.rp-copertina h1, .rp-copertina h2 { font-size: clamp(2.2rem, 5.6vw, 4rem); max-width: 900px; }
.rp-copertina .rp-lead { max-width: 680px; }
.rp-cop-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rp-con-foto { color: #fff; --rp-head: #fff; background: #000; }
.rp-con-foto::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .45) 55%, rgba(0, 0, 0, .25) 100%); }
.rp-con-foto .rp-in { z-index: 2; }

/* Testo e foto */
.rp-tf { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.rp-tf--sx .rp-tf-foto { order: -1; }
.rp-tf-foto img, .rp-foto { width: 100%; height: auto; border-radius: 14px; display: block; box-shadow: 0 14px 40px rgba(0, 0, 0, .14); }
.rp-tf > .rp-tf-testo:only-child { grid-column: 1 / -1; max-width: 800px; }

/* Griglie e schede */
/* Griglie: le schede che non riempiono la riga stanno al centro, non a sinistra con un buco. */
.rp-griglia { --rp-gap: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--rp-gap); }
.rp-griglia > * { flex: 1 1 260px; max-width: 420px; min-width: 0; }
.rp-griglia.rp-col-2 > * { flex: 0 1 calc((100% - var(--rp-gap)) / 2); max-width: none; }
.rp-griglia.rp-col-3 > * { flex: 0 1 calc((100% - 2 * var(--rp-gap)) / 3); max-width: none; }
.rp-griglia.rp-col-4 > * { flex: 0 1 calc((100% - 3 * var(--rp-gap)) / 4); max-width: none; }
.rp-galleria.rp-col-2 { grid-template-columns: repeat(2, 1fr); }
.rp-galleria.rp-col-3 { grid-template-columns: repeat(3, 1fr); }
.rp-galleria.rp-col-4 { grid-template-columns: repeat(4, 1fr); }
.rp-scheda { background: var(--rp-card); border: 1px solid var(--rp-line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.rp-scheda p { margin: 0; opacity: .9; }
.rp-scheda h3 { font-size: 1.2rem; margin: 6px 0 2px; }
.rp-scheda-foto { width: calc(100% + 48px); max-width: none; margin: -24px -24px 10px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px 14px 0 0; height: auto; }
.rp-foto-intera .rp-scheda-foto { object-fit: contain; padding: 18px; box-sizing: border-box; background: color-mix(in srgb, var(--rp-text) 4%, transparent); }
.rp-icona { font-size: 40px; line-height: 1; }
.rp-link { margin-top: auto; padding-top: 8px; font-weight: 700; text-decoration: none; }

/* Domande */
.rp-faq { border-bottom: 1px solid var(--rp-line); }
.rp-faq summary { cursor: pointer; padding: 18px 36px 18px 0; font-weight: 700; font-size: 1.08em; list-style: none; position: relative; color: var(--rp-head); }
.rp-faq summary::-webkit-details-marker { display: none; }
.rp-faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.5em; font-weight: 400; transition: transform .2s; }
.rp-faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.rp-faq > div { padding: 0 0 18px; opacity: .9; }

/* Galleria */
.rp-galleria { display: grid; gap: 10px; }
.rp-galleria a { display: block; border-radius: 10px; overflow: hidden; }
.rp-galleria img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform .3s; }
.rp-galleria a:hover img { transform: scale(1.04); }

/* Video */
.rp-video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; margin: 10px 0 16px; background: #000; }
.rp-video iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }

/* Piani */
.rp-piani { align-items: stretch; }
.rp-piano { position: relative; background: var(--rp-card); border: 1px solid var(--rp-line); border-radius: 16px; padding: 28px 24px; display: flex; flex-direction: column; text-align: center; }
.rp-piano--top { border: 2px solid var(--rp-acc); box-shadow: 0 14px 40px rgba(0, 0, 0, .12); }
.rp-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--rp-acc); color: var(--rp-acc-text); font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.rp-prezzo { font-size: 2.4rem; font-weight: 800; color: var(--rp-head); line-height: 1.1; }
.rp-sotto { opacity: .7; font-size: .95em; }
.rp-piano ul { list-style: none; margin: 18px 0; padding: 0; text-align: left; }
.rp-piano li { padding: 7px 0 7px 26px; position: relative; border-bottom: 1px solid var(--rp-line); }
.rp-piano li::before { content: "✓"; position: absolute; left: 2px; color: var(--rp-acc); font-weight: 800; }
.rp-bg-scuro .rp-piano li::before, .rp-bg-colore .rp-piano li::before { color: inherit; }
.rp-piano .rp-btn { margin-top: auto; }

/* Numeri */
.rp-numeri { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(20px, 6vw, 80px); }
.rp-numero strong { display: block; font-size: clamp(2.4rem, 6vw, 3.8rem); line-height: 1; color: var(--rp-head); }
.rp-numero span { display: block; margin-top: 8px; opacity: .8; text-transform: uppercase; letter-spacing: .06em; font-size: .85em; }
.rp-bg-scuro .rp-numero strong { color: #fbbf24; }

/* Testimonianze */
.rp-tes { margin: 0; background: var(--rp-card); border: 1px solid var(--rp-line); border-radius: 14px; padding: 24px; }
.rp-tes blockquote { margin: 0 0 16px; padding: 0; border: 0; font-size: 1.05em; font-style: italic; line-height: 1.6; }
.rp-tes blockquote::before { content: "“"; display: block; font-size: 3em; line-height: .6; color: var(--rp-acc); font-style: normal; }
.rp-tes figcaption { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.rp-tes-foto { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

.rp-funz, .rp-cod { margin-top: 10px; }
/* Le funzioni RSN hanno colori propri pensati per il chiaro: su una sezione scura o
   colorata stanno dentro un pannello chiaro, e la fascia fa da cornice (Roberto, 16/10). */
.rp-bg-scuro .rp-funz, .rp-bg-colore .rp-funz {
    background: #fff; color: #1f2937; border-radius: 18px; padding: clamp(16px, 3vw, 32px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
    --rp-head: #0b1f3a; --rp-text: #1f2937; --rp-link: #1d5f93; --rp-card: #f8fafc; --rp-line: #e5e7eb;
}
.rp-bg-scuro .rp-funz h1, .rp-bg-scuro .rp-funz h2, .rp-bg-scuro .rp-funz h3, .rp-bg-scuro .rp-funz h4,
.rp-bg-colore .rp-funz h1, .rp-bg-colore .rp-funz h2, .rp-bg-colore .rp-funz h3, .rp-bg-colore .rp-funz h4 { color: #0b1f3a; }
.rp-cod iframe { max-width: 100%; }
.rp-cod--largo iframe { width: 100%; display: block; }
.rp-codice-wrap-largo { padding: 0; }

@media (max-width: 900px) {
    .rp-griglia.rp-col-3 > *, .rp-griglia.rp-col-4 > * { flex-basis: calc((100% - var(--rp-gap)) / 2); }
    .rp-galleria.rp-col-3, .rp-galleria.rp-col-4 { grid-template-columns: repeat(2, 1fr); }
    .rp-tf { grid-template-columns: 1fr; }
    .rp-tf .rp-tf-foto { order: -1; }
}
@media (max-width: 600px) {
    .rp-griglia.rp-col-2 > *, .rp-griglia.rp-col-3 > *, .rp-griglia.rp-col-4 > * { flex-basis: 100%; }
    .rp-galleria.rp-col-2 { grid-template-columns: 1fr; }
    .rp-galleria.rp-col-3, .rp-galleria.rp-col-4 { grid-template-columns: repeat(2, 1fr); }
    .rp-btn { width: 100%; text-align: center; }
}
