/* =========================================================
   FINAL DESIGN — PERSONAL ATTORNEY (DARK EDITORIAL)
   ========================================================= */

/* =========================
   DESIGN TOKENS
   ========================= */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/inter-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/inter-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-body: #0e1424;
    --bg-header: #0b1220;
    --bg-hero: linear-gradient(135deg, #0e1424 0%, #121a2f 100%);
    --bg-light: #e4e7ec;

    --text-light: #e5e7eb;
    --text-muted-light: #9ca3af;
    --text-dark: #0f172a;
    --text-muted-dark: #374151;

    --accent: #2f4a7c;

    --border-light: #e5e7eb;

    --shadow-photo: 0 18px 60px rgba(0, 0, 0, 0.45);
}

/* =========================
   RESET / BASE
   ========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-light);
    line-height: 1.6;

    overflow-y: scroll;
    scrollbar-gutter: stable;
}

/* =========================
   HEADER
   ========================= */

header {
    background-color: var(--bg-header);
    padding: 16px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header strong {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

header div {
    line-height: 1.3;
}

header {
    position: relative;
    z-index: 6000;
}

/* =========================
   HEADER — STAGGERED PAGE TRANSITION
   ========================= */

header {
    transform: translateY(-24px);
    opacity: 0;

    transition:
        transform 0.55s cubic-bezier(0.12, 1, 0.25, 1),
        opacity 0.45s ease;
}

/* внутрішні елементи стартують окремо */
header .site-logo,
header nav {
    opacity: 0;
    transform: translateY(-8px);

    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

/* header з’явився */
header.header-visible {
    transform: translateY(0);
    opacity: 1;
}

/* логотип — перший */
header.header-visible .site-logo {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.12s;
}

/* меню — другим */
header.header-visible nav {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}


/* =========================================================
   ACTIVE MENU POINT (HEADER)
   ========================================================= */

    nav a.active {
    color: #ffffff;
}

nav a.active::after {
    transform: scaleX(1);
}

/* =========================
   NAVIGATION
   ========================= */

nav {
    display: flex;
    gap: 18px;
}

nav a {
    position: relative;
    color: var(--text-muted-light);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding-bottom: 4px;
}

nav a:hover {
    color: #ffffff;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 2px;

    background-color: var(--accent);

    opacity: 1;                 /* ← ВАЖЛИВО */
    transform: scaleX(0);
    transform-origin: left;

    transition: transform 0.2s ease;
}

/* =========================
   MAIN LAYOUT
   ========================= */

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}

section {
    margin-bottom: 64px;
}

.hero + section {
    margin-top: -32px;
}

/* =========================
   HERO
   ========================= */

.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 56px;
    align-items: center;
    margin-bottom: 140px;
}

.hero-inner {
    background: var(--bg-hero);
    padding: 64px 56px;
    border-radius: 16px;
    min-height: 420px;
    display: flex;
    align-items: center;
}

.hero-text {
    max-width: 440px;
}

.hero-text h1 {
    font-size: 44px;
    line-height: 1.15;
    margin-bottom: 20px;
    color: #ffffff;
}

.hero-text p {
    font-size: 18px;
    color: var(--text-muted-light);
    line-height: 1.7;
}

/* =========================
   HERO ACTIONS
   ========================= */

.hero-actions {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-actions a:hover {
    cursor: pointer;
}

.hero-actions a {
    width: 280px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;

    transition:
        background-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

/* primary CTA */
.button-primary {
    background-color: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid rgba(15, 23, 42, 0.14);

    font-size: 17.5px; 
}

.button-primary:hover {
    background-color: #b9c2d1; 
    color: #0b1220;            
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, 0.22),
        0 12px 28px rgba(15, 23, 42, 0.32);
}

.button-primary:hover {
    color: #0b1220;
}

.button-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08); 
    border-color: rgba(255, 255, 255, 0.55);    
    transform: translateY(-1px);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.22),
        0 5px 12px rgba(0, 0, 0, 0.28);
}

/* secondary CTA */
.button-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.button-primary:active,
.button-secondary:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.22);
}

/* =========================
   HERO PHOTO
   ========================= */

.hero-photo {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-photo);
}

