:root {
    /* Enterprise Colors */
    --navy-blue: #0A192F;
    --navy-blue-light: #112240;
    --primary-blue: #0056b3;
    --white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #e9ecef;
    --text-main: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    
    /* Semantic */
    --success: #198754;
    --danger: #dc3545;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius: 4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
/* щоб якірні переходи не ховали заголовок під фіксованим хедером */
section[id] { scroll-margin-top: 80px; }
body { font-family: var(--font-sans); background-color: var(--white); color: var(--text-main); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 15px; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--navy-blue); line-height: 1.2; }
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 1px; }
.section-subtitle { text-align: center; color: var(--text-muted); font-size: 1.1rem; margin-bottom: 3rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.highlight { color: var(--primary-blue); }

/* Header */
.header { position: fixed; top: 0; left: 0; width: 100%; background: var(--white); border-bottom: 1px solid var(--border-color); z-index: 1000; padding: 15px 0; }
.header .container { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 35px; }
.nav { display: flex; gap: 30px; align-items: center; }
.nav a { color: var(--text-main); text-decoration: none; font-size: 0.95rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; transition: color 0.2s; }
.nav a:hover { color: var(--primary-blue); }
.nav-phones a { background-color: var(--navy-blue); color: var(--white); padding: 8px 20px; border-radius: var(--radius); }
.nav-phones a:hover { background-color: var(--primary-blue); color: var(--white); }
.nav-socials { display: flex; align-items: center; gap: 6px; }
.nav-socials a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 1.85rem; transition: transform 0.2s; }
.nav-socials a:hover { transform: translateY(-2px); }
.nav-socials .fa-telegram { color: #229ED9; }
.nav-socials .fa-instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.mobile-menu-btn { display: none; font-size: 1.5rem; color: var(--navy-blue); cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; border-radius: var(--radius); text-decoration: none; transition: all 0.2s; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--primary-blue); color: var(--white); }
.btn-primary:hover { background: #004494; color: var(--white); }
.btn-secondary { background: transparent; color: var(--navy-blue); border-color: var(--navy-blue); }
.btn-secondary:hover { background: var(--navy-blue); color: var(--white); }
.btn-white { background: var(--white); color: var(--navy-blue); }
.btn-white:hover { background: var(--bg-gray); color: var(--navy-blue); }

/* Background Overlays for Strict Corporate Look */
.bg-section { position: relative; color: var(--white); background-size: cover; background-position: center; background-attachment: fixed; }
.bg-section::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.bg-overlay-navy::before { background: rgba(10, 25, 47, 0.85); }
.bg-overlay-blue::before { background: rgba(0, 86, 179, 0.85); }
.bg-section .container { position: relative; z-index: 2; }
.bg-section .section-title, .bg-section .section-subtitle, .bg-section h1, .bg-section h2, .bg-section h3, .bg-section p { color: var(--white); }

/* Hero Section */
.hero { padding: 160px 0 120px; background-image: url('../images/trust_hero_bg_1779315526322.png'); }
.hero .container { max-width: 800px; text-align: center; }
.hero h1 { font-size: 3.5rem; margin-bottom: 20px; text-transform: uppercase; }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,0.8); margin-bottom: 40px; }
.hero-actions { display: flex; gap: 15px; justify-content: center; }

/* Stats Section */
.stats { padding: 80px 0; background-image: url('../images/trust_work_bg_1779315557614.png'); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat-item h3 { font-size: 3rem; margin-bottom: 5px; }
.stat-item p { font-size: 0.95rem; font-weight: 600; text-transform: uppercase; }

/* Why Us — editorial split (big statement + divided feature grid) */
.why-us { padding: 110px 0; background: var(--bg-light); }
.why-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; align-items: stretch; }

