@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

/* ==========================================================================
   Simulatore 730 — CAF Public Brand System — v2
   ========================================================================== */

/* --- CSS Variables — CAF Public Brand --- */
:root {
    /* ---- Colori brand ---- */
    --cafp-blu: #093561;
    --cafp-turchese: #048BA8;
    --cafp-acqua: #06C4B6;
    --cafp-arancione: #FFA500;

    /* ---- Superfici ---- */
    --sim-glass-bg: rgba(255, 255, 255, 0.97);
    --sim-glass-border: rgba(4, 139, 168, 0.18);
    --sim-surface: #F4F8FC;

    /* ---- Ombre ---- */
    --sim-shadow-soft: 0 4px 24px -6px rgba(9, 53, 97, 0.13), 0 1px 4px rgba(9, 53, 97, 0.06);
    --sim-shadow-hover: 0 16px 40px -8px rgba(9, 53, 97, 0.22), 0 4px 8px rgba(9, 53, 97, 0.08);
    --sim-shadow-card: 0 2px 12px rgba(9, 53, 97, 0.07);

    /* ---- Gradienti ---- */
    --sim-gradient-primary: linear-gradient(135deg, #093561 0%, #048BA8 100%);
    --sim-gradient-turchese: linear-gradient(135deg, #048BA8 0%, #06C4B6 100%);
    --sim-gradient-success: linear-gradient(135deg, #06C4B6 0%, #059669 100%);
    --sim-gradient-warm: linear-gradient(135deg, #FFA500 0%, #e07b00 100%);
    --sim-cta-gradient: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    --sim-gradient-hero: linear-gradient(135deg, #093561 0%, #0a4a7c 50%, #048BA8 100%);

    /* ---- Raggi e transizioni ---- */
    --sim-radius: 20px;
    --sim-radius-sm: 12px;
    --sim-transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Appended Styles for Animations & Charts */

/* --- Slide Animations --- */
.cafp-slide-in-right {
    animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cafp-slide-out-left {
    animation: slideOutLeft 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-40px);
    }
}

/* --- Counter Animation --- */
.cafp-counter {
    font-variant-numeric: tabular-nums;
    transition: color 0.3s;
    display: inline-block;
}

.cafp-counter.animating {
    transform: scale(1.1);
    color: var(--dr-primary);
}

/* --- Donut Chart (CSS Only) --- */
.cafp-donut-chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
    position: relative;
    animation: cafp-fadeIn 0.6s ease-out;
}

.cafp-donut-chart {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: conic-gradient(#093561 0%,
            #048BA8 var(--p-tax, 0%),
            #06C4B6 var(--p-tax, 0%),
            #06C4B6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 32px rgba(9, 53, 97, 0.18);
}

/* Fallback/Overlay for Donut */
.cafp-donut-inner {
    width: 168px;
    height: 168px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: inset 0 4px 12px rgba(9, 53, 97, 0.08);
}

.cafp-donut-label {
    font-size: 0.75rem;
    color: #093561;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Titillium Web', sans-serif;
}

.cafp-donut-value {
    font-size: 2rem;
    font-weight: 700;
    color: #FFA500;
    line-height: 1.1;
    font-family: 'Titillium Web', sans-serif;
}


/* --- Instances (Tabs Logic) --- */
.cafp-simulator-instance {
    display: none;
}

.cafp-simulator-instance.cafp-active {
    display: block;
    animation: cafp-fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Accordion Logic --- */
.cafp-accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease-out;
}

.cafp-accordion-content.cafp-active {
    grid-template-rows: 1fr;
}

.cafp-accordion-content-inner {
    overflow: hidden;
}

.cafp-accordion-header svg {
    transition: transform 0.3s ease;
}

.cafp-accordion-header.cafp-active svg {
    transform: rotate(180deg);
}

/* --- Multi-Step Logic --- */
.cafp-form-step {
    display: none;
}

.cafp-form-step.cafp-active {
    display: block;
    animation: cafp-slideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Animations --- */
@keyframes cafp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cafp-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cafp-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes cafp-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

/* ==========================================================================
   TAB BUTTONS — Brand Dinamico
   ========================================================================== */

.cafp-tab-button {
    border-radius: var(--sim-radius-sm) !important;
    justify-content: center;
    transition: var(--sim-transition);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    padding: 14px 24px !important;
    background: #ffffff !important;
    color: var(--cafp-blu) !important;
    border: 2px solid rgba(9, 53, 97, 0.18) !important;
    box-shadow: var(--sim-shadow-card) !important;
    position: relative;
    overflow: hidden;
    font-family: 'Titillium Web', sans-serif;
}

.cafp-tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--sim-gradient-turchese);
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 0 0 10px 10px;
}

.cafp-tab-button:hover {
    background: #EFF8FB !important;
    border-color: var(--cafp-turchese) !important;
    color: var(--cafp-turchese) !important;
    transform: translateY(-2px);
    box-shadow: var(--sim-shadow-hover) !important;
}

.cafp-tab-button:hover::after {
    opacity: 1;
}

.cafp-tab-button.cafp-active {
    background: var(--sim-gradient-primary) !important;
    color: white !important;
    border: 2px solid transparent !important;
    box-shadow: 0 8px 28px -4px rgba(9, 53, 97, 0.45), 0 2px 6px rgba(4, 139, 168, 0.3) !important;
    transform: translateY(-2px);
}

.cafp-tab-button.cafp-active::after {
    opacity: 0;
}

/* ==========================================================================
   CARD ICONS — Gradient Background
   ========================================================================== */

.dr-calc-card-icon {
    background: var(--dr-primary-light, #dbeafe);
    color: var(--dr-primary);
    transition: var(--sim-transition);
    border-radius: 12px;
}

.dr-calc-card-icon.icon-completo {
    background: var(--sim-gradient-primary);
    color: white;
}

/* ==========================================================================
   FORM GROUPS — Enhanced Inputs
   ========================================================================== */

.dr-calc-form-group {
    margin-bottom: 22px;
}

.dr-calc-form-group label {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    display: block;
    font-size: 0.9rem;
}

.dr-calc-form-group h5 svg {
    width: 24px;
    height: 24px;
}

.dr-calc-form-group input,
.dr-calc-form-group select {
    border-radius: 10px;
    border: 2px solid rgba(9, 53, 97, 0.15);
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: 'Titillium Web', sans-serif;
    transition: var(--sim-transition);
    background: #f9fbfd;
    color: #0f1e30;
    width: 100%;
    box-sizing: border-box;
}

.dr-calc-form-group input:hover,
.dr-calc-form-group select:hover {
    border-color: rgba(4, 139, 168, 0.4);
    background: #ffffff;
}

.dr-calc-form-group input:focus,
.dr-calc-form-group select:focus {
    border-color: #048BA8;
    box-shadow: 0 0 0 4px rgba(4, 139, 168, 0.12), 0 2px 8px rgba(9, 53, 97, 0.08);
    outline: none;
    background: #ffffff;
}

/* ==========================================================================
   TOOLTIPS — Premium Float
   ========================================================================== */

.dr-calc-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(4, 139, 168, 0.12);
    color: #048BA8;
    font-size: 11px;
    font-weight: 700;
    cursor: help;
    margin-left: 6px;
    position: relative;
    vertical-align: middle;
    transition: var(--sim-transition);
    border: 1.5px solid rgba(4, 139, 168, 0.25);
}

.dr-calc-info:hover,
.dr-calc-info.cafp-mobile-active {
    background: var(--sim-gradient-primary);
    color: white;
    border-color: transparent;
    transform: scale(1.2);
    box-shadow: 0 4px 14px rgba(9, 53, 97, 0.3);
}

.dr-calc-info::after {
    content: attr(data-text);
    position: absolute;
    top: 135%;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    width: 240px;
    background: #0f172a;
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.2);
}

.dr-calc-info::before {
    content: "";
    position: absolute;
    top: 135%;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #0f172a transparent;
    visibility: hidden;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    pointer-events: none;
}

.dr-calc-info:hover::after,
.dr-calc-info.cafp-mobile-active::after,
.dr-calc-info:hover::before,
.dr-calc-info.cafp-mobile-active::before {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .dr-calc-info::after {
        width: 200px;
        left: auto;
        right: -10px;
        transform: none;
        top: 145%;
        bottom: auto;
    }

    .dr-calc-info:hover::after,
    .dr-calc-info.cafp-mobile-active::after {
        transform: none;
    }
}

/* ==========================================================================
   FAQ ACCORDION — Premium Glass Cards
   ========================================================================== */

.dr-calc-accordion {
    display: grid;
    gap: 14px;
    margin-top: 20px;
    font-family: 'Titillium Web', sans-serif;
}

.dr-calc-acc-item {
    background: #F9FBFF !important;
    border: 1px solid rgba(4, 139, 168, 0.25);
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(9, 53, 97, 0.04) !important;
    transition: all 0.3s ease !important;
    margin-bottom: 12px;
}

.dr-calc-acc-item:hover {
    box-shadow: 0 6px 20px -4px rgba(9, 53, 97, 0.1) !important;
    transform: translateY(-2px);
    border-color: #CFE3FF;
}

.dr-calc-acc-item.active {
    background: #ffffff !important;
    border-color: #048BA8;
    box-shadow: 0 8px 28px -6px rgba(4, 139, 168, 0.2) !important;
    border-left: 4px solid #048BA8 !important;
}

.dr-calc-acc-header {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 20px 24px;
    font-size: 1.02rem;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: color 0.2s;
    line-height: 1.4;
}

.dr-calc-acc-header:hover {
    background: transparent !important;
    color: #048BA8 !important;
}

.dr-calc-acc-item.active .dr-calc-acc-header {
    color: #093561;
    background: linear-gradient(135deg, rgba(9, 53, 97, 0.04), rgba(4, 139, 168, 0.07));
}

.dr-calc-acc-header .icon {
    font-size: 1.4rem;
    line-height: 1;
    color: #94a3b8;
    transition: transform 0.35s ease, color 0.2s;
    font-weight: 300;
    flex-shrink: 0;
}

.dr-calc-acc-item.active .dr-calc-acc-header .icon {
    transform: rotate(45deg);
    color: #048BA8;
}

.dr-calc-acc-content {
    display: none;
    padding: 0 24px 24px;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.7;
    background: transparent;
    border-top: 1px solid #f1f5f9;
}

.dr-calc-acc-item.active .dr-calc-acc-content {
    display: block;
    animation: cafp-fadeIn 0.35s ease;
}

.dr-calc-acc-content p {
    margin-top: 10px;
}

.dr-calc-acc-content ul {
    margin: 12px 0 0 18px;
    padding: 0;
}

.dr-calc-acc-content li {
    margin-bottom: 6px;
}

/* ==========================================================================
   WIZARD PROGRESS BAR — Premium Gradient
   ========================================================================== */

.cafp-wizard-progress {
    background: rgba(9, 53, 97, 0.08);
    border-radius: 20px;
    height: 6px;
    overflow: hidden;
    margin: 16px 0 24px;
}

.cafp-wizard-progress-bar {
    height: 100%;
    border-radius: 20px;
    background: var(--sim-gradient-turchese);
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.cafp-wizard-progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200% 100%;
    animation: cafp-shimmer 1.8s infinite;
}

/* Step indicators */
.cafp-wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 4px;
}

.cafp-wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 600;
    transition: var(--sim-transition);
}

.cafp-wizard-step.cafp-active {
    color: var(--dr-primary);
}

.cafp-wizard-step.cafp-completed {
    color: #06C4B6;
}

.cafp-wizard-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    transition: var(--sim-transition);
}

