@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #4a5f4a 0%, #2d3e2d 50%, #3d4f3d 100%);
    min-height: 100vh;
    padding: 20px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

.container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    margin-left: -40px;
    margin-right: -40px;
    margin-top: -40px;
    width: calc(100% + 80px);
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.logo {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    display: block;
}

/* Datos Bancarios */
.datos-bancarios {
    background: linear-gradient(135deg, #4a5f4a 0%, #2d3e2d 100%);
    padding: 25px;
    margin: 0 -40px 30px -40px;
    text-align: center;
}

.datos-bancarios h3 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
}

.info-bancaria {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.info-bancaria p {
    color: #ffffff;
    font-size: 17px;
    margin: 8px 0;
    line-height: 1.6;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 100%;
}

.info-bancaria strong {
    color: #e8f5e9;
    font-weight: 600;
    font-size: 17px;
    margin-right: 5px;
}

.info-bancaria p:last-child {
    margin-top: 8px;
    font-weight: 600;
    font-size: 16px;
    color: #c8e6c9;
    letter-spacing: 0.5px;
}

h1 {
    color: #4a5f7f;
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: #6b7c93;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    color: #4a5f7f;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="text"],
input[type="number"],
input[type="tel"],
input[type="file"],
select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #d4dce6;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f5f7fa;
    color: #2d3748;
    font-family: 'Poppins', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5f7f' 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 12px center;
    background-size: 20px;
    padding-right: 40px;
}

select:focus {
    outline: none;
    border-color: #8b9dc3;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(139, 157, 195, 0.15);
}

select:invalid {
    color: #a0aec0;
}

select:valid {
    color: #2d3748;
}

select option {
    color: #2d3748;
}

select option:first-child {
    color: #a0aec0;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
select:focus {
    outline: none;
    border-color: #8b9dc3;
    background: white;
    box-shadow: 0 0 0 3px rgba(139, 157, 195, 0.15);
}

input:invalid:not(:focus):not(:placeholder-shown):not([type="file"]) {
    border-color: #c26b6b;
}

input:valid:not(:focus):not(:placeholder-shown):not([type="file"]) {
    border-color: #689f86;
}

input.invalid,
select.invalid {
    border-color: #c26b6b !important;
    background: rgba(194, 107, 107, 0.05);
}

input[type="file"].invalid {
    border-color: #c26b6b;
    background: rgba(194, 107, 107, 0.05);
}

input::placeholder {
    color: #a0aec0;
}

.radio-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px 18px;
    background: #f5f7fa;
    border-radius: 10px;
    border: 2px solid #d4dce6;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 160px;
}

.radio-option:hover {
    background: #e8ecf1;
    border-color: #b8c5d6;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #7a92b8;
}

.radio-option span {
    color: #4a5f7f;
    font-size: 15px;
    font-weight: 500;
}

.form-section {
    background: rgba(139, 157, 195, 0.08);
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    border: 1px solid rgba(139, 157, 195, 0.15);
}

.form-section h2 {
    color: #5a7199;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

small {
    display: block;
    color: #a0aec0;
    font-size: 12px;
    margin-top: 6px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.4;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4a5f4a 0%, #2d3e2d 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(45, 62, 45, 0.4);
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 62, 45, 0.6);
    background: linear-gradient(135deg, #3d4f3d 0%, #1f2b1f 100%);
}

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

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loader {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 10px;
}

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

.mensaje {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    display: none;
    font-family: 'Poppins', sans-serif;
}

.mensaje.exito {
    background: rgba(104, 159, 134, 0.12);
    color: #2d7a5a;
    border: 2px solid #689f86;
    display: block;
}

.mensaje.error {
    background: rgba(194, 107, 107, 0.12);
    color: #a84444;
    border: 2px solid #c26b6b;
    display: block;
}

.mensaje.info {
    background: rgba(107, 153, 185, 0.12);
    color: #2c5282;
    border: 2px solid #6b99b9;
    display: block;
}

/* ========================================
   RESPONSIVE MÓVIL OPTIMIZADO
   ======================================== */

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        padding: 35px;
    }
}

/* Tablets pequeñas y landscape phones (481px - 768px) */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 30px 25px;
        border-radius: 18px;
    }

    .logo-container {
        margin-left: -25px;
        margin-right: -25px;
        margin-top: -30px;
        width: calc(100% + 50px);
        border-radius: 18px 18px 0 0;
    }

    .logo {
        max-height: 220px;
    }

    .datos-bancarios {
        margin: 0 -25px 25px -25px;
        padding: 20px 20px;
    }

    .datos-bancarios h3 {
        font-size: 19px;
        margin-bottom: 16px;
    }

    .info-bancaria {
        gap: 10px;
    }

    .info-bancaria p {
        font-size: 15px;
        line-height: 1.7;
    }

    .info-bancaria strong {
        font-size: 15px;
    }

    .info-bancaria p:last-child {
        font-size: 14px;
        margin-top: 6px;
    }

    h1 {
        font-size: 25px;
    }

    .form-section {
        padding: 22px;
    }

    .radio-group {
        gap: 12px;
    }

    .radio-option {
        min-width: 140px;
    }
}

