/* ==========================================================================
   Layout — Header, Footer, Nav, Containers
   Breast Connect Theme
   ========================================================================== */

/* ---------- Skip to Content ---------- */

.bc-skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--teal);
    color: var(--white);
    padding: 8px 24px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    transition: top var(--transition-fast);
}

.bc-skip-link:focus {
    top: 10px;
    color: var(--white);
}

/* ---------- Event Notification Banner ---------- */

.bc-banner {
    background: var(--navy);
    color: var(--white);
    font-size: 0.85rem;
    font-family: var(--font-body);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 110;
    text-align: center;
}

.bc-banner__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 10px var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.bc-banner__link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.bc-banner__link:hover {
    opacity: 0.85;
}

.bc-banner__arrow {
    margin-left: 6px;
    white-space: nowrap;
}

.bc-banner__close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 10px 14px;
    min-width: 44px;
    min-height: 44px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.bc-banner__close:hover {
    color: var(--white);
}

/* Push header down when banner is showing — uses dynamic --banner-h set by JS */
body.has-banner .bc-header {
    top: var(--banner-h, 40px);
}

/* When banner is showing, push the mobile nav contents and X close button below it
   so they aren't obscured by the banner (which sits at z-index 110, above the nav) */
body.has-banner .bc-mobile-nav {
    padding-top: calc(24px + var(--banner-h, 40px));
}

body.has-banner .bc-hamburger.active {
    top: calc(38px + var(--banner-h, 40px));
}

@media (max-width: 768px) {
    .bc-banner {
        font-size: 0.78rem;
    }
    .bc-banner__inner {
        padding: 8px 16px;
    }
}

/* ---------- Header ---------- */

.bc-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 100;
    transition: all 0.4s ease;
}

.bc-header--transparent {
    background: transparent;
}

.bc-header--solid {
    background: var(--white);
    box-shadow: var(--shadow-nav);
}

.bc-header__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.bc-header__logo {
    display: flex;
    align-items: center;
}

.bc-header__logo img {
    height: 110px;
    transition: all var(--transition-medium);
}

/* Logo toggle: teal on solid, white on transparent */
.bc-header--transparent .bc-header__logo-main { display: none; }
.bc-header--transparent .bc-header__logo-white { display: block; }
.bc-header--solid .bc-header__logo-main { display: block; }
.bc-header--solid .bc-header__logo-white { display: none; }

.bc-header__nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

/* Menu list reset */
.bc-header__menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bc-header__nav-item {
    position: relative;
    list-style: none;
}

.bc-header__nav-item > a {
    color: var(--white);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: all var(--transition-fast);
    padding: 8px 0;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.bc-header__nav-item > a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--teal);
    transition: width var(--transition-fast);
}

.bc-header__nav-item > a:hover::after {
    width: 100%;
}

.bc-header--solid .bc-header__nav-item > a {
    color: var(--navy);
}

.bc-header__nav-item > a:hover,
.bc-header--solid .bc-header__nav-item > a:hover {
    color: var(--teal);
}

/* ---------- Dropdown ---------- */

.bc-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    border-top: 3px solid var(--teal);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition-fast);
    padding: 12px 0;
}

.bc-header__nav-item:hover > .bc-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    top: 100%;
}

.bc-dropdown__icon {
    width: 20px;
    text-align: center;
    color: var(--teal);
    font-size: 0.85rem;
}

.bc-dropdown__item {
    display: block;
    padding: 10px 24px;
    color: var(--navy);
    font-size: 0.88rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.bc-dropdown__item:hover {
    background-color: var(--soft-gray);
    color: var(--teal);
    padding-left: 28px;
}

.bc-dropdown__divider {
    height: 1px;
    background-color: var(--gray);
    margin: 6px 16px;
}

/* ---------- Chevron ---------- */

.bc-chevron {
    font-size: 0.65rem;
    margin-left: 4px;
    transition: transform var(--transition-fast);
    display: inline-block;
}

.bc-header__nav-item:hover .bc-chevron {
    transform: rotate(180deg);
}

/* Mobile nav list reset */
.bc-mobile-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bc-mobile-nav__item {
    border-bottom: 1px solid var(--gray);
}

.bc-mobile-nav__item > a {
    display: block;
    padding: 14px 0;
    color: var(--navy);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    font-family: var(--font-body);
    transition: color var(--transition-fast);
}

.bc-mobile-nav__item > a:hover {
    color: var(--teal);
}

.bc-mobile-nav__item--has-sub {
    position: relative;
}

.bc-mobile-nav__toggle {
    position: absolute;
    top: 4px;
    right: 0;
    background: none;
    border: none;
    color: var(--gray-text);
    padding: 10px 16px;
    cursor: pointer;
    font-size: 1rem;
    min-width: 44px;
    min-height: 44px;
}

.bc-mobile-nav__submenu {
    list-style: none;
    margin: 0;
    padding: 0 0 10px 16px;
    display: none;
}

.bc-mobile-nav__submenu.active {
    display: block;
}

.bc-mobile-nav__submenu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--gray-text);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.bc-mobile-nav__submenu .bc-dropdown__icon {
    width: 18px;
    text-align: center;
    color: var(--teal);
    font-size: 0.8rem;
}