.cafp-wizard-step.cafp-active .cafp-wizard-step-dot {
    background: var(--sim-gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 14px rgba(9, 53, 97, 0.35);
    transform: scale(1.12);
}

.cafp-wizard-step.cafp-completed .cafp-wizard-step-dot {
    background: var(--sim-gradient-turchese);
    border-color: transparent;
    color: white;
    box-shadow: 0 3px 10px rgba(6, 196, 182, 0.35);
}

/* ==========================================================================
   BANNERS — Contextual Prediction Cards
   ========================================================================== */

#cafp-completo-banners {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.cafp-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 22px;
    border-radius: var(--sim-radius);
    border: 1px solid;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: cafp-fadeIn 0.4s ease;
    transition: var(--sim-transition);
}

.cafp-banner:hover {
    transform: translateY(-2px);
}

.cafp-banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.cafp-banner-content {
    flex: 1;
}

.cafp-banner-content strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.cafp-banner-content p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    opacity: 0.85;
}

/* Banner Types */
.cafp-banner-success {
    background: rgba(5, 150, 105, 0.06);
    border-color: rgba(16, 185, 129, 0.25);
    color: #065f46;
}

.cafp-banner-success .cafp-banner-icon {
    background: rgba(16, 185, 129, 0.12);
}

.cafp-banner-warning {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.25);
    color: #92400e;
}

