/* assets/css/mobile.css */
/* Estilos específicos de la interfaz móvil (App Feel) */

/* Contenedor principal de la app móvil */
.mobile-app-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    max-width: 100%;
    position: relative;
    background-color: var(--light-bg);
    overflow: hidden;
}

/* Header superior de la App */
.mobile-header {
    background-color: var(--primary-green);
    color: white;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    box-shadow: var(--shadow-sm);
    border-bottom: 2px solid var(--gold);
    flex-shrink: 0;
    z-index: 100;
}

.mobile-header-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-header-title img {
    height: 32px;
    width: auto;
}

.mobile-header-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.mobile-header-btn a {
    color: white;
    text-decoration: none;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

/* Contenido Principal con scroll interno de App */
.mobile-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 80px; /* Espacio para la barra inferior */
    -webkit-overflow-scrolling: touch;
}

/* Barra de Navegación Inferior (Bottom Navbar) */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: #ffffff;
    border-top: 1px solid var(--light-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--light-text-secondary);
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 500;
    flex: 1;
    height: 100%;
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0 2px;
}

.mobile-nav-item .nav-icon {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.mobile-nav-item.active {
    color: var(--primary-green);
    font-weight: 700;
}

.mobile-nav-item.active .nav-icon {
    transform: scale(1.1);
    color: var(--gold);
}

/* Tarjeta del Carnet Digital Giratoria 3D (Flip Card) */
.flip-container {
    perspective: 1000px;
    width: 100%;
    max-width: 340px;
    height: 210px;
    margin: 20px auto;
    cursor: pointer;
}

/* Flipper que gira */
.flipper {
    transition: 0.6s;
    transform-style: preserve-3d;
    position: relative;
    width: 100%;
    height: 100%;
}

/* Girar 180 grados al activarse */
.flip-container.flipped .flipper {
    transform: rotateY(180deg);
}

.front, .back {
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 18px;
    color: white;
    border: 2px solid var(--gold);
}

/* Frontal del Carnet */
.front {
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
    z-index: 2;
    transform: rotateY(0deg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.front-logo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.front-logo-text {
    font-weight: bold;
    font-size: 1rem;
    letter-spacing: 0.5px;
    color: var(--gold);
}

.front-status {
    background: var(--gold);
    color: var(--carbon);
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.front-body {
    margin: 15px 0;
}

.front-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.front-id {
    font-size: 0.8rem;
    opacity: 0.75;
}

.front-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.front-tap-hint {
    font-size: 0.65rem;
    color: var(--gold-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.front-qr-small {
    width: 40px;
    height: 40px;
    background: white;
    padding: 2px;
    border-radius: 4px;
}

/* Reverso del Carnet */
.back {
    background: linear-gradient(135deg, #1b201c 0%, var(--carbon-light) 100%);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

.back-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold);
}

.back-body {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 5px;
}

.back-qr {
    width: 85px;
    height: 85px;
    background: white;
    padding: 5px;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.back-id-text {
    font-size: 0.75rem;
    color: #bbb;
}

.back-footer {
    font-size: 0.6rem;
    color: #999;
    line-height: 1.3;
}

/* Contenedores de Secciones en la App */
.mobile-section {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.mobile-section.active {
    display: block;
}

/* Banner de Inicio de la App */
.mobile-hero {
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
    color: white;
    padding: 24px 16px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 3px solid var(--gold);
}

.mobile-hero h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--gold);
}

.mobile-hero p {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Tarjetas de Plan de Pago (Móvil) */
.plan-selector-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.plan-option-card {
    border: 2px solid var(--light-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.plan-option-card.selected {
    border-color: var(--primary-green);
    background-color: rgba(27, 67, 30, 0.03);
    box-shadow: var(--shadow-sm);
}

.plan-option-card.selected .radio-indicator {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.radio-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ccc;
    display: inline-block;
    position: relative;
}

.radio-indicator::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 4px;
    left: 4px;
}

/* Formularios de Paso a Paso */
.checkout-step {
    display: none;
}

.checkout-step.active {
    display: block;
}

/* Historial de Transacciones (Móvil) */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.transaction-item {
    background-color: white;
    border: 1px solid var(--light-border);
    border-radius: var(--radius-md);
    padding: 12px;
}

.transaction-item-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.transaction-item-body {
    font-size: 0.75rem;
    color: var(--light-text-secondary);
}

/* Estilos de Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pantalla de login / registro adaptada a móvil */
.mobile-auth-container {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 20px;
    margin-top: 10px;
}

.mobile-auth-toggle {
    display: flex;
    border-bottom: 2px solid var(--light-border);
    margin-bottom: 20px;
}

.mobile-auth-tab {
    width: 50%;
    text-align: center;
    padding: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--light-text-secondary);
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-auth-tab.active {
    color: var(--primary-green);
    border-bottom: 3px solid var(--gold);
}

/* ============================================================
   MÓVIL — HOME TEASERS
   ============================================================ */

/* Stats 2×2 */
.m-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.m-stat-card {
    background: linear-gradient(135deg, var(--primary-green-dark), var(--primary-green));
    border-radius: var(--radius-md);
    padding: 14px 12px;
    text-align: center;
    color: white;
}
.m-stat-card .m-stat-icon { font-size: 1.4rem; display: block; margin-bottom: 4px; }
.m-stat-card .m-stat-num { font-size: 1.6rem; font-weight: 800; color: var(--gold); display: block; line-height: 1; }
.m-stat-card .m-stat-lbl { font-size: 0.68rem; opacity: 0.82; line-height: 1.35; margin-top: 3px; display: block; }

/* Plan 20/20 Teaser card */
.m-plan-teaser { padding: 15px; margin-bottom: 16px; }
.m-plan-badge {
    display: inline-block;
    background: #f0f7f1;
    border: 1px solid rgba(27,67,30,0.2);
    color: var(--primary-green);
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    margin-bottom: 8px;
}
.m-plan-teaser h3 { font-size: 1.05rem; color: var(--carbon); line-height: 1.3; margin-bottom: 6px; }
.m-plan-teaser h3 span { color: var(--primary-green); }
.m-plan-teaser p { font-size: 0.8rem; color: var(--light-text-secondary); line-height: 1.6; margin-bottom: 12px; }
.m-plan-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.m-plan-step {
    display: flex; align-items: flex-start; gap: 10px;
    background: #f8faf8; border-radius: 8px;
    padding: 8px 10px; border-left: 3px solid var(--primary-green);
}
.m-step-dot {
    width: 22px; height: 22px; min-width: 22px;
    background: var(--primary-green); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 800; color: var(--gold);
    flex-shrink: 0;
}
.m-step-text strong { display: block; font-size: 0.8rem; color: var(--carbon); }
.m-step-text span { font-size: 0.72rem; color: var(--light-text-secondary); }

/* Aliados pills home */
.m-aliados-pills {
    display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px;
}
.m-aliado-pill {
    display: flex; align-items: center; gap: 5px;
    background: white; border: 1px solid var(--light-border);
    border-radius: 20px; padding: 5px 10px;
    font-size: 0.75rem; font-weight: 600; color: var(--carbon);
}
.m-aliado-pill .pill-em { font-size: 0.8rem; }

/* CTA Banner móvil */
.m-cta-card {
    background: linear-gradient(135deg, var(--primary-green-dark), var(--primary-green));
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    margin-bottom: 16px;
    position: relative; overflow: hidden;
}
.m-cta-card::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 80% 20%, rgba(212,175,55,0.15) 0%, transparent 60%);
}
.m-cta-card h3 { font-size: 1.15rem; font-weight: 800; color: white; margin-bottom: 6px; position: relative; }
.m-cta-card h3 span { color: var(--gold); }
.m-cta-card p { font-size: 0.78rem; color: rgba(255,255,255,0.8); line-height: 1.55; margin-bottom: 14px; position: relative; }
.m-cta-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ============================================================
   MÓVIL — SECCIÓN MODELO DE TRABAJO
   ============================================================ */

/* Hero del modelo */
.m-modelo-hero {
    background: linear-gradient(135deg, var(--primary-green-dark), #2c7a34);
    border-radius: var(--radius-lg);
    padding: 22px 16px;
    margin-bottom: 14px;
    text-align: center;
    border: 2px solid rgba(212,175,55,0.35);
    position: relative; overflow: hidden;
}
.m-modelo-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 70% 20%, rgba(212,175,55,0.12) 0%, transparent 55%);
}
.m-modelo-badge {
    display: inline-block;
    background: rgba(212,175,55,0.2);
    border: 1px solid rgba(212,175,55,0.45);
    color: var(--gold-light);
    padding: 3px 12px; border-radius: 20px;
    font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 10px; position: relative;
}
.m-modelo-hero h2 {
    font-size: 1.4rem; font-weight: 800;
    color: white; line-height: 1.2; margin-bottom: 8px;
    position: relative;
}
.m-modelo-hero h2 span { color: var(--gold); }
.m-modelo-hero p {
    font-size: 0.8rem; opacity: 0.85; line-height: 1.65;
    margin-bottom: 14px; position: relative;
}
.m-hero-img-ph {
    height: 110px;
    background: rgba(255,255,255,0.07);
    border: 1.5px dashed rgba(255,255,255,0.25);
    border-radius: var(--radius-md);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: rgba(255,255,255,0.45); gap: 5px;
    margin-top: 14px; position: relative;
}
.m-hero-img-ph span { font-size: 1.6rem; opacity: 0.7; }
.m-hero-img-ph p { font-size: 0.65rem; margin: 0; }

/* Por qué elegirnos — lista vertical */
.m-por-que-list { display: flex; flex-direction: column; gap: 10px; }
.m-por-que-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px;
    background: #f8faf8; border-radius: 8px;
    border-left: 3px solid var(--primary-green);
}
.m-por-que-item .m-pq-icon { font-size: 1.5rem; flex-shrink: 0; }
.m-por-que-item h4 { font-size: 0.85rem; color: var(--primary-green); margin-bottom: 3px; }
.m-por-que-item p { font-size: 0.75rem; color: var(--light-text-secondary); line-height: 1.5; margin: 0; }

/* Afiliación box móvil */
.m-afiliacion-box {
    background: linear-gradient(135deg, #fffef6, #fff8e1);
    border: 2px solid var(--gold);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    margin-bottom: 10px;
}
.m-afiliacion-box .m-corner-badge {
    display: inline-block;
    background: var(--gold); color: var(--carbon);
    padding: 3px 12px; border-radius: 20px;
    font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; margin-bottom: 8px;
}
.m-afiliacion-price {
    font-size: 2.2rem; font-weight: 800; color: var(--primary-green);
    line-height: 1; margin: 6px 0 3px;
}
.m-afiliacion-price small { font-size: 0.85rem; font-weight: 400; color: var(--light-text-secondary); }
.m-afiliacion-list {
    list-style: none; padding: 0;
    margin: 10px 0 0; text-align: left;
    display: flex; flex-direction: column; gap: 6px;
}
.m-afiliacion-list li {
    font-size: 0.78rem; color: var(--light-text);
    display: flex; align-items: flex-start; gap: 6px; line-height: 1.45;
}
.m-afiliacion-list li::before { content: '✓'; color: var(--primary-green); font-weight: 700; flex-shrink: 0; }

/* Timeline móvil */
.m-timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.m-timeline::before {
    content: '';
    position: absolute; left: 17px; top: 18px; bottom: 18px;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold), var(--primary-green));
    border-radius: 2px;
}
.m-step {
    display: flex; gap: 12px;
    margin-bottom: 14px; position: relative;
}
.m-step:last-child { margin-bottom: 0; }
.m-step-num {
    width: 36px; height: 36px; min-width: 36px;
    background: var(--primary-green);
    border: 2px solid var(--gold); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-weight: 800; font-size: 0.9rem;
    position: relative; z-index: 1;
    box-shadow: 0 0 0 3px white;
    flex-shrink: 0;
}
.m-step-body {
    background: white; border: 1px solid var(--light-border);
    border-radius: var(--radius-sm); padding: 10px 12px; flex: 1;
}
.m-step-tag {
    display: inline-block;
    background: #f0f7f1; color: var(--primary-green);
    padding: 1px 8px; border-radius: 20px;
    font-size: 0.62rem; font-weight: 700;
    text-transform: uppercase; margin-bottom: 4px;
}
.m-step-body h4 { font-size: 0.85rem; color: var(--primary-green); margin-bottom: 4px; }
.m-step-body p { font-size: 0.77rem; color: var(--light-text-secondary); line-height: 1.6; margin: 0; }
.m-step-highlight {
    background: #fffef6; border: 1px solid rgba(212,175,55,0.35);
    border-radius: 6px; padding: 6px 10px;
    font-size: 0.73rem; color: var(--primary-green); font-weight: 600;
    margin-top: 7px;
}
.m-step-img-ph {
    height: 70px; background: #f4f7f4;
    border: 1.5px dashed #c0d0c2; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: #9ab09e; font-size: 0.68rem; gap: 5px; margin-top: 8px;
}

/* Score bars móvil */
.m-score-wrap { margin-bottom: 12px; }
.m-score-label {
    display: flex; justify-content: space-between;
    font-size: 0.78rem; color: var(--light-text); margin-bottom: 4px; font-weight: 500;
}
.m-score-track {
    height: 8px; background: var(--light-border);
    border-radius: 5px; overflow: hidden;
}
.m-score-fill {
    height: 100%; border-radius: 5px;
    background: linear-gradient(90deg, var(--primary-green), var(--gold));
}
.m-score-total {
    background: linear-gradient(135deg, var(--primary-green), #2c7a34);
    color: white; border-radius: var(--radius-sm);
    padding: 12px; text-align: center; margin-top: 14px;
}
.m-score-total .m-total-num { font-size: 2.5rem; font-weight: 800; color: var(--gold); line-height: 1; }
.m-score-total .m-total-sub { font-size: 0.72rem; opacity: 0.8; }

/* Aliados sector móvil */
.m-sector-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem; font-weight: 700; color: var(--primary-green);
    margin-bottom: 10px; padding-bottom: 8px;
    border-bottom: 1.5px solid var(--light-border);
}
.m-aliados-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.m-aliado-row {
    display: flex; align-items: center; gap: 10px;
    background: #f8faf8; border-radius: 8px; padding: 8px 10px;
    border-left: 3px solid var(--gold);
}
.m-aliado-row .m-al-icon {
    width: 32px; height: 32px;
    background: white; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
    border: 1px solid var(--light-border);
}
.m-aliado-row .m-al-name { font-size: 0.85rem; font-weight: 700; color: var(--carbon); }
.m-aliado-row .m-al-via { font-size: 0.7rem; color: var(--light-text-secondary); }