.hero-photo img {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================
   HERO SCROLL INDICATOR
   ========================= */

.hero::after {
    content: "↓";
    position: absolute;
    bottom: -64px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    animation: scrollHint 1.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes scrollHint {
    0% {
        transform: translate(-50%, 0);
        opacity: 0.35;
    }
    50% {
        transform: translate(-50%, 6px);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, 0);
        opacity: 0.35;
    }
}

/* =========================
   CONTENT SECTIONS
   ========================= */

main section:not(.hero) {
    background-color: var(--bg-light);
    padding: 56px 64px;
    border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

main section:not(.hero) h2 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-dark);
}

main section:not(.hero) p,
main section:not(.hero) ul,
main section:not(.hero) ol {
    color: var(--text-muted-dark);
}

/* TEXT CONTRAST — GLOBAL (DESKTOP + MOBILE) */
main section:not(.hero) p,
main section:not(.hero) li {
    color: #1f2937;
}

/* =========================
   TYPOGRAPHY
   ========================= */

h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

ul,
ol {
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
}

/* =========================
   CONTENT LINKS (EDITORIAL STYLE)
   ========================= */

main section:not(.hero) a,
main section:not(.hero) a:visited {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

main section:not(.hero) a:hover,
main section:not(.hero) a:focus-visible {
    color: #243b66; /* трохи темніше за accent */
    text-decoration-thickness: 2px;
}


/* =========================
   FAQ
   ========================= */

.faq {
    max-width: 860px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    padding: 18px 0;
    cursor: pointer;

    font-size: 18px;      /* ← ВАЖЛИВО */
    font-weight: 500;
    line-height: 1.6;

    color: var(--accent);
}

.faq-answer {
    height: 0;
    overflow: hidden;

    opacity: 0;
    transform: translateY(-6px);

    transition:
        height 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s ease,
        transform 0.35s ease;
}

.faq-answer p {
    color: var(--text-muted-dark);
    margin-top: 8px;
}

.faq-item.active .faq-answer {
    opacity: 1;
    transform: translateY(0);
}

.faq-icon {
    display: inline-block;
    margin-left: 12px;

    transition: transform 0.3s ease;
}

/* коли FAQ відкритий */
.faq-item.active .faq-icon {
    transform: rotate(180deg);
}


/* =========================
   FORMS
   ========================= */

label {
    font-weight: 500;
    color: var(--text-dark);
}

input,
textarea {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    margin-top: 6px;
}

textarea {
    width: 100%;
    min-height: 120px;

    resize: both;

    max-width: 100%;
    min-width: 50%;

    box-sizing: border-box;
}

.contact-form button {
    width: 280px;
    height: 56px;
    background-color: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

/* =========================
   TOAST MESSAGE
   ========================= */

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    max-width: 320px;

    background: #f0f4ff;
    color: #1f2933;

    padding: 14px 18px;
    border-left: 4px solid var(--accent);
    border-radius: 8px;

    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);

    font-size: 14px;
    line-height: 1.4;

    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;

    transition:
        opacity 0.35s ease,
        transform 0.35s ease;

    z-index: 4000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   FOOTER
   ========================= */

footer {
    background-color: var(--bg-header);
    color: var(--text-muted-light);
    text-align: center;
    padding: 48px 16px;
    font-size: 14px;
}

footer a {
    color: var(--text-muted-light);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer p:last-of-type {
    font-size: 13px;
}

footer p:first-of-type {
    color: #ffffff;
}

/* =========================
   CHECKBOX
   ========================= */

input[type="checkbox"] {
    width: auto;
    accent-color: var(--accent);
}

.messengers {
    display: inline-flex;
    gap: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

.messengers a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.messengers a:hover {
    transform: translateY(-2px);
    opacity: 0.85;
}

.messengers img {
    width: 100%;
    height: auto;
    display: block;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

.site-logo:hover {
    opacity: 0.9;
}

/* =========================
   SAFE CONTENT FADE-IN — ULTRA SMOOTH (CSS LIMIT)
   ========================= */

main {
    animation: contentFadeIn 980ms cubic-bezier(0.12, 1, 0.25, 1);
    animation-delay: 140ms;
    animation-fill-mode: both;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   SCROLL TO TOP
   ========================= */

.scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 12px 16px;
    background-color: rgba(15, 23, 42, 0.85);
    color: #ffffff;

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;

    font-size: 14px;
    font-weight: 500;

    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1000;
}

.scroll-top-arrow {
    font-size: 18px;
    line-height: 1;
}

.scroll-top:hover {
    background-color: rgba(15, 23, 42, 0.95);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* FLOATING CONTACT */

.floating-contact {
    position: fixed;
    right: 24px;
    bottom: 96px;
    z-index: 1001;
}

.floating-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background-color: #2f4a7c;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    animation: pulse 2.2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(47,74,124,0.5); }
    70% { box-shadow: 0 0 0 14px rgba(47,74,124,0); }
    100% { box-shadow: 0 0 0 0 rgba(47,74,124,0); }
}

.floating-menu {
    position: absolute;
    bottom: 72px;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.25);
    padding: 8px 0;
    width: 260px;

    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);

}

.floating-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-item {
    display: block;
    padding: 12px 18px;
    font-size: 14px;
    color: #0f172a;
    text-decoration: none;
}

.floating-item:hover {
    background: #f1f5f9;
}

.floating-menu {
    transition:
        opacity 0.28s ease,
        transform 0.28s ease,
        visibility 0s linear 0.28s;
}

.floating-contact:hover .floating-menu {
    transition:
        opacity 0.28s ease,
        transform 0.28s ease,
        visibility 0s;
}

.floating-item {
    display: flex;
    align-items: center;
    gap: 12px;

    opacity: 0;
    transform: translateY(6px);

    transition:
        opacity 0.28s ease,
        transform 0.28s ease;
}

@media (hover: hover) and (pointer: fine) {

    .floating-contact:hover .floating-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .floating-contact:hover .floating-item {
        opacity: 1;
        transform: translateY(0);
    }

}

.floating-contact:hover .floating-item:nth-child(1) {
    transition-delay: 0.05s;
}

.floating-contact:hover .floating-item:nth-child(2) {
    transition-delay: 0.12s;
}

.floating-contact:hover .floating-item:nth-child(3) {
    transition-delay: 0.19s;
}

.floating-contact:hover .floating-item:nth-child(4) {
    transition-delay: 0.26s;
}

.floating-contact:hover .floating-item:nth-child(5) {
    transition-delay: 0.33s;
}

.floating-item {
    transition-delay: 0s;
}

/* =========================================================
   Floating contact icons alignment
   ========================================================= */

.floating-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* icon container */
.floating-item img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

/* optical compensation for line-icons */
.floating-item img[src*="phone.png"],
.floating-item img[src*="form.png"] {
    transform: scale(0.95);
}

/* =========================
   COOKIE CONSENT BAR (BOTTOM)
   ========================= */

.cookie-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;

    background: rgba(11, 18, 32, 0.96);
    backdrop-filter: none;

    padding: 20px 24px;
    z-index: 7000;

    display: none;
}

.cookie-bar.active {
    display: block;
}

.cookie-bar .cookie-box {
    max-width: 1100px;
    margin: 0 auto;

    background: transparent;
    color: #e5e7eb;
    padding: 0;
    border-radius: 0;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.35);
}

