/* Pricing Section Styles */
#precios {
    scroll-margin-top: 80px;
}

.pricing-header {
    margin-bottom: 3rem;
}

.pricing-switch-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 1rem;
    align-items: center;
}

.pricing-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
}

.pricing-card.popular {
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 1rem 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.pricing-currency {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 4px;
}

.pricing-period {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 4px;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    flex-grow: 1;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.pricing-check {
    color: var(--success-color, #10b981);
    font-weight: bold;
    flex-shrink: 0;
}

.onboarding-banner {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    margin-bottom: 3rem;
}

/* ───── Enterprise Calculator (Firebase-style) ───── */
.calc-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* Header bar */
.calc-header {
    background: var(--primary-color, #0f172a);
    color: white;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-header-title {
    font-weight: 700;
    font-size: 1rem;
}

.calc-header-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* Service row */
.calc-service-row {
    display: grid;
    grid-template-columns: 200px 1fr 160px 140px;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f1f5f9;
    gap: 1.5rem;
    transition: background 0.2s;
}

.calc-service-row:hover {
    background: #f8fafc;
}

.calc-service-row:last-child {
    border-bottom: none;
}

/* Service identity */
.calc-service-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.calc-service-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.calc-service-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark, #1e293b);
}

.calc-service-unit {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    margin-top: 2px;
}

/* Slider area */
.calc-slider-area {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calc-slider-label {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    font-weight: 500;
}

.calc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    transition: transform 0.15s;
}

.calc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.calc-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* Value display */
.calc-value-display {
    text-align: center;
}

.calc-value-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark, #1e293b);
    line-height: 1.2;
}

.calc-value-input {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark, #1e293b);
    line-height: 1.2;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    text-align: center;
    width: 100%;
    max-width: 140px;
    padding: 0.25rem 0.5rem;
    font-family: inherit;
    transition: all 0.2s;
    cursor: text;
}

.calc-value-input:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.calc-value-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.calc-value-suffix {
    font-size: 0.8rem;
    color: var(--text-muted, #94a3b8);
    font-weight: 500;
}

.calc-value-desc {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Cost display */
.calc-cost {
    text-align: right;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.calc-cost.free {
    color: var(--success-color, #10b981);
    background: #ecfdf5;
}

.calc-cost.paid {
    color: var(--text-dark, #1e293b);
    background: #f1f5f9;
}

/* Total bar */
.calc-total-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
}

.calc-total-label {
    font-size: 1rem;
    font-weight: 500;
    color: #94a3b8;
}

.calc-total-amount {
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

.calc-total-amount small {
    font-size: 0.85rem;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 4px;
}

/* Tier info */
.calc-tier-info {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.calc-tier-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-weight: 600;
    white-space: nowrap;
}

.calc-tier-badge.active-tier {
    background: #3b82f6;
    color: white;
}

/* Notes under calculator */
.calc-notes {
    padding: 1.25rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.calc-notes p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .calc-service-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.25rem 1.25rem;
    }

    .calc-service-info {
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 0.75rem;
    }

    .calc-value-display {
        text-align: left;
    }

    .calc-cost {
        text-align: left;
        display: inline-block;
    }

    .calc-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1rem 1.25rem;
    }

    .calc-total-bar {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1.25rem;
    }

    .calc-total-amount {
        font-size: 1.75rem;
    }
}

.calc-helper-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background-color: #e2e8f0;
    color: #64748b;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 6px;
    cursor: help;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.calc-helper-icon:hover {
    background-color: #cbd5e1;
    color: #334155;
    transform: scale(1.1);
}

/* Service Info Clickable */
.calc-service-info {
    cursor: pointer;
    position: relative;
}

.calc-service-info:hover .calc-service-name {
    color: var(--primary-color, #3b82f6);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

/* Info Modal */
.calc-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calc-modal-backdrop.open {
    display: flex;
    opacity: 1;
}

.calc-modal {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.calc-modal-backdrop.open .calc-modal {
    transform: translateY(0);
}

.calc-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.calc-modal-close:hover {
    background: #e2e8f0;
    color: #ef4444;
}

.calc-modal-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 1rem;
    border-radius: 16px;
}

.calc-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.calc-modal-desc {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
}

/* ── ROI / Marketing Banner ── */
.roi-banner {
    background: linear-gradient(to right, #fff1f2, #fff);
    border: 1px solid #fecdd3;
    border-left: 6px solid #e11d48;
    /* Red alert */
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(225, 29, 72, 0.1);
    animation: fadeIn 0.5s ease-out;
}

.roi-icon {
    font-size: 2rem;
    background: #ffe4e6;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #e11d48;
    flex-shrink: 0;
}

.roi-content h4 {
    color: #9f1239;
    font-weight: 800;
    font-size: 1.1rem;
    margin: 0 0 0.25rem 0;
}

.roi-content p {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
}

.roi-highlight {
    color: #be123c;
    font-weight: 700;
    background: #fff1f2;
    padding: 0 4px;
    border-radius: 4px;
}

@media (max-width: 640px) {
    .roi-banner {
        flex-direction: column;
        text-align: center;
    }

    .roi-icon {
        margin-bottom: 0.5rem;
    }
}