/* assets/css/membership.css */
:root {
    --bg-apple: #f5f5f7;
    --card-apple: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent: #0071e3;
    --danger: #ff3b30;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-apple);
    color: var(--text-primary);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.apple-container {
    width: 100%;
    max-width: 480px;
    background: var(--card-apple);
    border-radius: 24px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.02);
    padding: 32px 24px;
    box-sizing: border-box;
}

.top-back-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    transition: opacity 0.2s ease;
}

.top-back-link:hover { opacity: 0.8; }
.top-back-link .arrow { font-size: 20px; margin-right: 4px; line-height: 0; position: relative; top: -1px; }

.brand-section { text-align: center; margin-bottom: 24px; }
.tagline { font-size: 10px; letter-spacing: 1.5px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; }
.brand-section h2 { font-size: 24px; letter-spacing: -0.5px; margin: 0 0 4px 0; }
.user-status-text { font-size: 14px; color: var(--text-secondary); margin: 0; }

.segmented-control {
    display: flex;
    background: #ededf0;
    padding: 3px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.segment-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.segment-btn.active {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.slider-viewport { width: 100%; overflow: hidden; border-radius: 16px; }
.slider-track { display: flex; width: 200%; transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); }

.slide-card {
    width: 50%;
    box-sizing: border-box;
    background: #f5f5f7;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 12px;
}

.card-header h3 { font-size: 15px; margin: 0; font-weight: 600; max-width: 65%; }
.badge-price { font-size: 12px; font-weight: 700; color: var(--accent); background: #fff; padding: 4px 10px; border-radius: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }

.features-list { list-style: none; padding: 0; margin: 0 0 20px 0; font-size: 13px; color: #3a3a3c; line-height: 1.6; }
.features-list li { position: relative; padding-left: 18px; margin-bottom: 10px; }
.features-list li::before { content: "•"; position: absolute; left: 4px; color: var(--text-secondary); font-weight: bold; }
.sub-features { display: block; font-size: 12px; color: var(--text-secondary); padding-left: 2px; line-height: 1.4; }

.payment-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.action-button {
    display: block;
    text-align: center;
    padding: 12px;
    background: var(--text-primary);
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
}
.action-button.highlight { background: var(--accent); }
.action-button:hover { opacity: 0.9; }

.secondary-btn { background-color: #f5f5f7 !important; color: var(--text-primary) !important; border: 1px solid #d4d4d4!important; }
.secondary-btn:hover { background-color: #e8e8ed !important; }

.current-plan-badge {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #14804a;
    background: #e2f6ea;
    padding: 10px;
    border-radius: 10px;
    margin-top: auto;
}
.current-plan-badge.premium { background: var(--accent); color: #fff; }

.secure-form {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    color: #171717;
    box-sizing: border-box;
}
.secure-form:focus { outline: none; border-color: var(--text-primary); }

.toast { padding: 12px; border-radius: 10px; font-size: 12px; text-align: center; margin-bottom: 16px; background: #e2f6ea; color: #14804a; font-weight: 600; }
.toast.info { background: #ededf0; color: var(--text-primary); }

.legal-notice { font-size: 11px; color: var(--text-secondary); text-align: center; margin-top: 20px; line-height: 1.4; }
.text-center { text-align: center; }

/* NUEVO: Contenedor Adaptable de Sub-Filtros para 4 Pestañas */
.filter-tab-container { 
    display: flex; 
    background: #ededf0; 
    padding: 3px; 
    border-radius: 10px; 
    margin: 15px 0; 
    overflow-x: auto;
    scrollbar-width: none;
}
.filter-tab-container::-webkit-scrollbar { display: none; }

.filter-btn { 
    flex: 1; 
    background: none; 
    border: none; 
    padding: 8px 4px; 
    font-size: 12px; 
    font-weight: 600; 
    color: #1d1d1f; 
    cursor: pointer; 
    border-radius: 8px; 
    transition: all 0.2s; 
    white-space: nowrap;
}
.filter-btn.active { background: #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.clinic-item-card { background: #fff; border: 1px solid #e5e5e5; padding: 16px; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); margin-bottom: 12px; }

.card-actions-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; margin-bottom: 12px; gap: 10px; }
.btn-location-mini { display: inline-flex; align-items: center; background: #f1f5f9; color: #0f172a; border: 1px solid #cbd5e1; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; text-decoration: none; gap: 4px; flex-shrink: 0; }
.countdown-text-mini { font-size: 11px; color: #475569; font-weight: 600; text-align: right; line-height: 1.3; }
.countdown-text-mini strong { color: #ef4444; }