/* ============================================
   FEATURE PAGES STYLESHEET
   Dark marketing aesthetic — matches landing.html
   ============================================ */

/* ============================================
   0. DARK MARKETING FOUNDATION
   ============================================ */

:root {
    --feature-gradient-start: #1e3a5f;
    --feature-gradient-end: #0d1b2a;
    --feature-accent-orange: #f97316;
    --feature-accent-orange-hover: #ea580c;
    --feature-accent-blue: #3b82f6;
    --feature-text: #ffffff;
    --feature-text-muted: rgba(255, 255, 255, 0.65);
    --feature-text-subtle: rgba(255, 255, 255, 0.45);
    --feature-card-bg: rgba(255, 255, 255, 0.05);
    --feature-card-border: rgba(255, 255, 255, 0.1);
    --feature-card-hover-border: rgba(249, 115, 22, 0.35);
    --feature-section-overlay: rgba(0, 0, 0, 0.2);
}

.feature-page-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, var(--feature-gradient-start) 0%, var(--feature-gradient-end) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--feature-text);
}

/* Ensure the gradient covers the full page even on short content */
.feature-page-main {
    min-height: calc(100vh - 200px);
}

/* ============================================
   1. NAVIGATION
   ============================================ */

.landing-nav {
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(13, 27, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--feature-card-border);
}

.landing-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.landing-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--feature-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.landing-logo:hover {
    color: var(--feature-text);
    opacity: 0.9;
}

.landing-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.landing-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-landing-outline {
    color: var(--feature-text);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.4rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-landing-outline:hover {
    color: var(--feature-text);
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
}

.btn-landing-primary {
    background: var(--feature-accent-orange);
    color: var(--feature-text);
    border: none;
    padding: 0.45rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-landing-primary:hover {
    background: var(--feature-accent-orange-hover);
    color: var(--feature-text);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.3);
}

/* Mobile nav: hide "Features" link to save space */
@media (max-width: 480px) {
    .nav-buttons .btn-landing-outline:first-child {
        display: none;
    }
}

/* ============================================
   2. BREADCRUMBS
   ============================================ */

.breadcrumb-nav {
    padding-top: 1.5rem;
    margin-bottom: 0;
}

.breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
    margin: 0;
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--feature-text-subtle);
}

.breadcrumb-item a {
    color: var(--feature-accent-orange);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.breadcrumb-item a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--feature-text-subtle);
}

/* ============================================
   3. HERO SECTION
   ============================================ */

