/* ══════════════════════════════════════════════════════
   Єдиний ритм секцій головної сторінки
   ══════════════════════════════════════════════════════ */

:root {
    --index-section-gap: clamp(1.1rem, 2.4vw, 2rem);
    --index-section-gap-lg: clamp(1.5rem, 3vw, 2.6rem);
    --index-card-padding-y: clamp(1.5rem, 2.3vw, 2.5rem);
    --index-card-padding-x: clamp(.75rem, 1.8vw, 2rem);
}

/* Вертикальний ритм між секціями головної */
.hero {
    margin-bottom: var(--index-section-gap-lg);
}

/* ── Quick actions row ──────────────────────────────── */
.quick-actions {
    max-width: 1580px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
}

.quick-action-card {
    background: #16191c;
    border: 1.5px solid rgba(255, 204, 0, .15);
    border-radius: 14px;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 700;
    font-size: .92rem;
    transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
}

.quick-action-card i {
    color: var(--pub-cta, #ffcc00);
}

.quick-action-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 204, 0, .45);
    box-shadow: 0 8px 24px rgba(255, 179, 0, .14);
    background: #1b2024;
    color: #fff;
    text-decoration: none;
}

/* ── Work steps section ─────────────────────────────── */
.work-steps {
    max-width: 1580px;
    margin: 0 auto;
    padding: var(--index-card-padding-y) var(--index-card-padding-x);
    background: linear-gradient(135deg, #1a1d20 0%, #1e2124 100%);
    border: 1.5px solid rgba(255, 204, 0, .1);
    border-radius: 20px;
}

.work-steps-header {
    margin-bottom: 1.2rem;
}

.work-steps-header h2 {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: .55rem;
}

.work-steps-header h2 i {
    color: var(--pub-cta, #ffcc00);
}

.work-steps-header p {
    margin: .45rem 0 0;
    color: #94a3b8;
    font-size: .96rem;
}

.work-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .85rem;
}

.work-step-card {
    background: #16191c;
    border: 1.5px solid rgba(255, 204, 0, .1);
    border-radius: 14px;
    padding: 1rem .95rem;
    position: relative;
}

.work-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 900;
    color: #16191c;
    background: var(--pub-cta, #ffcc00);
    margin-bottom: .5rem;
}

.work-step-card h3 {
    margin: 0 0 .35rem;
    font-size: .98rem;
    color: #fff;
}

.work-step-card p {
    margin: 0;
    font-size: .84rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* ── Mobile sticky CTA ──────────────────────────────── */
.mobile-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: none;
    gap: .6rem;
    padding: .55rem .7rem calc(.65rem + env(safe-area-inset-bottom));
    background: rgba(22, 25, 28, .94);
    border-top: 1px solid rgba(255, 204, 0, .15);
    backdrop-filter: blur(6px);
}

.mobile-sticky-cta__primary,
.mobile-sticky-cta__call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 12px;
    min-height: 48px;
    font-weight: 800;
}

