/* ============================================================
   AVANA SURGICAL — SOLUTIONS MEGA-MENU + NAVBAR EXTENSIONS

   Layers cleanly on top of the existing .main-nav__* and
   .site-header styles defined in index.html / pain.css.
   ============================================================ */

/* --- Announcement bar (rendered above the top-bar in header.html) --- */
.announce-bar {
    background: linear-gradient(90deg, #8a6300 0%, #b27f0d 100%);
    color: #fff;
    font-size: 0.85rem;
    padding: 8px 0;
    text-align: center;
}
.announce-bar .container {
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    gap: 12px;
    flex-wrap: wrap;
    text-align: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.announce-bar__icon { font-size: 1rem; line-height: 1; }
.announce-bar__text { font-weight: 500; }
.announce-bar__cta {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    padding-bottom: 1px;
    transition: border-color 0.2s;
}
.announce-bar__cta:hover { border-bottom-color: #fff; }
@media (max-width: 640px) {
    .announce-bar { font-size: 0.78rem; padding: 6px 0; }
    .announce-bar .container { gap: 8px; }
}

/* --- Nav item containers --- */
.main-nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.main-nav__item {
    position: relative;
}

.main-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text, #1F1F1F);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 0;
    transition: color 0.2s;
    white-space: nowrap;
}

.main-nav__link:hover,
.main-nav__link.is-active,
.main-nav__link--active {
    color: var(--color-accent, #b27f0d);
}

.main-nav__caret {
    width: 10px;
    height: 7px;
    transition: transform 0.2s;
}

.main-nav__item--has-mega:hover .main-nav__caret,
.main-nav__item.mega-open .main-nav__caret {
    transform: rotate(180deg);
}

/* --- The mega-menu panel --- */
.mega-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    min-width: 920px;
    max-width: 96vw;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(36, 52, 71, 0.12);
    padding: 28px 32px;
    z-index: 200;

    /* Hidden by default — reveal on hover, focus-within, or .mega-open */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.main-nav__item--has-mega:hover .mega-menu,
.main-nav__item--has-mega:focus-within .mega-menu,
.main-nav__item--has-mega.mega-open .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Invisible bridge so cursor can cross the gap from link to menu without losing hover */
.main-nav__item--has-mega::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.mega-menu__inner,
.site-header .mega-menu__inner {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 36px;
    max-width: none;
    padding: 0;
    align-items: start !important;
    justify-content: normal !important;
}

/* ============================================================
   Back-to-top button — canonical position across all pages.
   Sits above the Zoho chat widget (bottom-right) so users see it.
   Overrides any page-local inline .back-to-top rules.
   ============================================================ */
.back-to-top {
    bottom: 96px !important;
    right: 12px !important;
    z-index: 999999 !important;
}
@media (max-width: 640px) {
    .back-to-top {
        bottom: 88px !important;
        right: 12px !important;
    }
}

.mega-menu__col {
    min-width: 0;
}

.mega-menu__heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent, #b27f0d);
    margin: 0 0 14px;
}

.mega-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mega-menu__list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--color-text, #1F1F1F);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.mega-menu__list a:hover {
    background: rgba(178, 127, 13, 0.10);
    color: var(--color-accent, #b27f0d);
}

.mega-menu__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    font-size: 1rem;
}

.mega-menu__icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

/* Featured / promo column */
.mega-menu__col--featured {
    background: linear-gradient(135deg, rgba(178, 127, 13, 0.08), rgba(36, 52, 71, 0.04));
    border-radius: 10px;
    padding: 18px;
    margin: -4px -4px -4px 0;
}

.mega-menu__feature {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(36, 52, 71, 0.08);
    margin-bottom: 10px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.mega-menu__feature:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(36, 52, 71, 0.08);
}

.mega-menu__feature--secondary {
    background: transparent;
    border-style: dashed;
}

.mega-menu__feature-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent, #b27f0d);
}

.mega-menu__feature-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary, #243447);
    line-height: 1.4;
}

