﻿/* Global Vars */
:root {
    --primary-color: #3E5C76;
    /* Azul Vibrante */
    --primary-dark: #2E455A;
    --secondary-color: #10b981;
    /* Verde Esmeralda */
    --accent-color: #f59e0b;
    /* Ambar para destacados */
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.1) 0px, transparent 50%), radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

/* Main Container */
.main-container {
    background: var(--card-bg);
    width: 100%;
    max-width: 95%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: max-width 0.4s ease; /* 👈 animación */
}

    .main-container.compact {
        max-width: 67%;
    }


/* Header */
.form-header {
    background: white;
    padding: 2rem 2.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    padding: 10px;
    border-radius: 12px;
}

.logo-area h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.highlight {
    color: var(--primary-color);
}

/* Progress Bar */
.progress-container {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 4px;
    background: var(--border-color);
    width: 100%;
    z-index: 0;
    border-radius: 2px;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    transition: width 0.5s ease;
    border-radius: 2px;
    z-index: 1;
}

/* Dynamic width class handled by JS */
.progress-container.step-1 .progress-bar::after {
    width: 0%;
}

.progress-container.step-2 .progress-bar::after {
    width: 25%;
}

.progress-container.step-3 .progress-bar::after {
    width: 50%;
}

.progress-container.step-4 .progress-bar::after {
    width: 75%;
}

.progress-container.step-5 .progress-bar::after {
    width: 100%;
}