/* Móviles (max 480px) */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .container {
        padding: 25px 20px;
        border-radius: 16px;
    }

    .logo-container {
        margin-left: -20px;
        margin-right: -20px;
        margin-top: -25px;
        width: calc(100% + 40px);
        border-radius: 16px 16px 0 0;
    }

    .logo {
        max-height: 180px;
    }

    .datos-bancarios {
        margin: 0 -20px 22px -20px;
        padding: 18px 16px;
    }

    .datos-bancarios h3 {
        font-size: 17px;
        letter-spacing: 1px;
        margin-bottom: 14px;
    }

    .info-bancaria {
        gap: 8px;
    }

    .info-bancaria p {
        font-size: 14px;
        line-height: 1.6;
    }

    .info-bancaria strong {
        font-size: 14px;
        margin-right: 5px;
    }

    .info-bancaria p:last-child {
        font-size: 13px;
        margin-top: 6px;
        line-height: 1.5;
    }

    h1 {
        font-size: 23px;
        margin-bottom: 8px;
    }

    .form-group {
        margin-bottom: 22px;
    }

    label {
        font-size: 14px;
        margin-bottom: 7px;
    }

    input[type="text"],
    input[type="number"],
    input[type="tel"],
    input[type="file"],
    select {
        padding: 13px 14px;
        font-size: 16px;
        border-radius: 10px;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .radio-option {
        width: 100%;
        min-width: auto;
        padding: 13px 16px;
        justify-content: flex-start;
    }

    .radio-option input[type="radio"] {
        width: 22px;
        height: 22px;
    }

    .radio-option span {
        font-size: 15px;
    }

    .form-section {
        padding: 20px 18px;
        margin: 25px 0;
        border-radius: 12px;
    }

    .form-section h2 {
        font-size: 18px;
        margin-bottom: 18px;
    }

    small {
        font-size: 12px;
        margin-top: 5px;
    }

    .btn-submit {
        padding: 15px;
        font-size: 16px;
        border-radius: 10px;
    }

    .mensaje {
        padding: 14px;
        font-size: 14px;
    }
}

/* Móviles pequeños (max 375px) */
@media (max-width: 375px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 22px 18px;
    }

    .logo-container {
        margin-left: -18px;
        margin-right: -18px;
        margin-top: -22px;
        width: calc(100% + 36px);
    }

    .logo {
        max-height: 160px;
    }

    .datos-bancarios {
        margin: 0 -18px 20px -18px;
        padding: 16px 14px;
    }

    .datos-bancarios h3 {
        font-size: 16px;
        letter-spacing: 0.8px;
        margin-bottom: 12px;
    }

    .info-bancaria p {
        font-size: 13px;
    }

    .info-bancaria strong {
        font-size: 13px;
        margin-right: 5px;
    }

    .info-bancaria p:last-child {
        font-size: 12px;
    }

    h1 {
        font-size: 21px;
    }

    .form-section {
        padding: 18px 16px;
    }

    .form-section h2 {
        font-size: 17px;
    }
}

/* Móviles muy pequeños (max 320px) */
@media (max-width: 320px) {
    body {
        padding: 8px;
    }

    .container {
        padding: 20px 15px;
    }

    .logo-container {
        margin-left: -15px;
        margin-right: -15px;
        margin-top: -20px;
        width: calc(100% + 30px);
    }

    .logo {
        max-height: 140px;
    }

    .datos-bancarios {
        margin: 0 -15px 18px -15px;
        padding: 14px 12px;
    }

    .datos-bancarios h3 {
        font-size: 15px;
        letter-spacing: 0.5px;
    }

    .info-bancaria p {
        font-size: 12px;
    }

    .info-bancaria strong {
        font-size: 12px;
        margin-right: 5px;
    }

    .info-bancaria p:last-child {
        font-size: 11px;
    }

    h1 {
        font-size: 19px;
    }

    input[type="text"],
    input[type="number"],
    input[type="tel"],
    input[type="file"],
    select {
        padding: 12px;
        font-size: 15px;
    }

    .form-section {
        padding: 16px 14px;
    }

    .btn-submit {
        padding: 14px;
        font-size: 15px;
    }
}