/* Custom styles for RicaricApe v2 */

body { color: var(--ape-dark); }

/* Packages Section - Styles from area-riservata/css/acquisto-ricaricape.css */
.section-packages { background-color: #F9FAFB !important; }

:root {
    --acquisto-primary: #33AA11;
    --acquisto-primary-hover: #2d9410;
    --acquisto-success: #10B981;
    --acquisto-bg: #F9FAFB;
    --acquisto-card-bg: #FFFFFF;
    --acquisto-border: #E5E7EB;
    --acquisto-text: #111827;
    --acquisto-text-secondary: #6B7280;
    --acquisto-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --acquisto-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --acquisto-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --acquisto-radius: 12px;
    --acquisto-radius-sm: 8px;
    --acquisto-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.acquisto-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 2.5rem 2rem; height: 100%; display: flex; flex-direction: column; position: relative; transition: var(--acquisto-transition); cursor: pointer; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); text-decoration: none !important; }
.acquisto-card:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); transform: translateY(-4px); }
.acquisto-card-featured { border: 2px solid var(--acquisto-primary); }
.acquisto-badge { position: absolute; top: -2px; right: -2px; background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); color: #000; padding: 0.2rem 1rem; border-radius: 0 12px 0 12px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; z-index: 1; box-shadow: -2px 2px 10px rgba(0,0,0,0.15); }
.acquisto-card-header { text-align: left; margin-bottom: 1.25rem; }
.acquisto-card-title { font-size: 0.8125rem; font-weight: 600; color: #9CA3AF; letter-spacing: 0.25px; text-transform: uppercase; margin: 0; }
.acquisto-card-featured .acquisto-card-title { color: var(--acquisto-primary); }
.acquisto-card-body { flex: 1; }
.acquisto-price-section { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 1.25rem; }
.acquisto-label { font-size: 0.8125rem; color: #6B7280; font-weight: 500; }
.acquisto-price { font-size: 2.5rem; font-weight: 600; color: #111827; line-height: 1; }
.acquisto-credit-box { background: #f0fdf4; border-radius: 8px; padding: 0.875rem 1.25rem; margin-bottom: 1.75rem; display: flex; align-items: center; justify-content: flex-start; gap: 0.5rem; }
.acquisto-credit-label { font-size: 0.875rem; color: #111827; font-weight: 500; }
.acquisto-credit-value { font-size: 1.75rem; font-weight: 600; color: var(--acquisto-primary); }
.acquisto-benefits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 2rem; }
.acquisto-benefit-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: #4B5563; font-weight: 500; line-height: 1.2; }
.acquisto-benefit-item i { color: var(--acquisto-primary); font-size: 1rem; }
.acquisto-btn-outline { background: transparent; border: 1.5px solid #111827; color: #111827; padding: 0.65rem 1.5rem; border-radius: 8px; font-weight: 700; font-size: 0.9375rem; display: flex; align-items: center; justify-content: center; gap: 0.75rem; transition: var(--acquisto-transition); }
.acquisto-btn-outline:hover { background: var(--acquisto-primary); border-color: var(--acquisto-primary); color: #fff; }
.acquisto-btn-solid { background: var(--acquisto-primary); border: 1.5px solid var(--acquisto-primary); color: #fff; padding: 0.65rem 1.5rem; border-radius: 8px; font-weight: 700; font-size: 0.9375rem; display: flex; align-items: center; justify-content: center; gap: 0.75rem; transition: var(--acquisto-transition); box-shadow: 0 4px 10px rgba(51, 170, 17, 0.2); }
.acquisto-btn-solid:hover { background: var(--acquisto-primary-hover); border-color: var(--acquisto-primary-hover); transform: translateY(-2px); box-shadow: 0 8px 15px rgba(51, 170, 17, 0.3); color: #fff; }

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulse-soft {
    0% { box-shadow: 0 0 0 0 rgba(100, 180, 72, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(100, 180, 72, 0); }
    100% { box-shadow: 0 0 0 0 rgba(100, 180, 72, 0); }
}

.animate-fade-in-up { opacity: 0; animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

.hero-section .img-fluid { animation: float 6s ease-in-out infinite; }
.step-number.active { background: var(--ape-primary); box-shadow: 0px 0px 20px rgba(100, 180, 72, 0.4); animation: pulse-soft 2s infinite; }

/* Scroll reveal class (managed via JS) */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Benefit Cards (after Hero) */
.benefit-card { background: #F2F9F0; border-radius: 24px; padding: 40px; height: 100%; border: none; }
.benefit-icon-box { width: 64px; height: 64px; background: white; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; color: var(--ape-primary); font-size: 24px; }
.benefit-card-title { font-weight: 700; font-size: 20px; margin-bottom: 16px; color: var(--ape-dark); }
.benefit-card-text { font-size: 15px; line-height: 1.6; color: var(--ape-gray-600); margin-bottom: 0; }

/* Sections */
/* Spacing is handled by Bootstrap utility classes (py-lg-5, my-lg-5, etc.) */

/* Hero Section */
.hero-section { background: white; position: relative; overflow: hidden; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--ape-bg-light-orange); border: 1px solid #ffedd5; padding: 6px 16px; border-radius: 9999px; color: var(--ape-orange); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 24px; }
.hero-title { font-weight: 600; font-size: 3.5rem; line-height: 1.1; margin-bottom: 24px; }
.hero-subtitle { font-size: 1.2rem; color: var(--ape-gray-600); line-height: 1.6; margin-bottom: 40px; max-width: 500px; }
.hero-benefit { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--ape-gray-600); }
.hero-benefit-icon { width: 32px; height: 32px; background: #f0fdf4; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ape-primary); font-size: 14px; }

/* Steps Section */
.step-item { text-align: center; position: relative; margin-bottom: 40px; /* Spacing for mobile */ }
@media (min-width: 768px) {
    .step-item { margin-bottom: 0; }
}
.step-number { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; font-size: 20px; font-weight: 700; color: white; }
.step-number.active { background: var(--ape-primary); box-shadow: 0px 0px 20px rgba(100, 180, 72, 0.4); }
.step-number.outline { background: var(--ape-dark); border: 2px solid var(--ape-primary); }
.step-title { font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.step-desc { font-size: 14px; color: var(--ape-gray-500); line-height: 1.5; }

/* Package Cards */
.package-card { background: white; border: 1px solid #e5e7eb; border-radius: 16px; padding: 32px; height: 100%; transition: all 0.3s ease; position: relative; }
.package-card.best-seller { border: 2px solid var(--ape-primary); box-shadow: 0px 20px 25px -5px rgba(0,0,0,0.1); transform: translateY(-16px); }
.best-seller-badge { position: absolute; top: 0; right: 0; background: var(--ape-primary); color: white; padding: 4px 12px; border-radius: 0 0 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.package-ape-count { color: var(--ape-primary); font-weight: 700; font-size: 14px; text-transform: uppercase; margin-bottom: 16px; }
.package-price-label { color: var(--ape-gray-500); font-size: 14px; }
.package-price-value { font-size: 36px; font-weight: 700; margin-bottom: 16px; }
.package-credit-box { background: var(--ape-bg-light-green); border: 1px solid #dcfce7; border-radius: 8px; padding: 12px; display: flex; align-items: baseline; gap: 8px; margin-bottom: 24px; }
.package-credit-label { font-size: 14px; font-weight: 500; }
.package-credit-value { font-size: 32px; font-weight: 700; color: var(--ape-primary); }
.package-features { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.package-feature-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ape-gray-600); }

/* Who is it for Cards */
.who-card { background: white; border: none; border-radius: 20px; padding: 30px 20px; /* Reduced for mobile */ text-align: center; transition: all 0.3s ease; text-decoration: none !important; color: inherit; display: flex; flex-direction: column; align-items: center; height: 100%; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); }
@media (min-width: 992px) {
    .who-card { padding: 40px 24px; }
}
.who-card:hover { transform: translateY(-8px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); text-decoration: none !important; }
.who-icon-wrapper { width: 56px; height: 56px; background: #F8F9FA; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; color: #4B5563; /* Grigio scuro per le icone come da immagine */ font-size: 20px; }
.who-title { font-weight: 600; font-size: 18px; margin-bottom: 12px; color: var(--ape-dark); }
.who-desc { font-size: 14px; color: var(--ape-gray-500); margin-bottom: 24px; /* Slightly reduced for mobile */ line-height: 1.5; flex-grow: 1; }
@media (min-width: 992px) {
    .who-desc { margin-bottom: 32px; }
}
.who-link { font-weight: 700; font-size: 14px; color: var(--ape-primary); display: flex; align-items: center; gap: 8px; transition: all 0.2s ease; text-decoration: none; }
.who-card:hover .who-link { gap: 12px; text-decoration: underline !important; }

/* History Visual Section */
.history-visual-wrapper { position: relative; padding: 20px 0; /* Mobile first: less padding */ }
.history-card { background: white; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); overflow: hidden; margin: 0 auto; max-width: 450px; transition: var(--acquisto-transition); }
.history-header { background: var(--ape-dark); padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; }
.history-dots { display: flex; gap: 6px; }
.history-dot { width: 8px; height: 8px; border-radius: 50%; }
.history-title { color: var(--ape-gray-400); font-family: 'Menlo', monospace; font-size: 11px; }
.history-body { padding: 20px; }
.history-summary { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.summary-label { color: var(--ape-gray-400); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.summary-value { font-size: 22px; font-weight: 700; line-height: 1; }
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item { padding: 10px; border-radius: 8px; border-left: 3px solid transparent; display: flex; justify-content: space-between; align-items: center; }
.history-item.debit { background: #f9fafb; border-left-color: #f87171; }
.history-item.credit { background: var(--ape-bg-light-green); border-left-color: var(--ape-primary); }
.item-info { display: flex; gap: 10px; align-items: center; }
.item-icon { width: 28px; height: 28px; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.item-text-main { font-weight: 700; font-size: 11px; color: #374151; display: block; }
.item-text-sub { font-size: 9px; color: var(--ape-gray-400); }
.item-amount { font-weight: 700; font-size: 14px; }
.item-amount.negative { color: #ef4444; }
.item-amount.positive { color: var(--ape-primary); }

/* Desktop overrides for History Visual */
@media (min-width: 992px) {
    .history-visual-wrapper { padding: 40px; }
    .history-card { transform: rotate(2deg); max-width: 500px; box-shadow: 0px 25px 50px -12px rgba(0,0,0,0.25); animation: card-entrance 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards, float-subtle 6s ease-in-out infinite 1.2s; }
}

@keyframes card-entrance {
    from { transform: rotate(0deg) translateY(40px) scale(0.95); opacity: 0; }
    to { transform: rotate(2deg) translateY(0) scale(1); opacity: 1; }
}

@keyframes float-subtle {
    0% { transform: rotate(2deg) translateY(0px); }
    50% { transform: rotate(2.5deg) translateY(-8px); }
    100% { transform: rotate(2deg) translateY(0px); }
}

/* FAQ Section */
.faq-section { background: white; }
.accordion-item { border: none; margin-bottom: 16px; border-radius: 12px !important; overflow: hidden; background-color: #F9FAFB !important; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.accordion-button { font-weight: 700; padding: 20px; background-color: #F9FAFB !important; }
.accordion-button:not(.collapsed) { background-color: #F9FAFB !important; color: var(--ape-primary); }
.accordion-button:focus { box-shadow: none; }

@media (max-width: 991.98px) {
    .hero-title { font-size: 2.5rem; }
    .package-card.best-seller { transform: none; margin-top: 24px; margin-bottom: 24px; }
}