// Estilos para Catálogo de Membresías - Grupo 6
// Plans comparativos con diseño profesional

/* Layout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    margin: 0;
    line-height: 1.6;
}

/* Navbar (reutilizado) */
.navbar {
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand h1 {
    margin: 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-logout {
    background: rgba(244, 67, 54, 0.9);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-logout:hover {
    background: rgba(244, 67, 54, 1);
    transform: translateY(-1px);
}

.navbar-user {
    font-weight: 500;
    margin-left: 2rem;
}

/* Contenido Principal */
.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.memberships-header {
    text-align: center;
    margin-bottom: 2rem;
}

.memberships-header h1 {
    margin: 0;
    color: #1976d2;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.memberships-header p {
    margin: 0.5rem 0 0;
    color: #666;
    font-size: 1.1rem;
}

/* Alert de membresía actual */
.current-membership-alert {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.5s ease-out;
}

.alert-icon {
    font-size: 2rem;
}

.alert-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.alert-content p {
    margin: 0;
    opacity: 0.9;
}

.status-activa {
    color: #c8e6c9;
    font-weight: 600;
}

.status-inactiva {
    color: #ffcdd2;
    font-weight: 600;
}

/* Contenedor de planes */
.plans-container {
    margin-bottom: 3rem;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.plan-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border: 2px solid transparent;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.plan-card.popular {
    border-color: #ff9800;
    background: linear-gradient(to bottom, #fff8e1, #ffffff);
}

.popular-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.plan-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.plan-name {
    margin: 0 0 0.5rem;
    color: #333;
    font-size: 1.4rem;
    font-weight: 700;
}

.plan-description {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
}

.plan-price {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.price-amount {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1976d2;
}

.price-period {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

.plan-savings {
    text-align: center;
    color: #4caf50;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    flex-grow: 1;
}

.plan-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 1.5rem;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
}

/* Botón de selección */
.btn-select-plan {
    background: #1976d2;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: auto;
}

.btn-select-plan:hover {
    background: #115293;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.3);
}

.btn-select-plan:active {
    transform: translateY(0);
}

/* Sección de beneficios */
.benefits-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.benefits-section h2 {
    margin: 0 0 1.5rem;
    color: #1976d2;
    text-align: center;
    font-size: 1.5rem;
}

/* Tabla comparativa */
.comparison-table {
    overflow-x: auto;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 1rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-col {
    color: #666;
}

.plan-col {
    text-align: center;
    color: #1976d2;
}

.plan-col.featured {
    color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 6px;
    padding: 0.5rem;
}

.table-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row .feature-col {
    font-weight: 500;
    color: #333;
}

.table-row .plan-col {
    text-align: center;
    font-weight: 600;
}

.table-row .plan-col.featured {
    color: #ff9800;
    font-weight: 700;
    background: rgba(255, 152, 0, 0.05);
    border-radius: 4px;
}

/* Sección FAQ */
.faq-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.faq-section h2 {
    margin: 0 0 1.5rem;
    color: #1976d2;
    text-align: center;
    font-size: 1.5rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #1976d2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.faq-question {
    width: 100%;
    background: #f8f9fa;
    border: none;
    padding: 1.5rem;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #e8f0fe;
}

.faq-icon {
    font-size: 1.5rem;
    color: #1976d2;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.faq-answer p {
    padding: 1.5rem;
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Loading */
.loading-placeholder {
    text-align: center;
    padding: 4rem;
    color: #666;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    background: white;
    padding: 2rem 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    text-align: center;
    font-size: 1.2rem;
    color: #1976d2;
    font-weight: 600;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-size: 0.9rem;
}

/* Animaciones */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.current-membership-alert {
    animation: slideIn 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plan-card {
    animation: fadeInUp 0.4s ease-out;
}

.plan-card:nth-child(2) { animation-delay: 0.1s; }
.plan-card:nth-child(3) { animation-delay: 0.2s; }

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1.5fr repeat(3, 1fr);
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .benefits-section,
    .faq-section {
        padding: 1.5rem;
    }
    
    .memberships-header h1 {
        font-size: 1.8rem;
    }
    
    .plan-price .price-amount {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .table-header,
    .table-row {
        font-size: 0.8rem;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .btn-select-plan {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}
