/* Shared improvements — preserves Autoshift PRO design system */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

.header {
    overflow: visible;
}

@media (max-width: 767px) {
    .header {
        overflow: hidden;
    }
}

.header > .container {
    position: relative;
    z-index: 1;
}

/* Gearbox — three meshed Font Awesome gears */
.header-gears {
    position: absolute;
    top: 50%;
    right: clamp(40px, 10vw, 140px);
    width: clamp(540px, 88vw, 980px);
    height: clamp(500px, 78vh, 860px);
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 0;
}

.header-gears .gear-lg,
.header-gears .gear-md,
.header-gears .gear-sm {
    position: absolute;
    display: block;
    line-height: 1;
    transform-origin: center center;
}

.header-gears .gear-lg {
    right: 6%;
    bottom: -30%;
    font-size: clamp(440px, 64vw, 820px);
    color: rgba(255, 255, 255, 0.09);
    animation: gearCW 36s linear infinite;
}

.header-gears .gear-md {
    right: 58%;
    bottom: 14%;
    font-size: clamp(250px, 38vw, 460px);
    color: rgba(255, 255, 255, 0.11);
    animation: gearCCW 20.5s linear infinite;
}

.header-gears .gear-sm {
    right: 72%;
    top: -12%;
    font-size: clamp(120px, 17vw, 210px);
    color: rgba(255, 255, 255, 0.14);
    animation: gearCW 9.3s linear infinite;
}

