/* === VARIABLES / RESET === */
:root {
  --telcel-blue: #004b89;       /* main telcel dark blue */
  --telcel-blue-soft: #eaf4fc;  /* light bluish background */
  --green: #28a745;
  --red: #dc3545;
  --bg: #f0f2f5;
  --card: #ffffff;
  --muted: #6b7280;
  --text: #0f172a;
  --footer-dark: #003a6b;
  --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

/* === LAYOUT === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

main {
    padding: 40px 16px;
    max-width: 980px;
    margin: 0 auto;
}

/* === HERO SLIDER === */
.hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #fff;
}

/* === HERO SLIDER RESPONSIVE FIX === */
.slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 6; /* Relación de aspecto profesional para desktop */
    overflow: hidden;
}

.slide {
    display: none;
    width: 100%;
}

.slide.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .slider-container {
        aspect-ratio: 16 / 9; /* Ajuste para móviles */
    }
}

/* === MAIN CONTAINER MOBILE OPTIMIZATION === */

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--telcel-blue);
    transform: scale(1.2);
}

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

/* === MAIN TITLES === */
.main-title {
    text-align: center;
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 800;
    color: var(--telcel-blue);
    margin-bottom: 10px;
}

.sub-title {
    text-align: center;
    color: var(--muted);
    font-size: 16px;
    margin-bottom: 30px;
}

/* === RECHARGE FLOW === */
#recharge-flow {
    margin-top: 30px;
    /* Ocultar inicialmente si el usuario lo prefiere, pero mostraremos el primer paso de forma estética */
}

.card {
    background: var(--card);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.steps-indicator {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0 30px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-item .circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    border: 1px solid #cbd5e1;
    transition: all 0.3s;
}

.step-item .step-label {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
}

.step-item.active .circle {
    background: var(--telcel-blue);
    color: #fff;
    border-color: var(--telcel-blue);
}

.step-item.active .step-label {
    color: var(--telcel-blue);
    font-weight: 700;
}

.step-item.completed .circle {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

/* Step content visibility */
.step-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.step-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Form groups */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

input[type="tel"], input[type="email"], input[type="text"], input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    background: #f8fafc;
}

input:focus {
    border-color: var(--telcel-blue);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 75, 137, 0.08);
}

input.invalid {
    border-color: var(--red);
}

.error-msg {
    color: var(--red);
    font-size: 12px;
    margin-top: 5px;
}

/* Amounts */
.amount-wrapper {
    display: none;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: translateY(10px);
}

.amount-wrapper.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    margin-top: 25px;
}

.amount-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.option-card {
    background: #fff;
    border: 2px solid #f1f5f9;
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.option-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.option-card.selected {
    background: var(--telcel-blue);
    border-color: var(--telcel-blue);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 75, 137, 0.15);
}

.option-card span {
    font-weight: 800;
    font-size: 18px;
    color: var(--telcel-blue);
}

.option-card.selected span {
    color: #fff;
}

/* Buttons */
.button {
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--telcel-blue);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #003a6b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 75, 137, 0.2);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text);
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: #fff;
    max-width: 375px;
    width: 100%;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    animation: modalSlideUp 0.4s ease-out;
}

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
}

/* === ACCORDION === */
.telcel-accordion {
    margin-top: 40px;
}

.telcel-acc-header {
    background: #fff;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: -1px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--telcel-blue);
    transition: background 0.2s;
}

.telcel-acc-header:hover {
    background: var(--telcel-blue-soft);
}

.telcel-acc-header.active {
    background: var(--telcel-blue-soft);
}

.telcel-acc-header::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 14px;
    transition: transform 0.3s;
}

.telcel-acc-header.active::after {
    transform: rotate(180deg);
}

.telcel-acc-body {
    max-height: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border-color);
    border-top: none;
    transition: max-height 0.4s ease;
}

.telcel-acc-body.open {
    max-height: 2000px;
}

.acc-inner {
    padding: 30px;
}

.acc-row {
    display: flex;
    gap: 30px;
    align-items: center;
}

.acc-col-img img {
    width: 250px;
    border-radius: 12px;
}

.acc-col-text ul {
    list-style: none;
}

.acc-col-text li {
    margin-bottom: 12px;
}

.acc-col-text b {
    color: var(--telcel-blue);
}

/* === FOOTER === */
.footer-minimal {
    background: #fff;
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 35px;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: #94a3b8;
    font-size: 20px;
}

.footer-links-minimal {
    display: flex;
    gap: 60px;
}

.link-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-group a {
    color: #64748b;
    font-size: 14px;
}

.footer-apps-minimal p {
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--telcel-blue);
}

.app-row {
    display: flex;
    gap: 10px;
}

.app-row img {
    height: 32px;
}

.footer-divider {
    height: 1px;
    background: var(--border-color);
    margin-bottom: 30px;
}

.footer-bottom-minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.trust-icons-minimal {
    display: flex;
    align-items: center;
    gap: 15px;
}

.trust-icons-minimal img {
    height: 25px;
}

.divider-v {
    width: 1px;
    height: 20px;
    background: var(--border-color);
}

.copy-text {
    font-size: 13px;
    color: #94a3b8;
}

/* === SUCCESS ANIMATIONS & CONFETTI === */
.success-view {
    text-align: center;
    padding: 30px 10px;
    position: relative;
    overflow: hidden;
}

