/* /features, /features/{group} and /tips (app/features_html.py).
   Self-contained: same palette and header as the trips and scenic pages, but its own
   classes, so the nav stays visible on phones (itinerary-page.css hides it there). */

:root {
    --ft-blue: #2C5F7C;
    --ft-blue-dark: #1e4a62;
    --ft-ink: #1a2a35;
    --ft-body: #374151;
    --ft-muted: #5a6b76;
    --ft-bg: #f5f5f5;
    --ft-panel: #EAEFF2;
    --ft-line: #d0d8df;
    --ft-card: #fff;
    --ft-pro: #9a5b12;
    --ft-pro-bg: #fdf1e1;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--ft-bg);
    color: var(--ft-ink);
    -webkit-text-size-adjust: 100%;
}

a { color: var(--ft-blue); }

.ft-sr {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Header ── */

.ft-header {
    background: var(--ft-panel);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.ft-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ft-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.ft-logo { width: 44px; height: 44px; }

.ft-brand-text { display: flex; flex-direction: column; gap: 2px; }

.ft-brand-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--ft-blue);
    line-height: 1;
}

.ft-brand-sub { font-size: 11px; color: #777; letter-spacing: 0.3px; }

.ft-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.ft-nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--ft-blue);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

.ft-nav-link:hover { background: rgba(44, 95, 124, 0.08); }

.ft-nav-btn {
    margin-left: 6px;
    background: var(--ft-blue);
    color: #fff;
    padding: 9px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.ft-nav-btn:hover { background: var(--ft-blue-dark); }

/* ── Feature sub-nav: scrolls sideways on its own on narrow screens ── */

.ft-subnav {
    background: #fff;
    border-bottom: 1px solid #e3e8ec;
    position: sticky;
    top: 0;
    z-index: 100;
}

.ft-subnav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.ft-subnav-inner::-webkit-scrollbar { display: none; }

.ft-subnav-link {
    flex-shrink: 0;
    padding: 13px 12px 11px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ft-muted);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.ft-subnav-link:hover { color: var(--ft-blue); }

.ft-subnav-link[aria-current="page"] {
    color: var(--ft-blue);
    border-bottom-color: var(--ft-blue);
    font-weight: 600;
}

/* ── Hero ── */

.ft-hero {
    background: linear-gradient(135deg, var(--ft-blue) 0%, var(--ft-blue-dark) 100%);
    color: #fff;
    text-align: center;
    padding: 64px 24px 56px;
}

.ft-hero-group { padding: 48px 24px 44px; }

.ft-eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
}

.ft-eyebrow a { color: inherit; }

.ft-hero h1 {
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 auto 16px;
    max-width: 820px;
    text-wrap: balance;
}

.ft-lede {
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto;
    opacity: 0.92;
}

.ft-hero-note {
    margin: 14px auto 0;
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255,255,255,0.14);
    padding: 6px 12px;
    border-radius: 999px;
}

.ft-hero-actions {
    margin-top: 28px;
    display: flex;
    gap: 16px 24px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.ft-hero-secondary {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-underline-offset: 3px;
}

.ft-store-link { display: inline-block; line-height: 0; }
.ft-store-badge { height: 52px; width: auto; }

/* ── Main sections ── */

.ft-main { display: block; }

.ft-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 8px;
}

.ft-section h2 {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    color: var(--ft-ink);
    margin: 0 0 8px;
}

.ft-section-intro {
    font-size: 16px;
    line-height: 1.6;
    color: var(--ft-body);
    margin: 0 0 8px;
}

.ft-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}

.ft-grid-groups { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }

.ft-card,
.ft-group-card {
    background: var(--ft-card);
    border-radius: 12px;
    padding: 22px 22px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 14px rgba(0,0,0,0.04);
}

.ft-card p,
.ft-group-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ft-body);
}

.ft-card-icon { font-size: 28px; line-height: 1; margin-bottom: 12px; }

.ft-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ft-ink);
    margin: 0 0 8px;
    line-height: 1.3;
}

.ft-group-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.ft-group-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.ft-group-card .ft-card-title { font-size: 20px; }

.ft-group-card ul {
    margin: 14px 0 16px;
    padding-left: 18px;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--ft-body);
}

.ft-more {
    margin-top: auto;
    font-size: 15px;
    font-weight: 600;
    color: var(--ft-blue);
    text-decoration: none;
}

a.ft-more:hover { text-decoration: underline; }

/* ── Tags ── */

.ft-tags { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: 2px; }

.ft-tag {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
    background: #e8eef2;
    color: var(--ft-muted);
    vertical-align: 2px;
}

.ft-tags .ft-tag { margin-left: 0; }

