/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #1e6bff;
    color: #fff;
}

/* ============================================
   FOCUS
   ============================================ */
*:focus:not(input):not(select):not(textarea):not(button) {
    outline: none;
    box-shadow: none;
}

input:focus,
select:focus,
button:focus {
    outline: none;
    box-shadow: none;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    padding-left: 20px;
    padding-right: 20px;
}

/* ============================================
   COLUMNA FORMULARIO
   ============================================ */
.form-col {
    width: 55%;
    padding: 50px 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    z-index: 2;
    overflow: visible;
}

.title {
    color: #f5c500;
    font-weight: 800;
    margin-bottom: 20px;
}

/* ============================================
   FORM GRID (2 columnas)
   ============================================ */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
    width: 100%;
    align-items: start;
}

.form-full {
    grid-column: 1 / -1;
}

/* ============================================
   INPUT WRAP — floating label
   ============================================ */
.input-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 14px;
}

.input-wrap label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 13px;
    font-weight: 400;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.18s ease;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 28px);
    z-index: 1;
}

.input-wrap .input {
    padding-top: 22px;
    padding-bottom: 8px;
    margin-bottom: 0;
}

/* Floating: focus o con valor */
.input-wrap .input:not([type="date"]):focus + label,
.input-wrap .input:not([type="date"]):not(:placeholder-shown) + label {
    top: 10px;
    transform: translateY(0);
    font-size: 10px;
    color: #1e6bff;
    font-weight: 600;
}

/* Date: label siempre flotada porque el browser siempre muestra formato */
.input-wrap .input[type="date"] + label {
    top: 10px;
    transform: translateY(0);
    font-size: 10px;
    color: #888;
    font-weight: 400;
}

.input-wrap .input[type="date"]:focus + label {
    color: #1e6bff;
    font-weight: 600;
}

/* ============================================
   SELECT WRAP
   ============================================ */
.select-wrap {
    width: 100%;
    margin-bottom: 14px;
}

.select-wrap .select2-container {
    margin-bottom: 0 !important;
}

/* ============================================
   INPUTS GENERALES
   ============================================ */
.input,
select.input {
    width: 100%;
    max-width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1.5px solid #ddd;
    margin-bottom: 14px;
    background: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #000;
    outline: none;
}

.input::placeholder {
    color: transparent;
}

.input:focus {
    border-color: #1e6bff;
}

/* SELECT NATIVO */
select.input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
    background-color: #fff;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23888' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
}

select.input::-ms-expand {
    display: none;
}

/* ============================================
   PHONE WRAP — contiene .row y su error-msg
   ============================================ */
.phone-wrap {
    width: 100%;
    margin-bottom: 14px;
}

.phone-wrap .row {
    margin-bottom: 0;
}

/* ============================================
   ROW (teléfono)
   ============================================ */
.row {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    align-items: center;
    margin-bottom: 14px;
}

#phone_number {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    max-width: 100% !important;
    margin-bottom: 0 !important;
}

/* ============================================
   INTL-TEL-INPUT
   ============================================ */
.iti {
    position: relative;
    z-index: 5;
    margin-bottom: 0;
    display: block;
    width: 100%;
}

.iti input {
    width: 100%;
    padding-left: 60px;
    border-radius: 12px;
    background: #fff;
    border: 1.5px solid #ddd;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #000;
}

.iti input::placeholder {
    color: #888;
    font-weight: 400;
}

.iti__flag-container {
    left: 10px;
}

.iti__country-list {
    background: #fff;
    color: #000;
    border-radius: 10px;
    z-index: 9999;
    max-height: 200px;
    overflow-y: auto;
}

.iti__country {
    color: #000;
    padding: 10px;
}

.iti__country-name {
    display: none;
}

.iti__selected-dial-code {
    color: #000;
    font-weight: 600;
}

.iti__country:hover {
    background: #f1f1f1;
}

.iti.phone-iti {
    width: 90px !important;
    max-width: 90px !important;
    min-width: 90px !important;
    flex-shrink: 0;
    margin-bottom: 0;
}

.phone-iti input {
    width: 90px;
    padding-left: 55px;
}

.phone-iti .iti__flag-container {
    left: 8px;
}

/* ============================================
   SELECT2
   ============================================ */
.select2-container {
    width: 100% !important;
    display: block !important;
    margin-bottom: 14px;
    position: relative;
}

