/* ============================================================
   css/index.css — Estilos específicos de la página de inicio
   Extraídos del <style> embebido en index.php (FIX 5)
   ============================================================ */

/* ── GLOBAL OVERRIDE ───────────────────────────────────────── */
body { font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif; }

/* ── NAVBAR ────────────────────────────────────────────────── */
.navbar {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
}
.nav-container { padding: 0.75rem 2rem; }
.nav-link { font-weight: 600; letter-spacing: 0.01em; }

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(140deg, #042f2e 0%, #15803d 45%, #16a34a 100%);
    padding: 130px 20px 100px;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.hero-title { font-size: 3.6rem; letter-spacing: -0.02em; }
.hero-subtitle { font-size: 1.15rem; opacity: 0.92; }

/* Floating cards */
.floating-card {
    border-radius: 16px;
    padding: 18px 22px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
}
.floating-card i { font-size: 1.6rem; margin-bottom: 6px; }
.floating-card h4 { font-size: 0.95rem; font-weight: 700; }
.floating-card p  { font-size: 0.82rem; }

/* ── SERVICES ──────────────────────────────────────────────── */
.services-section {
    padding: 90px 20px;
    background: #fff;
}
.section-title { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; }
.section-subtitle { color: #6c757d; font-size: 1.05rem; margin-top: 8px; }

.service-card {
    border-radius: 22px;
    padding: 36px 28px;
    border: 1.5px solid #f0f0f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.service-card:hover { border-color: #16a34a; }
.service-icon {
    border-radius: 18px;
    width: 72px;
    height: 72px;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
}

/* ── CREDITS ───────────────────────────────────────────────── */
.credits-detail-section {
    background: #f4faf4;
    padding: 90px 0;
}
.credits-detail-header { margin-bottom: 3.5rem; text-align: center; }
.credits-detail-header h2 {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.credits-detail-header p { color: #666; font-size: 1.05rem; }

.credits-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 2rem;
}

.credit-detail-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    border: 1.5px solid #dcfce7;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.credit-detail-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(6, 78, 59, 0.15);
    border-color: #16a34a;
}

.credit-card-header {
    background: #f0fdf4;
    padding: 1.5rem 1.5rem 0;
}
.credit-card-icon {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.credit-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(6, 78, 59, 0.15));
}

.credit-card-name {
    background: linear-gradient(135deg, #16a34a, #064e3b);
    color: white;
    text-align: center;
    padding: 0.8rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.credit-card-body { padding: 1.8rem; flex: 1; display: flex; flex-direction: column; }

.credit-card-body > p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Tabla de tasas para CootraYA */
.rates-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
}
.rates-table th {
    background: #f0fdf4;
    color: #16a34a;
    font-weight: 700;
    padding: 0.5rem 0.6rem;
    text-align: left;
    border-bottom: 2px solid #dcfce7;
}
.rates-table td {
    padding: 0.45rem 0.6rem;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}
.rates-table tr:last-child td { border-bottom: none; }

/* Pastillas de tasas */
.rate-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}
.rate-pill {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 50px;
    padding: 0.3rem 0.8rem;
    font-size: 0.78rem;
    color: #16a34a;
    font-weight: 600;
    white-space: nowrap;
}

.credit-features {
    list-style: none;
    margin-bottom: 1.5rem;
}
.credit-features li {
    padding: 0.45rem 0;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    border-bottom: 1px solid #f5f5f5;
}
.credit-features li:last-child { border-bottom: none; }
.credit-features i { color: #064e3b; font-size: 1rem; flex-shrink: 0; }

.credit-card-body .btn-credit-more { margin-top: auto; align-self: flex-start; }

.btn-credit-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    background: linear-gradient(135deg, #16a34a, #064e3b);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(6, 78, 59, 0.3);
}
.btn-credit-more:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(4, 47, 46, 0.45);
}

/* ── IDENTIDAD ORGANIZACIONAL ──────────────────────────────── */
.organizational-section { padding: 90px 0; }
.organizational-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}
.organizational-text h2 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin-bottom: 1rem;
}
.organizational-text p { color: #666; line-height: 1.8; margin-bottom: 2rem; }

.organizational-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.organizational-item {
    background: #f0fdf4;
    padding: 1.2rem 1.4rem;
    border-radius: 14px;
    border-left: 3px solid #16a34a;
    transition: all 0.25s ease;
}
.organizational-item:hover {
    background: #fff;
    box-shadow: 0 4px 18px rgba(6, 78, 59, 0.1);
    transform: translateX(4px);
}
.organizational-item h4 {
    color: #064e3b;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.organizational-item i { color: #e53935; font-size: 1rem; }
.organizational-item p { color: #888; font-size: 0.82rem; margin: 0; }

.btn-organizational-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    background: linear-gradient(135deg, #16a34a, #064e3b);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(6, 78, 59, 0.3);
    margin-top: 1.5rem;
}
.btn-organizational-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(4, 47, 46, 0.4);
}

.organizational-image-wrapper {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    position: relative;
}
.organizational-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 2px solid rgba(6, 78, 59, 0.2);
    z-index: 1;
    pointer-events: none;
}
.organizational-image img { width: 100%; height: auto; display: block; }

/* ── SOPORTE ───────────────────────────────────────────────── */
.support-section {
    background: linear-gradient(140deg, #042f2e 0%, #15803d 50%, #16a34a 100%);
    padding: 90px 0;
    position: relative;
    overflow: hidden;
}
.support-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.support-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}
.support-header .section-badge {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1.4rem;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,0.3);
}
.support-header h2 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: white;
    margin-bottom: 0.75rem;
}
.support-header p { color: rgba(255,255,255,0.92); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

.support-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}
.support-card {
    background: white;
    border-radius: 22px;
    padding: 2.2rem 2rem;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.support-card:hover { transform: translateY(-8px); box-shadow: 0 18px 40px rgba(0,0,0,0.18); }
.support-card-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #16a34a, #064e3b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 4px 16px rgba(6, 78, 59, 0.3);
}
.support-card h3 { color: #1a1a1a; font-size: 1.2rem; font-weight: 700; margin-bottom: 0.75rem; }
.support-card p { color: #666; line-height: 1.65; margin-bottom: 0.5rem; font-size: 0.93rem; }
.support-card a { color: #16a34a; text-decoration: none; font-weight: 600; }
.support-card a:hover { color: #15803d; }

.btn-support-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    background: white;
    color: #16a34a;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}
.btn-support-more:hover { background: #f0fdf4; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.2); }

/* ── BENEFITS ──────────────────────────────────────────────── */
.benefits { padding: 90px 20px; }
.benefits-image {
    height: auto !important;
    min-height: unset !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.benefits-image-container {
    max-width: 380px;
    width: 100%;
}
.benefits-main-image {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    border-radius: 24px;
    box-shadow: 0 16px 50px rgba(0,0,0,0.12);
    animation: floatImage 3s ease-in-out infinite;
}
.section-badge {
    display: inline-block;
    background: linear-gradient(135deg, #16a34a, #064e3b);
    color: white;
    padding: 0.45rem 1.3rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}
.benefit-item h4 { font-weight: 700; font-size: 1.1rem; }

/* ── AUXILIOS ──────────────────────────────────────────────── */
.auxilios-section {
    background: linear-gradient(140deg, #042f2e 0%, #15803d 50%, #16a34a 100%);
    padding: 90px 0;
    position: relative;
    overflow: hidden;
}
.auxilios-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.auxilios-header { text-align: center; margin-bottom: 3rem; color: white; position: relative; z-index: 1; }
.auxilios-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.6rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(255,255,255,0.3);
}
.auxilios-header h2 { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.auxilios-header p { font-size: 1.05rem; opacity: 0.92; max-width: 650px; margin: 0 auto; }

.auxilios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto 2.5rem;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.auxilio-card {
    background: white;
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.auxilio-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #16a34a, #064e3b);
}
.auxilio-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(22, 163, 74, 0.18); }

.auxilio-icon {
    min-width: 44px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #16a34a, #064e3b);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 3px 10px rgba(6, 78, 59, 0.25);
    flex-shrink: 0;
}
.auxilio-content h4 {
    color: #1a1a1a;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
}

.auxilio-card.destacado {
    background: linear-gradient(135deg, #ffffff, #f0fdf4);
    border: 1.5px solid rgba(22, 163, 74, 0.3);
}
.auxilio-card.destacado .auxilio-icon {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}
.auxilio-card.destacado .auxilio-content h4 { color: #16a34a; font-weight: 700; }

.auxilios-cta { text-align: center; position: relative; z-index: 1; }
.btn-auxilios {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1.1rem 2.4rem;
    background: white;
    color: #16a34a;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    transition: all 0.3s ease;
}
.btn-auxilios:hover { background: #f0fdf4; transform: translateY(-3px); box-shadow: 0 10px 32px rgba(0,0,0,0.22); }

/* ── CTA SECTION ───────────────────────────────────────────── */
.cta-section { padding: 80px 20px; }
.cta-content h2 { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; }

/* ── CONTACT ───────────────────────────────────────────────── */
.contact { padding: 90px 20px; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header .section-badge { margin-bottom: 0.75rem; }
.contact-card { border-radius: 20px; }
.contact-icon { border-radius: 50%; }

/* ── FOOTER ────────────────────────────────────────────────── */
.footer { padding: 60px 20px 24px; }
.footer-content { grid-template-columns: 2fr 1fr 1fr; }
.footer-bottom { font-size: 0.9rem; }

/* ✅ FIX 8: Efecto hover del corazón via CSS puro (sin JS inline) */
.heart-link {
    color: #ff4757;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
}
.heart-link:hover {
    transform: scale(1.3);
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .credits-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .organizational-content {
        gap: 3rem;
    }
}

@media (max-width: 968px) {
    .organizational-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 15px;
    }
    .organizational-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    .auxilios-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 15px;
    }
    .support-cards {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 15px;
    }
    .credits-detail-header h2,
    .support-header h2,
    .auxilios-header h2 {
        font-size: 1.7rem;
    }
    .simulator-header h2 {
        font-size: 1.7rem;
    }
    .testimonios-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Credits */
    .credits-cards {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    .credit-card-body {
        padding: 1.4rem;
    }

    /* Organizational */
    .organizational-grid {
        grid-template-columns: 1fr;
    }
    .organizational-item {
        padding: 1rem;
    }

    /* Auxilios */
    .auxilios-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    .auxilio-card {
        padding: 1rem;
    }
    .auxilio-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    .auxilio-content h4 {
        font-size: 0.8rem;
    }

    /* Support */
    .support-cards {
        grid-template-columns: 1fr;
    }
    .support-card {
        padding: 1.8rem;
    }

    /* Simulator */
    .sim-panel {
        padding: 1.5rem;
    }
    .sim-tabs {
        flex-wrap: wrap;
    }
    .sim-tab {
        flex: 0 0 calc(50% - 2px);
        font-size: 0.8rem;
    }

    /* Testimonios */
    .testimonios-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    /* Map */
    .map-container {
        height: 350px;
    }
    .map-overlay-card {
        padding: 1rem;
        bottom: 15px;
        left: 15px;
        right: 15px;
    }
}

@media (max-width: 600px) {
    /* Hero */
    .hero {
        padding: 100px 15px 60px;
    }
    .hero-title {
        font-size: 1.6rem;
    }
    .hero-subtitle {
        font-size: 0.9rem;
    }
    .floating-card {
        display: none;
    }

    /* Sections padding */
    .services-section,
    .credits-detail-section,
    .organizational-section,
    .support-section,
    .benefits,
    .auxilios-section,
    .testimonios-section,
    .cta-section,
    .contact,
    .map-section {
        padding: 50px 0;
    }

    /* Headers */
    .services-header h2,
    .section-title {
        font-size: 1.4rem;
    }
    .section-subtitle,
    .section-header p {
        font-size: 0.9rem;
    }

    /* Simulator */
    .sim-tab {
        flex: 0 0 100%;
        padding: 0.9rem;
    }
    .sim-panel {
        flex-direction: column;
        padding: 1.2rem;
    }
    .sim-result {
        width: 100%;
        padding: 1.5rem;
    }
    .sim-result-value {
        font-size: 1.8rem;
    }
    .sim-cootraya-table {
        font-size: 0.75rem;
    }
    .sim-cootraya-table th,
    .sim-cootraya-table td {
        padding: 0.4rem 0.5rem;
    }

    /* Buttons */
    .btn-cta,
    .btn-testimonios,
    .btn-auxilios,
    .btn-support-more,
    .btn-organizational-more {
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .footer-section {
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }

    /* Map */
    .map-header {
        padding: 0 15px;
    }
    .map-header h2 {
        font-size: 1.3rem;
    }
    .map-overlay-card {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    .map-overlay-icon {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    /* Hero */
    .hero-title {
        font-size: 1.4rem;
    }
    .hero-subtitle {
        font-size: 0.85rem;
    }

    /* Hero stats */
    .hero-stats {
        flex-wrap: wrap;
        gap: 10px;
        padding: 0.8rem;
    }
    .hero-stat {
        padding: 0 10px;
    }
    .stat-num {
        font-size: 1.3rem !important;
    }
    .stat-suffix {
        font-size: 1rem;
    }
    .stat-label {
        font-size: 0.65rem !important;
    }
    .hero-stat-divider {
        display: none;
    }

    /* Service cards */
    .service-card {
        padding: 25px 20px;
    }
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 2.2rem;
    }

    /* Benefits */
    .benefit-item {
        flex-direction: column;
        text-align: center;
    }
    .benefit-icon {
        margin: 0 auto;
    }

    /* Auxilios */
    .auxilios-header h2 {
        font-size: 1.4rem;
    }
    .auxilio-content h4 {
        font-size: 0.75rem;
    }

    /* Testimonios */
    .testimonio-card {
        padding: 1.5rem 1.2rem;
    }
    .testimonio-texto {
        font-size: 0.88rem;
    }
    .testimonio-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }

    /* Cookie banner */
    .cookie-banner {
        padding: 0.8rem;
    }
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .credits-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .organizational-content {
        gap: 3rem;
    }
}

/* ── SIMULADOR DE CRÉDITO ──────────────────────────────────── */
.simulator-section {
    background: #f4faf4;
    padding: 90px 20px;
}

.simulator-wrapper {
    max-width: 960px;
    margin: 0 auto;
}

.simulator-header {
    text-align: center;
    margin-bottom: 2.8rem;
}
.simulator-header h2 {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin-bottom: 0.4rem;
}
.simulator-header p {
    color: #666;
    font-size: 1.05rem;
}

.simulator-body {
    background: white;
    border-radius: 28px;
    box-shadow: 0 8px 40px rgba(6, 78, 59, 0.12);
    overflow: hidden;
    border: 1.5px solid #dcfce7;
}

/* Pestañas */
.sim-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    background: #fafafa;
}
.sim-tab {
    flex: 1;
    padding: 1.1rem 0.5rem;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.sim-tab:hover { color: #16a34a; background: #f0fdf4; }
.sim-tab.active {
    color: #16a34a;
    border-bottom-color: #16a34a;
    background: white;
}
.sim-tab i { font-size: 1rem; }

/* Panel de cálculo */
.sim-panel {
    display: flex;
    gap: 2.5rem;
    padding: 2.5rem;
    align-items: flex-start;
}
@media (max-width: 768px) {
    .sim-panel { flex-direction: column; gap: 1.5rem; }
    .sim-result { width: 100%; }
    .sim-tabs { flex-wrap: wrap; }
    .sim-tab { font-size: 0.82rem; padding: 0.9rem 0.4rem; }
}

.sim-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.sim-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.sim-field label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #444;
    letter-spacing: 0.01em;
}

.sim-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.sim-input-wrap:focus-within { border-color: #16a34a; }

.sim-prefix {
    padding: 0 0.9rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #16a34a;
    background: #f0fdf4;
    border-right: 1.5px solid #e0e0e0;
    line-height: 2.8rem;
    height: 2.8rem;
    display: flex;
    align-items: center;
}

.sim-input-wrap input {
    border: none;
    outline: none;
    padding: 0 1rem;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
    width: 100%;
    background: white;
    height: 2.8rem;
}

.sim-range-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.sim-range-label {
    font-size: 0.74rem;
    color: #aaa;
    white-space: nowrap;
}
input[type="range"]#sim-range {
    flex: 1;
    accent-color: #16a34a;
    height: 4px;
    cursor: pointer;
}

.sim-field select {
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.72rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    background: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    appearance: auto;
}
.sim-field select:focus { border-color: #16a34a; }

/* Resultado */
.sim-result {
    width: 300px;
    flex-shrink: 0;
    background: linear-gradient(140deg, #042f2e 0%, #15803d 50%, #16a34a 100%);
    border-radius: 22px;
    padding: 2rem 1.8rem;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.sim-result-main {
    text-align: center;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.25);
}
.sim-result-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.85;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}
.sim-result-value {
    display: block;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.sim-result-details {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.sim-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.87rem;
}
.sim-detail-label { opacity: 0.82; }
.sim-detail-val   { font-weight: 700; }
.sim-detail-val.highlight-red { color: #ffe0b2; }

.sim-disclaimer {
    font-size: 0.72rem;
    opacity: 0.7;
    line-height: 1.5;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 0.8rem;
    margin-top: auto;
}

.btn-sim-solicitar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    background: white;
    color: #16a34a;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.92rem;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.btn-sim-solicitar:hover {
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.2);
}

/* Panel CootraYA */
#panel-cootraya {
    flex-direction: column;
}
.cootraya-info { width: 100%; }
.cootraya-desc {
    font-size: 1rem;
    color: #444;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.cootraya-desc i { color: #d97706; margin-right: 0.3rem; }

.cootraya-table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }
.sim-cootraya-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 420px;
}
.sim-cootraya-table th {
    background: #f0fdf4;
    color: #064e3b;
    font-weight: 700;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid #bbf7d0;
}
.sim-cootraya-table td {
    padding: 0.7rem 1rem;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
}
.sim-cootraya-table tr:last-child td { border-bottom: none; }
.sim-cootraya-table tr.tr-best { background: #f0fff0; }
.td-tasa   { font-weight: 700; color: #064e3b; }
.td-tasa.best { color: #d97706; }
.td-cuota  { font-weight: 700; color: #1a1a1a; }

.cootraya-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.6rem;
}
.cootraya-badges span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 50px;
    padding: 0.35rem 1rem;
    font-size: 0.82rem;
    color: #064e3b;
    font-weight: 600;
}
.cootraya-badges i { font-size: 0.85rem; }

/* ── BOTÓN FLOTANTE WHATSAPP ──────────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #16a34a;
    border-radius: 50%;
    box-shadow: 0 6px 24px rgba(6, 78, 59, 0.45);
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: waBounce 2s ease-in-out 1.5s 3;
}
.whatsapp-float:hover {
    transform: scale(1.12);
    box-shadow: 0 10px 32px rgba(6, 78, 59, 0.6);
}
.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; transform: translateX(0); }

@keyframes waBounce {
    0%,100% { transform: translateY(0); }
    40%      { transform: translateY(-10px); }
    60%      { transform: translateY(-6px); }
}

.whatsapp-icon {
    font-size: 2rem;
    color: white;
    line-height: 1;
}

.whatsapp-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e53935;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: waBadgePulse 1.8s ease-in-out infinite;
}
@keyframes waBadgePulse {
    0%,100% { transform: scale(1);    }
    50%      { transform: scale(1.25); }
}

.whatsapp-tooltip {
    position: absolute;
    right: 74px;
    background: #1a1a1a;
    color: white;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(8px);
    transition: all 0.25s ease;
    pointer-events: none;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
}
.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #1a1a1a;
}

@media (max-width: 600px) {
    .whatsapp-float { bottom: 18px; right: 18px; width: 54px; height: 54px; }
    .whatsapp-icon  { font-size: 1.7rem; }
    .simulator-section { padding: 60px 16px; }
    .sim-panel { padding: 1.5rem; }
    .sim-result { width: 100%; }
}
/* ── FOOTER — Enlace de privacidad (Ley 1581) ─────────────────── */
.footer-privacy-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-privacy-link {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s;
}
.footer-privacy-link:hover { color: rgba(255,255,255,0.95); }
.footer-privacy-link i { font-size: 0.75rem; }
.footer-privacy-sep { color: rgba(255,255,255,0.25); font-size: 0.8rem; }

/* ── Banner de consentimiento de cookies ──────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 99998;
    background: #0f172a;
    border-top: 3px solid #16a34a;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 1rem 1.5rem;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.cookie-icon {
    width: 40px; height: 40px;
    background: rgba(6, 78, 59, 0.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #16a34a; font-size: 1.1rem;
    flex-shrink: 0;
}
.cookie-text { flex: 1; min-width: 200px; }
.cookie-text p {
    color: rgba(255,255,255,0.82);
    font-size: 0.84rem;
    line-height: 1.6;
    margin: 0;
}
.cookie-text a { color: #4ade80; font-weight: 600; text-decoration: underline; }
.cookie-actions {
    display: flex; align-items: center;
    gap: 0.8rem; flex-shrink: 0;
}
.cookie-btn-accept {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: #16a34a; color: white;
    border: none; border-radius: 50px;
    padding: 0.55rem 1.3rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem; font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.cookie-btn-accept:hover { background: #15803d; transform: scale(1.03); }
.cookie-btn-info {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.82rem; font-weight: 500;
    transition: color 0.2s;
}
.cookie-btn-info:hover { color: rgba(255,255,255,0.9); }
@media (max-width: 600px) {
    .cookie-content { flex-direction: column; align-items: flex-start; }
    .cookie-actions { width: 100%; justify-content: flex-end; }
    .footer-privacy-row { flex-direction: column; gap: 0.3rem; }
}

/* ── NAVBAR — enlace simulador ─────────────────────────────────── */
.nav-link-sim {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #16a34a !important;
    font-weight: 700 !important;
}
.nav-link-sim i { font-size: 0.85rem; }

/* ── HERO — botón secundario ───────────────────────────────────── */
.btn-secondary-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
}
.btn-secondary-hero:hover {
    background: rgba(255,255,255,0.25);
    border-color: white;
    transform: translateY(-2px);
}

/* ── HERO — estadísticas animadas ──────────────────────────────── */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 2.2rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 1.2rem 1.8rem;
    width: fit-content;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.6rem;
}
.hero-stat:first-child { padding-left: 0; }
.hero-stat:last-child  { padding-right: 0; }
.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    letter-spacing: -0.02em;
}
.stat-suffix {
    font-size: 1.3rem;
    font-weight: 800;
    color: rgba(255,255,255,0.85);
    line-height: 1;
    align-self: flex-start;
    margin-top: 2px;
}
.stat-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    margin-top: 4px;
    text-align: center;
    white-space: nowrap;
}
.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.25);
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .hero-stats { flex-wrap: wrap; gap: 1rem; padding: 1rem 1.2rem; }
    .hero-stat { padding: 0 0.8rem; }
    .hero-stat-divider { display: none; }
    .stat-num { font-size: 1.6rem; }
}

/* ── TESTIMONIOS ───────────────────────────────────────────────── */
.testimonios-section {
    background: #fff;
    padding: 90px 20px;
}
.testimonios-header {
    text-align: center;
    margin-bottom: 3rem;
}
.testimonios-header h2 {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}
.testimonios-header p {
    color: #666;
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto;
}
.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}
.testimonio-card {
    background: #f9fafb;
    border: 1.5px solid #f0f0f0;
    border-radius: 22px;
    padding: 2rem 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    transition: all 0.3s ease;
}
.testimonio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(6, 78, 59, 0.12);
    border-color: #86efac;
}
.testimonio-card.destacado {
    background: linear-gradient(145deg, #f0fdf4, #dcfce7);
    border-color: #4ade80;
    box-shadow: 0 8px 28px rgba(6, 78, 59, 0.1);
}
.testimonio-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #16a34a, #064e3b);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.9rem;
    border-radius: 50px;
    white-space: nowrap;
    letter-spacing: 0.03em;
}
.testimonio-stars { color: #d97706; font-size: 0.85rem; display: flex; gap: 3px; }
.testimonio-texto {
    color: #444;
    font-size: 0.94rem;
    line-height: 1.75;
    flex: 1;
    font-style: italic;
}
.testimonio-texto::before { content: '"'; color: #064e3b; font-size: 1.4rem; line-height: 0; vertical-align: -0.4em; margin-right: 2px; }
.testimonio-texto::after  { content: '"'; color: #064e3b; font-size: 1.4rem; line-height: 0; vertical-align: -0.4em; margin-left: 2px; }
.testimonio-autor {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.testimonio-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #064e3b);
    color: white;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.testimonio-autor strong { display: block; font-size: 0.9rem; color: #1a1a1a; }
.testimonio-autor span   { font-size: 0.78rem; color: #888; }

.btn-testimonios {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.2rem;
    background: linear-gradient(135deg, #16a34a, #064e3b);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 6px 20px rgba(6, 78, 59, 0.35);
    transition: all 0.3s ease;
}
.btn-testimonios:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(4, 47, 46, 0.45);
}
@media (max-width: 600px) {
    .testimonios-header h2 { font-size: 1.6rem; }
    .testimonios-grid { grid-template-columns: 1fr; }
}
