/* ============================================================================
 * Pyllar — Fund detail pages (SEO fund catalogue)
 * Shared external stylesheet so it caches once across all fund pages, rather
 * than duplicating a <style> block on every generated page.
 * ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

/* ── Hero ─────────────────────────────────────────── */
.fp-hero {
    background: linear-gradient(135deg, #0A2415 0%, #11381E 60%, #0A2415 100%);
    padding: 8rem 1.5rem 2.5rem;
    text-align: center;
    color: #fff;
}
.fp-breadcrumb { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-bottom: 1rem; }
.fp-breadcrumb a { color: rgba(255,255,255,0.8); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.3); }
.fp-breadcrumb a:hover { color: #fff; }
.fp-hero-badge {
    display: inline-block; background: rgba(255,255,255,0.12); color: #EFEBE9;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    padding: 0.35rem 0.9rem; border-radius: 50px; margin-bottom: 1rem;
}
.fp-hero h1 { font-size: clamp(1.6rem, 4.6vw, 2.5rem); font-weight: 800; color: #fff; margin: 0 0 0.6rem; line-height: 1.22; }
.fp-hero-amc { display: inline-flex; align-items: center; gap: 8px; margin: 0.4rem 0 1rem; }
.fp-hero-amc img { height: 20px; width: auto; max-width: 100px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px 8px; }
.fp-hero-amc span { font-size: 0.85rem; color: rgba(255,255,255,0.75); }
.fp-hero p { font-size: 1rem; color: rgba(255,255,255,0.8); max-width: 560px; margin: 0 auto; line-height: 1.55; }
.fp-hero-cta { margin-top: 1.5rem; }

/* ── Live stats bar ───────────────────────────────── */
.fp-stats-bar {
    max-width: 780px; margin: -1.75rem auto 0; padding: 0 1.5rem; position: relative; z-index: 2;
}
.fp-stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #EFEBE9;
    border-radius: 14px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.fp-stat-cell { background: #fff; padding: 1rem 1.1rem; text-align: center; }
.fp-stat-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #8B6B25; margin-bottom: 0.3rem; }
.fp-stat-value { font-size: 1.25rem; font-weight: 800; color: #3E2723; }
.fp-stat-value.up { color: #2E7D32; }
.fp-stat-value.down { color: #C62828; }
.fp-stat-sub { font-size: 0.72rem; color: #999; margin-top: 0.2rem; }
.fp-live-fallback {
    display: none; max-width: 780px; margin: -1.75rem auto 0; padding: 1rem 1.5rem; text-align: center;
    background: #fff; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.1); font-size: 0.85rem; color: #8B6B25; position: relative; z-index: 2;
}

/* ── Section base (shared with other marketing pages) ── */
.page-section { max-width: 780px; margin: 0 auto; padding: 3rem 1.5rem; }
.section-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #8B6B25; margin-bottom: 0.4rem; }
.section-heading { font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 700; color: #3E2723; margin: 0 0 0.75rem; line-height: 1.25; }
.section-body { font-size: 0.95rem; color: #555; line-height: 1.7; }
.section-body p { margin-bottom: 1rem; }

/* ── Chart card ───────────────────────────────────── */
.fp-chart-card { background: #fff; border: 1px solid #EFEBE9; border-radius: 14px; padding: 1.5rem; margin-top: 1.5rem; }
.fp-chart-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.fp-chart-tabs button {
    font-family: 'Outfit', sans-serif; font-size: 0.8rem; font-weight: 600; color: #8B6B25;
    background: #FBF9F4; border: 1px solid #EFEBE9; border-radius: 50px; padding: 0.35rem 0.9rem; cursor: pointer;
}
.fp-chart-tabs button.active { background: #0A2415; color: #fff; border-color: #0A2415; }
.fp-chart-tabs button:disabled { opacity: 0.4; cursor: not-allowed; }
.fp-chart-wrap { position: relative; height: 260px; }

/* ── Returns grid ─────────────────────────────────── */
.fp-returns-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem; }
.fp-return-cell { background: #FBF9F4; border-radius: 12px; padding: 1rem; text-align: center; }
.fp-return-period { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8B6B25; margin-bottom: 0.3rem; }
.fp-return-value { font-size: 1.3rem; font-weight: 800; color: #3E2723; }
.fp-return-value.up { color: #2E7D32; }
.fp-return-value.down { color: #C62828; }
.fp-return-note { font-size: 0.68rem; color: #999; margin-top: 0.2rem; }

/* ── Past performance backtest ────────────────────── */
.fp-pp-fundname { font-size: 0.85rem; font-weight: 600; color: #8B6B25; margin: -0.4rem 0 0; }
.fp-pp-card { background: #fff; border: 1px solid #EFEBE9; border-radius: 14px; padding: 1.5rem; margin-top: 1.5rem; }
.fp-pp-amount { text-align: center; margin-bottom: 1.5rem; }
.fp-pp-amount label { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #999; margin-bottom: 0.5rem; }
.fp-pp-amount-field { display: inline-flex; align-items: center; gap: 0.3rem; background: #FBF9F4; border: 1px solid #EFEBE9; border-radius: 50px; padding: 0.4rem 0.5rem; }
.fp-pp-amount-field span { font-size: 0.95rem; font-weight: 700; color: #3E2723; }
.fp-pp-amount-field input {
    width: 70px; border: none; background: transparent; font-family: 'Outfit', sans-serif;
    font-size: 1rem; font-weight: 800; color: #8B6B25; text-align: center; -moz-appearance: textfield;
}
.fp-pp-amount-field input:focus { outline: none; }
.fp-pp-amount-field input::-webkit-outer-spin-button,
.fp-pp-amount-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fp-pp-amount-step {
    width: 30px; height: 30px; flex-shrink: 0; border: none; border-radius: 50%;
    background: #fff; color: #8B6B25; font-size: 1.15rem; font-weight: 700; line-height: 1;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.fp-pp-amount-step:active { background: #8B6B25; color: #fff; }
.fp-pp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.75rem; }
.fp-pp-stat { text-align: center; }
.fp-pp-stat-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #999; margin-bottom: 0.3rem; }
.fp-pp-stat-value { font-size: 1.1rem; font-weight: 800; color: #3E2723; }
.fp-pp-stat-value.accent { color: #8B6B25; }
.fp-pp-stat-value.up { color: #2E7D32; }
.fp-pp-bars { display: flex; align-items: flex-end; gap: 0.5rem; padding-top: 1.75rem; }
.fp-pp-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.fp-pp-bar-col.latest { flex: 1.6; }
.fp-pp-bar-value {
    position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 0.4rem;
    font-size: 0.68rem; font-weight: 600; color: #999; white-space: nowrap;
}
.fp-pp-bar-col.latest .fp-pp-bar-value { font-size: 0.82rem; font-weight: 800; color: #8B6B25; }
.fp-pp-bar-track { width: 100%; height: 130px; position: relative; }
.fp-pp-bar-fill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, #D4AF37 0%, #8B6B25 100%); border-radius: 6px 6px 2px 2px; }
.fp-pp-bar-col.latest .fp-pp-bar-fill { background: linear-gradient(180deg, #FFD700 0%, #8B6B25 100%); box-shadow: 0 4px 16px rgba(212,175,55,0.35); }
.fp-pp-bar-date { font-size: 0.68rem; color: #999; margin-top: 0.4rem; white-space: nowrap; }
.fp-pp-bar-col.latest .fp-pp-bar-date { color: #3E2723; font-weight: 700; }
.fp-pp-cta { text-align: center; margin-top: 1.75rem; }
.fp-pp-cta-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%); color: #3E2723;
    font-family: 'Outfit', sans-serif; font-size: 0.95rem; font-weight: 700;
    padding: 0.85rem 1.9rem; border-radius: 50px; text-decoration: none;
    box-shadow: 0 4px 20px rgba(212,175,55,0.3); transition: transform 0.2s;
}
.fp-pp-cta-btn:hover { transform: translateY(-2px); }

/* ── Tables (facts) ───────────────────────────────── */
.compare-table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; font-size: 0.86rem; min-width: 480px; }
.compare-table th { background: #0A2415; color: #fff; padding: 0.75rem 1rem; text-align: left; font-weight: 700; white-space: nowrap; }
.compare-table th:first-child { border-radius: 12px 0 0 0; }
.compare-table th:last-child { border-radius: 0 12px 0 0; }
.compare-table td { padding: 0.7rem 1rem; border-bottom: 1px solid #FBF9F4; color: #444; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: #f9fdf9; }
.compare-table td.green { color: #8B6B25; font-weight: 700; }
.table-footnote { font-size: 0.72rem; color: #aaa; margin-top: 0.75rem; line-height: 1.6; }

/* ── FAQ ───────────────────────────────────────────── */
.faq-h3 { margin: 0; padding: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.faq-item { border: 1px solid #EFEBE9; border-radius: 12px; overflow: hidden; }
.faq-q {
    width: 100%; background: #fff; border: none; text-align: left; padding: 1rem 1.25rem;
    font-family: 'Outfit', sans-serif; font-size: 0.93rem; font-weight: 600; color: #3E2723;
    cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-q::after { content: '+'; font-size: 1.3rem; color: #8B6B25; flex-shrink: 0; transition: transform 0.2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 1.25rem 1rem; font-size: 0.88rem; color: #555; line-height: 1.65; background: #fff; border-top: 1px solid #FBF9F4; }
.faq-item.open .faq-a { display: block; }

/* ── CTA ──────────────────────────────────────────── */
.inline-cta { margin-top: 1.5rem; padding: 1.25rem 1.5rem; background: #f1f8f1; border-left: 3px solid #0A2415; border-radius: 8px; }
.inline-cta p { margin: 0; color: #1a3a1a; line-height: 1.7; font-size: 0.92rem; }
.inline-cta a { color: #8B6B25; font-weight: 600; text-decoration: underline; }
.playstore-btn {
    display: inline-flex; align-items: center; gap: 0.6rem; background: #FFD700; color: #3E2723;
    font-family: 'Outfit', sans-serif; font-size: 0.95rem; font-weight: 700; padding: 0.85rem 1.75rem;
    border-radius: 50px; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.playstore-btn:hover { transform: translateY(-2px); }
.playstore-btn svg { width: 20px; height: 20px; }

/* ── Fund catalogue hub ───────────────────────────── */
.fp-hub-group { margin-top: 2.5rem; }
.fp-hub-group h3 { font-size: 1.05rem; font-weight: 700; color: #3E2723; margin: 0 0 0.9rem; }
.fp-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.9rem; }
.fp-hub-card {
    display: block; background: #fff; border: 1px solid #EFEBE9; border-radius: 12px; padding: 1rem 1.1rem;
    text-decoration: none; transition: transform 0.15s, box-shadow 0.15s;
}
.fp-hub-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.fp-hub-card .fp-hub-name { font-size: 0.92rem; font-weight: 700; color: #3E2723; margin-bottom: 0.3rem; }
.fp-hub-card .fp-hub-meta { font-size: 0.76rem; color: #8B6B25; }

@media (max-width: 640px) {
    .fp-stats-grid { grid-template-columns: 1fr; }
    .fp-returns-grid { grid-template-columns: 1fr; }
}