.select2-container--default .select2-selection--single {
    background: #fff !important;
    border: 1.5px solid #ddd !important;
    border-radius: 12px !important;
    height: auto !important;
    min-height: unset !important;
    padding: 14px !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection__rendered {
    color: #888 !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

.select2-container.has-value .select2-selection__rendered {
    color: #000 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow,
.select2-container--default .select2-selection__arrow {
    height: 100%;
    right: 10px;
}

.select2-dropdown {
    border-radius: 10px !important;
    z-index: 99999 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18) !important;
}

.select2-results__options {
    max-height: 180px !important;
    overflow-y: auto !important;
}

.select2-results {
    overflow: hidden !important;
}

.select2-results__option {
    padding: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #000 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

.select2-results__option--highlighted {
    background: #f1f1f1 !important;
    color: #000 !important;
}

/* ============================================
   BOTONES INCREMENTALES S/
   ============================================ */
.btn-row-cell {
    margin-bottom: 14px;
}

.btn-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.inc {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1.5px solid #fff;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}

.inc:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   NOTA APORTE + SWITCH (celda derecha inferior)
   ============================================ */
.right-bottom {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 14px;
}

.aporte-note {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    margin-bottom: 6px;
}

/* ============================================
   SWITCH
   ============================================ */
.switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 4px 0;
}

.switch input {
    display: none;
}

.slider {
    width: 34px;
    height: 18px;
    background: #ccc;
    border-radius: 20px;
    position: relative;
    transition: background 0.25s;
    flex-shrink: 0;
}

.slider::before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.25s;
}

.switch input:checked + .slider {
    background: #f5c500;
}

.switch input:checked + .slider::before {
    transform: translateX(16px);
}

.switch-text {
    font-size: 12px;
    color: #fff;
    user-select: none;
}

/* ============================================
   CHECKBOX
   ============================================ */
.checkbox {
    margin: 12px 0 6px;
    font-size: 12px;
    color: #fff;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 420px;
}

.checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #f5c500;
}

.checkbox span {
    color: #fff;
    line-height: 1.5;
}

.checkbox a {
    color: #f5c500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ============================================
   BOTÓN SUBMIT
   ============================================ */
.btn-submit {
    display: block;
    margin-top: 10px;
    padding: 15px 40px;
    width: 100%;
    max-width: 420px;
    background: #0f2d82;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #0a1f58;
}

/* ============================================
   COLUMNA IMAGEN
   ============================================ */
.img-col {
    width: 45%;
    position: relative;
    z-index: 2;
    outline: none;
    box-shadow: none;
}

.mancha {
    position: absolute;
    left: 35%;
    bottom: -60px;
    width: 75%;
    z-index: 1;
    animation: fadeIn 1.2s ease;
    outline: none;
}

.nino {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 90vh;
    object-fit: contain;
    z-index: 2;
    animation: fadeUp 1s ease;
    outline: none;
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

/* ============================================
   RESPONSIVE — iPad Pro 12.9" (1025–1366px)
   ============================================ */
@media (max-width: 1366px) and (min-width: 1025px) {
    .form-col { padding: 40px 45px; }
    .nino     { height: 85vh; }
}

/* ============================================
   RESPONSIVE — iPad Air / Pro 11" (769–1024px)
   ============================================ */
@media (max-width: 1024px) and (min-width: 769px) {
    .form-col  { width: 60%; padding: 35px 40px; }
    .img-col   { width: 40%; }
    .nino      { height: 80vh; right: 0; }
    .form-grid { gap: 0 14px; }
    .select2-results__options { max-height: 160px !important; }
}

/* ============================================
   RESPONSIVE — Tablets (481–768px)
   ============================================ */
@media (max-width: 768px) and (min-width: 481px) {
    .container  { flex-direction: column; }
    .form-col   { width: 100%; padding: 35px 30px; }
    .img-col    { width: 100%; height: 380px; overflow: hidden; }
    .mancha     { left: -10%; width: 120%; bottom: -20px; }
    .nino       {
        right: auto;
        left: 50%;
        transform: translateX(-40%);
        height: 100%;
        width: auto;
    }

    .form-grid  { grid-template-columns: 1fr; }
    .btn-submit { max-width: 100%; }
    .checkbox   { max-width: 100%; }
    .select2-results__options { max-height: 150px !important; }
}

/* ============================================
   RESPONSIVE — Celulares (hasta 480px)
   ============================================ */
@media (max-width: 480px) {
    .container  { flex-direction: column; }
    .form-col   { width: 100%; padding: 25px 20px; }
    .img-col    { width: 100%; height: 320px; overflow: hidden; }
    .mancha     { left: -10%; width: 120%; bottom: -20px; }
    .nino       {
        right: auto;
        left: 50%;
        transform: translateX(-40%);
        height: 100%;
        width: auto;
    }

    .form-grid  { grid-template-columns: 1fr; }
    .select2-results__options { max-height: 120px !important; }
    .btn-submit { max-width: 100%; padding: 14px 20px; }
    .inc        { font-size: 11px; padding: 5px 8px; }
    .checkbox   { max-width: 100%; }
}

/* ============================================
   VALIDACIONES
   ============================================ */
.input-error {
    border: 2px solid #e03030 !important;
    background: #fff0f0 !important;
}

/* Error siempre en rojo, dentro de wrappers — NO crea item de grid */
.error-msg {
    display: block;
    color: #e03030;
    font-size: 10px;
    font-weight: 600;
    margin-top: 3px;
    margin-bottom: 0;
    padding-left: 4px;
    line-height: 1.3;
}

/* Error fuera de wrap (checkbox) */
.checkbox ~ .error-msg {
    margin-top: 4px;
    margin-bottom: 4px;
    color: #e03030;
}

.select2-error-box {
    border: 2px solid #e03030 !important;
    background: #fff0f0 !important;
}


/* ============================================
   RESPONSIVE — Tablets (481–768px)
   ============================================ */
@media (max-width: 768px) and (min-width: 481px) {
    .container  { flex-direction: column; }
    .form-col   { width: 100%; padding: 35px 30px; }
    .img-col    { display: none; }  /* ← oculta niño */
    .mancha     { display: none; }  /* ← oculta mancha */
    .form-grid  { grid-template-columns: 1fr; }
    .btn-submit { max-width: 100%; }
    .checkbox   { max-width: 100%; }
    .select2-results__options { max-height: 150px !important; }
}

/* ============================================
   RESPONSIVE — Celulares (hasta 480px)
   ============================================ */
@media (max-width: 480px) {
    .container  { flex-direction: column; }
    .form-col   { width: 100%; padding: 25px 20px; }
    .img-col    { display: none; }  /* ← oculta niño */
    .mancha     { display: none; }  /* ← oculta mancha */
    .form-grid  { grid-template-columns: 1fr; }
    .select2-results__options { max-height: 120px !important; }
    .btn-submit { max-width: 100%; padding: 14px 20px; }
    .inc        { font-size: 11px; padding: 5px 8px; }
    .checkbox   { max-width: 100%; }
}