/* 09_public.css — Server-rendered public SEO pages (no Dash JS).
   Everything is driven by 00_tokens.css custom properties; this file only
   composes them for the static ranking pages. */

.public-page {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: var(--lh-relaxed);
}

/* --- nav -------------------------------------------------------------- */
/* Named .seo-nav (not .public-nav): Dash auto-loads every assets/*.css file
   on every page, and 01_base.css already owns .public-nav for the Dash app
   (fixed top bar). The SEO pages only load 00_tokens + this file, so the
   distinct class name keeps the two navs from colliding on Dash pages. */
.seo-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 28px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-opaque);
    flex-wrap: wrap;
}
.public-brand {
    font-size: var(--fs-3xl);
    font-weight: var(--fw-extrabold);
    color: var(--brand-green-text);
    text-decoration: none;
}
.public-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.public-nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--fs-md);
    font-weight: var(--fw-medium);
}
.public-nav-links a:hover { color: var(--brand-green-text); }
.public-nav-cta {
    background: var(--brand-green-fill);
    color: var(--on-fill) !important;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: var(--fw-semibold);
}
.public-nav-cta:hover { background: var(--brand-green-fill-hover); }

/* --- layout ------------------------------------------------------------ */
.public-main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 24px 24px 24px;
}
.public-main h1 {
    font-size: var(--fs-8xl);
    font-weight: var(--fw-semibold);
    line-height: 1.25;
    margin: 0 0 16px 0;
    border-left: 4px solid var(--brand-green);
    padding-left: 16px;
}
.public-main h2 {
    font-size: var(--fs-3xl);
    font-weight: var(--fw-semibold);
    margin: 36px 0 12px 0;
    color: var(--text-primary);
}
/* Headings wrap to even line lengths instead of leaving a one-word tail. */
.public-main h1, .public-main h2 { text-wrap: balance; }
/* Body copy spans the same width as the tables and is justified, with
   Spanish hyphenation (<html lang="es-CO">) keeping word gaps even. Phones
   fall back to left alignment (see the 480px block). */
.public-intro {
    color: var(--text-secondary);
    font-size: var(--fs-lg);
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
}
.public-intro a, .public-footer a { color: var(--brand-green-text); }
.public-freshness {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    margin: 4px 0 0 0;
}
.public-empty { color: var(--text-muted); }

/* --- table ------------------------------------------------------------- */
.public-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-opaque);
    border-radius: var(--radius-md);
    background: var(--bg-card);
}
.public-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}
.public-table th {
    background: var(--bg-green-light);
    text-transform: uppercase;
    font-size: var(--fs-3xs);
    letter-spacing: 0.5px;
    font-weight: var(--fw-semibold);
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-opaque);
    white-space: nowrap;
}
.public-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border-opaque);
    vertical-align: top;
}
/* The fund name is what readers scan for: stronger ink, and a floor so it
   never squeezes to a word per line beside the numeric columns. */
.public-table td.fund {
    font-weight: var(--fw-medium);
    color: var(--text-primary);
    min-width: 200px;
}
.public-table tbody tr:last-child td { border-bottom: none; }
.public-table tbody tr:hover { background: var(--bg-hover); }
.public-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* --- legend / CTA ------------------------------------------------------ */
.public-legend {
    color: var(--text-muted);
    font-size: var(--fs-xs);
    margin-top: 20px;
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
}
.public-cta-box {
    margin-top: 40px;
    padding: 28px;
    border-radius: var(--radius-md);
    background: var(--bg-green-light);
    border: 1px solid rgb(var(--brand-green-rgb) / 0.3);
    text-align: center;
}
.public-cta-box h3 { margin: 0 0 8px 0; font-size: var(--fs-3xl); }
.public-cta-box p { color: var(--text-secondary); margin: 0 0 18px 0; }
.public-btn {
    display: inline-block;
    background: var(--brand-green-fill);
    color: var(--on-fill);
    text-decoration: none;
    font-weight: var(--fw-semibold);
    padding: 12px 28px;
    border-radius: var(--radius-sm);
}
.public-btn:hover { background: var(--brand-green-fill-hover); }

/* --- footer ------------------------------------------------------------ */
.public-footer {
    max-width: 1080px;
    margin: 40px auto 0 auto;
    padding: 24px;
    border-top: 1px solid var(--border-opaque);
    color: var(--text-muted);
    font-size: var(--fs-xs);
    text-align: center;
}
.public-disclaimer { font-size: var(--fs-2xs); }

/* --- responsive --------------------------------------------------------- */
@media (max-width: 768px) {
    .public-main { padding: 28px 16px 16px 16px; }
    .public-main h1 { font-size: var(--fs-5xl); }
    .seo-nav { padding: 12px 16px; }
    .public-nav-links { gap: 14px; font-size: var(--fs-sm); }
}
@media (max-width: 480px) {
    .public-main h1 { font-size: var(--fs-3xl); }
    .public-table { font-size: var(--fs-2xs); }
    .public-table th, .public-table td { padding: 8px 10px; }
    .public-table td.fund { min-width: 160px; }
    /* Justified text on a ~360px column opens wide word gaps: left-align. */
    .public-intro, .public-legend {
        text-align: left;
        -webkit-hyphens: manual;
        hyphens: manual;
    }
}
