/* ==========================================================================
   Brokers88 RC Psicología — Registration Form
   Redesigned with warmth, depth, and refined micro-interactions
   ========================================================================== */

:root {
    /* Brand — color corporativo Brokers88 */
    --red: #eb0028;
    --red-dark: #c9001f;
    --red-deeper: #a00018;
    --red-light: #ff2244;
    --red-glow: rgba(235, 0, 40, 0.14);
    --red-subtle: #fff0f2;
    --red-hover: #d40024;

    /* Warm stone neutrals */
    --white: #FFFFFF;
    --gray-50: #FAFAF9;
    --gray-100: #F5F5F4;
    --gray-200: #E7E5E4;
    --gray-300: #D6D3D1;
    --gray-400: #A8A29E;
    --gray-500: #78716C;
    --gray-600: #57534E;
    --gray-700: #44403C;
    --gray-800: #292524;
    --gray-900: #1C1917;

    /* Shadows — layered for realism */
    --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06), 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow: 0 4px 6px -1px rgba(28, 25, 23, 0.06), 0 2px 4px -2px rgba(28, 25, 23, 0.04);
    --shadow-md: 0 8px 24px -4px rgba(28, 25, 23, 0.08), 0 4px 8px -4px rgba(28, 25, 23, 0.03);
    --shadow-lg: 0 16px 40px -8px rgba(28, 25, 23, 0.1), 0 8px 16px -8px rgba(28, 25, 23, 0.04);
    --shadow-xl: 0 24px 56px -12px rgba(28, 25, 23, 0.14), 0 12px 24px -8px rgba(28, 25, 23, 0.05);
    --shadow-red: 0 4px 14px rgba(220, 38, 56, 0.25), 0 2px 6px rgba(220, 38, 56, 0.1);
    --shadow-red-lg: 0 8px 24px rgba(220, 38, 56, 0.3), 0 4px 8px rgba(220, 38, 56, 0.1);

    /* Radii */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --duration: 0.25s;
    --duration-slow: 0.4s;
}


/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle ambient color bleed behind the form */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 10%, rgba(220, 38, 56, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 85% 80%, rgba(220, 38, 56, 0.025) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}


/* ==========================================================================
   Header
   ========================================================================== */

.header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
    padding: 0.875rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(231, 229, 228, 0.7);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.header-contact {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.header-contact a {
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--duration) var(--ease);
}

.header-contact a:hover {
    color: var(--red-dark);
}

.btn-help {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.375rem 0.875rem;
    background: var(--red);
    color: var(--white) !important;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background var(--duration) var(--ease), transform var(--duration) var(--ease);
    margin-left: 0.375rem;
}

.btn-help:hover {
    background: var(--red-dark) !important;
    transform: translateY(-1px);
    color: var(--white) !important;
}


/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 45%, var(--red-deeper) 100%);
    padding: 3.5rem 2rem 5rem;
    position: relative;
    overflow: hidden;
}

/* Diagonal line pattern for texture */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 28px,
            rgba(255, 255, 255, 0.03) 28px,
            rgba(255, 255, 255, 0.03) 29px
        );
    pointer-events: none;
}

/* Soft curved bottom edge */
.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -5%;
    right: -5%;
    height: 48px;
    background: var(--gray-50);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hero-content {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: 'Titillium Web', sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.hero p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.125rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}


/* ==========================================================================
   Main Container & Form Card
   ========================================================================== */

.main-container {
    max-width: 920px;
    margin: -2.5rem auto 3rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

.form-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid rgba(231, 229, 228, 0.5);
}


/* ==========================================================================
   Progress Bar — Connected Steps
   ========================================================================== */

.progress-bar {
    display: flex;
    padding: 0;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    position: relative;
}

.progress-step {
    flex: 1;
    padding: 1.5rem 1rem 1.25rem;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    border-bottom: 3px solid transparent;
    z-index: 1;
}

.progress-step:hover {
    background: rgba(220, 38, 56, 0.02);
}

.progress-step.active {
    background: var(--white);
    border-bottom-color: var(--red);
}

.progress-step.completed {
    border-bottom-color: var(--red-light);
}

/* Connecting line between steps */
.progress-step:not(:last-child)::before {
    content: '';
    position: absolute;
    top: calc(1.5rem + 12px);
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
    transition: background 0.4s var(--ease);
}

.progress-step.completed:not(:last-child)::before {
    background: var(--red);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    transition: all 0.3s var(--ease);
    position: relative;
    z-index: 2;
}