.steps-indicator {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.step {
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: var(--transition);
}

.step.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.step.completed {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Form Wizard Styling */
.wizard-form {
    padding: 2.5rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.form-step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.step-title + small {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
    position: relative;
    top: -4px;
}

.step-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Plan Cards */
.plans-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 👈 FUERZA 4 COLUMNAS */
    gap: 1.5rem;
    align-items: stretch;
}





.plan-card input {
    display: none;
}

.plan-content {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.plan-icon {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.plan-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}



.plan-features {
    list-style: none;
    text-align: left;
    width: 100%;
    margin-bottom: 2rem;
}

.plan-features li {
    margin-bottom: 0.8rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
}

.plan-features li i {
    color: var(--secondary-color);
}



/* Active/Hover States for Plans */


.plan-card:hover .plan-content {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.plan-card input:checked+.plan-content {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.02);
    box-shadow: var(--shadow-md);
}

.plan-card input:checked+.plan-content .plan-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.plan-card input:checked+.plan-content .select-btn {
    background: var(--primary-color);
    color: white;
}

/* Featured Badge */
.plan-card.featured .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Frequency Toggle */
.frequency-toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-weight: 500;
}


.plan-card.featured {
    border: 2px solid var(--accent-color);
    background: linear-gradient(180deg, #fffaf0, #ffffff);
    transform: scale(1.05);
    box-shadow: 0 20px 45px rgba(245, 158, 11, 0.25);
}

.plan-card.featured .plan-icon {
    color: var(--accent-color);
}


.toggle-label {
    cursor: pointer;
    transition: var(--transition);
}

.toggle-label.active {
    color: var(--primary-color);
    font-weight: 700;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.badge-save {
    background: #dcfce7;
    color: #166534;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Pricing in Cards */
.price-container {
    height: 60px;
    /* Fixed height to prevent jumping */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}



/*.plan-price .period {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
}


.plan-price.hidden {
    display: none;
}*/

/* Inputs & Forms */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.row {
    display: flex;
    gap: 1.5rem;
}

.half {
    flex: 1;
}

.floating-label {
    display: block;
    position: relative;
}

.floating-label i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
    transition: var(--transition);
    z-index: 1;
}

.floating-label span:not(.static-label) {
    position: absolute;
    left: 3rem;
    top: 1rem;
    /* Center vertically */
    transform: translateY(0);
    color: var(--text-light);
    transition: var(--transition);
    pointer-events: none;
    background: white;
    padding: 0 4px;
}

.floating-label .static-label {
    position: absolute;
    left: 3rem;
    top: -0.6rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
    background: white;
    padding: 0 4px;
}

.floating-label input,
.floating-label select {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    /* Left padding for icon */
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: white;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
    color: var(--text-main);
    appearance: none;
}

.floating-label input:focus,
.floating-label input:not(:placeholder-shown),
.floating-label input.has-value,
.floating-label select:focus,
.floating-label select.has-value {
    border-color: var(--primary-color);
}

.floating-label input:focus+span,
.floating-label input:not(:placeholder-shown)+span,
.floating-label input.has-value+span,
.floating-label select:focus+span,
.floating-label select.has-value+span {
    top: -0.6rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
    transform: translateY(0);
}

.floating-label input:focus~i,
.floating-label select:focus~i {
    color: var(--primary-color);
}

.floating-label input[type="date"]:not(:focus):not(.has-value) {
    border-color: var(--border-color);
}
.floating-label input[type="date"]:not(:focus):not(.has-value)+span {
    top: 1rem;
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 400;
    transform: translateY(0);
}

/* Checkboxes */
.checkbox-group {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.group-label {
    margin-bottom: 1rem;
    font-weight: 500;
    display: block;
}

.checkbox-options {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 2rem;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition);
}

.custom-checkbox:hover input~.checkmark {
    border-color: var(--primary-color);
}

.custom-checkbox input:checked~.checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.label-text i {
    margin-right: 0.4rem;
    color: var(--text-light);
}

/* File Upload */
.docs-requirements {
    background: #eff6ff;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 2rem;
}

.docs-requirements h3 {
    color: var(--primary-dark);
    font-size: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.docs-requirements ul {
    list-style: none;
    margin-left: 0.5rem;
}

.docs-requirements li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #4b5563;
}

.docs-requirements li i {
    color: var(--secondary-color);
    margin-top: 3px;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 3rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #fafafa;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.upload-icon {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.upload-area:hover .upload-icon {
    color: var(--primary-color);
    transform: translateY(-5px);
}

.upload-area h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: var(--text-light);
}

.file-list {
    margin-top: 1.5rem;
}

.file-item {
    background: white;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeIn 0.3s;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.file-icon {
    color: var(--primary-color);
}

.delete-file {
    color: #ef4444;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
    padding: 0.5rem;
    transition: var(--transition);
}

.delete-file:hover {
    background: #fee2e2;
    border-radius: 4px;
}

/* Signature */
.signature-section {
    margin-top: 3rem;
}

.legal-text {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
    background: #f9fafb;
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.signature-wrapper {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

canvas {
    display: block;
    cursor: crosshair;
    width: 100%;
    /* Height handled by attr but good to set max */
}

.signature-tools {
    border-top: 1px solid var(--border-color);
    background: #f9fafb;
    padding: 0.5rem;
    display: flex;
    justify-content: flex-end;
}

.tool-btn {
    background: white;
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.tool-btn:hover {
    background: #f3f4f6;
    color: #ef4444;
    border-color: #ef4444;
}

/* Footer & Controls */
.form-controls {
    margin-top: 3rem;
    padding-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #e5e7eb;
    color: #9ca3af;
}

.btn-secondary {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:not(:disabled):hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.5);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    background: #059669;
    /* Emerald 600 */
    transform: translateY(-2px);
}

.hidden {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .wizard-form {
        padding: 1.5rem;
    }

    .form-header {
        padding: 1.5rem 1.5rem 0.5rem;
    }

    .row {
        flex-direction: column;
        gap: 0;
    }

    .plan-card {
        margin-bottom: 1rem;
    }


    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- New Styles for Modals & Legal --- */

.legal-consent-container {
    display: flex;
    align-items: center;
    background: #f0fdf4;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    border: 1px solid #bbf7d0;
}

.legal-checkbox {
    margin-bottom: 0;
    flex: 1;
}

.info-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.info-btn:hover {
    color: var(--primary-dark);
    transform: scale(1.1);
}

.signature-preview-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: #fafafa;
    overflow: hidden;
}

.empty-signature {
    text-align: center;
    color: var(--text-light);
}

.empty-signature i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

#signatureImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 0;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-body h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body ul {
    list-style: disc;
    margin-left: 1.5rem;
    color: var(--text-main);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Signature Modal Specifics */
.signature-modal-content {
    max-width: 600px;
}

/* Shake Animation for Verification Error */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.hidden {
    display: none !important;
}


.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.beneficiarios-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.beneficiario-chip {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.beneficiario-chip button {
    background: none;
    border: none;
    cursor: pointer;
    color: #ef4444;
    font-size: 0.9rem;
}


.error-text {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: block;
}

.checkbox-group.error {
    border: 1px solid #ef4444;
    background: #fef2f2;
    border-radius: var(--radius-md);
    padding: 1rem;
}


.docs-requirements ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.docs-requirements li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    line-height: 1.4;
}

/* Sublistas */
.docs-requirements li.nested {
    margin-left: 36px;
    /* 👈 MÁS SANGRÍA */
    font-size: 0.95rem;
    color: #555;
}

/* Íconos principales */
.docs-requirements li>i.fa-check {
    color: #16a34a;
    margin-top: 2px;
}

/* Íconos sublista */
.docs-requirements li.nested>i {
    color: #6b7280;
    font-size: 0.7rem;
    margin-top: 6px;
}


.docs-note {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    background-color: #eff6ff;
    /* azul suave */
    border-left: 4px solid #3b82f6;
    /* azul principal */
    border-radius: 8px;
    color: #555;
    font-size: 0.95rem;
}

.docs-note i {
    margin-top: 2px;
    font-size: 1.1rem;
    color: #3b82f6;
}

.docs-note p {
    margin: 0;
    line-height: 1.4;
}

.docs-note.important {
    background-color: #fff7ed;
    border-left-color: #f97316;
    color: #9a3412;
}



.legal-consent-container.error {
    border: 1px solid #ef4444;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 5px;
}

.signature-preview-area.error {
    border: 2px dashed #ef4444;
}

.error-text {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 6px;
}


.success-screen {
    text-align: center;
    padding: 40px;
}

.success-icon {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 20px;
}



/* ===========================
   PAYMENT MODAL
=========================== */

.payment-modal {
    max-width: 480px;
    border-radius: 16px;
    overflow: hidden;
}

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: #fff;
    padding: 16px 20px;
}

.payment-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-body {
    padding: 20px;
}

.payment-security {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f7ff;
    color: #0d6efd;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.payment-input label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
    color: #333;
}

.payment-input input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}

.payment-input input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, .15);
    outline: none;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
}

.cvv-help {
    right: 12px;
    left: auto;
    cursor: pointer;
}

.payment-row {
    display: flex;
    gap: 10px;
}

.payment-input.small input {
    padding-left: 12px;
}

.payment-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
}

.btn-pay {
    width: 100%;
    font-size: 16px;
    padding: 12px;
    border-radius: 10px;
}




.select-btn {
    margin-top: auto;
    width: 100%;
    padding: 0.9rem 1.2rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    font-weight: 700;
    letter-spacing: .3px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.plan-card:hover .select-btn {
    transform: translateY(-2px);
}

.plan-card input:checked+.plan-content {
    border-color: var(--primary-color);
    background: linear-gradient(180deg, rgba(37, 99, 235, .06), #ffffff);
}

/* Ocultar el indicador por defecto */
.plan-selected-indicator {
    display: none;
    margin-top: 1rem;
    background-color: #059669;
    /* Green tone */
    color: white;
    text-align: center;
    padding: 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    width: 100%;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.4);
}

/* Mostrar solo cuando el input hermano está checkeado */
.plan-card input:checked+.plan-content .plan-selected-indicator {
    display: block;
    animation: fadeIn 0.3s ease-out;
}



@media (max-width: 768px) {
    .plans-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding-bottom: 1rem;
    }

    .plan-card {
        min-width: 85%;
        scroll-snap-align: center;
    }
}


.plan-features li i {
    color: var(--secondary-color);
    font-size: 1rem;
    min-width: 20px;
}








/* =========================
   PLAN CARDS (FINAL LIMPIO)
========================= */

.plans-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
    align-items: stretch;
}

