/* home_stripe_inspired.css */
:root {
    --strava-orange: #fc5200;
    --brand-blue: #0077FF; /* Пример дополнительного акцентного цвета, как у Stripe */
    --link-blue: #0d87c2; /* Старый синий, можно заменить */

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --transition-fast: 0.2s ease-out;
    --transition-base: 0.3s ease-out;
    --transition-slow: 0.5s ease-out;

    /* Light Theme (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f7f7f7; /* Чуть темнее основного фона для секций */
    --bg-tertiary: #f0f0f0; /* Для фона инпутов, карт и т.д. */
    
    --text-primary: #1a1f36; /* Темно-серый, почти черный */
    --text-secondary: #5a647e; /* Серый для подзаголовков, описаний */
    --text-tertiary: #8892aa;  /* Светло-серый для мета-информации */
    
    --border-primary: #e6e6e6; /* Тонкие границы */
    --border-secondary: #d1d1d1;

    --shadow-xs: 0 1px 2px 0 rgba(26,31,54,0.05);
    --shadow-sm: 0 1px 3px 0 rgba(26,31,54,0.1), 0 1px 2px 0 rgba(26,31,54,0.06);
    --shadow-md: 0 4px 6px -1px rgba(26,31,54,0.1), 0 2px 4px -1px rgba(26,31,54,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(26,31,54,0.1), 0 4px 6px -2px rgba(26,31,54,0.05);

    --gradient-text-from: var(--strava-orange);
    --gradient-text-to: var(--brand-blue);
}

html.dark {
    --bg-primary: #0A0A0F; /* Очень темный фон */
    --bg-secondary: #101018; 
    --bg-tertiary: #1A1A22;
    
    --text-primary: #f0f4f9; /* Светлый текст */
    --text-secondary: #a0aec0;
    --text-tertiary: #718096;
    
    --border-primary: #2d3748;
    --border-secondary: #4a5568;

    --shadow-xs: 0 1px 2px 0 rgba(0,0,0,0.15);
    --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.2), 0 1px 2px 0 rgba(0,0,0,0.15);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.25), 0 2px 4px -1px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.25), 0 4px 6px -2px rgba(0,0,0,0.2);

    --gradient-text-from: var(--strava-orange);
    --gradient-text-to: #3b9eff; /* Более светлый синий для темной темы */
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
    font-size: 16px;
    transition: background-color var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
}

body.preload * {
  transition: none !important; /* Отключаем все анимации при первой загрузке */
}

/* Background Gradient - Stripe often uses subtle large scale gradients or patterns */
.background-gradient {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(ellipse at 0% 0%, hsla(200, 70%, 70%, 0.15) 0px, transparent 40%),
        radial-gradient(ellipse at 100% 0%, hsla(25, 80%, 70%, 0.15) 0px, transparent 40%),
        radial-gradient(ellipse at 100% 100%, hsla(220, 70%, 70%, 0.1) 0px, transparent 40%),
        radial-gradient(ellipse at 0% 100%, hsla(0, 0%, 80%, 0.1) 0px, transparent 40%);
    opacity: 0.7;
    z-index: -1;
    pointer-events: none;
    transition: opacity var(--transition-base);
}
html.dark .background-gradient {
    background: 
        radial-gradient(ellipse at 0% 0%, hsla(200, 60%, 30%, 0.2) 0px, transparent 50%),
        radial-gradient(ellipse at 100% 0%, hsla(25, 70%, 30%, 0.2) 0px, transparent 50%),
        radial-gradient(ellipse at 100% 100%, hsla(220, 60%, 35%, 0.15) 0px, transparent 50%),
        radial-gradient(ellipse at 0% 100%, hsla(0, 0%, 20%, 0.15) 0px, transparent 50%);
}

/* Container */
.container {
    width: 100%;
    max-width: 1140px; /* Stripe-like max width */
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.75em;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em; /* Subtle tightening */
}
h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight: 800; } /* 60px */
h2 { font-size: clamp(1.8rem, 4vw, 2.625rem); font-weight: 700; } /* 42px */
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); font-weight: 600; } /* 24px */
p { margin-top: 0; margin-bottom: 1.5em; }
a { color: var(--strava-orange); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: color-mix(in srgb, var(--strava-orange) 80%, black); }