.cafp-banner-warning .cafp-banner-icon {
    background: rgba(245, 158, 11, 0.12);
}

.cafp-banner-info {
    background: rgba(4, 139, 168, 0.06);
    border-color: rgba(4, 139, 168, 0.25);
    color: #093561;
}

.cafp-banner-info .cafp-banner-icon {
    background: rgba(4, 139, 168, 0.12);
}

.cafp-banner-tip {
    background: rgba(139, 92, 246, 0.06);
    border-color: rgba(139, 92, 246, 0.25);
    color: #5b21b6;
}

.cafp-banner-tip .cafp-banner-icon {
    background: rgba(139, 92, 246, 0.12);
}

/* ==========================================================================
   RESULT CARDS — Glass Effect
   ========================================================================== */

#cafp-completo-step-7 {
    animation: cafp-fadeIn 0.5s ease;
}

.cafp-result-card {
    background: var(--sim-glass-bg);
    border: 1px solid #e2e8f0;
    border-radius: var(--sim-radius);
    padding: 20px 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--sim-shadow-soft);
    transition: var(--sim-transition);
}

.cafp-result-card:hover {
    box-shadow: var(--sim-shadow-hover);
    transform: translateY(-1px);
}

.cafp-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92rem;
}

.cafp-result-row:last-child {
    border-bottom: none;
}