.success-icon {
    font-size: 80px;
    color: var(--green);
    margin-bottom: 20px;
    animation: successScale 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successScale {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.confetti-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffd700;
    top: -10px;
    animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(500px) rotate(720deg); opacity: 0; }
}

.summary-box {
    background: #fff;
    border: 2px solid var(--telcel-blue-soft);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transform: translateY(20px);
    opacity: 0;
    animation: slideUpFade 0.6s 0.4s forwards;
}

@keyframes slideUpFade {
    to { transform: translateY(0); opacity: 1; }
}

/* === VERIFICATION CARD === */
.verification-card {
    background: var(--telcel-blue-soft);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.v-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.v-item:last-child {
    border-bottom: none;
}

.v-label {
    font-weight: 600;
    color: var(--muted);
}

.v-value {
    font-weight: 700;
    color: var(--telcel-blue);
}

/* === SUCCESS SUMMARY GRID === */
.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    text-align: left;
}

.s-item {
    display: flex;
    flex-direction: column;
}

.s-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
}

.s-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

/* === TERMS CHECKBOX === */
.terms-container {
    margin: 20px 0;
    text-align: left;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    user-select: none;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    min-width: 20px;
    height: 20px;
    background-color: #fff;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-wrapper:hover input ~ .checkmark {
    border-color: var(--telcel-blue);
}

.checkbox-wrapper input:checked ~ .checkmark {
    background-color: var(--telcel-blue);
    border-color: var(--telcel-blue);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-wrapper input:checked ~ .checkmark:after {
    display: block;
}

.terms-text a {
    color: var(--telcel-blue);
    text-decoration: underline;
    font-weight: 600;
}

/* === LOADER OVERLAY REFINED === */
#loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 20000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
    transition: all 0.5s ease;
}

#loader-overlay.show {
    display: flex;
}

.loader-spinner {
    position: relative;
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 0 10px rgba(0, 75, 137, 0.1));
}

.loader-spinner::before,
.loader-spinner::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}

.loader-spinner::before {
    border-top-color: var(--telcel-blue);
    animation: spin 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loader-spinner::after {
    border-bottom-color: var(--telcel-blue-soft);
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite reverse;
    opacity: 0.6;
}

.loader-logo {
    position: absolute;
    inset: 20px;
    background: url('logo-telcel.svg') no-repeat center;
    background-size: contain;
    animation: pulseLoader 2s ease-in-out infinite;
}

@keyframes pulseLoader {
    0%, 100% { transform: scale(0.85); opacity: 0.7; }
    50% { transform: scale(1); opacity: 1; }
}

.loader-text {
    margin-top: 35px;
    font-weight: 300;
    color: var(--telcel-blue);
    font-size: 15px;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.8s ease;
    display: none;
}

#loader-overlay.show-text .loader-text {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: blinkingText 1.5s ease-in-out infinite;
}

@keyframes blinkingText {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.98); }
}

@keyframes elegantFade {
    from { opacity: 0.5; letter-spacing: 3px; }
    to { opacity: 1; letter-spacing: 4px; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === FORM VALIDATION STYLES === */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-color: var(--telcel-blue);
    box-shadow: 0 0 0 4px var(--telcel-blue-soft);
}

.input-group input.invalid {
    border-color: var(--red);
    background-color: #fff5f5;
}

.input-group input.valid {
    border-color: var(--green);
    background-color: #fafff5;
}

.error-msg {
    color: var(--red);
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === FLOATING ELEMENTS === */
.support-gif {
    position: fixed;
    right: -65px; /* Hides 50% of 130px width */
    top: 15%;
    width: 130px;
    z-index: 9999;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.support-gif:hover {
    right: 0;
    transform: scale(1.1) rotate(-5deg);
}

.opina-img {
    position: fixed;
    right: 15px;
    bottom: 30px;
    width: 40px;
    z-index: 9999;
    cursor: pointer;
    transition: transform 0.3s;
}

/* === FLOW HEADER === */
.flow-header {
    text-align: center;
    margin-bottom: 25px;
}

.flow-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--telcel-blue);
    margin-bottom: 15px;
}

/* === FORM HELPERS === */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    margin-top: 25px;
    display: flex;
}

.align-right {
    justify-content: flex-end;
}

.flex-between {
    justify-content: space-between;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 25px 0 15px;
    color: var(--telcel-blue);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

/* === SUCCESS / ERROR VIEWS === */
.success-view, .error-view {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    color: var(--green);
    font-size: 64px;
    margin-bottom: 20px;
}

.error-icon {
    color: var(--red);
    font-size: 64px;
    margin-bottom: 20px;
}

.success-view h2, .error-view h2 {
    font-weight: 800;
    color: var(--telcel-blue);
    margin-bottom: 15px;
}

.success-msg, .error-msg-text {
    color: var(--muted);
    margin-bottom: 25px;
}

.summary-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    margin: 0 auto 30px;
    max-width: 400px;
    border: 1px solid #e2e8f0;
}

.summary-box p {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.summary-box p:last-child {
    margin-bottom: 0;
}

/* === RESPONSIVE FIXES === */
@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links-minimal {
        flex-direction: column;
        gap: 30px;
    }

    .footer-bottom-minimal {
        flex-direction: column;
        text-align: center;
    }

    .acc-row {
        flex-direction: column;
    }

    .acc-col-img img {
        width: 100%;
        max-width: 300px;
    }

    .card {
        padding: 20px;
    }

    .amount-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2, .form-grid-2 {
        grid-template-columns: 1fr;
    }
}
