/* Estilos para la página de Planes y Precios */
.planes-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.planes-header {
    text-align: center;
    margin-bottom: 50px;
}

.planes-header h1 {
    font-size: 38px; /* Aumentado ligeramente para más impacto */
    font-weight: 700;
    margin-bottom: 10px;
    /* Efecto de gradiente para un look premium */
    background: linear-gradient(45deg, #007aff, #9058ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.planes-header p {
    font-size: 17px; /* Reducido ligeramente como se solicitó */
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Selector de Precios Mensual/Anual --- */
.pricing-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    background-color: #e5e5ea;
    padding: 6px;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}
.toggle-label {
    font-weight: 600;
    color: #333;
    padding: 8px 18px;
    border-radius: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
}
.toggle-label.active {
    background-color: #fff;
    color: #007aff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}
.pricing-toggle .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.pricing-toggle .switch input { opacity: 0; width: 0; height: 0; }
.pricing-toggle .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; }
.pricing-toggle .slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; }
.pricing-toggle input:checked + .slider { background-color: #007aff; }
.pricing-toggle input:checked + .slider:before { transform: translateX(22px); }
.pricing-toggle .slider.round { border-radius: 34px; }
.pricing-toggle .slider.round:before { border-radius: 50%; }

/* --- Tarjetas de Planes --- */
.planes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}