/* Left lead */
.why-lead { padding-right: 56px; }
.why-kicker { display: block; font-size: 0.9rem; font-weight: 600; color: var(--primary-blue); margin-bottom: 26px; }
.why-bigtitle { font-size: 3.4rem; font-weight: 800; line-height: 1.06; letter-spacing: -0.02em; text-transform: none; color: var(--navy-blue); margin-bottom: 26px; }
.why-text { color: var(--text-muted); font-size: 1rem; line-height: 1.75; margin-bottom: 30px; max-width: 40ch; }
.why-links { display: flex; flex-direction: column; gap: 14px; }
.why-links a { color: var(--primary-blue); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 9px; width: fit-content; }
.why-links a i { font-size: 0.78rem; transition: transform 0.2s; }
.why-links a:hover i { transform: translateX(5px); }

/* Right feature grid — column-flow so dividers read like the reference */
.why-features { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: auto auto; border-left: 1px solid var(--border-color); }
.why-feature { padding: 4px 38px 38px; }
.why-feature:nth-child(2), .why-feature:nth-child(4) { border-top: 1px solid var(--border-color); padding-top: 38px; }
.why-feature:nth-child(3), .why-feature:nth-child(4) { border-left: 1px solid var(--border-color); }
.why-ico { display: block; width: 46px; height: 46px; margin-bottom: 18px; }
.why-ico .ico-line { stroke: var(--primary-blue); fill: none; }
.why-ico .ico-soft { fill: rgba(0,86,179,0.12); stroke: none; }
.why-ico .ico-dot { fill: var(--primary-blue); stroke: none; }
.why-feature:hover .why-ico .ico-soft { fill: rgba(0,86,179,0.2); }
.why-ico { transition: transform 0.25s ease; }
.why-feature:hover .why-ico { transform: translateY(-3px); }
.why-feature h3 { font-size: 1.15rem; letter-spacing: -0.01em; text-transform: none; margin-bottom: 10px; }
.why-feature p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.65; }

