/*
 * DINEROZA PAGE ILLUSTRATIONS v1
 * Adds visual illustrations and enhancements to all internal pages.
 * Loaded after design-system.css
 */

/* ===== PAGE HEADER ILLUSTRATION LAYOUT ===== */
/* Makes page-header a split layout: text left, illustration right */
.page-header {
    position: relative;
    overflow: visible;
}

.page-header-inner {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
}

.page-header-text {
    flex: 1;
    min-width: 0;
}

.page-header-illo {
    flex: 0 0 180px;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: illo-float 4s ease-in-out infinite;
}

@keyframes illo-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* Standalone illustration (not in inner wrapper) */
.page-header > .page-header-illo {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    animation: illo-float-abs 4s ease-in-out infinite;
    opacity: 0.92;
}

@keyframes illo-float-abs {
    0%, 100% { transform: translateY(calc(-50% + 0px)); }
    50% { transform: translateY(calc(-50% - 8px)); }
}

@media (max-width: 900px) {
    .page-header > .page-header-illo {
        display: none;
    }
    .page-header-inner {
        gap: 0;
    }
    .page-header-inner .page-header-illo {
        flex: 0 0 100px;
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 640px) {
    .page-header-inner .page-header-illo {
        display: none;
    }
}

/* ===== GUIDE ARTICLE HERO BANNER ===== */
.guide-hero-banner {
    background: linear-gradient(135deg, #065F46 0%, #047857 100%);
    border-radius: 20px;
    margin: 0 0 2.5rem;
    padding: 2rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    color: white;
}

.guide-hero-banner::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(245,158,11,0.2), transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.guide-hero-banner::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.guide-hero-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.guide-hero-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.guide-hero-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #F59E0B;
    margin-bottom: 0.4rem;
}

.guide-hero-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.guide-hero-meta {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.guide-hero-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

@media (max-width: 640px) {
    .guide-hero-banner {
        padding: 1.5rem;
        gap: 1rem;
        border-radius: 14px;
    }
    .guide-hero-icon {
        width: 56px;
        height: 56px;
    }
}

/* ===== VISUAL DIVIDER FOR GUIDE SECTIONS ===== */
.guide-section-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2.5rem 0 1.25rem;
}

.guide-section-divider-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #065F46, #047857);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.guide-section-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(6,95,70,0.2), transparent);
}

/* ===== KEY STAT CALLOUT ===== */
.key-stat-callout {
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    border: 1.5px solid #A7F3D0;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin: 1.75rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.key-stat-callout .stat-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.key-stat-callout .stat-body .stat-number {
    font-family: 'DM Sans', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: #065F46;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.key-stat-callout .stat-body .stat-desc {
    font-size: 0.88rem;
    color: #374151;
    line-height: 1.4;
}

@media (max-width: 500px) {
    .key-stat-callout {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        gap: 1rem;
    }
}

/* ===== STEP VISUAL CARDS ===== */
.steps-visual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1.75rem 0;
}

.step-card {
    background: white;
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid rgba(6,95,70,0.1);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.step-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(6,95,70,0.1);
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #065F46, #047857);
    color: white;
    font-family: 'DM Sans', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.step-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.step-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #065F46;
    line-height: 1.3;
}

/* ===== PROVIDER LOGO ENHANCEMENTS ===== */
/* Already has .provider-logo styles — these enhance them */
.provider-logo {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Feature check/X icons */
.feat-yes {
    color: #065F46;
    font-weight: 700;
}
.feat-yes::before { content: '✓'; }

.feat-no {
    color: #DC2626;
    font-weight: 700;
}
.feat-no::before { content: '✗'; }

/* ===== TOPIC STAT STRIP ===== */
/* Visual stats strip below page header */
.topic-stat-strip {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.topic-stat-pill {
    background: white;
    border: 1px solid rgba(6,95,70,0.12);
    border-radius: 100px;
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #065F46;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 1px 4px rgba(6,95,70,0.06);
    white-space: nowrap;
}

.topic-stat-pill .pill-icon {
    font-size: 0.9rem;
}

/* ===== GUIDE ARTICLE VISUAL INFOGRAPHIC ===== */
.article-infographic {
    background: white;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(6,95,70,0.1);
}

.article-infographic-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #065F46;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.infographic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.infographic-item {
    text-align: center;
    padding: 0.75rem;
    background: #F0FDF9;
    border-radius: 12px;
}

.infographic-item .item-icon {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
}

.infographic-item .item-value {
    font-family: 'DM Sans', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: #065F46;
    margin-bottom: 0.25rem;
}

.infographic-item .item-label {
    font-size: 0.75rem;
    color: #6B7280;
    line-height: 1.3;
}

/* ===== CONTENT SECTION BREAK VISUAL ===== */
.section-break-visual {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #F0FDF9, #ECFDF5);
    border-radius: 12px;
    border-left: 4px solid #065F46;
}

.section-break-visual .break-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.section-break-visual .break-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #065F46;
}

.section-break-visual .break-sub {
    font-size: 0.85rem;
    color: #6B7280;
    margin-top: 0.2rem;
}

/* ===== DIVULGACION / EDITORIAL PAGE VISUAL ===== */
.page-hero-visual {
    position: relative;
    overflow: hidden;
}

.page-hero-visual .page-hero-illo {
    position: absolute;
    right: 4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 160px;
    opacity: 0.85;
    animation: illo-float 4s ease-in-out infinite;
}

@media (max-width: 800px) {
    .page-hero-visual .page-hero-illo {
        display: none;
    }
}

/* ===== COMPARISON PAGE VISUAL UPGRADES ===== */
/* Pulse animation on "best pick" rows */
.best-pick td:first-child .provider-logo {
    position: relative;
}

.best-pick td:first-child .provider-logo::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 2px solid #F59E0B;
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Visual cost bar enhancement */
.cost-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== GUIDE CARDS VISUAL STRIP ===== */
/* On guias.html listing page - add colored left border per category */
.guide-card[href*="credito"] { border-left: 4px solid #3B82F6; }
.guide-card[href*="remesas"] { border-left: 4px solid #10B981; }
.guide-card[href*="hipoteca"] { border-left: 4px solid #8B5CF6; }
.guide-card[href*="impuesto"] { border-left: 4px solid #F59E0B; }
.guide-card[href*="seguro"] { border-left: 4px solid #EF4444; }
.guide-card[href*="tarjeta"], .guide-card[href*="itin"] { border-left: 4px solid #065F46; }
.guide-card[href*="prestamo"] { border-left: 4px solid #D97706; }

/* ===== TRUST BANNER ===== */
.trust-visual-banner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

.trust-visual-inner {
    background: linear-gradient(135deg, #F0FDF9 0%, white 100%);
    border: 1px solid rgba(6,95,70,0.15);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 150px;
}

.trust-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #065F46;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.trust-item-text {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
}

.trust-item-text strong {
    display: block;
    font-size: 0.9rem;
    color: #065F46;
}