/* Mejoras iOS para cards de planes */
.plan-card {
    background-color: #FFFFFF;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 32px;
    border: 2px solid #E5E5EA;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* --- Estrategia de Ventas Visual --- */

/* 1. Plan Gratuito (Neutral) */
.plan-card.gratuito {
    border-color: #e5e5ea; /* Borde simple */
}

/* 2. Plan Intermedio (Atractivo) */
.plan-card.intermedio {
    border-color: #007aff; /* Borde azul para destacar */
}

/* 3. Plan Destacado (Irresistible) */
.plan-card.destacado {
    transform: scale(1.05);
    border-color: #9058ff; /* Un color más vibrante como violeta */
    box-shadow: 0 10px 40px rgba(144, 88, 255, 0.25);
    background: linear-gradient(to top, #f9f7ff, #fff); /* Gradiente sutil */
}

.destacado-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #9058ff, #007aff); /* Gradiente en el badge */
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.card-header {
    text-align: center;
    border-bottom: 1px solid #e5e5ea;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1d1d1f; /* Color de texto estándar para todos */
}

.precio {
    display: flex;
    justify-content: center;
    align-items: baseline;
    min-height: 60px; 
}

.precio .moneda {
    font-size: 24px;
    font-weight: 500;
    margin-right: 4px;
}

.precio .valor {
    font-size: 48px;
    font-weight: 700;
    color: #1d1d1f;
}

.precio .periodo {
    font-size: 16px;
    color: #666;
    margin-left: 8px;
}

.precio .valor-gratis {
    font-size: 48px;
    font-weight: 700;
    color: #1d1d1f;
}

.card-body {
    flex-grow: 1;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    margin-bottom: 15px;
    color: #333;
    position: relative;
}

.features-list li.disabled {
    color: #999;
    text-decoration: line-through;
}

.features-list .check {
    font-size: 18px;
    color: #28a745;
}

.features-list li.disabled .check {
    color: #dc3545;
}

.card-footer {
    margin-top: 30px;
}

.boton-plan-accion {
    display: block;
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: 2px solid transparent;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.2px;
}

/* Botón para planes de pago */
.boton-plan-accion.upgrade {
    background-color: #007aff;
    color: white;
    border-color: #007aff;
}
.boton-plan-accion.upgrade:hover {
    background-color: #0051D5;
    border-color: #0051D5;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.4);
}

/* Botón para bajar de plan (menos importante) */
.boton-plan-accion.downgrade {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}
.boton-plan-accion.downgrade:hover {
    background-color: #e5e5ea;
}

/* Botón para el plan actual (deshabilitado) */
.boton-plan-accion.actual {
    background-color: #fff;
    color: #007aff;
    border: 2px solid #007aff;
    cursor: not-allowed;
}

/* Botón para el plan gratuito (outline) */
.boton-plan-accion.gratuito {
    background-color: transparent;
    color: #007aff;
    border: 2px solid #007aff;
}
.boton-plan-accion.gratuito:hover {
    background-color: #e0f0ff;
    color: #005bb5;
}


/* Tooltip para características */
.feature-tooltip {
    position: absolute;
    background-color: #1d1d1f;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* --- Tabla Comparativa --- */
.tabla-comparativa {
    margin-top: 80px;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.tabla-comparativa h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
}
.tabla-comparativa table {
    width: 100%;
    border-collapse: collapse;
}
.tabla-comparativa th, .tabla-comparativa td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #e5e5ea;
}
.tabla-comparativa th {
    font-weight: 600;
    font-size: 16px;
}
.tabla-comparativa td:first-child {
    text-align: left;
    font-weight: 500;
}
.check-icon { color: #28a745; font-size: 20px; }
.cross-icon { color: #dc3545; font-size: 20px; }

/* --- Sección FAQ --- */
.faq-section {
    margin-top: 80px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.faq-section h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
}
.faq-item {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid #e5e5ea;
}
.faq-item summary {
    padding: 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: '+';
    font-size: 24px;
    font-weight: 400;
    transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
}
.faq-item p {
    padding: 0 20px 20px 20px;
    color: #666;
    line-height: 1.7;
}


/* Responsividad */
@media (max-width: 992px) {
    .planes-grid {
        grid-template-columns: 1fr;
    }
    .plan-card.destacado {
        transform: none;
    }
}

/* PC - Ocultar versión móvil de la comparativa y mostrar solo la tabla */
@media (min-width: 1025px) {
    /* Ocultar completamente la versión móvil - FORZAR OCULTACIÓN */
    .tabla-comparativa .tabla-comparativa-mobile,
    .tabla-comparativa-mobile,
    div.tabla-comparativa-mobile {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        max-height: 0 !important;
        max-width: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
        pointer-events: none !important;
    }
    
    .tabla-comparativa-mobile *,
    .comparativa-mobile-item,
    .comparativa-mobile-item *,
    .comparativa-plans,
    .comparativa-plans *,
    .plan-row,
    .plan-name,
    .plan-value {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        pointer-events: none !important;
    }
    
    /* Mostrar solo la tabla HTML en PC */
    .tabla-comparativa {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .tabla-comparativa h2 {
        display: block !important;
        visibility: visible !important;
    }
    
    .tabla-comparativa table {
        display: table !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        border-collapse: collapse !important;
    }
    
    .tabla-comparativa thead {
        display: table-header-group !important;
        visibility: visible !important;
    }
    
    .tabla-comparativa tbody {
        display: table-row-group !important;
        visibility: visible !important;
    }
    
    .tabla-comparativa tr {
        display: table-row !important;
        visibility: visible !important;
    }
    
    .tabla-comparativa th,
    .tabla-comparativa td {
        display: table-cell !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 15px !important;
        text-align: center !important;
        border-bottom: 1px solid #e5e5ea !important;
    }
    
    .tabla-comparativa td:first-child {
        text-align: left !important;
        font-weight: 500 !important;
    }
    
    .tabla-comparativa th {
        font-weight: 600 !important;
        font-size: 16px !important;
    }
}

/* MÓVIL Y TABLET - Ocultar comparación detallada completamente */
@media (max-width: 1024px) {
    .tabla-comparativa {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* MÓVIL - Ajustes generales */
@media (max-width: 768px) {
    .planes-container {
        margin: 60px auto 12px auto; /* Margen superior para el logo flotante */
        padding: 0 12px;
    }
    
    .planes-header {
        margin-bottom: 30px;
    }
    
    .planes-header h1 {
        font-size: 28px;
    }
    
    .planes-header p {
        font-size: 15px;
    }
    
    .comparativa-mobile-item {
        background: #f8f9fa;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .comparativa-mobile-item h3 {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 12px;
        color: #1d1d1f;
    }
    
    .comparativa-plans {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .comparativa-plans .plan-row {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 0;
        border-bottom: 1px solid #e5e5ea;
    }
    
    .comparativa-plans .plan-row:last-child {
        border-bottom: none;
    }
    
    .comparativa-plans .plan-name {
        font-weight: 600;
        color: #666;
        font-size: 14px;
        min-width: 120px;
        flex-shrink: 0;
    }
    
    .comparativa-plans .plan-value {
        color: #1d1d1f;
        font-size: 14px;
        font-weight: 500;
    }
    
    .comparativa-plans .plan-value.check-icon {
        color: #28a745;
        font-size: 18px;
        font-weight: 600;
    }
}

/* --- Estilos para el Footer --- */
.public-footer { 
    background-color: #1d1d1f; 
    color: #e5e5ea; 
    padding: 50px 20px 20px 20px;
    margin-top: 80px;
    border-radius: 50px 50px 0 0;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col.about .footer-logo {
    height: 40px;
    margin-bottom: 15px;
}
.footer-col.about p {
    color: #999;
    line-height: 1.7;
    max-width: 350px;
}
.footer-col h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}
.footer-col p {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}
.footer-col a {
    display: block;
    color: #e5e5ea;
    text-decoration: none;
    margin-bottom: 5px;
    transition: color 0.2s ease;
}
.footer-col a:hover {
    color: #007aff;
}
.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #999;
}
/* TABLET - Ajustes del footer para eliminar espacio extra */
@media (min-width: 769px) and (max-width: 1024px) {
    .public-footer {
        margin-bottom: 0 !important;
        padding-bottom: 20px !important;
    }
    
    body.page-planes,
    body {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    html {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        height: 100% !important;
    }
    
    .planes-container {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 768px) {
    .footer-container { 
        grid-template-columns: 1fr; 
        text-align: center; 
    }
    .footer-col.about p { 
        margin-left: auto; 
        margin-right: auto; 
    }
    
    .public-footer {
        margin-bottom: 0 !important;
        padding-bottom: 20px !important;
    }
    
    body {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    html {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
}