/* Partners Marquee */
.partners { padding: 60px 0; background: var(--white); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.partners .section-title { font-size: 1.8rem; margin-bottom: 40px; }
.marquee { position: relative; overflow: hidden; width: 100%; }
/* плавне згасання по краях */
.marquee::before, .marquee::after { content: ''; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(to right, var(--white), rgba(255,255,255,0)); }
.marquee::after { right: 0; background: linear-gradient(to left, var(--white), rgba(255,255,255,0)); }
.marquee-track { display: flex; width: max-content; animation: scroll 25s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
/* трек містить 2 однакові набори → зсув на 50% дає безшовний цикл */
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item { flex: 0 0 auto; width: 200px; display: flex; justify-content: center; align-items: center; padding: 0 25px; }
.marquee-item img { max-width: 100%; max-height: 45px; filter: grayscale(100%) opacity(0.6); transition: filter 0.3s; }
.marquee-item img:hover { filter: grayscale(0%) opacity(1); }

/* Pricing Section */
.pricing { padding: 100px 0; background-image: url('../images/trust_tariff_bg_1779315588488.png'); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; align-items: stretch; }
.pricing-card { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 40px; display: flex; flex-direction: column; color: var(--text-main); }
.pricing-card.pro { border: 2px solid var(--primary-blue); box-shadow: 0 15px 35px rgba(0,0,0,0.2); transform: scale(1.02); position: relative; }
.pricing-header { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.pricing-header h3 { font-size: 1.25rem; text-transform: uppercase; color: var(--text-muted); }
.pricing-card.pro .pricing-header h3 { color: var(--primary-blue); font-weight: 800; }
.price { font-size: 3rem; font-weight: 700; color: var(--navy-blue); }
.price span { font-size: 1rem; color: var(--text-muted); }
.pricing-features { list-style: none; margin-bottom: 30px; flex-grow: 1; }
.pricing-features li { padding: 12px 0; border-bottom: 1px solid var(--bg-light); font-size: 0.95rem; }
.pricing-features li:before { content: '✓'; color: var(--success); font-weight: bold; margin-right: 10px; }
.pricing-card .section-title, .pricing-card h2, .pricing-card h3 { color: var(--navy-blue) !important; }

/* Pricing as Swiper (slider on mobile, grid-like on desktop) */
.swiper.pricing-swiper { padding: 14px 4px 10px; }
.pricing-swiper .swiper-wrapper { align-items: stretch; }
.pricing-swiper .swiper-slide { width: auto; height: auto; perspective: none; cursor: default; display: flex; }
.pricing-swiper .swiper-slide .pricing-card { width: 100%; height: 100%; }
.pricing-swiper .pricing-card.pro { transform: none; }
.pricing-pagination { position: static; margin-top: 24px; }
.pricing-pagination .swiper-pagination-bullet { background: rgba(255,255,255,0.45); opacity: 1; width: 9px; height: 9px; transition: background 0.2s, width 0.2s; }
.pricing-pagination .swiper-pagination-bullet-active { background: var(--white); width: 26px; border-radius: 5px; }
@media (min-width: 992px) { .pricing-pagination { display: none; } }

/* Cases (Swiper) */
.cases { padding: 100px 0; background: var(--bg-gray); overflow: hidden; }
.swiper { width: 100%; padding: 40px 0; }
.swiper-slide { width: 350px; height: 450px; perspective: 1000px; cursor: pointer; }
.case-swiper-item-inner { position: relative; width: 100%; height: 100%; text-align: left; transition: transform 0.6s; transform-style: preserve-3d; }
.swiper-slide.flipped .case-swiper-item-inner { transform: rotateY(180deg); }
/* hover-фліп лише для пристроїв з мишею, щоб не залипало на тачі */
@media (hover: hover) {
    .swiper-slide:hover .case-swiper-item-inner { transform: rotateY(180deg); }
}
.case-swiper-item-front, .case-swiper-item-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); display: flex; flex-direction: column; }
.case-swiper-item-back { transform: rotateY(180deg); background: var(--navy-blue); color: var(--white); border-color: var(--navy-blue-light); }
.case-swiper-item-top-container { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.photo-container { width: 60px; height: 60px; border-radius: 4px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--border-color); }
.photo-container img { width: 100%; height: 100%; object-fit: cover; }
.name-container { font-weight: 700; font-size: 1.1rem; color: var(--navy-blue); }
.case-swiper-item-back .name-container { color: var(--white); }
.case-swiper-item-front .case-index-header { border-bottom: 1px solid var(--border-color); }
.case-swiper-item-back .case-index-header { border-bottom: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
.case-index-header { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; margin-bottom: 15px; padding-bottom: 10px; }
.case-index-value-content { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 1rem; font-weight: 600; }
.case-index-value-content span:first-child { color: var(--text-muted); font-weight: 400; }
.case-swiper-item-back .case-index-value-content span:first-child { color: rgba(255,255,255,0.7); }
.case-swiper-item-front .diff-positive { color: var(--success); font-size: 0.85rem; margin-left: 5px; }
.case-swiper-item-back .case-index-value { color: #ff6b6b; }

/* Підказка про гортання (лише мобільний) */
.cases-pagination { position: static; margin-top: 26px; display: none; }
.cases-pagination .swiper-pagination-bullet { background: var(--navy-blue); opacity: 0.22; width: 9px; height: 9px; transition: opacity 0.2s, width 0.2s; }
.cases-pagination .swiper-pagination-bullet-active { opacity: 1; width: 26px; border-radius: 5px; }
.swipe-hint { display: none; text-align: center; margin-top: 14px; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; }
.swipe-hint i { color: var(--primary-blue); margin-right: 7px; display: inline-block; animation: swipeNudge 1.6s ease-in-out infinite; }
@keyframes swipeNudge { 0%, 100% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }
.case-swiper-flip-btn { margin-top: auto; text-align: center; font-weight: 600; font-size: 0.9rem; text-transform: uppercase; }
.case-swiper-item-front .case-swiper-flip-btn { color: var(--primary-blue); }
.case-swiper-item-back .case-swiper-flip-btn { color: var(--white); }
.swiper-button-next, .swiper-button-prev { color: var(--navy-blue) !important; }

/* Audio Reviews Section */
.reviews { padding: 100px 0; background-image: url('../images/trust_about_bg_1779315539663.png'); }
.reviews-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; max-width: 900px; margin: 0 auto; }
.audio-item { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 15px; }
.audio-controls { display: flex; gap: 10px; }
.btn-audio { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-blue); color: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; font-size: 1.2rem; transition: background 0.2s; }
.btn-audio:hover { background: var(--white); color: var(--primary-blue); }
.track-info { flex-grow: 1; }
.track-name { font-weight: 600; font-size: 1rem; margin-bottom: 5px; }
.track-progress { height: 6px; background: rgba(255,255,255,0.2); border-radius: 3px; overflow: hidden; position: relative; }
.track-progress-bar { position: absolute; top: 0; left: 0; height: 100%; background: var(--primary-blue); width: 30%; }

/* Contact Form Section */
.contact { padding: 100px 0; background-image: url('../images/trust_whywe_bg_1779315571255.png'); }
.contact .container { max-width: 600px; }
.contact-form { background: var(--white); padding: 40px; border-radius: var(--radius); border: 1px solid var(--border-color); box-shadow: 0 10px 40px rgba(0,0,0,0.05); color: var(--text-main); }
.contact-form .section-title { color: var(--navy-blue); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.95rem; }
.form-control { width: 100%; padding: 12px 15px; border: 1px solid var(--border-color); border-radius: var(--radius); font-family: var(--font-sans); font-size: 1rem; transition: border-color 0.2s; }
.form-control:focus { outline: none; border-color: var(--primary-blue); }
textarea.form-control { min-height: 120px; resize: vertical; }

/* Footer */
.footer { background: var(--navy-blue); color: var(--white); padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { color: rgba(255,255,255,0.7); margin-top: 15px; font-size: 0.95rem; }
.footer h4 { color: var(--white); margin-bottom: 20px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.2s; }
.footer ul a:hover { color: var(--white); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); font-size: 0.85rem; }

/* MOBILE RESPONSIVENESS */
@media (max-width: 992px) {
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-card.pro { transform: none; }
    /* Why Us → лід зверху, переваги під ним */
    .why-grid { grid-template-columns: 1fr; }
    .why-lead { padding-right: 0; margin-bottom: 50px; }
    .why-bigtitle { font-size: 2.8rem; }
    .why-features { border-left: none; }
    .why-feature:first-child { padding-left: 0; }
    .why-feature:nth-child(3) { padding-left: 38px; }
}

@media (max-width: 768px) {
    .header { padding: 10px 0; }
    .mobile-menu-btn { display: block; z-index: 1001; }

    /* Мобільне меню — випадна панель під хедером */
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 14px 28px rgba(10,25,47,0.1);
        padding: 6px 0 12px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }
    .nav.active { opacity: 1; visibility: visible; transform: translateY(0); }
    .nav > a { padding: 14px 20px; border-bottom: 1px solid var(--bg-light); }
    .nav-socials { padding: 16px 20px 4px; gap: 22px; justify-content: flex-start; }
    .nav-socials a { width: auto; height: auto; }

    .hero { padding: 120px 0 80px; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    .hero-actions { flex-direction: column; }
    .section-title { font-size: 2rem; }
    .why-grid, .pricing-grid, .reviews-grid, .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .stat-item { padding: 20px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); }

    /* Кейси: одна картка по центру; ширину рахує сам Swiper (slidesPerView:1) */
    .cases-swiper { padding: 20px 0; }
    .cases-swiper .swiper-slide { height: 470px; }
    .case-swiper-item-front, .case-swiper-item-back { padding: 25px 22px; }
    .swiper-button-next, .swiper-button-prev { display: none; }
    .cases-pagination { display: block; }
    .swipe-hint { display: block; }

    .contact-form { padding: 20px; }

    /* Фонові секції: fixed-attachment глючить на iOS → робимо звичайний скрол */
    .bg-section { background-attachment: scroll; }

    /* Статистика: 2 колонки замість витягнутого стовпця */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .stat-item h3 { font-size: 2.4rem; }

    /* Why Us → переваги в один стовпець, горизонтальні роздільники */
    .why-bigtitle { font-size: 2.2rem; }
    .why-features { grid-template-columns: 1fr; grid-auto-flow: row; }
    .why-feature { padding: 28px 0 !important; border-left: none !important; }
    .why-feature:first-child { padding-top: 0 !important; }
    .why-feature:not(:first-child) { border-top: 1px solid var(--border-color) !important; }
}