.mobile-sticky-cta__primary {
    flex: 1;
    gap: .4rem;
    background: linear-gradient(135deg, var(--pub-cta, #ffcc00) 0%, var(--pub-cta-dark, #ffb300) 100%);
    color: var(--pub-cta-text, #1a1200);
    transition: filter .16s ease, transform .1s ease;
    position: relative;
    overflow: hidden;
}
.mobile-sticky-cta__primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%);
    transform: translateX(-100%);
    transition: transform .55s ease;
}
.mobile-sticky-cta__primary:hover::after { transform: translateX(100%); }
.mobile-sticky-cta__primary:hover { filter: brightness(1.06); }
.mobile-sticky-cta__primary:active { filter: brightness(.95); }

.mobile-sticky-cta__call {
    width: 52px;
    background: #1e2328;
    color: var(--pub-cta, #ffcc00);
    border: 1px solid rgba(255, 204, 0, .3);
}

.mobile-sticky-cta__call--full {
    width: 100%;
    flex: 1;
    gap: .5rem;
    font-size: 1rem;
}

/* ── FAQ section ─────────────────────────────────────── */
.home-faq {
    max-width: 1580px;
    margin: 0 auto;
    padding: var(--index-card-padding-y) var(--index-card-padding-x);
    background: #1e2124;
    border: 1.5px solid rgba(255, 204, 0, .1);
    border-radius: 20px;
}

.home-faq__header {
    margin-bottom: 1rem;
}

.home-faq__header h2 {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.home-faq__header h2 i {
    color: var(--pub-cta, #ffcc00);
}

.home-faq__header p {
    margin: .45rem 0 0;
    color: #94a3b8;
    font-size: .95rem;
}

.home-faq__list {
    display: grid;
    gap: .55rem;
}

.home-faq__item {
    background: #16191c;
    border: 1.5px solid rgba(255, 204, 0, .12);
    border-radius: 12px;
    padding: .8rem .9rem;
}

.home-faq__item summary {
    cursor: pointer;
    color: #e2e8f0;
    font-size: .95rem;
    font-weight: 700;
    list-style: none;
}

.home-faq__item summary::-webkit-details-marker {
    display: none;
}

.home-faq__item summary::after {
    content: '+';
    float: right;
    color: var(--pub-cta, #ffcc00);
    font-weight: 900;
}

.home-faq__item[open] summary::after {
    content: '\2212';
}

.home-faq__item p {
    margin: .55rem 0 0;
    color: #94a3b8;
    font-size: .88rem;
    line-height: 1.55;
}

.quick-actions + :is(.services-section, .promotions, .main-news, .work-steps, .advantages, .gallery-section, .reviews) {
    margin-top: var(--index-section-gap);
}

:is(.services-section, .promotions, .main-news, .work-steps, .advantages, .gallery-section, .reviews, .home-faq)
+ :is(.services-section, .promotions, .main-news, .work-steps, .advantages, .gallery-section, .reviews, .home-faq) {
    margin-top: var(--index-section-gap);
}

/* ── Shared section card ────────────────────────────── */
.services-section,
.promotions,
.main-news,
.work-steps,
.gallery-section,
.advantages,
.home-faq,
.reviews {
    background: #1e2124;
    border-radius: 20px;
    width: 100%;
    max-width: 1580px;
    margin-left: auto;
    margin-right: auto;
    padding: var(--index-card-padding-y) var(--index-card-padding-x);
    border: 1.5px solid rgba(255, 204, 0, .1);
    box-sizing: border-box;
}

/* Promotions keeps its red tint on top of the card */
.promotions {
    border-color: rgba(229, 57, 53, .18);
}

/* Reviews keeps its blue tint */
.reviews {
    border-color: rgba(66, 133, 244, .15);
}

.work-steps {
    background: linear-gradient(135deg, #1a1d20 0%, #1e2124 100%);
}

/* ── Unified section heading ────────────────────────── */
.services-section h2,
.promotions-header h2,
.main-news-header h2,
.main-news > h2,
.gallery-header h2 {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: .02em;
    display: flex;
    align-items: center;
    gap: .55rem;
}

/* Yellow left accent bar — universal */
.services-section h2::before,
.promotions-header h2::before,
.main-news-header h2::before,
.gallery-header h2::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 1.5rem;
    background: var(--pub-cta, #ffcc00);
    border-radius: 3px;
    flex-shrink: 0;
}

/* Section title icon system (replaces inline styles in templates) */
.section-title-icon {
    font-size: 1.1em;
    line-height: 1;
}

.section-title-icon--services {
    color: #ff6b35;
}

.section-title-icon--promotions {
    color: #e53935;
}

.section-title-icon--news {
    color: #3b82f6;
}

/* Remove old blue bar from news (replaced by universal yellow) */
.main-news-header h2::before {
    background: var(--pub-cta, #ffcc00);
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
    .hero {
        margin-bottom: var(--index-section-gap);
    }

    .services-section,
    .promotions,
    .main-news,
    .work-steps,
    .gallery-section,
    .advantages,
    .home-faq,
    .reviews {
        margin: 0 auto;
        padding: var(--index-card-padding-y) var(--index-card-padding-x);
    }

    .services-section h2,
    .promotions-header h2,
    .main-news-header h2,
    .main-news > h2,
    .gallery-header h2,
    .work-steps-header h2,
    .home-faq__header h2 {
        font-size: 1.45rem;
    }

    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }

    .work-steps-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .main-content {
        padding-bottom: calc(5.2rem + env(safe-area-inset-bottom));
    }

    .mobile-sticky-cta {
        display: flex;
    }
}

@media (max-width: 520px) {
    .quick-action-card {
        min-height: 62px;
        font-size: .86rem;
    }

    .work-steps-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════
   Scroll reveal animations (opacity + translateY)
   ══════════════════════════════════════════════════════ */

/* Initial hidden state — елементи поза viewport невидимі */
.anim-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity .55s cubic-bezier(.22,.68,0,1.2) var(--d, 0ms),
        transform .55s cubic-bezier(.22,.68,0,1.2) var(--d, 0ms);
    will-change: opacity, transform;
}

/* Animate from left for horizontal rows */
.anim-reveal--left {
    opacity: 0;
    transform: translateX(-22px);
    transition:
        opacity .5s ease var(--d, 0ms),
        transform .5s ease var(--d, 0ms);
    will-change: opacity, transform;
}

/* Visible state — triggered by JS adding .is-visible */
.anim-reveal.is-visible,
.anim-reveal--left.is-visible {
    opacity: 1;
    transform: none;
}

/* Disable for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .anim-reveal, .anim-reveal--left {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Hero CTA pulse (CSS-only, no JS) ─────────────────── */
@keyframes cta-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,204,0,.45); }
    60%       { box-shadow: 0 0 0 12px rgba(255,204,0,0); }
}
.btn-cta--xl {
    animation: cta-pulse 2.6s ease-out 1.2s infinite;
}
@media (prefers-reduced-motion: reduce) {
    .btn-cta--xl { animation: none; }
}
