/* ==========================================================================
   Layout — Header, Footer, Navigation
   ========================================================================== */

/* Top Bar */
.top-bar {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-200);
    font-size: 0.75rem;
    color: var(--color-gray-600);
}

.top-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4375rem 0;
    gap: 1rem;
    min-height: 2rem;
}

.top-bar .container {
    max-width: 1400px;
}

.top-bar__tagline {
    margin: 0;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.top-bar__badges {
    display: flex;
    gap: 1.5rem;
    flex-shrink: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--color-navy);
    white-space: nowrap;
    font-size: 0.75rem;
}

.badge .icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--color-red);
}

/* Main Nav — sticky for full-page scroll (top-bar scrolls away separately) */
.main-nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.main-nav .container {
    max-width: 1400px;
}

.main-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1.5rem;
    gap: 1.5rem;
}

/* Logo */
.logo {
    display: block;
    text-decoration: none;
    flex-shrink: 0;
    line-height: 0;
}

.logo:hover {
    opacity: 0.9;
}

.logo__img {
    display: block;
    width: auto;
    height: 75px;
    max-width: 280px;
}

.logo__img--footer {
    height: 64px;
    max-width: 240px;
}

/* Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-navy);
    transition: var(--transition);
    border-radius: 2px;
}

.nav__close {
    display: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
}

.nav__item {
    position: relative;
}

.nav__link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-navy);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition);
}

.nav__link:hover,
.nav__link--active {
    color: var(--color-red);
}

.nav__chevron {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.75;
    margin-top: 2px;
    transition: transform var(--transition);
}

.nav__item--has-dropdown:hover .nav__chevron,
.nav__item--has-dropdown:focus-within .nav__chevron {
    transform: rotate(180deg);
}

.nav__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition);
    z-index: 200;
}

.nav__item--has-dropdown:hover .nav__dropdown,
.nav__item--has-dropdown:focus-within .nav__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav__dropdown-link {
    display: block;
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-gray-800);
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    transition: color var(--transition), background var(--transition);
}

.nav__dropdown-link:hover {
    background: var(--color-gray-50);
    color: var(--color-red);
}

.nav__dropdown-link--active,
.nav__dropdown-link--active:hover {
    color: var(--color-red);
    background: rgba(196, 30, 58, 0.08);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--color-red);
}

.btn--nav {
    margin-left: 0.75rem;
    padding: 0.625rem 1.25rem !important;
    font-size: 0.75rem !important;
}

/* Mobile Call Button */
.mobile-call-btn {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--color-red);
    color: var(--color-white);
    text-align: center;
    padding: 0.875rem;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
}

.mobile-call-btn:hover {
    color: var(--color-white);
    background: var(--color-red-hover);
}

.mobile-call-btn .icon {
    width: 1.125rem;
    height: 1.125rem;
}

/* Footer */
.site-footer {
    background: var(--color-navy);
    color: rgba(255, 255, 255, 0.8);
    padding-top: 4rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.05fr) minmax(0, 2.35fr) minmax(220px, 0.95fr);
    gap: 2.5rem 3rem;
    align-items: start;
    padding-bottom: 3rem;
}

.footer__links-panel {
    display: grid;
    grid-template-columns: minmax(120px, 0.85fr) minmax(0, 1fr) minmax(120px, 0.8fr);
    gap: 2rem 2.5rem;
}

.footer__links--compact a {
    font-size: 0.75rem;
    line-height: 1.3;
}

.footer__links-panel .footer__links li + li {
    margin-top: 0.15rem;
}

.footer__bio {
    margin: 1.25rem 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

.footer__social {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--color-red);
    color: var(--color-white);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

.footer__heading {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer__links li + li {
    margin-top: 0.3rem;
}

.footer__links a {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition);
}

.footer__links a:hover {
    color: var(--color-white);
}

.footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
}

.footer__contact a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.footer__contact a:hover {
    color: var(--color-white);
}