.cafp-result-label {
    color: #64748b;
    font-weight: 500;
}

.cafp-result-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

/* Final Amount — Hero Risultato */
.cafp-final-amount-card {
    background: var(--sim-gradient-hero);
    border-radius: var(--sim-radius);
    padding: 32px 36px;
    text-align: center;
    color: white;
    margin-top: 20px;
    box-shadow: 0 16px 48px -8px rgba(9, 53, 97, 0.5), 0 4px 12px rgba(4, 139, 168, 0.3);
    position: relative;
    overflow: hidden;
}

.cafp-final-amount-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(6, 196, 182, 0.25), transparent 70%);
    pointer-events: none;
}

.cafp-final-amount-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 165, 0, 0.15), transparent 70%);
    pointer-events: none;
}

.cafp-final-amount-card .cafp-final-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    opacity: 0.75;
    margin-bottom: 10px;
    font-family: 'Titillium Web', sans-serif;
}

.cafp-final-amount-card .cafp-final-value {
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #FFA500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-family: 'Titillium Web', sans-serif;
}

/* Plafond Bar */
.cafp-plafond-bar-wrapper {
    background: #f1f5f9;
    border-radius: 12px;
    height: 12px;
    overflow: hidden;
    margin: 12px 0;
}

#cafp-plafond-bar {
    height: 100%;
    border-radius: 12px;
    background: var(--sim-gradient-primary);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   GLOSSARY — Premium DL Styling
   ========================================================================== */

.dr-calc-glossary-list>div {
    background: var(--sim-glass-bg) !important;
    padding: 18px 20px !important;
    border-radius: 14px !important;
    border: 1px solid #e2e8f0;
    transition: var(--sim-transition);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.dr-calc-glossary-list>div:hover {
    box-shadow: var(--sim-shadow-hover);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

.dr-calc-glossary-list dt {
    font-weight: 700 !important;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.dr-calc-glossary-list dd {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #64748b;
    margin: 0;
}

/* ==========================================================================
   NOVITÀ BOX — Gradient Accent Card
   ========================================================================== */

.dr-calc-card[style*="border-left: 4px solid #f59e0b"] {
    border-radius: var(--sim-radius) !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.04), rgba(249, 115, 22, 0.06)) !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
    border-left: 4px solid #f59e0b !important;
    box-shadow: var(--sim-shadow-soft);
    transition: var(--sim-transition);
}

.dr-calc-card[style*="border-left: 4px solid #f59e0b"]:hover {
    box-shadow: 0 8px 24px -4px rgba(245, 158, 11, 0.15);
    transform: translateY(-2px);
}

/* ==========================================================================
   BUTTONS — Premium Gradient
   ========================================================================== */

#cafp-completo-calculate-btn,
.cafp-calculate-btn {
    background: var(--sim-cta-gradient) !important;
    color: white !important;
    border: none !important;
    padding: 16px 36px !important;
    border-radius: var(--sim-radius-sm) !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: var(--sim-transition);
    box-shadow: 0 6px 24px -4px rgba(255, 140, 0, 0.55), 0 2px 6px rgba(255, 140, 0, 0.2) !important;
    position: relative;
    overflow: hidden;
    font-family: 'Titillium Web', sans-serif !important;
    text-transform: uppercase;
}

#cafp-completo-calculate-btn::before,
.cafp-calculate-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#cafp-completo-calculate-btn:hover,
.cafp-calculate-btn:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 14px 36px -6px rgba(255, 140, 0, 0.65), 0 4px 8px rgba(255, 140, 0, 0.25) !important;
}

#cafp-completo-calculate-btn:hover::before,
.cafp-calculate-btn:hover::before {
    opacity: 1;
}

#cafp-completo-calculate-btn:active,
.cafp-calculate-btn:active {
    transform: translateY(0) scale(0.99);
}

/* Navigation buttons */
#cafp-completo-next-btn,
#cafp-completo-prev-btn {
    border-radius: var(--sim-radius-sm) !important;
    padding: 13px 26px !important;
    font-weight: 700 !important;
    font-family: 'Titillium Web', sans-serif !important;
    transition: var(--sim-transition);
    cursor: pointer;
    letter-spacing: 0.2px;
}