.progress-step.active .step-number {
    background: var(--red);
    color: var(--white);
    box-shadow: 0 0 0 5px var(--red-glow);
    transform: scale(1.08);
}

.progress-step.completed .step-number {
    background: var(--red);
    color: var(--white);
}

.step-label {
    display: block;
    font-size: 0.78rem;
    color: var(--gray-400);
    font-weight: 500;
    transition: color 0.3s var(--ease);
    letter-spacing: 0.01em;
}

.progress-step.active .step-label {
    color: var(--gray-800);
    font-weight: 600;
}

.progress-step.completed .step-label {
    color: var(--gray-600);
}


/* ==========================================================================
   Form Sections
   ========================================================================== */

.form-section {
    display: none;
    padding: 2.5rem;
    animation: sectionSlideIn 0.5s var(--ease-out);
}

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

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

/* Stagger form fields on section entry */
.form-section.active .form-grid > * {
    animation: fieldReveal 0.45s var(--ease-out) both;
}

.form-section.active .form-grid > *:nth-child(1) { animation-delay: 0.02s; }
.form-section.active .form-grid > *:nth-child(2) { animation-delay: 0.05s; }
.form-section.active .form-grid > *:nth-child(3) { animation-delay: 0.08s; }
.form-section.active .form-grid > *:nth-child(4) { animation-delay: 0.11s; }
.form-section.active .form-grid > *:nth-child(5) { animation-delay: 0.14s; }
.form-section.active .form-grid > *:nth-child(6) { animation-delay: 0.17s; }
.form-section.active .form-grid > *:nth-child(7) { animation-delay: 0.20s; }
.form-section.active .form-grid > *:nth-child(8) { animation-delay: 0.23s; }
.form-section.active .form-grid > *:nth-child(9) { animation-delay: 0.26s; }
.form-section.active .form-grid > *:nth-child(10) { animation-delay: 0.29s; }
.form-section.active .form-grid > *:nth-child(11) { animation-delay: 0.32s; }
.form-section.active .form-grid > *:nth-child(12) { animation-delay: 0.35s; }
.form-section.active .form-grid > *:nth-child(13) { animation-delay: 0.38s; }
.form-section.active .form-grid > *:nth-child(14) { animation-delay: 0.41s; }

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

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--gray-100);
}

.section-header h2 {
    font-family: 'Titillium Web', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

.section-header h2 .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--red-subtle) 0%, rgba(220, 38, 56, 0.08) 100%);
    border-radius: var(--radius);
    color: var(--red);
    flex-shrink: 0;
}

.section-header h2 .icon svg {
    width: 20px;
    height: 20px;
}


/* ==========================================================================
   Form Grid
   ========================================================================== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
}

.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-12 { grid-column: span 12; }

@media (max-width: 768px) {
    .col-3, .col-4, .col-5, .col-6, .col-7, .col-8 {
        grid-column: span 12;
    }
}


/* ==========================================================================
   Form Groups & Labels
   ========================================================================== */

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: color var(--duration) var(--ease);
}

/* Highlight label when input is focused */
.form-group:focus-within label {
    color: var(--red);
}

.form-group label .required {
    color: var(--red);
    font-weight: 700;
}


/* ==========================================================================
   Input Wrapper & Icons
   ========================================================================== */

.input-wrapper {
    position: relative;
}

.input-wrapper .icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
    transition: color var(--duration) var(--ease);
    z-index: 1;
}

.input-wrapper .icon svg {
    width: 18px;
    height: 18px;
}

.input-wrapper:focus-within .icon {
    color: var(--red);
}


/* ==========================================================================
   Inputs & Selects
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--gray-800);
    background: var(--white);
    transition:
        border-color var(--duration) var(--ease),
        box-shadow var(--duration) var(--ease),
        background-color var(--duration) var(--ease);
    outline: none;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="date"]:hover,
input[type="tel"]:hover,
select:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px var(--red-glow);
    background: var(--white);
}

.input-wrapper.has-icon input,
.input-wrapper.has-icon select {
    padding-left: 2.75rem;
}

input::placeholder {
    color: var(--gray-400);
}

input:disabled,
select:disabled {
    background: var(--gray-100);
    border-color: var(--gray-200);
    cursor: not-allowed;
    color: var(--gray-500);
    opacity: 0.8;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}


/* ==========================================================================
   Checkbox Styles
   ========================================================================== */

.checkbox-group {
    margin-top: 1.75rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.125rem 1.25rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    border: 2px solid transparent;
}

.checkbox-wrapper:hover {
    background: var(--red-subtle);
    border-color: rgba(220, 38, 56, 0.06);
}

