/* ============================================
   PRÉSTAMOS HIPOTECARIOS - RE/MAX Metropolitana
   Estilos basados en la guía oficial
   ============================================ */

/* Variables de la guía de estilos RE/MAX */
:root {
    --remax-blue: #003DA5;
    --remax-blue-dark: #002764;
    --remax-red: #E11B22;
    --remax-red-dark: #DC1C2E;
    --remax-red-darker: #B91726;
    --text-dark: #0f172a;
    --text-gray: #475569;
    --text-gray-light: #64748b;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-gray: #F5F5F5;
    --border-color: #e5e7eb;
    --border-radius-md: 10px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ============================================
   HERO SECTION
   ============================================ */
.prestamos-hero {
    background: linear-gradient(135deg, var(--remax-blue) 0%, var(--remax-blue-dark) 100%);
    padding: 60px 20px;
    color: white;
}

.prestamos-hero__container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.prestamos-hero__title {
    font-family: 'Poppins', sans-serif;
    font-size: 36px;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .prestamos-hero__title {
        font-size: 48px;
    }
}

@media (max-width: 767px) {
    .prestamos-hero {
        padding: 40px 16px;
    }

    .prestamos-hero__title {
        font-size: 28px;
    }
}

/* ============================================
   CONTENT SECTION
   ============================================ */
.prestamos-content {
    padding: 60px 20px;
    background: white;
}

.prestamos-content__container {
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 767px) {
    .prestamos-content {
        padding: 40px 16px;
    }
}

/* ============================================
   FORM SECTION
   ============================================ */
.prestamos-form-section {
    background: white;
}

.prestamos-form-header {
    text-align: center;
    margin-bottom: 48px;
}

.prestamos-form-title {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
    margin: 0 0 16px;
}

@media (min-width: 768px) {
    .prestamos-form-title {
        font-size: 32px;
    }
}

@media (max-width: 767px) {
    .prestamos-form-title {
        font-size: 24px;
    }
}

.prestamos-form-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    color: var(--text-gray-light);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   BENEFITS SECTION
   ============================================ */
.prestamos-benefits {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    .prestamos-benefits {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

.prestamos-benefit {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px;
    background: var(--bg-light);
    border-radius: var(--border-radius-xl);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.prestamos-benefit:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    background: white;
    border-color: var(--remax-blue);
}

.prestamos-benefit__icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--remax-red-dark), var(--remax-red-darker));
    border-radius: var(--border-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.prestamos-benefit__content {
    flex: 1;
}

.prestamos-benefit__title {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px;
}

.prestamos-benefit__description {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--text-gray-light);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   FORM WRAPPER
   ============================================ */
.prestamos-form-wrapper {
    background: white;
    border-radius: var(--border-radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
}

@media (max-width: 767px) {
    .prestamos-form-wrapper {
        padding: 24px;
    }
}

/* ============================================
   HUBSPOT FORM STYLES OVERRIDE
   ============================================ */
.prestamos-form-wrapper .hbspt-form {
    margin: 0;
}

.prestamos-form-wrapper .hs-form-field {
    margin-bottom: 20px;
}

.prestamos-form-wrapper .hs-form-field label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.prestamos-form-wrapper .hs-form-field label .hs-form-required {
    color: var(--remax-red-dark);
}

.prestamos-form-wrapper .hs-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: var(--text-dark);
    transition: all 0.2s ease;
    background: white;
}

.prestamos-form-wrapper .hs-input:focus {
    outline: none;
    border-color: var(--remax-blue);
    box-shadow: 0 0 0 4px rgba(0, 61, 165, 0.1);
}

.prestamos-form-wrapper textarea.hs-input {
    resize: vertical;
    min-height: 100px;
}

.prestamos-form-wrapper select.hs-input {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2364748b" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.prestamos-form-wrapper .hs-button {
    background: var(--remax-red-dark);
    color: white;
    border: 0;
    border-radius: var(--border-radius-md);
    padding: 14px 32px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.prestamos-form-wrapper .hs-button:hover {
    background: var(--remax-red-darker);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(220, 28, 46, 0.25);
}

.prestamos-form-wrapper .hs-error-msgs {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}

.prestamos-form-wrapper .hs-error-msg {
    color: var(--remax-red-dark);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    margin-top: 4px;
}

/* ============================================
   BANKS SECTION
   ============================================ */
.prestamos-banks {
    padding: 80px 20px;
    background: var(--bg-light);
}

.prestamos-banks__container {
    max-width: 1200px;
    margin: 0 auto;
}

.prestamos-banks__title {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
    margin: 0 0 60px;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .prestamos-banks__title {
        font-size: 36px;
    }
}

@media (max-width: 767px) {
    .prestamos-banks {
        padding: 60px 16px;
    }

    .prestamos-banks__title {
        font-size: 26px;
        margin-bottom: 40px;
    }
}

.prestamos-banks__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

@media (min-width: 640px) {
    .prestamos-banks__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 36px;
    }
}

@media (min-width: 992px) {
    .prestamos-banks__grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 40px;
    }
}

.prestamos-bank {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.prestamos-bank__wrapper {
    width: 100%;
    height: 120px;
    background: white;
    border-radius: var(--border-radius-xl);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    margin-bottom: 16px;
}

.prestamos-bank__wrapper:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--remax-blue);
}

.prestamos-bank__wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.prestamos-bank__name {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.4;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767px) {
    .prestamos-bank__wrapper {
        height: 100px;
        padding: 16px;
    }
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delays escalonados para cada banco */
.prestamos-bank:nth-child(1) { animation-delay: 0.05s; }
.prestamos-bank:nth-child(2) { animation-delay: 0.1s; }
.prestamos-bank:nth-child(3) { animation-delay: 0.15s; }
.prestamos-bank:nth-child(4) { animation-delay: 0.2s; }
.prestamos-bank:nth-child(5) { animation-delay: 0.25s; }
.prestamos-bank:nth-child(6) { animation-delay: 0.3s; }
.prestamos-bank:nth-child(7) { animation-delay: 0.35s; }
.prestamos-bank:nth-child(8) { animation-delay: 0.4s; }
.prestamos-bank:nth-child(9) { animation-delay: 0.45s; }
.prestamos-bank:nth-child(10) { animation-delay: 0.5s; }
.prestamos-bank:nth-child(11) { animation-delay: 0.55s; }
.prestamos-bank:nth-child(12) { animation-delay: 0.6s; }
.prestamos-bank:nth-child(13) { animation-delay: 0.65s; }
.prestamos-bank:nth-child(14) { animation-delay: 0.7s; }
.prestamos-bank:nth-child(15) { animation-delay: 0.75s; }