.mega-menu__feature-sub {
    font-size: 0.82rem;
    color: var(--color-muted, #6C6C6C);
    line-height: 1.5;
}

/* --- Mobile menu --- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-primary, #243447);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
    display: none;
    border-top: 1px solid #eee;
    background: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-nav.open {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    display: block;
}

.mobile-nav__list {
    list-style: none;
    padding: 12px 0;
    margin: 0;
}

.mobile-nav__list > li > a,
.mobile-nav__group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 4px;
    color: var(--color-text, #1F1F1F);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    background: none;
    border: 0;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    text-align: left;
}

.mobile-nav__group-toggle svg {
    width: 12px;
    height: 8px;
    transition: transform 0.2s;
}

.mobile-nav__group.open .mobile-nav__group-toggle svg {
    transform: rotate(180deg);
}

.mobile-nav__submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 12px;
}

.mobile-nav__group.open .mobile-nav__submenu {
    max-height: 800px;
    padding: 4px 12px 12px;
}

.mobile-nav__sub-heading {
    margin: 14px 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent, #b27f0d);
}

.mobile-nav__submenu a {
    display: block;
    padding: 10px 4px;
    color: var(--color-text, #1F1F1F);
    text-decoration: none;
    font-size: 0.95rem;
}

.mobile-nav__submenu a:hover {
    color: var(--color-accent, #b27f0d);
}

.mobile-nav__cta {
    margin-top: 12px;
    background: var(--color-accent, #b27f0d);
    color: #fff !important;
    border-radius: 8px;
    text-align: center;
    justify-content: center !important;
    border-bottom: 0 !important;
}

/* --- Footer trust strip --- */
.site-footer__trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    padding: 22px 0;
    margin: 24px 0 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.site-footer__socials {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.site-footer__socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
}

.site-footer__socials a:hover {
    background: var(--color-accent, #b27f0d);
    transform: translateY(-2px);
}

.site-footer__socials svg {
    width: 14px;
    height: 14px;
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .mega-menu { min-width: 680px; }
    .mega-menu__inner { grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
}

@media (max-width: 860px) {
    .mega-menu { min-width: 560px; }
    .mega-menu__inner { grid-template-columns: 1fr 1fr; gap: 20px; }
}

@media (max-width: 968px) {
    .main-nav,
    .header-cta { display: none; }
    .mobile-menu-toggle { display: flex; }
    /* !important needed because the base .top-bar__left rule below in this
       file overrides the media-query rule due to same specificity + later
       source order. Hides email/phone from the top-bar on mobile. */
    .top-bar__left { display: none !important; }
    .top-bar .container { justify-content: center; }
}

@media (max-width: 640px) {
    .top-bar { padding: 8px 0; font-size: 12px; }
    .top-bar__social { width: 28px; height: 28px; }
    .top-bar__social svg { width: 12px; height: 12px; }
    .site-footer__trust { gap: 14px; font-size: 0.8rem; padding: 14px 0; }
}

/* Prevent body scroll when mobile nav is open */
body.mobile-nav-open { overflow: hidden; }

/* ============================================================
   SHARED HEADER + FOOTER LAYOUT — promoted from index.html
   inline styles so every page using partials/header.html +
   partials/footer.html gets consistent structure.
   ============================================================ */

/* --- Top bar --- */
.top-bar {
    background-color: var(--color-primary, #243447);
    color: var(--color-white, #ffffff);
    padding: 12px 0;
    font-size: 14px;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar__left { display: flex; gap: 24px; }
.top-bar__item {
    color: var(--color-white, #ffffff);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
}
.top-bar__item:hover { opacity: 0.8; }
.top-bar__right { display: flex; gap: 10px; align-items: center; }
.top-bar__social {
    color: var(--color-white, #ffffff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    transition: all 0.3s;
}
.top-bar__social:hover {
    background-color: var(--color-accent, #b27f0d);
    color: var(--color-white, #ffffff);
    transform: translateY(-2px);
}
.top-bar__social svg { width: 14px; height: 14px; fill: currentColor; }

/* --- Site header (sticky white bar) --- */
.site-header {
    background-color: var(--color-white, #ffffff);
    padding: 6px 0 4px !important;
    border-bottom: 1px solid var(--color-border, #D9D9D9);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: 0 4px 12px rgba(36, 52, 71, 0.1); }
.site-header > .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    padding-bottom: 6px !important;
}
/* Sit nav + CTA slightly BELOW the logo baseline
   so they line up with where the eye rests below the wordmark */
.site-header > .container > .site-logo {
    margin-bottom: 13px !important;
}
.site-logo {
    font-weight: 700;
    color: var(--color-primary, #243447);
    text-decoration: none;
    font-size: 24px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}
.site-logo img {
    height: 48px;
    width: auto;
    display: block;
}

/* --- Header CTA button --- */
.header-cta {
    background-color: var(--color-accent, #b27f0d);
    color: var(--color-white, #ffffff);
    padding: 10px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s;
}
.header-cta:hover { background-color: var(--color-accent-hover, #8a6300); }

/* --- Footer container --- */
.site-footer {
    background-color: #1a2836;
    color: var(--color-white, #ffffff);
    padding: 64px 0 24px;
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 28px;
    margin-bottom: 40px;
    align-items: start;
}
.site-footer__heading {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-white, #ffffff);
    letter-spacing: 0.5px;
}
.site-footer__logo {
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-white, #ffffff);
}
.site-footer__logo img {
    height: 56px;
    width: auto;
    display: block;
}
.site-footer__desc {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.7;
}
.site-footer__address {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.7;
    font-style: normal;
}
.site-footer__address p { margin: 0; }
.site-footer__contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.site-footer__contact-info a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
}
.site-footer__contact-info a:hover { color: var(--color-accent, #b27f0d); }
.site-footer__links {
    list-style: none;
    padding: 0;
}
.site-footer__links li { margin-bottom: 12px; }
.site-footer__links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}
.site-footer__links a:hover { color: var(--color-accent, #b27f0d); }
.site-footer__bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* --- Responsive header/footer --- */
@media (max-width: 968px) {
    .site-footer { padding: 48px 0 20px; }
}
@media (max-width: 768px) {
    .site-footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
}
@media (max-width: 640px) {
    .site-footer { padding: 40px 0 16px; }
    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 24px;
    }
    .site-footer__heading {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }
    .site-footer__logo img { height: 40px; }
    .site-footer__desc { font-size: 0.85rem; margin-bottom: 16px; }
    .site-footer__address { font-size: 0.85rem; margin-bottom: 16px; }
    .site-footer__contact-info a { font-size: 0.85rem; }
    .site-footer__links a { font-size: 0.85rem; margin-bottom: 8px; }
    .site-footer__bottom { font-size: 0.75rem; padding-top: 16px; }
}