@media (min-width: 768px) {
    .plans-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .plans-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

.plan-card {
    position: relative;
    background: linear-gradient(180deg, #ffffff, #fafafa);
    border-radius: 22px;
    border: 2px solid var(--border-color);
    padding: 16px;
    /* 👈 MENOS ESPACIO */
    cursor: pointer;
    transition: all .25s ease;
    display: flex;
    height: 100%;
}

.plan-card input {
    display: none;
}

.plan-content {
    width: 100%;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1.4rem 1.3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    position: relative; /* 🔑 necesario */
}


.badge-ahorro {
    position: absolute;
    top: -12px;
    right: 16px;
    background: #dcfce7;
    color: #166534;
    font-size: .65rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(22,101,52,.25);
    display: none; /* oculto por defecto */
}


/* ICONO */
.plan-icon {
    font-size: 2.3rem;
    margin-bottom: .6rem;
    color: var(--text-light);
}

/* TITULO */
.plan-card h3 {
    font-size: 1.15rem;
    margin-bottom: .3rem;
    line-height: 1.25;
}

/* PRECIO */
.price-container {
    margin-bottom: .5rem;
}

.plan-price {
    font-size: 1.9rem;
    font-weight: 700;
    color: #111827;
}

.plan-price .period {
    font-size: .85rem;
    color: var(--text-light);
}

/* FEATURES */
.plan-features {
    list-style: none;
    width: 100%;
    margin: .6rem 0 1rem;
    padding: 0;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .92rem;
    line-height: 1.35;
    margin-bottom: .45rem;
}

.plan-features li i {
    color: var(--secondary-color);
    font-size: .95rem;
    min-width: 18px;
}

/* HOVER */
.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, .08);
    border-color: var(--primary-color);
}