.gradient-text {
    background: linear-gradient(90deg, var(--gradient-text-from), var(--gradient-text-to));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    display: inline-block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.75em 1.5em; /* 12px 24px */
    font-size: 1rem; /* 16px */
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.btn-primary {
    background-color: var(--strava-orange);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
/* Станет: */
.btn-primary:hover {
    background-color: color-mix(in srgb, var(--strava-orange) 85%, black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: #fff; /* <-- ВОТ ИСПРАВЛЕНИЕ */
}
.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-primary);
}
html.dark .btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-secondary);
}
.btn-secondary:hover {
    background-color: var(--border-primary);
    border-color: var(--border-secondary);
    transform: translateY(-2px);
}
.btn-large {
    padding: 1em 2em; /* 16px 32px */
    font-size: 1.125rem; /* 18px */
}
.btn.disabled, .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--text-tertiary);
    box-shadow: none;
    transform: none;
}
.strava-btn .strava-icon {
    width: 20px;
    height: 20px;
}

/* Header */
.page-header {
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255,255,255,0.8); /* Semi-transparent for blur */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-primary);
    transition: background-color var(--transition-base), border-color var(--transition-base);
}
html.dark .page-header {
    background-color: rgba(10,10,15,0.8);
    border-bottom: 1px solid var(--border-secondary);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 800; text-decoration: none; color: var(--text-primary); }
.logo img { height: 28px; width: auto; }
.main-nav { display: none; /* Add if needed */ } 
@media (min-width: 768px) {
    .main-nav { display: flex; gap: 25px; }
    .main-nav a { color: var(--text-secondary); font-weight: 500; }
    .main-nav a:hover { color: var(--text-primary); }
}
.controls { display: flex; align-items: center; gap: 15px; }
.control-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
    padding: 6px; border-radius: var(--radius-sm);
}
.control-btn:hover { color: var(--text-primary); background-color: var(--bg-tertiary); }
.control-btn svg { width: 20px; height: 20px; }
.sun-icon { display: none; }
.moon-icon { display: block; }
html.dark .sun-icon { display: block; }
html.dark .moon-icon { display: none; }

.header-cta { font-size: 0.9rem; padding: 0.6em 1.2em; }

/* Стили для иконки в кнопке личного кабинета */
.header-cta .icon {
    display: none; /* По умолчанию иконка скрыта */
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Медиа-запрос для мобильных устройств */
@media (max-width: 768px) {
    .header-cta .text {
        display: none; /* Скрываем текст на мобильных */
    }
    .header-cta .icon {
        display: inline-block; /* Показываем иконку на мобильных */
        width: 24px; /* Увеличиваем размер иконки */
        height: 24px; /* Увеличиваем размер иконки */
    }
    .header-cta {
        padding: 0.5rem; /* Делаем кнопку квадратной */
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Language Switcher (from previous, adapted) */
.lang-switcher-dropdown { position: relative; }
.lang-switcher-btn {
    display: flex; align-items: center; gap: 6px;
    background-color: transparent;
    border: 1px solid var(--border-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer; color: var(--text-secondary);
    font-weight: 500; font-size: 0.9rem;
    transition: all var(--transition-fast);
}
.lang-switcher-btn:hover { border-color: var(--text-primary); color: var(--text-primary); }
.lang-switcher-btn svg { width: 16px; height: 16px; }
.lang-switcher-menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px; min-width: 160px; z-index: 101;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}
.lang-switcher-dropdown.active .lang-switcher-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-switcher-item {
    display: block; padding: 8px 12px;
    color: var(--text-primary); text-decoration: none;
    border-radius: var(--radius-sm); font-size: 0.9rem;
}
.lang-switcher-item:hover { background-color: var(--bg-secondary); }


/* Sections */
.section { padding: clamp(3rem, 8vw, 6rem) 0; } /* 60px to 100px vertical padding */
.section:nth-child(odd) { background-color: var(--bg-secondary); } /* Alternate section background */
html.dark .section:nth-child(odd) { background-color: var(--bg-secondary); }

.section-title { text-align: center; margin-bottom: 0.5em; }
.section-subtitle {
    text-align: center; color: var(--text-secondary);
    max-width: 650px; margin: 0 auto clamp(2rem, 5vw, 3.5rem) auto; /* bottom margin 40px to 60px */
    font-size: clamp(1rem, 2vw, 1.25rem); /* 18-20px */
    line-height: 1.7;
}

/* Hero Section */
.hero-section {
    padding-top: clamp(3rem, 10vh, 6rem);
    padding-bottom: clamp(4rem, 12vh, 8rem);
    text-align: center;
    background-color: transparent; /* Uses body background */
    overflow: hidden; /* For any decorative elements */
    position: relative; /* Для размещения scroll indicator */
    min-height: 60vh; /* Минимальная высота для красивого отображения */
}
.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
@media (min-width: 992px) { /* Larger screens - 2 column layout */
    .hero-container {
        flex-direction: row;
        text-align: left;
        gap: 4rem;
    }
    .hero-content { flex: 1 1 55%; }
    .hero-visual { flex: 1 1 45%; }
}

.hero-title {
    margin-bottom: 0.5em;
    line-height: 1.1;
}
.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.375rem); /* 20-22px */
    color: var(--text-secondary);
    margin-bottom: 2em;
    max-width: 600px;
}
@media (min-width: 992px) {
    .hero-subtitle { margin-left: 0; margin-right: 0; }
}

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 1em; }
@media (min-width: 992px) {
    .hero-actions { justify-content: flex-start; }
}
.hero-subtext {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}
.hero-visual {
    width: 100%;
    max-width: 500px; /* Control size of visual */
    margin: 0 auto;
}
.hero-image-placeholder { /* Replace with actual visual styles */
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    /* background-color: var(--bg-tertiary); Simple placeholder */
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}
/* Optional: Hero abstract visual */
.hero-abstract-visual {
    width: 100%;
    padding-bottom: 75%; /* Aspect ratio */
    background: linear-gradient(135deg, var(--strava-orange) 0%, var(--brand-blue) 100%);
    border-radius: var(--radius-lg);
    opacity: 0.1;
    filter: blur(20px);
}
html.dark .hero-abstract-visual { opacity: 0.2; }