.checkbox-wrapper.checked {
    background: var(--red-subtle);
    border-color: var(--red);
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-spring);
    background: var(--white);
    margin-top: 1px;
}

.checkbox-wrapper.checked .checkbox-custom {
    background: var(--red);
    border-color: var(--red);
    transform: scale(1.05);
}

.checkbox-custom svg {
    width: 14px;
    height: 14px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s var(--ease-spring);
    color: var(--white);
    stroke: var(--white);
}

.checkbox-wrapper.checked .checkbox-custom svg {
    opacity: 1;
    transform: scale(1);
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.checkbox-label a {
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--duration) var(--ease);
}

.checkbox-label a:hover {
    color: var(--red-dark);
    text-decoration: underline;
}

.checkbox-label .required {
    color: var(--red);
}


/* ==========================================================================
   Info Note
   ========================================================================== */

.info-note {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.125rem 1.25rem;
    background: linear-gradient(135deg, var(--red-subtle) 0%, rgba(220, 38, 56, 0.03) 100%);
    border-radius: var(--radius);
    border-left: 4px solid var(--red);
    margin-top: 1.5rem;
}

.info-note .icon {
    color: var(--red);
    flex-shrink: 0;
    margin-top: 2px;
}

.info-note .icon svg {
    width: 18px;
    height: 18px;
}

.info-note p {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.7;
}


/* ==========================================================================
   Form Navigation
   ========================================================================== */

.form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.form-nav > div {
    display: flex;
    gap: 0.75rem;
}


/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    border: none;
    outline: none;
    letter-spacing: 0.01em;
    position: relative;
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* Primary — gradient with layered shadow */
.btn-primary {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: var(--white);
    box-shadow: var(--shadow-red);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-red-lg);
    filter: brightness(1.06);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 38, 56, 0.2);
}

/* Secondary */
.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Danger / Cancel */
.btn-danger {
    background: transparent;
    color: var(--gray-500);
    border: 2px solid var(--gray-200);
}

.btn-danger:hover {
    color: var(--red);
    border-color: rgba(220, 38, 56, 0.25);
    background: var(--red-subtle);
}

/* Disabled */
.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}


/* ==========================================================================
   Password Strength Meter
   ========================================================================== */

.password-strength {
    margin-top: 0.625rem;
}

.strength-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.375rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: all 0.4s var(--ease);
}

.strength-fill.weak   { width: 25%;  background: #EF4444; }
.strength-fill.fair    { width: 50%;  background: #F59E0B; }
.strength-fill.good    { width: 75%;  background: #10B981; }
.strength-fill.strong  { width: 100%; background: #059669; }

.strength-text {
    font-size: 0.75rem;
    color: var(--gray-500);
}


/* ==========================================================================
   Validation States
   ========================================================================== */

.form-group.error input,
.form-group.error select {
    border-color: #EF4444;
    animation: inputShake 0.4s var(--ease);
}

.form-group.error input:focus,
.form-group.error select:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    20%  { transform: translateX(-4px); }
    40%  { transform: translateX(4px); }
    60%  { transform: translateX(-3px); }
    80%  { transform: translateX(2px); }
}

.error-message {
    color: #EF4444;
    font-size: 0.78rem;
    margin-top: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: errorAppear 0.3s var(--ease-out);
}

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

.form-group.success input,
.form-group.success select {
    border-color: #10B981;
}


/* ==========================================================================
   Loading State
   ========================================================================== */

.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2.5px solid transparent;
    border-top-color: var(--white);
    border-right-color: var(--white);
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
}

.btn-primary.loading::after {
    border-top-color: var(--white);
    border-right-color: var(--white);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ==========================================================================
   Policy Summary Card
   ========================================================================== */

.policy-summary {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 55%, var(--red-deeper) 100%);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    color: var(--white);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-red);
}

/* Texture overlay on the card */
.policy-summary::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 20px,
            rgba(255, 255, 255, 0.025) 20px,
            rgba(255, 255, 255, 0.025) 21px
        );
    pointer-events: none;
}

.policy-summary h3 {
    font-family: 'Titillium Web', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    position: relative;
}

.policy-summary h3 svg {
    width: 20px;
    height: 20px;
}

.policy-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

.policy-detail:last-child {
    border-bottom: none;
}

.policy-detail .label {
    opacity: 0.85;
    font-size: 0.9rem;
}

.policy-detail .value {
    font-weight: 600;
    font-size: 0.95rem;
}

