/* ============================================
   PRICING SECTION - Portal Emprendedor Chile
   Sistema modular de precios con toggle dinámico
============================================ */

:root {
    --pricing-primary: #ff5a5f;
    --pricing-secondary: #f1a7a6;
    --pricing-gradient: linear-gradient(135deg, #ff5a5f 0%, #f1a7a6 100%);
    --pricing-success: #25d366;
    --pricing-light: #f8f9fa;
    --pricing-dark: #212529;
    --pricing-border: #e9ecef;
    --pricing-shadow-base: 0 4px 15px rgba(0, 0, 0, 0.1);
    --pricing-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
    --pricing-shadow-featured: 0 20px 60px rgba(255, 90, 95, 0.2);
    --pricing-radius: 16px;
    --pricing-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sección principal */
.pricing-section {
    font-family: 'Poppins', Arial, sans-serif;
    padding: 5rem 0;
    background: #ffffff !important;
    position: relative;
    overflow: hidden;
}

.pricing-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(135deg, rgba(255, 90, 95, 0.03) 0%, rgba(241, 167, 166, 0.03) 100%);
    z-index: 0;
}

.pricing-section > .container {
    position: relative;
    z-index: 1;
}

/* Header de precios */
.pricing-header {
    margin-bottom: 3rem;
}

.pricing-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pricing-dark) !important;
    margin-bottom: 0.75rem;
}

.pricing-header .lead {
    font-size: 1.125rem;
    color: #6c757d !important;
    margin-bottom: 2.5rem;
}

/* Toggle de tipo de hosting */
.hosting-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.toggle-option {
    background: white;
    border: 2px solid var(--pricing-border);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    cursor: pointer;
    transition: var(--pricing-transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 240px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.toggle-option:hover {
    border-color: var(--pricing-primary);
    transform: translateY(-3px);
    box-shadow: var(--pricing-shadow-base);
}

.toggle-option.active {
    border-color: var(--pricing-primary);
    background: linear-gradient(135deg, rgba(255, 90, 95, 0.05) 0%, rgba(241, 167, 166, 0.05) 100%);
    box-shadow: var(--pricing-shadow-base);
}

.toggle-option i {
    font-size: 2rem;
    color: var(--pricing-primary);
    margin-bottom: 0.75rem;
}

.toggle-option strong {
    display: block;
    font-size: 1.125rem;
    color: var(--pricing-dark) !important;
    margin-bottom: 0.25rem;
}

.toggle-option small {
    display: block;
    font-size: 0.875rem;
    color: #6c757d !important;
    margin-top: 0.25rem;
}

.badge-pro {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--pricing-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 90, 95, 0.3);
}

/* Grid de planes */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    align-items: start;
}

/* Cards de planes */
.pricing-card {
    background: #ffffff !important;
    border: 2px solid var(--pricing-border);
    border-radius: var(--pricing-radius);
    padding: 2rem;
    box-shadow: var(--pricing-shadow-base);
    transition: var(--pricing-transition);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--pricing-shadow-hover);
    border-color: var(--pricing-primary);
}

/* Plan destacado */
.pricing-card--featured {
    border: 3px solid var(--pricing-primary);
    box-shadow: var(--pricing-shadow-featured);
    transform: scale(1.05);
    z-index: 2;
}

.pricing-card--featured:hover {
    transform: scale(1.07) translateY(-5px);
}

.pricing-card--featured .plan-header {
    background: var(--pricing-gradient);
    margin: -2rem -2rem 1.5rem -2rem;
    padding: 2rem;
    border-radius: calc(var(--pricing-radius) - 2px) calc(var(--pricing-radius) - 2px) 0 0;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pricing-card--featured .plan-header h3,
.pricing-card--featured .plan-header .price,
.pricing-card--featured .plan-header .period,
.pricing-card--featured .plan-header .billing-total,
.pricing-card--featured .plan-header .savings,
.pricing-card--featured .plan-header p,
.pricing-card--featured .plan-header strong {
    color: white !important;
}

.pricing-card--featured .plan-header .billing-total {
    color: white !important;
}

.pricing-card--featured .plan-header .billing-total strong {
    color: white !important;
}

.pricing-card--featured .price-original {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Features list en card destacada - Modo claro */
.pricing-card--featured .features-list li {
    color: var(--pricing-dark) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.pricing-card--featured .features-list i {
    color: var(--pricing-success) !important;
}

/* Badges */
.badge-popular {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--pricing-gradient);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 90, 95, 0.4);
    white-space: nowrap;
}

.badge-save {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ffc107;
    color: #212529;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.badge-save--large {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Header del plan */
.plan-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.plan-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pricing-dark) !important;
    margin-bottom: 1rem;
}