.cookie-bar .cookie-box h2 {
    font-size: 16px;
    margin-bottom: 6px;
    color: #ffffff;
}

.cookie-bar .cookie-box p {
    font-size: 14px;
    margin-bottom: 6px;
    color: #d1d5db;
}

.cookie-bar .cookie-box a {
    color: #93c5fd;
    text-decoration: underline;
}

.cookie-bar .cookie-actions {
    margin-top: 12px;
    display: flex;
    gap: 12px;
}

.cookie-bar .cookie-actions button {
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
    border-radius: 6px;
}

/* =========================
   COOKIE BAR BUTTONS — SITE STYLE
   ========================= */

.cookie-bar #cookieAccept {
    background-color: #eef1f6;
    color: var(--text-dark);
    border: 1px solid rgba(15, 23, 42, 0.14);
    transition: background-color 0.15s ease,
                box-shadow 0.15s ease,
                transform 0.15s ease;
}

.cookie-bar #cookieAccept:hover {
    background-color: #d9dde4;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
}

.cookie-bar #cookieAccept:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px rgba(47, 74, 124, 0.35),
        0 6px 16px rgba(15, 23, 42, 0.18);
}

.cookie-bar #cookieReject {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: background-color 0.15s ease,
                transform 0.15s ease;
}

.cookie-bar #cookieReject:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