#cafp-completo-next-btn {
    background: var(--sim-gradient-primary) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(9, 53, 97, 0.35), 0 1px 4px rgba(4, 139, 168, 0.2) !important;
}

#cafp-completo-next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(9, 53, 97, 0.45) !important;
}

#cafp-completo-prev-btn {
    background: #ffffff !important;
    color: var(--cafp-blu) !important;
    border: 2px solid rgba(9, 53, 97, 0.2) !important;
}

#cafp-completo-prev-btn:hover {
    background: #EFF8FB !important;
    border-color: var(--cafp-turchese) !important;
    color: var(--cafp-turchese) !important;
}

/* ==========================================================================
   FIELD ADVICE BOX — Glassmorphism
   ========================================================================== */

#cafp-completo-field-advice-box {
    background: linear-gradient(135deg, rgba(4, 139, 168, 0.07), rgba(6, 196, 182, 0.05));
    border: 1.5px solid rgba(4, 139, 168, 0.25);
    border-left: 4px solid #048BA8;
    border-radius: 12px;
    padding: 14px 18px 14px 16px;
    margin-top: 12px;
    font-size: 0.88rem;
    color: #093561;
    line-height: 1.55;
    font-family: 'Titillium Web', sans-serif;
}

/* ==========================================================================
   WIDER DESKTOP LAYOUT (Match IMU / Ravvedimento)
   ========================================================================== */

.imu-wrapper .imu-inner {
    max-width: 1100px !important;
}

/* ==========================================================================
   NOVITÀ CARD — Premium Accent
   ========================================================================== */

.dr-calc-novita-card {
    margin-top: 40px;
    margin-bottom: 30px;
    border-left: 4px solid #093561 !important;
    border-radius: var(--sim-radius) !important;
    background: linear-gradient(135deg, rgba(9, 53, 97, 0.03), rgba(4, 139, 168, 0.05)) !important;
    position: relative;
    overflow: hidden;
    transition: var(--sim-transition);
}

.dr-calc-novita-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 50%, rgba(4, 139, 168, 0.03));
    pointer-events: none;
}

.dr-calc-novita-card:hover {
    box-shadow: 0 8px 24px -4px rgba(9, 53, 97, 0.12);
    transform: translateY(-2px);
}

.dr-calc-novita-card .dr-calc-dashboard-sub {
    margin: 0;
}

.dr-calc-novita-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 16px;
}

.dr-calc-novita-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.dr-calc-novita-id {
    color: #048BA8;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    min-width: 24px;
}

.dr-calc-novita-text {
    color: var(--dr-text-light, #64748b);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================================================
   GLOSSARY — Premium Glass Cards
   ========================================================================== */

.dr-calc-glossary-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 0;
    padding: 0;
}

.dr-calc-glossary-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
    padding: 20px 22px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(4, 139, 168, 0.25);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    position: relative;
    overflow: hidden;
}

.dr-calc-glossary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--sim-gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dr-calc-glossary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -6px rgba(9, 53, 97, 0.12);
    border-color: rgba(4, 139, 168, 0.3);
}

.dr-calc-glossary-card:hover::before {
    opacity: 1;
}

.dr-calc-glossary-card dt {
    font-weight: 700;
    font-size: 0.98rem;
    color: #093561;
    margin-bottom: 6px;
    line-height: 1.3;
}

.dr-calc-glossary-card dd {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #475569;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ==========================================================================
   TRUST NOTE — Glassmorphism
   ========================================================================== */

.imu-trust-note {
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.9), rgba(226, 232, 240, 0.6)) !important;
    border: 1px solid rgba(203, 213, 225, 0.5) !important;
    border-radius: 14px !important;
    padding: 20px 24px !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: var(--sim-transition);
}

.imu-trust-note:hover {
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
}

.imu-trust-note p {
    font-size: 0.88rem !important;
    line-height: 1.65;
    color: #475569 !important;
    margin: 0;
}

/* Show-more button (FAQ / Glossario) */
.cafp-show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 50px;
    border: 2px solid #048BA8;
    background: transparent;
    color: #048BA8;
    font-family: 'Titillium Web', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: var(--sim-transition);
}

.cafp-show-more-btn:hover {
    background: #048BA8;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(4, 139, 168, 0.3);
    transform: translateY(-1px);
}

.cafp-show-more-btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   imu-box — Polish on hover
   ========================================================================== */

.imu-box {
    transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}

.imu-box:hover {
    box-shadow: 0 8px 30px -8px rgba(9, 53, 97, 0.1),
        0 4px 6px -2px rgba(9, 53, 97, 0.03) !important;
}