/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 30px;
}
.feature-card {
    background-color: var(--bg-primary);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.feature-icon { /* Placeholder - use SVG icons */
    font-size: 2.5rem;
    margin-bottom: 0.75em;
    color: var(--strava-orange);
    line-height: 1;
}
.feature-card h3 { font-size: 1.375rem; margin-bottom: 0.5em; } /* 22px */
.feature-card p { font-size: 1rem; color: var(--text-secondary); margin-bottom: 0; }

/* Stats Section */
.service-stats-section { background-color: transparent; } /* Use body background or a very subtle one */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    text-align: center;
}
.stat-item .stat-number {
    font-size: clamp(2.5rem, 6vw, 3.5rem); /* 48-56px */
    font-weight: 800;
    color: var(--strava-orange);
    line-height: 1;
    margin-bottom: 0.1em;
}
.stat-item .stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Demo Section */
#demo-input-form {
    display: flex;
    flex-direction: column; /* Stack on mobile */
    gap: 15px;
    max-width: 700px;
    margin: 0 auto 1.5rem auto;
}
@media (min-width: 576px) { /* Row on larger screens */
    #demo-input-form { flex-direction: row; gap: 10px; }
}

#demo-input-form input[type="text"] {
    flex-grow: 1;
    padding: 14px 18px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background-color: var(--bg-primary); /* Slightly different from page for depth */
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
}
#demo-input-form input[type="text"]:focus {
    outline: none;
    border-color: var(--strava-orange);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--strava-orange) 20%, transparent);
}
.demo-example-links { text-align: center; margin-bottom: 2rem; font-size: 0.9rem; color: var(--text-secondary); }
.demo-example-link { color: var(--strava-orange); cursor: pointer; font-weight: 500; margin-left: 0.5em; }
.demo-example-link:hover { text-decoration: underline; }

#demo-output { text-align: center; min-height: 50px; } /* For spinner or messages */
.spinner {
    display: inline-block;
    border: 4px solid var(--border-primary);
    width: 36px; height: 36px;
    border-radius: 50%;
    border-left-color: var(--strava-orange);
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

#demo-results {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 2.5rem); /* 24-40px padding */
    margin-top: 2.5rem;
    box-shadow: var(--shadow-lg);
}
#demo-segment-name {
    text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem;
    display: flex; align-items: center; justify-content: center; gap: 0.5em;
}
.strava-link-icon { /* Small icon next to segment name */
    color: var(--strava-orange);
    font-size: 0.8em;
    font-weight: normal;
}
.demo-stats-overview {
    display: flex;
    justify-content: space-around;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-primary);
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}
.demo-stats-overview .stat { text-align: center; }
.demo-stats-overview .stat h4 { margin:0 0 0.3em 0; font-size:0.85rem; font-weight:500; color:var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.demo-stats-overview .stat p { margin:0; font-size:1.75rem; font-weight:700; color:var(--text-primary); line-height: 1; }

.demo-visuals-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stack on mobile */
    gap: 2rem;
    margin-bottom: 2rem;
}
@media (min-width: 768px) { /* Side by side on larger */
    .demo-visuals-grid { grid-template-columns: 1fr 1fr; }
}
#demo-map-container, #demo-chart-container {
    border-radius: var(--radius-md);
    overflow: hidden; /* For rounded corners on map/chart */
    border: 1px solid var(--border-primary);
    background-color: var(--bg-tertiary);
}
#demo-map { height: 350px; }
#demo-chart-container { position: relative; }
.chart-blur-overlay {
    position: absolute; top:0; left:0; right:0; bottom:0;
    backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px);
    display:flex; flex-direction: column; justify-content:center; align-items:center; text-align:center;
    color:var(--text-primary);
    background: color-mix(in srgb, var(--bg-secondary) 70%, transparent);
    cursor:pointer; opacity:0; visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}