.policy-total {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 2px solid rgba(255, 255, 255, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.policy-total .label {
    font-size: 1rem;
    font-weight: 500;
}

.policy-total .value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}


/* ==========================================================================
   Field Hint / Tooltip
   ========================================================================== */

.field-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.375rem;
    cursor: pointer;
    position: relative;
}

.field-hint svg {
    width: 13px;
    height: 13px;
    color: var(--gray-400);
    vertical-align: middle;
}

.field-hint:hover svg {
    color: var(--red);
}

.field-hint-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: var(--white);
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.4;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    z-index: 200;
    pointer-events: none;
}

.field-hint-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--gray-800);
}

.field-hint:hover .field-hint-popup {
    display: block;
}


/* ==========================================================================
   Tipo Documento Row
   ========================================================================== */

.tipo-doc-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0;
    align-items: end;
}

.tipo-doc-row select {
    border-radius: var(--radius) 0 0 var(--radius);
    border-right: none;
    width: auto;
    min-width: 80px;
    background-color: var(--gray-50);
    font-weight: 600;
    font-size: 0.88rem;
}

.tipo-doc-row select:focus {
    z-index: 1;
    border-right: 2px solid var(--red);
}

.tipo-doc-row input {
    border-radius: 0 var(--radius) var(--radius) 0;
}


/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    text-align: center;
    padding: 2.5rem 2rem;
    color: var(--gray-400);
    font-size: 0.85rem;
}

.footer p + p {
    margin-top: 0.375rem;
}

.footer a {
    color: var(--gray-500);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--duration) var(--ease);
}

.footer a:hover {
    color: var(--red);
    text-decoration: underline;
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
    .header {
        padding: 0.75rem 1rem;
    }

    .header-contact {
        display: none;
    }

    .hero {
        padding: 2.5rem 1.5rem 4rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .main-container {
        padding: 0 0.75rem;
    }

    .form-card {
        border-radius: var(--radius-lg);
    }

    .form-section {
        padding: 1.75rem 1.25rem 1.5rem;
    }

    .progress-step {
        padding: 1rem 0.5rem 0.875rem;
    }

    .progress-step:not(:last-child)::before {
        display: none;
    }

    .step-label {
        font-size: 0.68rem;
    }

    .form-nav {
        flex-direction: column-reverse;
        gap: 0.75rem;
        padding: 1.25rem;
    }

    .form-nav > div {
        width: 100%;
        flex-direction: column;
    }

    .form-nav .btn {
        width: 100%;
        justify-content: center;
    }

    .form-grid {
        gap: 1rem;
    }

    .section-header h2 {
        font-size: 1.2rem;
    }

    .policy-summary {
        padding: 1.25rem;
    }

    .policy-total .value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .form-section {
        padding: 1.5rem 1rem;
    }

    .section-header h2 .icon {
        display: none;
    }
}


/* ==========================================================================
   Payment Mock Modal
   ========================================================================== */

.payment-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 25, 23, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: payment-fade-in 0.2s var(--ease-out);
}

@keyframes payment-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.payment-modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    animation: payment-modal-in 0.3s var(--ease-spring);
}

@keyframes payment-modal-in {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.payment-modal-header {
    padding: 1.1rem 1.5rem;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.payment-modal-header-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.92;
}

.payment-modal-header-attempts {
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    letter-spacing: 0.5px;
}

.payment-modal-body {
    padding: 1.75rem 1.5rem 1.5rem;
}

.payment-modal-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.payment-modal-title.danger  { color: var(--red); }
.payment-modal-title.success { color: #15803d; }

.payment-modal-text {
    font-size: 0.92rem;
    color: var(--gray-600);
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

.payment-modal-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
}

.payment-modal-amount-label {
    font-size: 0.78rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.payment-modal-amount-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--red);
}

.payment-modal-amount-value.neutral {
    color: var(--gray-900);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
}

.payment-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.payment-modal-actions .btn {
    width: 100%;
    justify-content: center;
}

.payment-modal-center {
    text-align: center;
}

.payment-spinner {
    width: 44px;
    height: 44px;
    border: 3.5px solid var(--gray-200);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin: 0.5rem auto 1rem;
}

.payment-spinner.success { border-top-color: #22c55e; }

.btn-link {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.btn-link:hover {
    color: var(--red);
}

.payment-hint {
    font-size: 0.82rem;
    color: var(--gray-500);
    letter-spacing: 0.2px;
}

.payment-state-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
}

.payment-state-icon.error {
    background: rgba(235, 0, 40, 0.1);
    color: var(--red);
}

.payment-state-icon svg {
    width: 28px;
    height: 28px;
}

.payment-state-icon.pending {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.payment-state-icon.success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}