/* Section Header — Gradient Accent Underline */
.imu-box>h3 {
    position: relative;
    padding-bottom: 14px;
}

.imu-box>h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--sim-gradient-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.imu-box:hover>h3::after {
    width: 100px;
}

/* ==========================================================================
   FAQ ACCORDION — Staggered Entrance Animation
   ========================================================================== */

.dr-calc-acc-item {
    animation: cafp-staggerIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.dr-calc-acc-item:nth-child(1) {
    animation-delay: 0.05s;
}

.dr-calc-acc-item:nth-child(2) {
    animation-delay: 0.1s;
}

.dr-calc-acc-item:nth-child(3) {
    animation-delay: 0.15s;
}

.dr-calc-acc-item:nth-child(4) {
    animation-delay: 0.2s;
}

.dr-calc-acc-item:nth-child(5) {
    animation-delay: 0.25s;
}

.dr-calc-acc-item:nth-child(6) {
    animation-delay: 0.3s;
}

.dr-calc-acc-item:nth-child(7) {
    animation-delay: 0.35s;
}

.dr-calc-acc-item:nth-child(8) {
    animation-delay: 0.4s;
}

@keyframes cafp-staggerIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   FOCUS ACCESSIBILITY — Blue glow
   ========================================================================== */

.dr-calc-acc-header:focus-visible,
.cafp-tab-button:focus-visible,
.dr-calc-module-card:focus-visible {
    outline: 2px solid #048BA8;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(4, 139, 168, 0.15);
}

/* ==========================================================================
   RESPONSIVE REFINEMENTS
   ========================================================================== */

@media (max-width: 1024px) {
    .imu-wrapper .imu-inner {
        max-width: 100% !important;
        padding: 0 20px !important;
    }
}

@media (max-width: 768px) {
    .cafp-tab-button {
        padding: 12px 16px !important;
        font-size: 0.88rem;
    }

    .cafp-banner {
        padding: 14px 16px;
        gap: 10px;
    }

    .cafp-banner-icon {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }

    .cafp-final-amount-card .cafp-final-value {
        font-size: 1.7rem;
    }

    .dr-calc-acc-header {
        padding: 16px 18px;
        font-size: 0.95rem;
    }

    .dr-calc-acc-content {
        padding: 0 18px 18px;
    }

    /* Glossary — prevent overflow on mobile */
    .dr-calc-glossary-list {
        grid-template-columns: 1fr !important;
    }

    .dr-calc-glossary-card {
        padding: 16px !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .dr-calc-glossary-card dt {
        font-size: 0.92rem;
    }

    .dr-calc-glossary-card dd {
        font-size: 0.85rem;
    }

    /* Novità — compact on mobile */
    .dr-calc-novita-card {
        margin-top: 24px;
        margin-bottom: 20px;
    }

    .dr-calc-novita-item {
        gap: 8px;
    }

    .dr-calc-novita-text {
        font-size: 0.88rem;
    }

    /* imu-box tighter padding */
    .imu-box {
        padding: 20px 16px !important;
        border-radius: 12px !important;
    }

    /* Meta row stack */
    .imu-meta-row {
        flex-direction: column;
        gap: 12px;
    }

    /* Trust note compact */
    .imu-trust-note {
        padding: 16px !important;
    }

    /* Page title smaller */
    .imu-page-title h1 {
        font-size: 1.6rem !important;
    }

    .imu-page-sub {
        font-size: 0.95rem;
    }

    /* Info pills wrap nicely */
    .imu-info-bar {
        gap: 8px;
    }

    .imu-info-pill {
        font-size: 0.78rem;
        padding: 5px 10px;
    }

    /* Disable hover animations on touch */
    .dr-calc-acc-item:hover,
    .dr-calc-glossary-card:hover,
    .dr-calc-novita-card:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .imu-wrapper .imu-inner {
        padding: 0 14px !important;
    }

    .imu-box {
        padding: 16px 14px !important;
    }

    .dr-calc-acc-header {
        padding: 14px 14px;
        font-size: 0.9rem;
        gap: 8px;
    }

    .dr-calc-acc-content {
        padding: 0 14px 14px;
        font-size: 0.88rem;
    }

    .dr-calc-glossary-card {
        padding: 14px !important;
    }

    .cafp-tab-button {
        padding: 10px 12px !important;
        font-size: 0.82rem;
    }
}

/* ==========================================================================
   LIVE PANEL — «Assistente Calcolo»
   ========================================================================== */

/* Grid layout: 2 columns on desktop */
.cafp-semplice-grid-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
}

/* Full-width tip stays above both columns */
.cafp-semplice-grid-layout>.dr-calc-tip {
    grid-column: 1 / -1;
}

/* Left column: form + results */
.cafp-semplice-form-col {
    min-width: 0;
}

/* Right column: live panel */
.cafp-semplice-live-panel {
    position: sticky;
    top: 100px;
    z-index: 10;
}

.cafp-live-panel-inner {
    background: linear-gradient(160deg, #f0f7fb 0%, #e8f4f8 50%, #f4fbfa 100%);
    border: 1.5px solid rgba(4, 139, 168, 0.2);
    border-top: 3px solid #048BA8;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 28px rgba(9, 53, 97, 0.1), 0 1px 4px rgba(4, 139, 168, 0.08);
}

/* Panel header */
.cafp-live-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.cafp-live-panel-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--sim-gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(9, 53, 97, 0.3);
}

.cafp-live-panel-icon svg {
    stroke: white;
}

.cafp-live-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

.cafp-live-panel-subtitle {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 2px 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Pulse indicator */
.cafp-live-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    position: absolute;
    top: 18px;
    right: 0;
    transition: background 0.3s;
}

.cafp-live-pulse.active {
    background: #22c55e;
    animation: cafpPulse 2s infinite;
}

@keyframes cafpPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

/* Empty state */
.cafp-live-empty {
    text-align: center;
    padding: 30px 10px;
    color: #94a3b8;
}

.cafp-live-empty p {
    font-size: 0.85rem;
    margin-top: 12px;
    line-height: 1.5;
}

/* Live data container */
.cafp-live-data {
    animation: cafpFadeIn 0.4s ease-out;
}

@keyframes cafpFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step cards */
.cafp-live-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    animation: cafpSlideIn 0.35s ease-out both;
}