.ft-tag-pro { background: var(--ft-pro-bg); color: var(--ft-pro); }
.ft-tag-more-pro { background: transparent; color: var(--ft-pro); box-shadow: inset 0 0 0 1px #e8c79c; }
.ft-tag-carplay { background: #e9ecf5; color: #3b4a7a; }
.ft-tag-web { background: #e3f1ef; color: #22675d; }

/* ── Free vs Pro ── */

.ft-table-wrap {
    margin-top: 20px;
    background: var(--ft-card);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
}

.ft-plan-table { width: 100%; border-collapse: collapse; font-size: 15px; }

.ft-plan-table th,
.ft-plan-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #edf0f2;
    text-align: center;
}

.ft-plan-table tbody tr:last-child th,
.ft-plan-table tbody tr:last-child td { border-bottom: 0; }

.ft-plan-table thead th {
    background: #f4f7f9;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ft-muted);
}

.ft-plan-table thead th:last-child { color: var(--ft-pro); }

.ft-plan-table tbody th {
    text-align: left;
    font-weight: 500;
    color: var(--ft-ink);
}

.ft-plan-table td { width: 22%; color: var(--ft-body); font-variant-numeric: tabular-nums; }
.ft-yes { color: var(--ft-blue) !important; font-weight: 700; font-size: 17px; }
.ft-no { color: #a3adb4 !important; }

/* ── Group pages ── */

.ft-note {
    max-width: 1152px;
    margin: 36px auto 0;
    margin-left: max(24px, calc((100% - 1152px) / 2));
    margin-right: max(24px, calc((100% - 1152px) / 2));
    padding: 16px 20px;
    background: #fffaf0;
    border: 1px solid #f0dfbd;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.6;
    color: #5b4a2a;
}

.ft-others { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }

.ft-other {
    background: var(--ft-card);
    border: 1px solid #dfe5ea;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ft-blue);
}

.ft-other:hover { border-color: var(--ft-blue); }

/* ── Tips ── */

.ft-jumps {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ft-jump {
    background: var(--ft-card);
    border: 1px solid #dfe5ea;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ft-blue);
}

.ft-jump:hover { border-color: var(--ft-blue); }

.ft-tips {
    list-style: none;
    counter-reset: tip;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 16px;
    align-items: start;  /* a step-by-step tip shouldn't stretch its neighbours */
}

.ft-tip {
    counter-increment: tip;
    position: relative;
    background: var(--ft-card);
    border-radius: 12px;
    padding: 20px 22px 20px 62px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 14px rgba(0,0,0,0.04);
    scroll-margin-top: 64px;
}

.ft-tip::before {
    content: counter(tip);
    position: absolute;
    left: 20px;
    top: 19px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ft-panel);
    color: var(--ft-blue);
    font-weight: 700;
    font-size: 14px;
    display: grid;
    place-items: center;
}

.ft-tip:target { box-shadow: 0 0 0 2px var(--ft-blue); }

.ft-tip-title { margin: 0 0 6px; font-size: 17px; line-height: 1.35; }

.ft-anchor { color: var(--ft-ink); text-decoration: none; }
.ft-anchor:hover { color: var(--ft-blue); text-decoration: underline; }

.ft-tip-body { font-size: 15px; line-height: 1.6; color: var(--ft-body); }

.ft-steps { margin: 8px 0; padding-left: 20px; }
.ft-steps li { margin: 4px 0; padding-left: 2px; }

.ft-section[id] { scroll-margin-top: 56px; }

.ft-teaser-list {
    margin: 12px 0 12px;
    padding-left: 20px;
    font-size: 16px;
    line-height: 1.9;
}

/* ── CTA + footer ── */

.ft-cta {
    margin-top: 56px;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    text-align: center;
    padding: 56px 24px;
}

.ft-cta h2 { font-size: 28px; margin: 0 0 10px; color: var(--ft-ink); }

.ft-cta p { font-size: 16px; color: #555; margin: 0 auto 24px; max-width: 520px; line-height: 1.6; }

.ft-cta .ft-cta-sub { margin: 18px auto 0; font-size: 14px; color: var(--ft-muted); }

.ft-footer {
    background: var(--ft-panel);
    border-top: 1px solid var(--ft-line);
    padding: 20px 24px;
}

.ft-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 12px 24px;
    flex-wrap: wrap;
}

.ft-footer a { font-size: 13px; color: #555; text-decoration: none; }
.ft-footer a:hover { color: var(--ft-blue); text-decoration: underline; }

/* ── Phones ── */

@media (max-width: 640px) {
    .ft-header-inner { padding: 10px 16px; }
    /* The nav's text links duplicate the sub-nav and the footer; keep only the App
       Store button next to the brand. */
    .ft-nav-link { display: none; }
    .ft-hero { padding: 44px 16px 40px; }
    .ft-section { padding: 36px 16px 4px; }
    .ft-jumps { padding: 24px 16px 0; }
    .ft-note { margin-left: 16px; margin-right: 16px; }
    .ft-plan-table th, .ft-plan-table td { padding: 11px 10px; font-size: 14px; }
    .ft-cta { padding: 44px 16px; }
    .ft-tip { padding: 18px 18px 18px 56px; }
    .ft-tip::before { left: 16px; }
}

/* An odd card out (five groups with RV on) spans the row instead of sitting alone in half of it. */
.ft-grid-groups > :last-child:nth-child(odd) { grid-column: 1 / -1; }
