/* ========================================
   Landi Header — Three-Section Layout
   ========================================
   1. .landi-infobar       — White: logo + info links + phone (sticky)
   2. .landi-services-bar  — Green: service items with dropdowns
   3. .landi-mobile-menu   — Slide-down overlay for mobile
   4. .landi-nav-spacer    — Compensates for header height
   ======================================== */

/* ----- Header Container (full-width with padding) ----- */
.landi-header__container {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (min-width: 1400px) {
    .landi-header__container {
        padding: 0 3rem;
    }
}

/* ----- INFO BAR ----- */
.landi-infobar {
    background: #fff;
    position: relative;
    z-index: 1030;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

/* На мобильных: fixed для доступа к гамбургеру */
@media (max-width: 991.98px) {
    .landi-infobar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1040;
    }
}

.landi-infobar.scrolled {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}

@media (max-width: 991.98px) {
    body.admin-bar .landi-infobar {
        top: 32px;
    }
}

@media (max-width: 782px) {
    body.admin-bar .landi-infobar {
        top: 46px;
    }
}

.landi-infobar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100px;
    gap: 1.25rem;
}

/* Logo */
.landi-infobar__brand {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: #2E8B57;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}

.landi-infobar__brand:hover {
    color: #2E8B57;
}

.landi-infobar__brand .landi-infobar__icon-wrap {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2E8B57, #278A50);
    border-radius: 10px;
    color: #fff;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Info nav links */
.landi-infobar__nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    margin-right: 1.5rem;
}

.landi-infobar__link {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #4A5568;
    text-decoration: none;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.25s ease, background-color 0.25s ease;
    white-space: nowrap;
}

.landi-infobar__link:hover {
    color: #2E8B57;
    background-color: rgba(46, 139, 87, 0.06);
}

.landi-infobar__icon-wrap {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1F3F5;
    border-radius: 8px;
    flex-shrink: 0;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.landi-infobar__link .landi-infobar__icon-wrap {
    color: #6B7280;
    font-size: 0.875rem;
}

.landi-infobar__link:hover .landi-infobar__icon-wrap {
    background: rgba(46, 139, 87, 0.1);
    color: #2E8B57;
}

/* Contact group: messengers + phone */
.landi-infobar__contact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Messenger buttons */
.landi-infobar__messenger {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.125rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landi-infobar__messenger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.landi-infobar__messenger--wa {
    background: #25D366;
    color: #fff;
}

.landi-infobar__messenger--tg {
    background: #2AABEE;
    color: #fff;
}

/* Phone */
.landi-infobar__phone {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a2e;
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color 0.25s ease;
    letter-spacing: 0.01em;
    margin-left: 0.25rem;
}

.landi-infobar__phone:hover {
    color: #2E8B57;
}


/* ----- SERVICES BAR (sticky menu — card style with icons) ----- */
.landi-services-bar {
    background: #f5f6f8;
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
    border-bottom: 1px solid #e5e7eb;
}

.landi-services-bar.stuck {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.admin-bar .landi-services-bar {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .landi-services-bar {
        top: 46px;
    }
}

.landi-services-bar__container {
    max-width: 1680px;
    margin: 0 auto;
    padding: 8px 2rem;
}

@media (min-width: 1400px) {
    .landi-services-bar__container {
        padding: 8px 3rem;
    }
}

.landi-services-bar__nav {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
}

.landi-services-bar__item {
    position: relative;
    flex: 1 1 0;
}

.landi-services-bar__link {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    text-decoration: none;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.3;
    position: relative;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.landi-services-bar__link:hover {
    color: #2E8B57;
    border-color: #2E8B57;
    box-shadow: 0 4px 16px rgba(46, 139, 87, 0.1);
    transform: translateY(-1px);
}

/* Active state — текущая страница */
.landi-services-bar__link.is-active,
.landi-services-bar__item.is-active > .landi-services-bar__link {
    color: #2E8B57;
    border-color: #2E8B57;
    background: rgba(46, 139, 87, 0.06);
    box-shadow: 0 0 0 2px rgba(46, 139, 87, 0.12);
}
.landi-services-bar__link.is-active .landi-services-bar__icon,
.landi-services-bar__item.is-active > .landi-services-bar__link .landi-services-bar__icon {
    background: #2E8B57;
    color: #fff;
}

/* Icon circle */
.landi-services-bar__icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(46, 139, 87, 0.08);
    color: #d4a574;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.3s;
}

.landi-services-bar__link:hover .landi-services-bar__icon {
    background: #d4a574;
    color: #fff;
}

/* Text + arrow inline */
.landi-services-bar__text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-align: left;
    /* no max-width — flex: 1 on item handles width */
    line-height: 1.35;
}

.landi-services-bar__arrow {
    font-size: 0.55rem;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease;
    opacity: 0.35;
    color: #64748b;
    flex-shrink: 0;
}

.landi-services-bar__item.has-dropdown:hover .landi-services-bar__arrow {
    transform: rotate(180deg);
    opacity: 0.7;
    color: #2E8B57;
}

/* Responsive */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .landi-services-bar__container {
        padding: 0 1rem;
    }
    .landi-services-bar__nav {
        min-height: 64px;
        gap: 6px;
    }
    .landi-services-bar__item {
        min-width: 0;
    }
    .landi-services-bar__link {
        font-size: 0.7rem;
        padding: 0.4rem 0.35rem;
        letter-spacing: 0;
        gap: 6px;
    }
    .landi-services-bar__icon {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
        border-radius: 7px;
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .landi-services-bar__nav {
        min-height: 68px;
    }
    .landi-services-bar__link {
        font-size: 0.8125rem;
        padding: 0.625rem 0.5rem;
    }
}


/* ----- DROPDOWNS ----- */
.landi-services-bar__dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.97);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s;
    z-index: 1050;
    padding-top: 0;
}

.landi-services-bar__item.has-dropdown:hover > .landi-services-bar__dropdown,
.landi-services-bar__item.has-dropdown:focus-within > .landi-services-bar__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
}