.cafp-live-step:nth-child(1) {
    animation-delay: 0s;
}

.cafp-live-step:nth-child(2) {
    animation-delay: 0.05s;
}

.cafp-live-step:nth-child(3) {
    animation-delay: 0.1s;
}

.cafp-live-step:nth-child(4) {
    animation-delay: 0.15s;
}

@keyframes cafpSlideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cafp-live-step-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cafp-step-blue {
    background: rgba(4, 139, 168, 0.12);
    color: #048BA8;
}

.cafp-step-blue svg {
    stroke: #048BA8;
}

.cafp-step-indigo {
    background: rgba(9, 53, 97, 0.1);
    color: #093561;
}

.cafp-step-indigo svg {
    stroke: #093561;
}

.cafp-step-green {
    background: rgba(6, 196, 182, 0.12);
    color: #06C4B6;
}

.cafp-step-green svg {
    stroke: #06C4B6;
}

.cafp-step-amber {
    background: rgba(255, 165, 0, 0.12);
    color: #CC8400;
}

.cafp-step-amber svg {
    stroke: #CC8400;
}

.cafp-step-primary {
    background: var(--sim-gradient-primary);
    color: white;
}

.cafp-step-primary svg {
    stroke: white;
}

.cafp-live-step-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
}

.cafp-live-step-label {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

.cafp-live-step-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s;
}

.cafp-val-green {
    color: #16a34a !important;
}

/* Value flash animation on change */
.cafp-live-step-value.cafp-flash {
    animation: cafpValueFlash 0.55s ease-out;
}

@keyframes cafpValueFlash {
    0% {
        background: rgba(4, 139, 168, 0.15);
        border-radius: 4px;
        color: #048BA8;
    }

    60% {
        background: rgba(4, 139, 168, 0.06);
    }

    100% {
        background: transparent;
    }
}

/* Divider */
.cafp-live-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
    margin: 6px 0;
}

/* Highlight row (saldo) */
.cafp-live-step-highlight {
    border-bottom: none !important;
    padding: 12px 10px;
    background: linear-gradient(135deg, rgba(9, 53, 97, 0.06) 0%, rgba(4, 139, 168, 0.04) 100%);
    border-radius: 10px;
    margin-top: 4px;
}

.cafp-live-saldo {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #FFA500 !important;
    font-family: 'Titillium Web', sans-serif;
}

.cafp-live-saldo.cafp-positive {
    color: #06C4B6 !important;
}

.cafp-live-saldo.cafp-negative {
    color: #dc2626 !important;
}

/* Mini progress bar */
.cafp-live-bar-wrap {
    margin-top: 14px;
    padding: 0 2px;
}

.cafp-live-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 5px;
}

.cafp-live-bar-bg {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.cafp-live-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #093561, #048BA8, #06C4B6);
    border-radius: 6px;
    transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Netto mensile box */
.cafp-live-netto-box {
    margin-top: 14px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(6, 196, 182, 0.08), rgba(4, 139, 168, 0.06));
    border-radius: 10px;
    text-align: center;
    border: 1.5px solid rgba(6, 196, 182, 0.3);
    animation: cafpFadeIn 0.4s ease-out;
}