/* Hosting options - Mostrar alternativas de hosting */
.hosting-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.hosting-options .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    gap: 0.5rem;
    background-color: rgba(255, 90, 95, 0.08);
    border: 1px solid rgba(255, 90, 95, 0.2);
    color: var(--pricing-dark);
}

.hosting-options .badge-info {
    background-color: rgba(255, 90, 95, 0.08);
    color: var(--pricing-dark);
    border: 1px solid rgba(255, 90, 95, 0.2);
}

.hosting-options .badge-warning {
    background-color: rgba(241, 167, 166, 0.12);
    color: var(--pricing-dark);
    border: 1px solid rgba(241, 167, 166, 0.3);
}

.hosting-options .badge strong {
    font-weight: 700;
    color: var(--pricing-primary);
}

/* Dark mode - Hosting options */
body.dark-mode .hosting-options .badge,
body.dark-mode .hosting-options .badge-info {
    background-color: rgba(255, 107, 111, 0.12);
    color: #e0e0e0;
    border: 1px solid rgba(255, 107, 111, 0.3);
}

body.dark-mode .hosting-options .badge-warning {
    background-color: rgba(94, 212, 212, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(94, 212, 212, 0.25);
}

body.dark-mode .hosting-options .badge strong {
    color: #ff6b6f;
}

.price-wrapper {
    margin: 1rem 0;
}

.price-original {
    display: block;
    font-size: 1rem;
    color: #6c757d !important;
    text-decoration: line-through;
    margin-bottom: 0.25rem;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--pricing-primary) !important;
    line-height: 1;
    transition: var(--pricing-transition);
}

.period {
    font-size: 1.125rem;
    color: #6c757d !important;
    font-weight: 400;
}

.billing-total {
    font-size: 0.9rem;
    color: #6c757d !important;
    margin: 0.5rem 0;
}

.billing-total strong {
    color: var(--pricing-dark) !important;
    font-weight: 600;
}

.savings {
    font-size: 0.875rem;
    color: var(--pricing-success) !important;
    font-weight: 600;
    margin-top: 0.5rem;
}

.savings--large {
    font-size: 1rem;
    font-weight: 700;
}

/* Lista de características */
.features-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    flex-grow: 1;
}