/* =========================
   COOKIE PENDING — READ ONLY MODE
   ========================= */

body.cookies-pending a,
body.cookies-pending button,
body.cookies-pending input,
body.cookies-pending textarea,
body.cookies-pending select {
    pointer-events: none;
}

/* дозволено: політика конфіденційності */
body.cookies-pending a[href*="privacy-policy"] {
    pointer-events: auto;
}

/* дозволено: ВСЯ форма cookie-consent */
body.cookies-pending .cookie-bar,
body.cookies-pending .cookie-bar * {
    pointer-events: auto;
}

/* =========================
   SUBTLE PAGE DIMMING WHILE COOKIE PENDING
   ========================= */

body.cookies-pending::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(1px);
    pointer-events: none;
    z-index: 2000;
}

/* =========================
   COOKIE DIMMING — POLICY PAGE (SOFTER)
   ========================= */

body.policy-page.cookies-pending::before {
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: none;
}

/* =========================
   COOKIE BAR SAFE SPACE — POLICY PAGE
   ========================= */

body.policy-page.cookies-pending {
    padding-bottom: 160px;
}

/* =========================================================
   ACCESSIBILITY / USER COMFORT
   Підсвітка активного елемента при навігації клавіатурою.
   ========================================================= */

:focus-visible {
    outline: 2px solid rgba(47, 74, 124, 0.6);
    outline-offset: 2px;
}

/* =========================
   PROCESS TIMELINE — FINAL
   ========================= */

.process-timeline {
    padding: 40px 48px !important;
}

.process-timeline .timeline {
    position: relative;
    max-width: 720px;
    margin: 32px auto 0;
    padding-left: 96px; /* місце: лінія + коло + повітря */
}

/* Вертикальна лінія */
.process-timeline .timeline::before {
    content: "";
    position: absolute;
    left: 32px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--accent);
    opacity: 0.3;
}

/* Елемент таймлайну */
.timeline-item {
    position: relative;
    margin-bottom: 36px;

    transform: translateX(-24px);
    transition: transform 0.45s cubic-bezier(0.12, 1, 0.25, 1);
}

.timeline-item.visible {
    transform: translateX(0);
}

/* Коло з римською цифрою */
.timeline-marker {
    position: absolute;
    left: -50px; /* ПРАВОРУЧ від лінії */
    top: 2px;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 15px;          /* ⬅️ трохи більше */
    font-weight: 600;
    line-height: 1;

    color: var(--accent);
    background-color: var(--bg-light);

    border: 1.5px solid var(--accent);
    border-radius: 50%;
}

/* Контент */
.timeline-content {
    padding-left: 0px; /* відступ ВІД кола */
}

.timeline-content h3 {
    margin-top: 0;
}

/* Легка послідовність */
.timeline-item:nth-child(1) { transition-delay: 0s; }
.timeline-item:nth-child(2) { transition-delay: 0.06s; }
.timeline-item:nth-child(3) { transition-delay: 0.12s; }
.timeline-item:nth-child(4) { transition-delay: 0.18s; }

/* =========================
   BACK LINK — CONTACT FORM
   ========================= */