/* Left-align dropdowns for first 2 items */
.landi-services-bar__item:nth-child(-n+2) .landi-services-bar__dropdown {
    left: 0;
    transform: translateY(10px) scale(0.97);
}

.landi-services-bar__item:nth-child(-n+2).has-dropdown:hover > .landi-services-bar__dropdown,
.landi-services-bar__item:nth-child(-n+2).has-dropdown:focus-within > .landi-services-bar__dropdown {
    transform: translateY(0) scale(1);
}

/* Right-align dropdowns for last 2 items */
.landi-services-bar__item:nth-last-child(-n+2) .landi-services-bar__dropdown {
    left: auto;
    right: 0;
    transform: translateY(10px) scale(0.97);
}

.landi-services-bar__item:nth-last-child(-n+2).has-dropdown:hover > .landi-services-bar__dropdown,
.landi-services-bar__item:nth-last-child(-n+2).has-dropdown:focus-within > .landi-services-bar__dropdown {
    transform: translateY(0) scale(1);
}

.landi-services-bar__dropdown-inner {
    background: #fff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12),
                0 4px 16px rgba(0, 0, 0, 0.06);
    min-width: 360px;
    max-width: 440px;
    overflow: hidden;
    border-top: 3px solid #2E8B57;
}

.landi-services-bar__dropdown-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #2c3e50;
    padding: 0.875rem 1.5rem;
    display: block;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.landi-services-bar__dropdown-link:hover {
    background-color: rgba(46, 139, 87, 0.05);
    color: #2E8B57;
    border-left-color: #2E8B57;
    padding-left: 1.75rem;
}

.landi-services-bar__dropdown-link:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

/* Active dropdown link */
.landi-services-bar__dropdown-link.is-active {
    color: #2E8B57;
    font-weight: 700;
    background: rgba(46, 139, 87, 0.06);
    border-left-color: #2E8B57;
    padding-left: 1.75rem;
}

/* ----- HAMBURGER ----- */
.landi-hamburger-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.landi-hamburger-btn:focus {
    outline: none;
    box-shadow: none;
}

.landi-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.landi-hamburger span {
    display: block;
    height: 2px;
    background-color: #2c3e50;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.landi-hamburger-btn[aria-expanded="true"] .landi-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.landi-hamburger-btn[aria-expanded="true"] .landi-hamburger span:nth-child(2) {
    opacity: 0;
}

.landi-hamburger-btn[aria-expanded="true"] .landi-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}


/* ----- MOBILE MENU ----- */
.landi-mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 1038;
    overflow-y: auto;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

body.admin-bar .landi-mobile-menu {
    top: 110px;
}

@media (max-width: 782px) {
    body.admin-bar .landi-mobile-menu {
        top: 110px;
    }
}

.landi-mobile-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.landi-mobile-menu__body {
    padding: 0.5rem 1.25rem 2rem;
}

.landi-mobile-menu__section {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.landi-mobile-menu__heading {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9CA3AF;
    padding: 0.5rem 0;
    margin-bottom: 0.25rem;
}

.landi-mobile-menu__group {
    /* wrapper for item + submenu */
}

.landi-mobile-menu__link {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #2c3e50;
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.landi-mobile-menu__link.has-children {
    justify-content: space-between;
    gap: 0;
}

.landi-mobile-menu__link:hover {
    color: #2E8B57;
}

.landi-mobile-menu__link.has-children i {
    font-size: 0.75rem;
    color: #9CA3AF;
    transition: transform 0.25s ease;
}

.landi-mobile-menu__link.has-children.expanded i {
    transform: rotate(180deg);
    color: #2E8B57;
}

.landi-mobile-menu__submenu {
    display: none;
    padding-left: 1rem;
    border-left: 2px solid #2E8B57;
    margin-left: 0.5rem;
    margin-bottom: 0.5rem;
}

.landi-mobile-menu__submenu.open {
    display: block;
}

.landi-mobile-menu__sublink {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    color: #636E72;
    padding: 0.5rem 0 0.5rem 0.75rem;
    display: block;
    text-decoration: none;
    transition: color 0.2s ease;
}

.landi-mobile-menu__sublink:hover {
    color: #2E8B57;
}

.landi-mobile-menu__phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #2E8B57;
    color: #fff;
    padding: 0.875rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    margin-top: 1.25rem;
    transition: background-color 0.2s ease;
}

.landi-mobile-menu__phone:hover {
    background: #1e3d29;
    color: #fff;
}


/* ----- NAV SPACER ----- */
/* Desktop: оба бара в потоке, спейсер не нужен.
   Mobile: infobar fixed — компенсируем 64px. */
.landi-nav-spacer {
    height: 0;
}

@media (max-width: 991.98px) {
    .landi-nav-spacer {
        height: 84px;
    }
    body.admin-bar .landi-nav-spacer {
        height: 96px;
    }
}

@media (max-width: 782px) {
    body.admin-bar .landi-nav-spacer {
        height: 110px;
    }
}