.footer__contact .icon {
    color: var(--color-red);
    margin-top: 0.2rem;
}

.btn--footer {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
}

.footer__bottom {
    background: var(--color-navy-dark);
    padding: 0.625rem 0;
}

.footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer__bottom-inner p {
    margin: 0;
}

.footer__legal a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.footer__legal a:hover {
    color: var(--color-white);
}

.footer__legal span {
    margin: 0 0.5rem;
}

/* Responsive */
@media (max-width: 1400px) {
    .nav__link {
        padding: 0.5rem 0.55rem;
        font-size: 0.6875rem;
        letter-spacing: 0.03em;
    }

    .logo__img {
        height: 66px;
        max-width: 250px;
    }

    .btn--nav {
        padding: 0.5rem 1rem !important;
        font-size: 0.6875rem !important;
        margin-left: 0.5rem;
    }
}

@media (max-width: 1320px) {
    .top-bar__tagline {
        font-size: 0.6875rem;
    }

    .nav__link {
        padding: 0.45rem 0.4rem;
        font-size: 0.625rem;
    }

    .logo__img {
        height: 60px;
        max-width: 230px;
    }
}

@media (max-width: 1200px) {
    .top-bar__tagline {
        display: none;
    }

    .top-bar__inner {
        justify-content: center;
    }

    .main-nav__inner {
        padding: 0.5rem 1.25rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(340px, 88vw);
        height: 100vh;
        background: var(--color-white);
        flex-direction: column;
        align-items: stretch;
        padding: 5rem 1.5rem 2rem;
        box-shadow: var(--shadow-lg);
        transition: right var(--transition);
        overflow-y: auto;
        z-index: 1200;
        flex: none;
        justify-content: flex-start;
    }

    .nav.is-open {
        right: 0;
    }

    .nav__close {
        display: block;
        position: absolute;
        top: 1.25rem;
        right: 1.25rem;
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .nav__close::before,
    .nav__close::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        width: 22px;
        height: 2px;
        background: var(--color-navy);
        border-radius: 2px;
    }

    .nav__close::before {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .nav__close::after {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    .nav__list {
        flex-direction: column;
        align-items: stretch;
    }

    .nav__link {
        padding: 0.875rem 0;
        font-size: 0.875rem;
        border-bottom: 1px solid var(--color-gray-100);
        letter-spacing: 0.04em;
    }

    .nav__dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 0.5rem 1rem;
        display: none;
    }

    .nav__item--has-dropdown.is-expanded .nav__dropdown {
        display: block;
    }

    .btn--nav {
        margin: 1rem 0 0;
        text-align: center;
        font-size: 0.875rem !important;
        padding: 0.75rem 1.5rem !important;
    }

    .mobile-call-btn {
        display: flex;
    }

    body {
        padding-bottom: 52px;
    }
}

@media (max-width: 1100px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer__col--brand,
    .footer__links-panel {
        grid-column: 1 / -1;
    }

    .footer__links-panel {
        grid-template-columns: 1fr 1.35fr 1fr;
    }
}

@media (max-width: 960px) {
    .footer__grid {
        grid-template-columns: 1fr;
    }

    .footer__links-panel {
        grid-template-columns: 1fr 1fr;
    }

    .footer__col--services {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .top-bar__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }

    .top-bar__badges {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }
}

@media (max-width: 600px) {
    .top-bar__badges {
        font-size: 0.6875rem;
    }

    .main-nav__inner {
        padding: 0.5rem 1rem;
        gap: 1rem;
    }

    .logo__img {
        height: 55px;
        max-width: 210px;
    }

    .logo__img--footer {
        height: 52px;
        max-width: 200px;
    }

    .footer__grid {
        grid-template-columns: 1fr;
    }

    .footer__links-panel {
        grid-template-columns: 1fr;
    }

    .footer__bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* Nav overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1100;
}

.nav-overlay.is-visible {
    display: block;
}