main section:not(.hero) a.back-link {
    display: inline-block;
    margin-bottom: 18px;

    font-size: 14px;
    font-weight: 500;

    color: var(--text-muted-dark);
    text-decoration: none;

    opacity: 0.85;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

main section:not(.hero) a.back-link:hover {
    opacity: 1;
    transform: translateX(-2px);
}

/* =========================
   INLINE MOVE LINK (ERAU)
   ========================= */

main section:not(.hero) a.inline-move-link {
    display: inline-block;
    text-decoration: none;
    color: var(--accent);

    opacity: 0.85;
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}

main section:not(.hero) a.inline-move-link:hover {
    opacity: 1;
    transform: translateX(2px);
    text-decoration: underline;
}

/* =========================
   CONTACT PHONE — HERO FIX
   ========================= */

.hero .contacts-list a[href^="tel:"] {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;

    opacity: 0.9;

    transition:
        transform 0.22s cubic-bezier(0.12, 1, 0.25, 1),
        text-decoration-thickness 0.2s ease;
}

.hero .contacts-list a[href^="tel:"]:hover {
    transform: translateX(6px);
    text-decoration-thickness: 2px;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
}

/* =========================
   PRIMARY INLINE CTA
   ========================= */

main section:not(.hero) a.primary-inline-cta {
    font-size: 18px;        
    font-weight: 500;       
    line-height: 1.5;
}

/* =========================
   DESKTOP READABILITY BOOST
   ========================= */

@media (min-width: 1024px) {

    main section:not(.hero) p,
    main section:not(.hero) li {
        font-size: 18px;
        line-height: 1.6;
    }

}

/* =========================
   MOBILE OPTIMIZATION — CONTENT BLOCKS
   ========================= */

@media (max-width: 768px) {

    main {
        padding: 24px 16px;
    }

    main section:not(.hero) {
        padding: 28px 20px;
        border-radius: 12px;
        margin-bottom: 32px;
    }

    main section:not(.hero) h2 {
        font-size: 22px;
        line-height: 1.3;
    }

    main section:not(.hero) p,
    main section:not(.hero) ul,
    main section:not(.hero) ol {
        font-size: 15.5px;
        line-height: 1.6;
    }

}


/* =========================
   MOBILE HERO OPTIMIZATION
   ========================= */

@media (max-width: 768px) {

    .hero {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 48px;
    }

    .hero-inner {
        padding: 24px 20px;
        min-height: auto;
        border-radius: 14px;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-text h1 {
        font-size: 30px;
        line-height: 1.2;
        margin-bottom: 16px;
    }

    .hero-text p {
        font-size: 16px;
        line-height: 1.6;
    }

    .hero-photo {
        max-width: 100%;
        border-radius: 12px;
    }

}

/* =========================
   MOBILE BUTTONS / CTA
   ========================= */

@media (max-width: 768px) {

    .hero-actions a,
    .contact-form button {
        width: 100%;
        height: 52px;
        font-size: 16px;
    }

    .hero-actions {
        gap: 10px;
    }

}

/* =========================
   MOBILE NAVIGATION (HAMBURGER)
   ========================= */

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    color: #ffffff;
    cursor: pointer;
}

@media (max-width: 768px) {

    header {
        padding: 12px 16px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .menu-toggle {
        display: block;
    }

 nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;

    background-color: var(--bg-header);
    padding: 16px;

    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);

    display: flex;
    flex-direction: column;
    gap: 14px;

    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;

    transition:
        opacity 0.28s ease,
        transform 0.28s cubic-bezier(0.12, 1, 0.25, 1);
}

    nav a {
        font-size: 16px;
        padding: 6px 0;
    }
}

@media (max-width: 768px) {
    header.header-visible nav {
        transition-delay: 0s;
    }
}

/* =========================
   MOBILE NAV — FINAL OVERRIDE
   ========================= */

@media (max-width: 768px) {

    /* базовий стан — меню сховане */
    header.header-visible nav {
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
    }

    /* відкритий стан — ТІЛЬКИ через hamburger */
    header.header-visible nav.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

}

/* =========================
   MOBILE NAV — FINAL VISUAL FIX
   ========================= */

@media (max-width: 768px) {

    /* прибрати вертикальні розділювачі | */
    nav a::before,
    nav a::after {
        content: none !important;
        display: none !important;
    }

    /* зробити пункти меню повноцінними tappable-блоками */
    nav a {
        display: block;
        padding: 10px 12px;
        border-radius: 8px;
        font-size: 16px;
        line-height: 1.4;
    }

    nav a:hover,
    nav a:focus-visible {
        background-color: rgba(255, 255, 255, 0.06);
    }

    /* трохи ущільнити меню */
    nav {
        gap: 8px;
    }

}

@media (max-width: 768px) {
    header nav {
        font-size: 0;
    }

    header nav a {
        font-size: 16px;
    }
}

/* =========================
   FOOTER NAV — MOBILE FIX
   ========================= */

footer .footer-nav a {
    white-space: nowrap;
}

/* =========================
   PROCESS TIMELINE — MOBILE OPTIMIZED (KEEP CONCEPT)
   ========================= */