#demo-chart-container:hover .chart-blur-overlay { opacity:1; visibility: visible; }
.chart-blur-overlay p {
    font-weight: 600; padding: 10px 15px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    font-size: 0.9rem;
}

.demo-download-action { text-align: center; }
.tooltip-wrapper { position: relative; display: inline-block; }
.tooltip-wrapper:has(.btn.disabled) { cursor: not-allowed; }
.tooltip-wrapper .tooltip-text {
    visibility:hidden; min-width:180px; max-width: 250px;
    background-color:var(--text-primary); color:var(--bg-primary);
    text-align:center; border-radius:var(--radius-sm); padding:10px;
    box-shadow:var(--shadow-lg);
    position:absolute; z-index:100;
    bottom:125%; left:50%;
    transform: translateX(-50%);
    opacity:0; transition:opacity var(--transition-fast),visibility var(--transition-fast);
    pointer-events:none; font-size: 0.85rem; line-height: 1.4;
}
.tooltip-wrapper:hover .tooltip-text { visibility:visible; opacity:1; }

/* Final CTA Section */
.final-cta-section { background-color: var(--bg-secondary); }
html.dark .final-cta-section { background-color: var(--bg-secondary); }
.final-cta-section .section-title { font-size: clamp(1.8rem, 4vw, 2.5rem); }

/* Footer */
.page-footer {
    padding: clamp(2rem, 5vw, 3.5rem) 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-primary);
}
.footer-container {
    display: flex;
    flex-direction: column; /* Mobile first */
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}
@media (min-width: 768px) { /* Desktop layout */
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
}
.footer-logo { font-size: 1.25rem; }
.footer-left .copyright { margin-top: 0.5em; margin-bottom: 0; font-size: 0.85rem; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px 25px; }
.footer-nav a { color: var(--text-secondary); }
.footer-nav a:hover { color: var(--text-primary); text-decoration: underline; }
.footer-strava-logo img { height: 28px; opacity: .8; }
.footer-strava-logo .logo-light { display: block; }
.footer-strava-logo .logo-dark { display: none; }
html.dark .footer-strava-logo .logo-light { display: none; }
html.dark .footer-strava-logo .logo-dark { display: block; }

/* Modal (from previous, adapted) */
.modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(10, 10, 15, 0.5); /* Darker backdrop */
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}
html.dark .modal-backdrop { background-color: rgba(0,0,0,0.7); }
.modal-backdrop.active { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 30px 35px;
    box-shadow: var(--shadow-lg);
    width: 90%; max-width: 500px;
    position: relative;
    transform: scale(0.95);
    opacity: 0;
    transition: opacity var(--transition-base) 0.05s, transform var(--transition-base) 0.05s;
}
.modal-backdrop.active .modal-content { transform: scale(1); opacity: 1; }
.modal-content h2 { font-size: 1.5rem; margin-bottom: 0.75em; }
.modal-content p { color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.5em; font-size: 1rem; }
.modal-content p:last-child { margin-bottom: 0; }
.modal-close-btn {
    position: absolute; top: 12px; right: 12px;
    background: none; border: none; font-size: 2rem; cursor: pointer;
    color: var(--text-tertiary); line-height: 1; padding: 5px;
}
.modal-close-btn:hover { color: var(--text-primary); }

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--transition-base), transform 0.6s var(--transition-base);
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.animation-delay-1 { transition-delay: 0.1s !important; }
.animation-delay-2 { transition-delay: 0.2s !important; }
.animation-delay-3 { transition-delay: 0.3s !important; }
.animation-delay-4 { transition-delay: 0.4s !important; }