.hero-section {
    padding: 4rem 0 3rem;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-section .display-4 {
    color: var(--feature-text);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

/* Gradient accent on key words */
.hero-section .display-4 span,
.hero-section .display-4 strong {
    background: linear-gradient(135deg, var(--feature-accent-orange), #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section .lead {
    color: var(--feature-text-muted);
    font-size: 1.15rem;
    line-height: 1.65;
    max-width: 560px;
}

.hero-section .text-muted {
    color: var(--feature-text-subtle) !important;
}

.hero-section .small.text-muted {
    color: var(--feature-text-subtle) !important;
}

/* Hero illustration placeholder */
.illustration-placeholder {
    aspect-ratio: 4/3;
    border-radius: 16px;
    background: var(--feature-card-bg) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--feature-card-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.illustration-placeholder .bi {
    color: rgba(255, 255, 255, 0.25) !important;
}

/* Recolor Bootstrap bg-primary-subtle for dark context */
.bg-primary-subtle {
    background: var(--feature-card-bg) !important;
}

/* ============================================
   4. CTA BUTTONS IN HERO / FEATURE PAGES
   ============================================ */

/* Override Bootstrap btn-primary to use orange */
.feature-page-body .btn-primary {
    background: var(--feature-accent-orange);
    border-color: var(--feature-accent-orange);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.feature-page-body .btn-primary:hover,
.feature-page-body .btn-primary:focus {
    background: var(--feature-accent-orange-hover);
    border-color: var(--feature-accent-orange-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.35);
}

.feature-page-body .btn-primary:active {
    background: #c2410c;
    border-color: #c2410c;
    transform: translateY(0);
}

/* Reassurance text below CTA */
.feature-page-body .text-muted.small {
    color: var(--feature-text-subtle) !important;
}

/* ============================================
   5. FEATURE HIGHLIGHTS SECTION
   ============================================ */

.feature-highlights {
    padding: 3rem 0 4rem;
}

.feature-highlights h2 {
    color: var(--feature-text);
    font-weight: 700;
    margin-bottom: 2.5rem;
}

.highlight-card {
    background: var(--feature-card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--feature-card-border);
    padding: 1.75rem;
    height: 100%;
    transition: all 0.3s ease;
}

.highlight-card:hover {
    transform: translateY(-4px);
    border-color: var(--feature-card-hover-border);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

.highlight-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.highlight-icon .bi,
.highlight-card .bi {
    color: var(--feature-accent-orange) !important;
}

.highlight-card h3 {
    color: var(--feature-text);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.highlight-card p,
.highlight-card .text-muted {
    color: var(--feature-text-muted) !important;
    line-height: 1.65;
    margin-bottom: 0;
    font-size: 0.925rem;
}

/* ============================================
   6. HOW IT WORKS SECTION
   ============================================ */

.how-it-works-section,
.feature-page-body section.py-5.bg-light {
    background: var(--feature-section-overlay) !important;
    padding: 4rem 0;
}

.how-it-works-section h2,
.feature-page-body section.py-5.bg-light h2 {
    color: var(--feature-text);
    font-weight: 700;
    margin-bottom: 2.5rem;
}

.how-it-works-section h3,
.feature-page-body section.py-5.bg-light h3 {
    color: var(--feature-text);
    font-weight: 600;
}

.how-it-works-section .text-muted,
.feature-page-body section.py-5.bg-light .text-muted {
    color: var(--feature-text-muted) !important;
}

/* Numbered step circles */
.how-it-works-section .rounded-circle.bg-primary,
.feature-page-body section.py-5.bg-light .rounded-circle.bg-primary {
    background: linear-gradient(135deg, var(--feature-accent-orange), #fbbf24) !important;
    border: none;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Step illustration placeholders */
.how-it-works-section .illustration-placeholder,
.feature-page-body section.py-5.bg-light .illustration-placeholder {
    background: var(--feature-card-bg) !important;
    border: 1px solid var(--feature-card-border);
}

.how-it-works-section .bi,
.feature-page-body section.py-5.bg-light .bi {
    color: rgba(255, 255, 255, 0.25) !important;
}

/* ============================================
   7. FAQ SECTION
   ============================================ */

.faq-section {
    padding: 4rem 0;
}

.faq-section h2 {
    color: var(--feature-text);
    font-weight: 700;
    margin-bottom: 2.5rem;
}

.faq-section .accordion-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--feature-card-border);
}

.faq-section .accordion-item:first-child {
    border-top: 1px solid var(--feature-card-border);
}

.faq-section .accordion-button {
    background: transparent;
    border: none;
    padding: 1.25rem 0;
    font-weight: 600;
    font-size: 1rem;
    color: var(--feature-text);
    box-shadow: none;
}

.faq-section .accordion-button:not(.collapsed) {
    color: var(--feature-accent-orange);
    background: transparent;
    box-shadow: none;
}

.faq-section .accordion-button:hover {
    color: var(--feature-accent-orange);
}

.faq-section .accordion-button:focus {
    box-shadow: none;
    outline: 2px solid var(--feature-accent-orange);
    outline-offset: 2px;
}

.faq-section .accordion-button::after {
    filter: brightness(0) invert(1);
    opacity: 0.6;
}

.faq-section .accordion-button:not(.collapsed)::after {
    filter: none;
    /* Bootstrap handles rotation, we just need to tint it orange */
    opacity: 1;
}

.faq-section .accordion-collapse {
    transition: height 250ms ease-out;
}

.faq-section .accordion-body {
    padding: 0 0 1.25rem 0;
    color: var(--feature-text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
    .faq-section .accordion-collapse {
        transition: none !important;
    }
}

/* ============================================
   8. CTA SECTION
   ============================================ */

.cta-section {
    padding: 4rem 0 5rem;
    background: transparent;
}

.cta-section .container > * {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-box,
.feature-page-body .cta-section > .container {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(59, 130, 246, 0.15));
    border-radius: 24px;
    border: 1px solid var(--feature-card-border);
    padding: 3.5rem 2.5rem;
    text-align: center;
}

.cta-section h2 {
    color: var(--feature-text);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.cta-section .lead {
    color: var(--feature-text-muted);
    margin-bottom: 2rem;
}

.cta-section .text-muted {
    color: var(--feature-text-subtle) !important;
}

@media (max-width: 576px) {
    .cta-box,
    .feature-page-body .cta-section > .container {
        padding: 2.5rem 1.5rem;
    }

    .cta-section h2 {
        font-size: 1.65rem;
    }
}

/* ============================================
   9. FOOTER
   ============================================ */

.landing-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--feature-card-border);
    text-align: center;
    color: var(--feature-text-subtle);
    font-size: 0.875rem;
    margin-top: 2rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

.footer-divider {
    color: rgba(255, 255, 255, 0.25);
}

.footer-strava-link {
    color: #FC5200;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.footer-strava-link:hover {
    opacity: 0.8;
}

/* ============================================
   10. HUB PAGE — FEATURE CARDS
   ============================================ */

/* Hub hero text */
.feature-page-body .py-5.text-center h1 {
    color: var(--feature-text);
    font-weight: 800;
}

.feature-page-body .py-5.text-center .lead,
.feature-page-body .py-5.text-center .text-muted {
    color: var(--feature-text-muted) !important;
}

/* Category headings */
.feature-page-body .h3 {
    color: var(--feature-text);
    font-weight: 700;
}

/* Bootstrap cards → dark glassmorphism style */
.feature-page-body .card {
    background: var(--feature-card-bg) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--feature-card-border) !important;
    border-radius: 16px;
    transition: all 0.3s ease;
    color: var(--feature-text);
}

.feature-page-body .card:hover {
    transform: translateY(-4px);
    border-color: var(--feature-card-hover-border) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.feature-page-body .card-body {
    padding: 1.75rem;
}

.feature-page-body .card-title {
    color: var(--feature-text);
    font-weight: 600;
    margin-top: 0.75rem;
}

.feature-page-body .card-text,
.feature-page-body .card-text.text-muted {
    color: var(--feature-text-muted) !important;
}

/* Feature icon in hub cards — orange instead of blue */
.feature-page-body .card .bi.text-primary,
.feature-page-body .card .fs-1.text-primary {
    color: var(--feature-accent-orange) !important;
}

/* shadow-sm on hub cards is distracting on dark bg — neutralize */
.feature-page-body .shadow-sm {
    box-shadow: none !important;
}

/* ============================================
   11. GENERIC FEATURE PAGE (feature_page.html)
   ============================================ */

.feature-page-body section.py-5.text-center h1 {
    color: var(--feature-text);
    font-weight: 800;
}

/* ============================================
   12. GLOBAL TEXT OVERRIDES FOR DARK CONTEXT
   ============================================ */

/* Any Bootstrap .text-muted inside the dark page body */
.feature-page-body .text-muted {
    color: var(--feature-text-muted) !important;
}

/* Bootstrap .text-primary → orange accent in feature pages */
.feature-page-body .text-primary {
    color: var(--feature-accent-orange) !important;
}

/* Headings should always be white */
.feature-page-body h1,
.feature-page-body h2,
.feature-page-body h3,
.feature-page-body h4,
.feature-page-body h5,
.feature-page-body h6 {
    color: var(--feature-text);
}

/* Paragraphs default to near-white */
.feature-page-body p {
    color: var(--feature-text-muted);
}

/* ============================================
   13. SCROLL ANIMATION SYSTEM
   ============================================ */

[data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

[data-animate-stagger] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

[data-animate-stagger].animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
[data-animate-stagger]:nth-child(1) { transition-delay: 0s; }
[data-animate-stagger]:nth-child(2) { transition-delay: 0.1s; }
[data-animate-stagger]:nth-child(3) { transition-delay: 0.15s; }
[data-animate-stagger]:nth-child(4) { transition-delay: 0.2s; }
[data-animate-stagger]:nth-child(5) { transition-delay: 0.25s; }
[data-animate-stagger]:nth-child(6) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
    [data-animate],
    [data-animate-stagger] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ============================================
   14. RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0 2rem;
    }

    .hero-section .display-4 {
        font-size: 2.25rem;
    }

    .feature-highlights {
        padding: 2rem 0 3rem;
    }

    .faq-section {
        padding: 2.5rem 0;
    }

    .cta-section {
        padding: 3rem 0 4rem;
    }

    .landing-nav {
        padding: 1rem 0;
    }
}

@media (max-width: 576px) {
    .hero-section .lead {
        font-size: 1rem;
    }

    .highlight-card {
        padding: 1.25rem;
    }
}
