/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    color: #333;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* ===== Header ===== */
header {
    background-color: #E30614;
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

nav {
    display: flex;
    gap: 12px;
}

.btn-login {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-login:hover {
    background-color: white;
    color: #E30614;
}

.btn-register {
    background-color: white;
    color: #E30614;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-register:hover {
    background-color: #f5f5f5;
}

/* ===== Main Container ===== */
.pago-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== Step Sections ===== */
.step-section {
    margin-bottom: 40px;
}

.step-section.hidden {
    display: none;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ddd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-number.active {
    background-color: #E30614;
}

.step-header h2 {
    font-size: 22px;
    color: #333;
    font-weight: 700;
}

/* ===== Plan Cards ===== */
.planes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.plan-card {
    background: white;
    border: 2px solid #eee;
    border-radius: 14px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    border-color: #E30614;
    box-shadow: 0 6px 20px rgba(227, 6, 20, 0.1);
    transform: translateY(-3px);
}

.plan-card.selected {
    border-color: #E30614;
    background: linear-gradient(135deg, #fff5f5, #ffffff);
    box-shadow: 0 8px 24px rgba(227, 6, 20, 0.15);
}

.plan-card.selected::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: #E30614;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.plan-badge {
    position: absolute;
    top: 10px;
    left: -26px;
    background: #E30614;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 28px;
    transform: rotate(-45deg);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-icon {
    font-size: 38px;
    margin-bottom: 10px;
}

.plan-name {
    font-size: 13px;
    font-weight: 700;
    color: #E30614;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    background: rgba(227, 6, 20, 0.08);
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
}

.plan-price {
    font-size: 28px;
    font-weight: 800;
    color: #333;
    margin: 12px 0 18px;
}

.plan-price span {
    font-size: 13px;
    font-weight: 400;
    color: #999;
}

.btn-plan {
    background-color: #FFCD1C;
    color: #333;
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-plan:hover {
    background-color: #FFB300;
    transform: translateY(-1px);
}

/* ===== Pago Layout ===== */
.pago-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

/* ===== Form Card ===== */
.pago-form-card {
    background: white;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.form-title {
    font-size: 17px;
    color: #333;
    font-weight: 700;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
}

.form-group input:focus {
    outline: none;
    border-color: #E30614;
    box-shadow: 0 0 0 3px rgba(227, 6, 20, 0.08);
    background: white;
}

/* ===== Resumen Card ===== */
.pago-resumen-card {
    background: white;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border-top: 4px solid #E30614;
}

.resumen-title {
    font-size: 17px;
    color: #333;
    font-weight: 700;
    margin-bottom: 20px;
}

.resumen-plan {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #fff5f5, #fffbeb);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.resumen-plan-icon {
    font-size: 32px;
}

.resumen-plan-info {
    display: flex;
    flex-direction: column;
}

.resumen-plan-type {
    font-size: 20px;
    font-weight: 800;
    color: #E30614;
}

.resumen-plan-label {
    font-size: 12px;
    color: #999;
}

.resumen-detalles {
    margin-bottom: 24px;
}

.resumen-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f3f3;
}

.resumen-row:last-child {
    border-bottom: none;
}

.resumen-row.total {
    border-top: 2px solid #E30614;
    border-bottom: none;
    padding-top: 14px;
    margin-top: 6px;
}

.resumen-label {
    font-size: 14px;
    color: #888;
}

.resumen-value {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.resumen-total {
    font-size: 24px;
    font-weight: 800;
    color: #E30614;
}

/* ===== Método de Pago ===== */
.metodo-title {
    font-size: 14px;
    color: #333;
    font-weight: 700;
    margin-bottom: 12px;
}

.metodos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

.metodo-option {
    cursor: pointer;
}

.metodo-option input[type="radio"] {
    display: none;
}

.metodo-card {
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 14px 8px;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.metodo-card:hover {
    border-color: #ccc;
}

.metodo-option input[type="radio"]:checked+.metodo-card {
    border-color: #E30614;
    background: rgba(227, 6, 20, 0.04);
    box-shadow: 0 0 0 3px rgba(227, 6, 20, 0.08);
}

.metodo-icon {
    font-size: 24px;
}

.metodo-name {
    font-size: 12px;
    font-weight: 700;
    color: #555;
}

/* ===== Buttons ===== */
.btn-confirmar {
    width: 100%;
    background: #E30614;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn-confirmar:hover {
    background: #c20410;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(227, 6, 20, 0.25);
}

.btn-cambiar {
    width: 100%;
    background: none;
    border: none;
    padding: 12px;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s;
}

.btn-cambiar:hover {
    color: #E30614;
}

/* ===== Confirmación ===== */
.confirmacion-card {
    background: white;
    border-radius: 16px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 520px;
    margin: 0 auto;
}

.confirmacion-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.confirmacion-title {
    font-size: 26px;
    color: #333;
    font-weight: 800;
    margin-bottom: 8px;
}

.confirmacion-msg {
    font-size: 14px;
    color: #888;
    margin-bottom: 30px;
}

.confirmacion-detalles {
    text-align: left;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 28px;
    border-left: 4px solid #E30614;
}

.confirmacion-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.confirmacion-row:last-child {
    border-bottom: none;
}

.confirmacion-label {
    color: #888;
}

.confirmacion-value {
    color: #333;
    font-weight: 600;
}

.conf-total {
    color: #E30614;
    font-weight: 800;
    font-size: 18px;
}

.btn-volver {
    background: #FFCD1C;
    color: #333;
    border: none;
    padding: 14px 40px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-volver:hover {
    background: #FFB300;
    transform: translateY(-1px);
}

/* ===== Footer ===== */
footer {
    background-color: #f9f9f9;
    color: #666;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    margin-top: 60px;
}

footer p {
    font-size: 13px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .header-content {
        padding: 0 12px;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .logo {
        justify-content: center;
        width: 100%;
    }

    .logo-img {
        height: 38px;
    }

    nav {
        justify-content: center;
        width: 100%;
        gap: 6px;
        flex-wrap: wrap;
    }

    .btn-login {
        padding: 6px 12px;
        font-size: 12px;
    }

    .planes-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .pago-layout {
        grid-template-columns: 1fr;
    }

    .pago-container {
        padding: 20px 12px;
    }

    .plan-price {
        font-size: 24px;
    }

    .confirmacion-card {
        padding: 24px 16px;
    }

    .metodos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

/* ===== Jornada Selector ===== */
.jornada-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.jornada-option {
    cursor: pointer;
}

.jornada-option input[type="radio"] {
    display: none;
}

.jornada-card {
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: #fafafa;
}

.jornada-card:hover {
    border-color: #ccc;
}

.jornada-option input[type="radio"]:checked + .jornada-card {
    border-color: #E30614;
    background: rgba(227, 6, 20, 0.04);
    box-shadow: 0 0 0 3px rgba(227, 6, 20, 0.08);
}

.jornada-icon {
    font-size: 26px;
}

.jornada-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.jornada-hora {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

.jornada-info {
    font-size: 12px;
    color: #666;
    background: rgba(255, 205, 28, 0.15);
    border-left: 3px solid #FFCD1C;
    padding: 10px 12px;
    border-radius: 6px;
    line-height: 1.5;
}

/* ===== Check-in Message en Confirmación ===== */
.confirmacion-checkin-msg {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #fffbe6, #fff5f5);
    border: 1.5px solid #FFCD1C;
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
    text-align: left;
}

.checkin-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.confirmacion-checkin-msg p {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.confirmacion-checkin-msg a {
    color: #E30614;
    font-weight: 700;
    text-decoration: none;
}

.confirmacion-checkin-msg a:hover {
    text-decoration: underline;
}

/* ===== Custom UI Dialog (Alert / Confirm) ===== */
.custom-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.custom-dialog-overlay.hidden {
    display: none;
}

.custom-dialog {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    animation: scaleIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.custom-dialog-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.custom-dialog-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.custom-dialog-msg {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

.custom-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.custom-dialog-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    border: none;
    flex: 1;
}

.custom-dialog-btn-primary {
    background: linear-gradient(135deg, #E30614, #b80510);
    color: white;
}

.custom-dialog-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 6, 20, 0.3);
}

.custom-dialog-btn-secondary {
    background: #f0f0f0;
    color: #555;
}

.custom-dialog-btn-secondary:hover {
    background: #e4e4e4;
}

/* ===== Spinner Overlay & Comprobante Button ===== */
.pago-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.25s ease;
}

.pago-spinner-overlay.hidden {
    display: none !important;
}

.pago-spinner-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 32px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.pago-spinner-ring {
    width: 54px;
    height: 54px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid #E30614;
    border-right: 4px solid #FFCD1C;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pago-progress-track {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 14px;
}

.pago-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #E30614, #FFCD1C);
    border-radius: 999px;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-descargar-comprobante:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px);
}