.stats-section-transparent {
    background-color: transparent !important;
}
/* Дополнительное правило для центрирования кнопки в секции CTA */
.final-cta-section .btn {
    display: table; /* Ведет себя как блочный элемент, но ширина подстраивается под контент */
    margin-left: auto;
    margin-right: auto;
}

.cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .section { padding: 3rem 0; }
    .hero-title { font-size: 2.25rem; }
    .hero-subtitle { font-size: 1.125rem; }
    .section-title { font-size: 1.75rem; }
    .section-subtitle { font-size: 1rem; margin-bottom: 2rem; }
    .features-grid { gap: 20px; }
    .feature-card { padding: 20px; }
    .stat-item .stat-number { font-size: 2.5rem; }
    .demo-stats-overview { flex-direction: column; align-items: center; gap: 1.5rem; }
}

@media (max-width: 575px) {
    .btn-large { padding: 0.8em 1.5em; font-size: 1rem; }
    .header-cta { display: none; } /* Hide in header on very small screens if too crowded */
}

/* ▼▼▼ НОВЫЕ АНИМАЦИИ ДЛЯ УКАЗАНИЯ НА СКРОЛЛ ▼▼▼ */

/* Scroll Indicator - стрелка вниз под hero */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.7;
    transition: opacity var(--transition-base);
    z-index: 10;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    animation: bounce 2s infinite;
}

.scroll-text {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Progress Bar для показа прогресса скролла */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--strava-orange), var(--brand-blue));
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Floating Action Button с подсказкой */
.scroll-hint {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--strava-orange);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all var(--transition-base);
}

.scroll-hint.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    animation: pulse 2s infinite;
}

.scroll-hint:hover {
    background: color-mix(in srgb, var(--strava-orange) 85%, black);
    transform: scale(1.1);
}

.scroll-hint svg {
    width: 24px;
    height: 24px;
}

@keyframes pulse {
    0% {
        box-shadow: var(--shadow-lg), 0 0 0 0 var(--strava-orange);
    }
    70% {
        box-shadow: var(--shadow-lg), 0 0 0 10px rgba(252, 82, 0, 0);
    }
    100% {
        box-shadow: var(--shadow-lg), 0 0 0 0 rgba(252, 82, 0, 0);
    }
}

/* Секции с wave эффектом при появлении */
.section-wave {
    position: relative;
    overflow: hidden;
}

.section-wave::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--strava-orange), transparent);
    transition: left 0.8s ease-out;
}

.section-wave.is-visible::before {
    left: 100%;
}

/* Улучшенные анимации появления */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Специальные анимации для разных элементов */
.animate-slide-right {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-slide-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-slide-left {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-slide-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Мобильные улучшения для анимаций */
@media (max-width: 768px) {
    .scroll-hint {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .scroll-hint svg {
        width: 20px;
        height: 20px;
    }
    
    .scroll-indicator {
        bottom: 20px;
    }
    
    .scroll-arrow {
        width: 20px;
        height: 20px;
    }
}

/* Прячем scroll indicator когда пользователь начал скролить */
.scroll-indicator.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(20px);
}

/* Анимация для цифр в статистике */
.stat-number.counting {
    animation: countUp 1.5s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Улучшенные hover эффекты для feature карточек */
.feature-card {
    background-color: var(--bg-primary);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--strava-orange), var(--brand-blue));
    border-radius: var(--radius-lg);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-base);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    /* ▼▼▼ ИСПРАВЛЕНИЕ КОНТРАСТНОСТИ ТЕКСТА ▼▼▼ */
    color: white; /* Белый текст на градиентном фоне */
}

/* Исправляем все дочерние элементы при hover */
.feature-card:hover h3,
.feature-card:hover .feature-icon,
.feature-card:hover p {
    color: white !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /* Небольшая тень для лучшей читаемости */
}

/* Обеспечиваем контраст для светлой темы */
html:not(.dark) .feature-card:hover h3,
html:not(.dark) .feature-card:hover .feature-icon,
html:not(.dark) .feature-card:hover p {
    color: white !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); /* Более сильная тень в светлой теме */
}
/* ▲▲▲ КОНЕЦ ИСПРАВЛЕНИЯ ▲▲▲ */

/* ▲▲▲ КОНЕЦ НОВЫХ АНИМАЦИЙ ▲▲▲ */

html.dark .principles-section {
    background-color: var(--bg-secondary);
}