@keyframes gearCW {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes gearCCW {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@media (max-width: 767px) {
    .header-gears {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: none;
    }

    .header-gears .gear-lg {
        font-size: clamp(140px, 42vw, 190px);
        right: 16%;
        bottom: 8%;
    }

    .header-gears .gear-md {
        font-size: clamp(82px, 25vw, 115px);
        right: 29%;
        bottom: 33%;
    }

    .header-gears .gear-sm {
        font-size: clamp(52px, 15vw, 72px);
        right: 34%;
        bottom: 47%;
        top: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-gears .gear-lg,
    .header-gears .gear-md,
    .header-gears .gear-sm {
        animation: none;
    }
}

/* Desktop navigation */
.nav-links {
    display: none;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 16px;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
    white-space: nowrap;
}

.nav-links a:hover {
    background: rgba(230, 116, 64, 0.1);
    color: var(--primary-color);
}

.nav-links a.active {
    background: var(--gradient);
    color: var(--white);
}

body.dark .nav-links a {
    color: var(--dark-text);
}

body.dark .nav-links a:hover {
    background: rgba(230, 116, 64, 0.15);
    color: var(--primary-color);
}

body.dark .nav-links a.active {
    color: var(--white);
}

@media (min-width: 992px) {
    .nav-links {
        display: flex;
    }

    .menu-button {
        display: none;
    }
}

/* Hero badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--white);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.hero-badge i {
    color: #ffd700;
}

/* Stats bar */
.stats-bar {
    background: var(--white);
    padding: 0;
    margin-top: -40px;
    position: relative;
    z-index: 2;
}

.stats-bar.dark {
    background: var(--dark-bg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 32px 24px;
}

.stats-bar.dark .stats-grid {
    background: var(--dark-card-bg);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.05);
}

.stat-item {
    text-align: center;
    padding: 8px;
}

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 4px;
}

.stats-bar.dark .stat-label {
    color: var(--dark-light-text);
}

@media (max-width: 767px) {
    .stats-bar {
        margin-top: -20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 24px 16px;
        gap: 16px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }
}

/* How it works */
.how-it-works {
    padding: 80px 0;
    background: var(--white);
    text-align: center;
}

.how-it-works.dark {
    background: var(--dark-bg);
}

.how-it-works h2 {
    font-size: 36px;
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
}

.how-it-works .section-subtitle {
    color: var(--text-light);
    font-size: 18px;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.how-it-works.dark .section-subtitle {
    color: var(--dark-light-text);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    position: relative;
}

.step-box {
    background: var(--bg-light);
    border-radius: 15px;
    padding: 40px 30px;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.step-box.dark {
    background: var(--dark-card-bg);
}

.step-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--gradient);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 20px;
    margin: 0 auto 20px;
}

.step-box h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.step-box p {
    color: var(--text-light);
    font-size: 15px;
    margin: 0;
}

.step-box.dark p {
    color: var(--dark-light-text);
}

@media (max-width: 767px) {
    .how-it-works {
        padding: 40px 0;
    }

    .how-it-works h2 {
        font-size: 28px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Platforms section — icon-based visuals instead of screenshots */
.platforms-section {
    padding: 80px 0;
    background: var(--white);
    text-align: center;
}

.platforms-section.dark {
    background: var(--dark-bg);
}

.platforms-section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.platforms-section.dark h2 {
    color: var(--dark-text);
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.platform-card {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 32px 24px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.platform-card.dark {
    background: var(--dark-card-bg);
}

.platform-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.platform-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    min-height: 140px;
    justify-content: center;
}

.platform-device {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(230, 116, 64, 0.35);
}

.platform-device i {
    font-size: 36px;
    color: var(--white);
}

.platform-ui-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 72px;
}

.platform-ui-lines span {
    display: block;
    height: 6px;
    border-radius: 4px;
    background: rgba(230, 116, 64, 0.25);
}

.platform-ui-lines span:first-child {
    width: 100%;
    background: rgba(230, 116, 64, 0.45);
}

.platform-ui-lines span:nth-child(2) {
    width: 85%;
}

.platform-ui-lines span:nth-child(3) {
    width: 65%;
}

.platform-ui-lines--wide {
    width: 100px;
}

.platform-ui-lines--wide span:nth-child(2) {
    width: 90%;
}

.platform-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--text-dark);
}

.platform-card.dark h3 {
    color: var(--dark-text);
}

.platform-card p {
    color: var(--text-light);
    font-size: 15px;
    margin: 0;
    line-height: 1.5;
}

.platform-card.dark p {
    color: var(--dark-light-text);
}

@media (max-width: 767px) {
    .platforms-section {
        padding: 40px 0;
    }

    .platforms-section h2 {
        font-size: 28px;
    }

    .platforms-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Legacy screenshots section (kept for compatibility) */
.screenshots {
    padding: 80px 0;
    background: var(--white);
}

.screenshots.dark {
    background: var(--dark-bg);
}

.screenshots h2 {
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
}

.screenshots.dark h2 {
    color: var(--dark-text);
}

.device-badge {
    text-align: center;
    margin-bottom: 40px;
}

.device-badge span {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Secondary CTA button in hero */
.store-button-outline {
    display: inline-flex;
    padding: 15px 35px;
    background: transparent;
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    transition: transform 0.3s, background 0.3s;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.store-button-outline:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

/* FAQ accordion */
.faq-item {
    cursor: pointer;
    user-select: none;
}

.faq-item h3 {
    margin: 0;
    justify-content: space-between;
}

.faq-item h3 .faq-toggle {
    font-size: 14px;
    color: var(--primary-color);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item.open h3 .faq-toggle {
    transform: rotate(180deg);
}

.faq-item .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin 0.3s ease;
    margin: 0;
}

.faq-item.open .faq-answer {
    max-height: 200px;
    margin-top: 12px;
}

.faq-item h3::before {
    content: "Q";
}

/* Footer Telegram link */
.footer-telegram {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-telegram i {
    font-size: 18px;
    color: #54a9eb;
}

/* Contact page — action buttons */
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-top: 32px;
}

.contact-telegram-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 30px;
    background: var(--white);
    color: #229ED9;
    text-decoration: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid #229ED9;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-telegram-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(34, 158, 217, 0.25);
    color: #229ED9;
}

.contact-telegram-btn i {
    font-size: 18px;
}

.contact-section.dark .contact-telegram-btn {
    background: transparent;
    color: #54a9eb;
    border-color: #54a9eb;
}

.contact-section.dark .contact-telegram-btn:hover {
    color: #54a9eb;
}

/* Focus accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .screenshots {
        padding: 40px 0;
    }

    .screenshots h2 {
        font-size: 28px;
    }

    .store-button-outline {
        padding: 15px 35px;
        width: auto;
        text-align: center;
        justify-content: center;
    }
}