.plan-card:hover .plan-content {
    border-color: var(--primary-color);
}

/* SELECCIONADO */
.plan-card input:checked+.plan-content {
    border-color: var(--primary-color);
    background: linear-gradient(180deg, rgba(37, 99, 235, .06), #ffffff);
    box-shadow: 0 12px 30px rgba(37, 99, 235, .18);
}

.plan-card input:checked+.plan-content .plan-icon {
    color: var(--primary-color);
    transform: scale(1.05);
}

/* BADGE */
.plan-card.featured {
    border-color: var(--accent-color);
}

.plan-card.featured .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
}

/* INDICADOR SELECCIONADO */
.plan-selected-indicator {
    display: none;
    margin-top: .9rem;
    padding: .55rem;
    width: 100%;
    background: linear-gradient(135deg, #16a34a, #059669);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(5, 150, 105, .35);
}

.plan-card input:checked+.plan-content .plan-selected-indicator {
    display: block;
}

@media (max-width: 600px) {
    .price-annual::before {
        font-size: .55rem;
        padding: 2px 6px;
        margin-right: 4px;
        line-height: 1;
        border-radius: 999px;
    }

    .plan-price {
        font-size: 1.6rem;
        font-weight: 700;
        color: #111827;
    }

}



@media (max-width: 600px) {

    .plan-card.featured .badge {
        transform: none;
        margin: 0 auto 0px auto;
        display: inline-block;
        background: #fff7ed; /* naranja MUY suave */
        color: #9a3412;
        font-size: .65rem;
        padding: 4px 10px;
        border-radius: 999px;
        box-shadow: none;
    }
}



.plan-card:has(.price-annual:not(.hidden)) .badge-ahorro {
    display: inline-block;
}

@media (max-width: 600px) {
    .badge-ahorro {
        top: 10px;
        right: 10px;
        font-size: .6rem;
        padding: 3px 8px;
    }
}


@media (max-width: 768px) {
    .main-container,
    .main-container.compact {
        max-width: 100%;
    }
}



#bloqueBeneficiarios,
#bloqueAcudiente {
    display: none;
}



.upload-loader {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
}

.hidden {
    display: none !important;
}




.logo-img {
    height: 76px;
}

@media (max-width: 768px) {
    .logo-img {
        height: 20px;
    }

    .logo-area h1 {
        font-size: 18px;
    }
}




/* ===== PASO EXEQUIAL ===== */
.exequial-banner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: rgba(16, 185, 129, 0.08); /* usa tu --secondary-color */
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 18px;
}

.exequial-banner-icon {
    font-size: 26px;
    flex-shrink: 0;
    margin-top: 2px;
}

.exequial-banner-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.exequial-banner-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.55;
}

.badge-incluido {
    background: rgba(16, 185, 129, 0.15);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
}

.exequial-coverage-box {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 18px;
}

.exequial-coverage-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.exequial-coverage-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .exequial-coverage-list li {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        color: var(--text-main);
    }

    .exequial-coverage-list .fa-circle-check {
        color: var(--secondary-color);
        font-size: 14px;
    }

    .exequial-coverage-list .fa-paw {
        color: var(--accent-color);
        font-size: 14px;
    }

.pet-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 18px;
    transition: var(--transition);
}

    .pet-toggle-row:hover {
        border-color: var(--primary-color);
    }

.pet-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pet-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.pet-toggle-hint {
    font-size: 12px;
    color: var(--text-light);
}

#petSection {
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pet-fields-wrapper {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 12px;
}

.pet-section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .pet-section-label .fa-paw {
        color: var(--accent-color);
        font-size: 13px;
    }

.pet-skip-note {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

    .pet-skip-note .fa-circle-info {
        color: var(--primary-color);
        font-size: 13px;
    }

.form-version {
    flex: 0 0 100%;
    text-align: center;
    padding: 12px 0 2px;
    font-size: 11px;
    color: var(--text-light);
    opacity: 0.5;
}

.floating-label input.field-invalid {
    border-color: #ef4444;
    background: #fef2f2;
}

.field-error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.field-error-msg.visible {
    display: block;
}