.cafp-live-netto-label {
    display: block;
    font-size: 0.72rem;
    color: #048BA8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-family: 'Titillium Web', sans-serif;
}

.cafp-live-netto-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: #06C4B6;
    font-family: 'Titillium Web', sans-serif;
}

/* Panel footer */
.cafp-live-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.7rem;
    color: #94a3b8;
    line-height: 1.4;
}

.cafp-live-footer svg {
    flex-shrink: 0;
    stroke: #94a3b8;
}

/* Technical log toggle */
.cafp-technical-log-details {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.cafp-technical-log-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    background: #f8fafc;
    transition: background 0.2s, color 0.2s;
    list-style: none;
}

.cafp-technical-log-summary::-webkit-details-marker {
    display: none;
}

.cafp-technical-log-summary::before {
    content: '▶';
    font-size: 0.6rem;
    transition: transform 0.2s;
    color: #94a3b8;
}

.cafp-technical-log-details[open] .cafp-technical-log-summary::before {
    transform: rotate(90deg);
}

.cafp-technical-log-summary:hover {
    background: #f1f5f9;
    color: #475569;
}

.cafp-technical-log-summary svg {
    stroke: #94a3b8;
    flex-shrink: 0;
}

/* ===== RESPONSIVE: Mobile stacking ===== */
@media (max-width: 900px) {
    .cafp-semplice-grid-layout {
        grid-template-columns: 1fr;
    }

    .cafp-semplice-live-panel {
        position: relative;
        top: 0;
        order: -1;
    }

    .cafp-live-panel-inner {
        border-radius: 12px;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .cafp-live-step-label {
        font-size: 0.78rem;
    }

    .cafp-live-step-value {
        font-size: 0.85rem;
    }

    .cafp-live-panel-title {
        font-size: 0.88rem;
    }
}

/* --- Generic SVG Sizing for Cards --- */
.dr-calc-card svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* ==========================================================================
   FAQ Accordion + Glossario – Simulatore Fiscale
   ========================================================================== */

/* Contenitore sezioni (FAQ, Glossario, Novità) */
.imu-box {
    background: #ffffff;
    border: 1px solid rgba(4, 139, 168, 0.15);
    border-radius: var(--sim-radius, 16px);
    padding: 28px 32px;
    margin-top: 24px;
    box-shadow: var(--sim-shadow-card, 0 2px 12px rgba(9, 53, 97, 0.07));
}

.imu-box h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cafp-blu, #093561);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(4, 139, 168, 0.2);
}

/* --- Accordion FAQ --- */
.dr-calc-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dr-calc-acc-item {
    border: 1px solid rgba(4, 139, 168, 0.18);
    border-radius: 10px;
    overflow: hidden;
    background: #f8fbfd;
    transition: box-shadow 0.2s;
}

.dr-calc-acc-item:hover {
    box-shadow: 0 4px 16px rgba(9, 53, 97, 0.1);
}

.dr-calc-acc-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cafp-blu, #093561);
    text-align: left;
    transition: background 0.2s;
}

.dr-calc-acc-header:hover {
    background: rgba(4, 139, 168, 0.06);
}

.dr-calc-acc-header .icon {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--cafp-turchese, #048BA8);
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.dr-calc-acc-item.is-open .dr-calc-acc-header .icon {
    transform: rotate(45deg);
}

.dr-calc-acc-content {
    display: none;
    padding: 0 18px 16px;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
}

.dr-calc-acc-content p {
    margin: 0;
}

.dr-calc-acc-item.is-open .dr-calc-acc-content {
    display: block;
    animation: cafp-fadeIn 0.25s ease;
}

/* --- Glossario --- */
.dr-calc-glossary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.dr-calc-glossary-card {
    background: #f4f9fc;
    border: 1px solid rgba(4, 139, 168, 0.15);
    border-radius: 10px;
    padding: 14px 18px;
}

.dr-calc-glossary-card dt {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--cafp-blu, #093561);
    margin-bottom: 4px;
}

.dr-calc-glossary-card dd {
    margin: 0;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.5;
}

/* --- Extra items (hidden beyond first 4) --- */
.cafp-extra-item {
    display: none;
}

/* --- Show More Button --- */
.cafp-show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--sim-gradient-turchese, linear-gradient(135deg, #048BA8, #06C4B6));
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    text-align: center;
}

.cafp-show-more-btn:hover {
    box-shadow: 0 6px 20px rgba(4, 139, 168, 0.35);
    transform: translateY(-1px);
}

/* --- Fade-in animation --- */
@keyframes cafp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}