@media (max-width: 768px) {

    .process-timeline {
        padding: 28px 20px !important;
    }

    .process-timeline .timeline {
        padding-left: 56px; /* було 96px */
    }

    /* вертикальна лінія — ближче і тонша */
    .process-timeline .timeline::before {
        left: 20px;
        width: 1.5px;
        opacity: 0.25;
    }

    /* елемент — менше "заїзду" */
    .timeline-item {
        margin-bottom: 28px;
        transform: translateX(-12px); /* було -24px */
    }

    .timeline-item.visible {
        transform: translateX(0);
    }

    /* коло — компактніше */
    .timeline-marker {
        left: -36px;
        width: 26px;
        height: 26px;

        font-size: 13px;
        border-width: 1.2px;
    }

    .timeline-content h3 {
        font-size: 17px;
        line-height: 1.35;
        margin-bottom: 6px;
    }

    .timeline-content p {
        font-size: 15.5px;
        line-height: 1.6;
    }
}

/* =========================
   FAQ — MOBILE OPTIMIZED ANIMATION
   ========================= */


@media (max-width: 768px) {
    .faq-question {
        font-size: 15.5px;
        line-height: 1.6;
    }
}

/* MOBILE CLICK STATE */
.floating-contact.open .floating-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-contact.open .floating-item {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   MOBILE LANDSCAPE FIX
   ========================= */

@media (max-height: 500px) and (orientation: landscape) {

    .menu-toggle {
        display: block;
    }

    /* меню — ЗАКРИТЕ за замовчуванням */
    header.header-visible nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 16px;
        right: 16px;

        background-color: var(--bg-header);
        padding: 16px;

        border-radius: 12px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);

        display: flex;
        flex-direction: column;
        gap: 12px;

        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
    }

    /* відкриття ТІЛЬКИ через .open */
    header.header-visible nav.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* кнопка контактів — ВИЩЕ */
    .floating-contact {
        bottom: 88px;
        right: 16px;
        z-index: 1200;
    }

    /* кнопка "вгору" — ПІД контактами */
    .scroll-top {
        bottom: 16px;
    }

}

/* =========================
   KEYBOARD SAFE AREA
   ========================= */

@media (max-height: 500px) {

    .floating-menu {
        max-height: 60vh;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

}

/* =========================
   MOBILE LANDSCAPE HEADER FULL-WIDTH FIX
   ========================= */

@media (max-height: 500px) and (orientation: landscape) {

    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        overflow-y: auto;          /* ❗️зняти scrollbar-gutter ефект */
        scrollbar-gutter: auto;
    }

    header {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        padding-left: 16px;
        padding-right: 16px;
    }

}

/* =========================================
   MOBILE MENU — HIDE TEXT SEPARATORS "|"
   (portrait + landscape)
   ========================================= */

@media (max-width: 768px), 
       (max-height: 500px) and (orientation: landscape) {

    header nav {
        font-size: 0; /* ховає текстові | */
    }

    header nav a {
        font-size: 16px; /* повертає текст пунктів */
    }

}

/* =========================================
   MOBILE: DISABLE DESKTOP UNDERLINE
   ========================================= */

@media (max-width: 768px),
       (max-height: 500px) and (orientation: landscape) {

    nav a::after {
        display: none !important;
        content: none !important;
    }

}

/* =========================================
   FINAL FIX: FLOATING CONTACT IN LANDSCAPE
   ========================================= */

@media (max-height: 500px) and (orientation: landscape) {

    .floating-contact {
        bottom: 88px;
    }

    .floating-contact .floating-menu {
        position: fixed;
        top: 72px;
        right: 88px; /* ← КЛЮЧОВЕ */

        bottom: auto;
        max-height: calc(100vh - 88px);
        overflow-y: auto;

        transform: none;
    }

}

/* =========================================
   HERO GRID FIX — MOBILE LANDSCAPE
   ========================================= */

@media (max-height: 500px) and (orientation: landscape) {

    .hero {
        grid-template-columns: 1fr 360px; /* було 420px */
        gap: 32px;                        /* було 56px */
    }

}

@media (max-height: 500px) and (orientation: landscape) {

    .hero-photo img {
        transform: scale(1.08);
        transform-origin: center;
    }

}