/* ==========================================================
 * Secondary Pages - Risorse, Per Genitori, Progetti
 * Palette: indigo #4c51bf | rosa #ef476f | verde #06d6a0
 *          ambra #f59e0b | rosso #ef4444 | bg #faf9fc
 * ========================================================== */

/* ===== HERO COMUNE ===== */
.hero-secondary {
    position: relative;
    background:
        radial-gradient(ellipse at top right, rgba(255,209,102,0.18) 0%, transparent 55%),
        radial-gradient(ellipse at bottom left, rgba(239,71,111,0.20) 0%, transparent 60%),
        linear-gradient(135deg, #4c51bf 0%, #6b46c1 60%, #ef476f 100%);
    color: #fff;
    padding: 100px 0 80px;
    text-align: center;
    overflow: hidden;
}

.hero-secondary::after {
    content: '';
    position: absolute;
    inset: auto 0 -1px 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, #faf9fc);
    pointer-events: none;
}

.hero-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 22px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.hero-secondary h1 {
    font-size: 50px;
    font-weight: 700;
    line-height: 1.05;
    margin: 0 0 18px;
    color: #fff;
    letter-spacing: -0.02em;
}

.hero-secondary .hero-subtitle {
    font-size: 18px;
    max-width: 720px;
    margin: 0 auto;
    opacity: 0.92;
    line-height: 1.6;
}

/* ===== INTRO BOX ===== */
.intro-box {
    max-width: 820px;
    margin: 60px auto 0;
    padding: 26px 30px;
    background: linear-gradient(135deg, #fff 0%, #faf9fc 100%);
    border: 1px solid #ece8f5;
    border-left: 4px solid #4c51bf;
    border-radius: 14px;
    font-size: 16px;
    line-height: 1.65;
    color: #1a202c;
    box-shadow: 0 8px 28px -16px rgba(76,81,191,0.18);
}

.intro-box strong {
    color: #4c51bf;
}

/* ===== SECTION COMUNI ===== */
.section-secondary {
    padding: 80px 0;
    background: #faf9fc;
}

.section-secondary.alt {
    background: #fff;
}

.section-secondary h2 {
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.section-intro {
    text-align: center;
    font-size: 16.5px;
    color: #64748b;
    max-width: 720px;
    margin: 0 auto 56px;
    line-height: 1.65;
}

/* ===== CARD GRID GENERICA ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
    max-width: 1100px;
    margin: 0 auto;
}

.info-card {
    background: #fff;
    border-radius: 18px;
    padding: 28px;
    border: 1px solid #ece8f5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px -16px rgba(76,81,191,0.18);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    position: relative;
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: #d8d3e6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 18px 36px -18px rgba(76,81,191,0.28);
}

.info-card .card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #4c51bf, #6b46c1);
    margin-bottom: 18px;
    box-shadow: 0 6px 14px -6px #4c51bf;
}

.info-card.accent-rosa .card-icon {
    background: linear-gradient(135deg, #ef476f, #d6336c);
    box-shadow: 0 6px 14px -6px #ef476f;
}

.info-card.accent-verde .card-icon {
    background: linear-gradient(135deg, #06d6a0, #20b28b);
    box-shadow: 0 6px 14px -6px #06d6a0;
}

.info-card.accent-ambra .card-icon {
    background: linear-gradient(135deg, #f59e0b, #ed8936);
    box-shadow: 0 6px 14px -6px #f59e0b;
}

.info-card h3 {
    font-size: 19px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 10px;
}

.info-card p {
    color: #475569;
    font-size: 15px;
    line-height: 1.65;
    margin: 0 0 14px;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card ul li {
    position: relative;
    padding: 7px 0 7px 22px;
    font-size: 14.5px;
    color: #1a202c;
    line-height: 1.55;
    border-bottom: 1px solid #f3f0f8;
}

.info-card ul li:last-child {
    border-bottom: none;
}

.info-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4c51bf;
}

.info-card.accent-rosa ul li::before { background: #ef476f; }
.info-card.accent-verde ul li::before { background: #06d6a0; }
.info-card.accent-ambra ul li::before { background: #f59e0b; }

/* ===== EMERGENCY BOX ===== */
.emergency-box {
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 32px;
    background: linear-gradient(180deg, #fff5f5 0%, #fffafa 100%);
    border: 1px solid #fed7d7;
    border-left: 4px solid #ef4444;
    border-radius: 18px;
    box-shadow: 0 8px 28px -16px rgba(239,68,68,0.25);
}

.emergency-text {
    font-size: 16px;
    color: #742a2a;
    font-weight: 500;
    line-height: 1.6;
    margin: 0 0 24px;
    text-align: center;
}

.emergency-text strong {
    color: #c53030;
    font-weight: 700;
}

.emergency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.emergency-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 18px;
    text-align: center;
    border: 1px solid #fed7d7;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.emergency-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -8px rgba(239,68,68,0.2);
}

.emergency-number {
    font-size: 38px;
    font-weight: 700;
    color: #c53030;
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.emergency-card-label {
    font-size: 14px;
    color: #1a202c;
    font-weight: 600;
    margin-bottom: 4px;
}

.emergency-card-hours {
    font-size: 12.5px;
    color: #64748b;
}

/* ===== RISORSE LINK LIST ===== */
.risorse-list {
    max-width: 820px;
    margin: 28px auto 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.risorsa-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #ece8f5;
    border-radius: 14px;
    color: #1a202c;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.risorsa-link:hover {
    transform: translateX(6px);
    border-color: #4c51bf;
    box-shadow: 0 8px 24px -10px rgba(76,81,191,0.25);
}

.risorsa-link-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4c51bf, #ef476f);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.risorsa-link-text {
    flex: 1;
}

.risorsa-link-text strong {
    display: block;
    font-size: 15px;
    color: #1a202c;
    margin-bottom: 3px;
}

.risorsa-link-text span {
    font-size: 13.5px;
    color: #64748b;
}

.risorsa-link-arrow {
    color: #cbd5e1;
    flex-shrink: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.risorsa-link:hover .risorsa-link-arrow {
    color: #ef476f;
    transform: translateX(2px);
}

/* ===== FAQ ACCORDION ===== */
.faq-list {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: #fff;
    border: 1px solid #ece8f5;
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item[open] {
    border-color: #4c51bf;
    box-shadow: 0 8px 24px -12px rgba(76,81,191,0.2);
}

.faq-item summary {
    padding: 18px 22px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '';
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234c51bf' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-item[open] summary::after {
    transform: rotate(180deg);
}

.faq-item-body {
    padding: 0 22px 22px;
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
}

.faq-item-body p {
    margin: 0 0 10px;
}

.faq-item-body p:last-child {
    margin-bottom: 0;
}

.faq-item-body a {
    color: #4c51bf;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
}

/* ===== SEGNALI CARD ===== */
.segnali-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
    max-width: 1100px;
    margin: 0 auto;
}

.segnale-card {
    background: #fff;
    border-radius: 18px;
    padding: 26px 28px;
    border: 1px solid #ece8f5;
    border-top: 4px solid #ef4444;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.segnale-card.warn { border-top-color: #f59e0b; }
.segnale-card.info { border-top-color: #4c51bf; }
.segnale-card.ok   { border-top-color: #06d6a0; }

.segnale-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.segnale-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.segnale-card ul li {
    position: relative;
    padding: 8px 0 8px 22px;
    font-size: 14.5px;
    color: #1a202c;
    line-height: 1.55;
    border-bottom: 1px solid #f3f0f8;
}

.segnale-card ul li:last-child {
    border-bottom: none;
}

.segnale-card ul li::before {
    content: '!';
    position: absolute;
    left: 0;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.segnale-card.warn ul li::before { background: #f59e0b; }
.segnale-card.info ul li::before { background: #4c51bf; content: 'i'; }
.segnale-card.ok   ul li::before { background: #06d6a0; content: '✓'; font-size: 12px; }

/* ===== PROGETTO MAIN BOX (progetti page) ===== */
.progetto-main-box {
    max-width: 920px;
    margin: 0 auto;
    background: linear-gradient(135deg, #fff 0%, #faf9fc 100%);
    border-radius: 24px;
    padding: 44px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04), 0 32px 60px -32px rgba(76,81,191,0.22);
    border: 1px solid #ece8f5;
    position: relative;
}

.progetto-main-box::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(90deg, #4c51bf, #ef476f);
}

.progetto-main-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4c51bf, #ef476f);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    box-shadow: 0 8px 18px -6px rgba(76,81,191,0.4);
}

.progetto-main-box h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px;
    text-align: left;
    letter-spacing: -0.01em;
}

.progetto-lead {
    font-size: 16px;
    color: #ef476f;
    font-weight: 500;
    margin: 0 0 22px;
}

.progetto-main-box h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin: 26px 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4c51bf;
}

.progetto-main-box p {
    color: #334155;
    font-size: 15.5px;
    line-height: 1.7;
    margin: 0 0 14px;
}

.progetto-main-box ul {
    padding-left: 20px;
    margin: 0 0 18px;
}

.progetto-main-box ul li {
    color: #334155;
    margin-bottom: 8px;
}

.progetto-main-box ul li::marker {
    color: #ef476f;
}

.stats-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 24px 0 28px;
    padding: 24px;
    background: #faf9fc;
    border-radius: 14px;
    border: 1px solid #ece8f5;
}

.stats-mini .stat-item {
    text-align: center;
}

.stats-mini .stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #4c51bf;
    line-height: 1;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #4c51bf, #ef476f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stats-mini .stat-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
}

.btn-progetto {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    background: #1a202c;
    color: #fff;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-progetto:hover {
    background: linear-gradient(135deg, #4c51bf, #ef476f);
    transform: translateY(-2px);
}

/* ===== FUTURI ===== */
.futuri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
}

.futuro-card {
    background: #fff;
    padding: 24px 26px;
    border-radius: 16px;
    border: 1px solid #ece8f5;
    border-top: 4px solid #4c51bf;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.futuro-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -14px rgba(76,81,191,0.22);
}

.futuro-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.futuro-card p {
    color: #475569;
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0 0 14px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 6px;
}

.status-badge.planning {
    background: #ebf8ff;
    color: #2b6cb0;
}

.status-badge.idea {
    background: #fffaf0;
    color: #c05621;
}

/* ===== AIUTACI BOX ===== */
.aiutaci-box {
    max-width: 880px;
    margin: 60px auto 0;
    padding: 36px 40px;
    background: linear-gradient(135deg, #4c51bf 0%, #6b46c1 60%, #ef476f 100%);
    color: #fff;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 50px -20px rgba(76,81,191,0.5);
}

.aiutaci-box h3 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
}

.aiutaci-box p {
    font-size: 15.5px;
    color: rgba(255,255,255,0.9);
    margin: 0 0 24px;
    line-height: 1.6;
}

.aiutaci-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.aiutaci-buttons .btn {
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.aiutaci-buttons .btn-light {
    background: #fff;
    color: #1a202c;
}

.aiutaci-buttons .btn-light:hover {
    transform: translateY(-2px);
    background: #faf9fc;
}

.aiutaci-buttons .btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.6);
}

.aiutaci-buttons .btn-outline:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

/* ===== TIMELINE ===== */
.timeline {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #4c51bf 0%, #ef476f 100%);
    transform: translateX(-1px);
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr 90px 1fr;
    gap: 18px;
    margin-bottom: 36px;
    align-items: center;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-year {
    grid-column: 2;
    width: 80px;
    height: 80px;
    background: #fff;
    border: 3px solid #4c51bf;
    color: #4c51bf;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    z-index: 2;
    margin: 0 auto;
    box-shadow: 0 4px 12px -4px rgba(76,81,191,0.4);
}

.timeline-item:nth-child(odd) .timeline-content {
    grid-column: 1;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    grid-column: 3;
    text-align: left;
}

.timeline-content {
    background: #fff;
    padding: 20px 24px;
    border-radius: 14px;
    box-shadow: 0 4px 12px -6px rgba(0,0,0,0.1);
    border: 1px solid #ece8f5;
}

.timeline-content h3 {
    font-size: 17px;
    font-weight: 700;
    color: #4c51bf;
    margin: 0 0 8px;
}

.timeline-content p {
    color: #475569;
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0;
}

/* ===== CONTACT BOX ===== */
.contact-box-secondary {
    max-width: 820px;
    margin: 60px auto 0;
    padding: 32px 36px;
    background: #fff;
    border: 1px solid #ece8f5;
    border-left: 4px solid #06d6a0;
    border-radius: 14px;
    box-shadow: 0 8px 24px -14px rgba(6,214,160,0.25);
}

.contact-box-secondary h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 10px;
}

.contact-box-secondary p {
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 8px;
}

.contact-box-secondary a {
    color: #4c51bf;
    font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-secondary { padding: 80px 0 60px; }
    .hero-secondary h1 { font-size: 36px; }
    .hero-secondary .hero-subtitle { font-size: 16px; }

    .section-secondary { padding: 60px 0; }
    .section-secondary h2 { font-size: 26px; }

    .progetto-main-box { padding: 28px 22px; }
    .progetto-main-box h2 { font-size: 22px; }

    .stats-mini { grid-template-columns: 1fr; padding: 18px; }

    /* Timeline mobile: tutto a sinistra */
    .timeline::before {
        left: 30px;
        transform: none;
    }
    .timeline-item {
        grid-template-columns: 70px 1fr;
        gap: 16px;
    }
    .timeline-year {
        grid-column: 1 !important;
        width: 60px;
        height: 60px;
        font-size: 15px;
    }
    .timeline-item .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        grid-column: 2 !important;
        text-align: left !important;
    }

    .aiutaci-box { padding: 28px 22px; }
    .aiutaci-buttons { flex-direction: column; }
    .aiutaci-buttons .btn { width: 100%; text-align: center; }
}
