/* ===== 1. FONDO GENERAL ===== */
body {
    background: 
        linear-gradient(rgba(223, 223, 223, 0.85), rgba(223, 223, 223, 0.85)),
        url("imagenes/fondoBG.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    margin: 0;
    font-family: 'Arial', sans-serif;

    display: flex;
    flex-direction: column; /* 👈 vertical */
    min-height: 100vh;
}
/* ===== 2. CONTENEDOR EN DOS COLUMNAS ===== */
.container {
    max-width: 950px;
    width: 95%;

    margin: 60px auto; /* centra + deja espacio */

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 20px;
    align-items: stretch;
}

/* ===== 3. HEADER Y LOGOTIPO (AJUSTADO) ===== */
.header {
    grid-column: span 2;
    text-align: center;
    margin-bottom: 25px; /* Más espacio bajo el header */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    width: 220px;
    height: auto;
    margin-bottom: 20px; /* 👈 más espacio */
}

.header h1 {
    color: #074a7b;
    font-size: 26px;
    font-weight: 700;
    margin: 0;
}

/* ===== 4. AMBAS SECCIONES BLANCAS ===== */
.section {
    background: 
        url("imagenes/fondosecction.webp"),  /*  tu patrón */
        rgba(255, 255, 255, 0.75);  /* base blanca suave */

    background-size: 300px, auto;   /* tamaño del patrón */
    background-repeat: repeat, no-repeat;
    background-position: center;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.section h2 {
    color: #074a7b;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;

    padding-left: 15px; /* espacio para la línea */
    position: relative;

    text-align: left; /* 👈 cambiamos esto */
}

.section h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: #b82627; /* amarillo */
    border-radius: 2px;
}

label {
    font-size: 13px;
    color: #64748B;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

/* ===== 5. INPUTS MODERNOS ===== */
input {
    width: 100%;
    border: 2px solid #cbcdcf;
    border-radius: 12px;
    background: #E2E8F0;
    padding: 14px;
    font-size: 15px;
    color: #0A2540;
    margin-bottom: 18px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

input:focus {
    outline: none;
    border-color: #2E6FF2;
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(46, 111, 242, 0.1);
}

/* ===== 6. RESULTADOS ===== */
p {
    background: #E2E8F0;
    border-radius: 12px;
    padding: 14px;
    font-size: 14px;
    color: #475569;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
}

span {
    font-weight: 700;
    color: #0A2540;
    font-size: 16px;
}

#spnDisponible, #spnCapacidadPago, #spnCuotaMensual {
    color: #074a7b;
}

/* ===== 7. BOTONES FINTECH ===== */
.buttons {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
}

button {
    flex: 1;
    padding: 16px;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

#btnCalcularCredito {
    background: #074a7b;
    color: white;
    box-shadow: 0 10px 20px rgba(46, 111, 242, 0.2);
}

#btnReiniciar {
    background: #F1F5F9;
    color: #64748B;
}

button:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* ===== 8. RESPONSIVE ===== */
@media (max-width: 850px) {
    .container {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
    .header {
        grid-column: span 1;
    }
    .logo {
        width: 140px; /* 👈 aquí sí cambia */
    }
}

/* Ajusta el contenedor del campo */
.section {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeSlideUp 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.section input {
  margin-bottom: 2px; /* Reduce espacio entre input y error */
}

/* Mensaje de error más compacto */
.error-msg {
  color: #d93025;
  font-style: italic;
  font-size: 11px;
  margin: 2px 0 8px 2px; /* ↓↓ clave aquí */
  display: block;
  line-height: 1.2;
}

/* Input error */
.input-error {
  border: 1px solid #d93025 !important;
  animation: shake 0.25s ease-in-out;
}

/* Animación */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}

/* Animación de entrada suave */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Primera columna */
.section:nth-child(2) {
    animation-delay: 0.2s;
}

/* Segunda columna */
.section:nth-child(3) {
    animation-delay: 0.4s;
}

.descripcion {
  font-size: 14px;
  color: #475569;
  margin-top: 10px;
  text-align: center;

  padding: 20px;
  border-radius: 20px;

  background: 
    url("imagenes/fondosecction.webp"),
    rgba(255, 255, 255, 0.75);

  background-size: 300px, auto;
  background-repeat: repeat, no-repeat;
  background-position: center;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.footer {
  width: 100%;
  padding: 15px 0;
  margin-top: 20px;

  background: #ffffff;
  border-top: 1px solid #e2e8f0;

  text-align: center;
  font-size: 13px;
  color: #64748B;
}