.bc-mobile-nav__submenu a:hover {
    color: var(--teal);
}

/* ---------- Mobile Menu ---------- */

.bc-hamburger {
    display: none;
    width: 32px;
    height: 24px;
    position: relative;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 101;
    padding: 10px;
}

.bc-hamburger.active {
    position: fixed;
    top: 38px;
    right: var(--container-padding);
    z-index: 200;
}

.bc-hamburger.active span {
    background-color: var(--navy) !important;
}

.bc-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--navy);
    position: absolute;
    left: 0;
    transition: all var(--transition-fast);
}

.bc-header--transparent .bc-hamburger span {
    background-color: var(--white);
}

.bc-hamburger span:nth-child(1) {
    top: 0;
}

.bc-hamburger span:nth-child(2) {
    top: 11px;
}

.bc-hamburger span:nth-child(3) {
    top: 22px;
}

.bc-hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 11px;
}

.bc-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.bc-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 11px;
}

.bc-mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    height: 100dvh;
    background-color: var(--white);
    padding: 24px 24px calc(30px + env(safe-area-inset-bottom, 40px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: right var(--transition-slow);
    z-index: 99;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.bc-mobile-nav__cta-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-right: 80px; /* clear the X close button across all phone widths */
}

.bc-mobile-nav__cta {
    flex: 1;
    min-width: 0; /* let flex items shrink so labels aren't clipped */
    padding: 9px 10px !important;
    font-size: 0.78rem !important;
    justify-content: center;
    min-height: 38px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-mobile-nav__cta i {
    margin-right: 4px;
    font-size: 0.78rem;
}

/* Stack vertically on very narrow phones (older iPhone SE / 8 / 320–360px) */
@media (max-width: 360px) {
    .bc-mobile-nav__cta-row {
        flex-direction: column;
        gap: 6px;
        padding-right: 64px;
    }
    .bc-mobile-nav__cta {
        min-height: 36px;
        font-size: 0.82rem !important;
    }
}

.bc-mobile-nav.active {
    right: 0;
}

.bc-mobile-nav__item {
    display: block;
    padding: 14px 0;
    color: var(--navy);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--gray);
    transition: color var(--transition-fast);
    font-family: var(--font-body);
}

.bc-mobile-nav__item:hover {
    color: var(--teal);
}

.bc-mobile-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    z-index: 98;
    transition: all var(--transition-medium);
}

.bc-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ---------- Footer ---------- */

.bc-footer {
    background-color: var(--navy);
    padding: 80px 0 0;
    color: var(--white);
}

.bc-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 2fr 1.3fr;
    gap: 50px;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.bc-footer__links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 30px;
}

.bc-footer__brand img {
    height: 100px;
    margin-bottom: 20px;
}

.bc-footer__tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.bc-footer__social {
    display: flex;
    gap: 12px;
}

.bc-footer__social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.bc-footer__social-icon:hover {
    background-color: var(--teal);
    color: var(--white);
}

.bc-footer__heading {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--white);
    margin-bottom: 20px;
}

.bc-footer__heading a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.bc-footer__heading a:hover {
    color: var(--teal);
}

/* Become a Member featured CTA in footer */
.bc-footer__member-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 12px 22px;
    border: 2px solid var(--teal);
    border-radius: 999px;
    color: var(--white);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    background: rgba(33, 165, 165, 0.08);
    transition: all var(--transition-fast);
}

.bc-footer__member-cta:hover {
    background: var(--teal);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(33, 165, 165, 0.3);
}

.bc-footer__member-cta i {
    color: var(--teal);
    transition: color var(--transition-fast);
}

.bc-footer__member-cta:hover i {
    color: var(--white);
}

.bc-footer__links {
    list-style: none;
    padding: 0;
}

.bc-footer__links li {
    margin-bottom: 10px;
}

.bc-footer__links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all var(--transition-fast);
}

.bc-footer__links a:hover {
    color: var(--teal);
    padding-left: 4px;
}

.bc-footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
}

.bc-footer__contact-item i {
    color: var(--teal);
    width: 16px;
    margin-top: 3px;
}

.bc-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 50px;
    padding: 24px var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
}

.bc-footer__copyright {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.bc-footer__legal a {
    color: rgba(255, 255, 255, 0.4);
    margin-left: 24px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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