.features-list li {
    padding: 0.75rem 0;
    color: var(--pricing-dark) !important;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list i {
    color: var(--pricing-success) !important;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Botón de plan */
.btn-plan {
    display: block;
    width: 100%;
    background: var(--pricing-success);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: var(--pricing-transition);
    border: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    margin-top: auto;
}

.btn-plan:hover {
    background: #20b558;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: white;
}

.btn-plan i {
    margin-right: 0.5rem;
}

.btn-plan--featured {
    background: var(--pricing-primary);
    color: white;
    border: 2px solid var(--pricing-primary);
    box-shadow: 0 4px 15px rgba(255, 90, 95, 0.3);
}

.btn-plan--featured:hover {
    background: rgba(255, 90, 95, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 90, 95, 0.5);
    color: white;
}

.guarantee {
    text-align: center;
    font-size: 0.75rem;
    color: #6c757d !important;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.pricing-card--featured .guarantee {
    color: #6c757d !important;
}

/* Comparativa y trust badges */
.pricing-compare {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--pricing-border);
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.trust-badges span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d !important;
    font-size: 0.875rem;
    font-weight: 500;
}

.trust-badges i {
    color: var(--pricing-primary) !important;
    font-size: 1.125rem;
}

/* ===== DARK MODE ===== */
body.dark-mode .pricing-section {
    background: #0f0f0f !important;
}

body.dark-mode .pricing-section::before {
    background: linear-gradient(135deg, rgba(255, 107, 111, 0.05) 0%, rgba(94, 212, 212, 0.05) 100%);
}

body.dark-mode .pricing-header h2 {
    color: #e0e0e0 !important;
}

body.dark-mode .pricing-header .lead {
    color: #b0b0b0 !important;
}

body.dark-mode .pricing-card {
    background: #1f1f1f !important;
    border-color: #333333;
    color: #e0e0e0;
}

body.dark-mode .pricing-card:hover {
    border-color: #ff6b6f;
}

body.dark-mode .pricing-card--featured {
    background: #1f1f1f !important;
    border-color: #ff6b6f;
}

body.dark-mode .pricing-card--featured .plan-header {
    background: linear-gradient(135deg, rgba(255, 107, 111, 0.25) 0%, rgba(94, 212, 212, 0.2) 100%);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .pricing-card--featured:hover {
    border-color: #ff7a81;
}

body.dark-mode .plan-header h3 {
    color: #e0e0e0 !important;
}

body.dark-mode .price {
    color: #ff6b6f !important;
}

body.dark-mode .period,
body.dark-mode .billing-total {
    color: #b0b0b0 !important;
}

body.dark-mode .billing-total strong {
    color: #e0e0e0 !important;
}

body.dark-mode .savings {
    color: #5ed4d4 !important;
}

body.dark-mode .savings--large {
    color: #5ed4d4 !important;
}

body.dark-mode .badge-popular {
    background: linear-gradient(135deg, #ff6b6f 0%, #5ed4d4 100%);
}

body.dark-mode .badge-save {
    background: #ffc107;
    color: #1f1f1f;
}

body.dark-mode .features-list li {
    color: #d0d0d0 !important;
}

body.dark-mode .features-list i {
    color: #4ade80 !important;
}

body.dark-mode .btn-plan {
    background: #ff6b6f;
    border-color: #ff6b6f;
    color: white;
}

body.dark-mode .btn-plan:hover {
    background: #ff7a81;
    border-color: #ff7a81;
}

body.dark-mode .btn-plan--featured {
    background: white;
    border-color: white;
    color: #ff6b6f;
}

body.dark-mode .btn-plan--featured:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #ff6b6f;
}

body.dark-mode .guarantee {
    color: #b0b0b0 !important;
}

body.dark-mode .pricing-card--featured .guarantee {
    color: rgba(224, 224, 224, 0.95) !important;
}

body.dark-mode .pricing-card--featured .features-list li {
    color: #d0d0d0 !important;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .pricing-card--featured .features-list i {
    color: #4ade80 !important;
}

body.dark-mode .toggle-option {
    background: #1f1f1f;
    border-color: #333333;
    color: #e0e0e0;
}

body.dark-mode .toggle-option:hover {
    border-color: #ff6b6f;
}

body.dark-mode .toggle-option.active {
    background: linear-gradient(135deg, rgba(255, 107, 111, 0.2) 0%, rgba(94, 212, 212, 0.15) 100%);
    border-color: #ff6b6f;
}

body.dark-mode .toggle-option strong {
    color: #e0e0e0 !important;
}

body.dark-mode .toggle-option small {
    color: #b0b0b0 !important;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pricing-card {
    animation: fadeInUp 0.6s ease-out;
}

.pricing-card:nth-child(1) { animation-delay: 0.1s; }
.pricing-card:nth-child(2) { animation-delay: 0.2s; }
.pricing-card:nth-child(3) { animation-delay: 0.3s; }
.pricing-card:nth-child(4) { animation-delay: 0.4s; }

/* Efecto de actualización de precio */
.price.updating {
    animation: priceUpdate 0.3s ease;
}

@keyframes priceUpdate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-card--featured {
        transform: scale(1);
        grid-column: span 2;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .pricing-card--featured:hover {
        transform: scale(1.02) translateY(-5px);
    }
}

@media (max-width: 768px) {
    .pricing-section {
        padding: 3rem 0;
    }
    
    .pricing-header h2 {
        font-size: 2rem;
    }
    
    .hosting-toggle {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toggle-option {
        min-width: auto;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .pricing-card--featured {
        transform: scale(1);
        grid-column: span 1;
    }
    
    .price {
        font-size: 2.5rem;
    }
    
    .badge-popular {
        font-size: 0.75rem;
        padding: 0.375rem 1rem;
    }
    
    .trust-badges {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .pricing-card {
        padding: 1.5rem;
    }
    
    .pricing-card--featured .plan-header {
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
        padding: 1.5rem;
    }
    
    .price {
        font-size: 2rem;
    }
    
    .features-list li {
        font-size: 0.85rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .pricing-section {
        background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    }
    
    .pricing-card {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .plan-header h3,
    .billing-total strong,
    .features-list li {
        color: #f8f9fa;
    }
    
    .toggle-option {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .toggle-option.active {
        background: rgba(255, 90, 95, 0.1);
    }
}
