/* ============================================================
   TOPHAT VIP — Page Layout Patch
   Scoped layout fixes: about page, member dashboard.
   (Home hero brand sizing/colors → site-brand-colors.css)
   ============================================================ */

/* ── About: Meet the Founder — side-by-side card ── */
#about-founder-cd34 .flex {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    #about-founder-cd34 .flex {
        flex-direction: row;
    }

    #about-founder-cd34 .flex > .w-full {
        width: 33.333333%;
        max-width: 280px;
        flex-shrink: 0;
    }

    #about-founder-cd34 .flex > .flex-1 {
        flex: 1 1 0%;
        min-width: 0;
    }
}

#about-founder-cd34 .bg-navy {
    height: 100%;
}

/* ── About: fleet cards — single row on desktop ── */
#about-fleet-ij90 .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    #about-fleet-ij90 .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    #about-fleet-ij90 .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

#about-fleet-ij90 .service-card {
    height: 100%;
}

/* ── Member dashboard: sidebar width (slightly wider) ── */
.spa-page .members-sidebar {
    width: 220px;
    min-width: 220px;
    flex-shrink: 0;
}

/* ── Member dashboard: responsive flex layout ── */
.spa-page > .max-w-6xl,
.spa-page > .max-w-\[1200px\] {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: stretch;
}

.spa-page .members-content {
    flex: 1 1 auto;
    min-width: 0;
}

/* Phones: sidebar full width */
@media (max-width: 599px) {
    .spa-page .members-sidebar {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Tablets+ (600px): sidebar + content side-by-side, including portrait */
@media (min-width: 600px) {
    .spa-page > .max-w-6xl,
    .spa-page > .max-w-\[1200px\] {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Home bottom CTA: luxury sedan image fully visible above footer */
#bottom-cta-wx34 > .bottom-cta-bg {
    z-index: 0;
}

#bottom-cta-wx34 > .bottom-cta-bg img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

#bottom-cta-wx34 .bottom-cta-copy,
#bottom-cta-wx34 .bottom-cta-copy h2,
#bottom-cta-wx34 .bottom-cta-copy p {
    color: #C9A84C !important;
}

#bottom-cta-wx34 .bottom-cta-copy p {
    color: rgba(201, 168, 76, 0.85) !important;
}

#bottom-cta-wx34 .bottom-cta-copy {
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
}

@media (max-width: 1023px) {
    #bottom-cta-wx34 {
        min-height: 28rem;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 767px) {
    #bottom-cta-wx34 {
        min-height: 22rem;
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

/* ── Mobile top bar layout ── */
.mobile-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
}

@media (min-width: 1024px),
       (min-width: 660px),
       (orientation: portrait) and (min-width: 480px) and (min-height: 650px) and (max-width: 1023px) {
    .mobile-top-bar {
        display: none !important;
    }

    #main-nav .main-nav-mobile-shell,
    #main-nav > div.lg\:hidden {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden;
    }
}

body.tophat-desktop-nav .mobile-top-bar,
body.tophat-desktop-nav #main-nav .main-nav-mobile-shell {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
}

@media (max-width: 519px) {
    #nav-logo-ab12 {
        display: none !important;
    }
}

.mobile-top-brand {
    color: #C9A84C;
    flex: 0 0 auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.booking-schedule-policy-notice {
    margin-bottom: 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(125, 211, 252, 0.35);
    background: #0a1628;
    box-shadow: 0 1px 0 rgba(125, 211, 252, 0.08) inset;
}

.booking-schedule-policy-notice__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.45rem;
}

.booking-schedule-policy-notice__title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7dd3fc;
}

.booking-schedule-policy-notice__body {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.65;
    color: #bae6fd;
}

.booking-advance-hours {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(201, 168, 76, 0.55);
    background: rgba(201, 168, 76, 0.12);
    color: #bae6fd;
    font-weight: 700;
    line-height: 1.35;
}

.booking-schedule-policy-notice .admin-ops-live-status {
    text-transform: none;
}

.site-live-status-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 0.45rem;
    border: 1px solid rgba(201, 168, 76, 0.55);
    background: rgba(201, 168, 76, 0.08);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #c9a84c;
    white-space: nowrap;
}

.site-live-status-chip::before {
    content: '';
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.35rem;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.25);
    animation: site-live-pulse 2s ease-in-out infinite;
}

@keyframes site-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* Desktop main nav — 3-column grid centers links in the viewport */
.main-nav-desktop-inner {
    display: none;
}

@media (min-width: 1024px),
       (min-width: 660px),
       (orientation: portrait) and (min-width: 480px) and (min-height: 650px) and (max-width: 1023px) {
    .main-nav-desktop-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
        width: 100%;
        max-width: 80rem;
        margin: 0 auto;
        padding: 0 1.5rem;
        min-height: 4.5rem;
    }

    .main-nav-left {
        flex: 0 0 auto;
        min-width: 11.5rem;
        z-index: 2;
    }

    .main-nav-right {
        flex: 0 0 auto;
        min-width: 14.5rem;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.75rem;
        flex-wrap: nowrap;
        z-index: 2;
    }

    .main-nav-right > a[href^="tel:"],
    .main-nav-right .main-nav-meta-link {
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        flex-shrink: 0;
        white-space: nowrap;
        background: none;
        border: 0;
        padding: 0;
        font: inherit;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.75rem;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .main-nav-right .main-nav-meta-link:hover,
    .main-nav-right .main-nav-meta-link:focus {
        color: #c9a84c;
    }

    .main-nav-guest-stack {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.15rem;
        line-height: 1.2;
    }

    body.auth-logged-in .main-nav-guest-stack,
    body.auth-logged-in .main-nav-right .auth-logged-out-only,
    body.auth-logged-in #mobile-menu .auth-logged-out-only {
        display: none !important;
    }

    body:not(.auth-logged-in) .main-nav-phone-link,
    body:not(.auth-logged-in) .main-nav-right .auth-logged-in-only,
    body:not(.auth-logged-in) #mobile-menu .auth-logged-in-only {
        display: none !important;
    }

    body.auth-logged-in .main-nav-phone-link.auth-logged-in-only:not(.hidden) {
        display: inline-flex !important;
    }

    #mobile-menu .main-nav-meta-link {
        color: rgba(201, 168, 76, 0.85);
        font-size: 0.95rem;
        text-decoration: none;
        background: none;
        border: 0;
        padding: 0;
        text-align: left;
        cursor: pointer;
    }

    .main-nav-right > a[href^="tel:"] {
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .main-nav-right .nav-primary-btn {
        flex-shrink: 0;
    }

    .main-nav-center {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 1rem;
        pointer-events: auto;
    }

    #main-nav .main-nav-links-center .nav-link {
        white-space: nowrap;
        font-size: 0.72rem;
    }
}

body.tophat-desktop-nav .main-nav-desktop-inner {
    display: flex !important;
}

/* Full desktop (1025px+): single-row centered links between logo and actions */
@media (min-width: 1025px) {
    .main-nav-desktop-inner {
        min-height: 4.5rem;
    }

    .main-nav-center {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        flex-wrap: nowrap;
        max-width: calc(100% - 24rem);
        z-index: 1;
    }

    #main-nav .main-nav-links-center .nav-link {
        font-size: 0.72rem;
    }

    body.auth-logged-in .main-nav-left {
        flex: 0 0 12rem;
        min-width: 12rem;
    }

    body.auth-logged-in .main-nav-right {
        flex: 0 0 auto;
        min-width: 15rem;
    }

    body.auth-logged-in .main-nav-center {
        max-width: calc(100% - 26rem);
    }
}

/* Narrow desktop / fold inner — two-row wrap (after full-desktop so it wins at fold widths) */
@media (min-width: 660px) and (max-width: 1024px),
       (orientation: portrait) and (min-width: 480px) and (min-height: 650px) and (max-width: 1024px),
       (orientation: landscape) and (min-width: 660px) and (max-width: 1100px) {
    body.tophat-compact-desktop-nav:not(.tophat-dashboard-layout-active) {
        padding-top: 5.65rem !important;
    }

    #main-nav .main-nav-desktop-inner {
        flex-wrap: wrap;
        align-items: center;
        min-height: 0;
        padding: 0.35rem 0.85rem 0.4rem;
    }

    #main-nav .main-nav-left {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 36%;
    }

    #main-nav .main-nav-left .text-gold {
        font-size: 0.95rem !important;
        letter-spacing: 0.04em;
    }

    #main-nav .main-nav-right {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 64%;
        gap: 0.35rem 0.5rem;
        flex-wrap: nowrap;
    }

    body:not(.auth-logged-in) #main-nav .main-nav-guest-stack {
        display: flex !important;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.08rem;
        line-height: 1.15;
        min-width: 0;
    }

    #main-nav .main-nav-guest-stack .main-nav-meta-link {
        font-size: 0.58rem;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #main-nav .main-nav-right .main-nav-meta-link {
        font-size: 0.625rem;
    }

    #main-nav .nav-primary-btn {
        padding: 0.3rem 0.65rem !important;
        font-size: 0.625rem !important;
    }

    #main-nav .main-nav-center {
        position: static;
        left: auto;
        transform: none;
        order: 3;
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        justify-content: space-evenly;
        flex-wrap: nowrap;
        gap: 0;
        padding-top: 0.35rem;
        margin-top: 0.25rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1;
    }

    #main-nav .main-nav-links-center .nav-link {
        flex: 0 1 auto;
        min-width: 0;
        text-align: center;
        font-size: 0.58rem;
        letter-spacing: 0.01em;
        padding: 0.1rem 0;
    }

    body.auth-logged-in #main-nav .main-nav-left,
    body.auth-logged-in #main-nav .main-nav-right {
        flex: 1 1 auto;
        min-width: 0;
    }

    body.auth-logged-in #main-nav .main-nav-center {
        max-width: 100%;
    }
}

/* Admin view toolbar — layout only; colors from admin-dashboard.css */
.admin-back-dashboard-link,
.admin-multitask-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    text-decoration: none;
}

/* Embedded navy admin panel — keep gold outline styling */
.dashboard-role-panel[data-role-panel="admin"] .admin-back-dashboard-link,
.dashboard-role-panel[data-role-panel="admin"] .admin-multitask-view-btn {
    border: 1px solid rgba(201, 168, 76, 0.45);
    background: transparent;
    color: #ffffff;
}

.dashboard-role-panel[data-role-panel="admin"] .admin-multitask-view-btn:hover,
.dashboard-role-panel[data-role-panel="admin"] .admin-back-dashboard-link:hover {
    border-color: rgba(201, 168, 76, 0.75);
    color: #ffffff;
}

.admin-view-toolbar {
    width: 100%;
}

.admin-dashboard-header-links {
    align-items: center;
}
#main-nav .nav-primary-btn {
    padding: 0.35rem 0.9rem !important;
    font-size: 0.6875rem !important;
    letter-spacing: 0.03em;
}

/* Contact form scroll anchor below fixed header */
#page-contact .contact-form-anchor {
    scroll-margin-top: 6.5rem;
    padding-top: 1rem;
}

@media (min-width: 768px) {
    #page-contact .contact-form-anchor {
        padding-top: 1.5rem;
    }
}

.mobile-top-book {
    flex: 0 1 auto;
    margin: 0 auto;
    padding: 0.45rem 1.1rem;
    border-radius: 9999px;
    border: none;
    background: linear-gradient(135deg, #C9A84C, #a88a3a);
    color: #0A1628;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    white-space: nowrap;
}

.mobile-top-nav {
    flex: 0 0 auto;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    border: none;
    background: #6CB4EE;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
}

/* Membership request frame: stable sizing (match other dashboard frames) */
#page-members-request > .max-w-6xl {
    max-width: 72rem;
}

.spa-page > .max-w-6xl,
.spa-page > .max-w-\[1200px\] {
    width: 100%;
    max-width: 72rem;
}

/* ── Footer: 3-column compact layout (fold inner) ── */
@media (min-width: 660px) and (max-width: 1023px),
       (orientation: portrait) and (min-width: 480px) and (min-height: 650px) and (max-width: 1023px) {
    #main-footer-kl34 .footer-grid {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr) minmax(0, 0.95fr);
        gap: 1rem 1.35rem;
        align-items: start;
    }

    /* TopHat VIP title row spans full width; veteran joins lists + contact below */
    #main-footer-kl34 .footer-brand-col {
        display: contents;
    }

    #main-footer-kl34 .footer-brand-copy {
        grid-column: 1 / -1;
    }

    #main-footer-kl34 .footer-brand-copy h3 {
        font-size: 1.125rem;
        margin-bottom: 0.35rem;
    }

    #main-footer-kl34 .footer-brand-copy p {
        margin-bottom: 0;
        font-size: 0.6875rem;
        line-height: 1.45;
        max-width: 36rem;
    }

    #main-footer-kl34 .footer-veteran-badge {
        grid-column: 1;
        align-self: start;
        max-width: 7rem;
    }

    #main-footer-kl34 .footer-veteran-badge span {
        font-size: 0.625rem;
        line-height: 1.35;
        letter-spacing: 0.05em;
    }

    #main-footer-kl34 .footer-lists-col {
        grid-column: 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem 1.25rem;
    }

    #main-footer-kl34 .footer-contact-col {
        grid-column: 3;
    }

    #main-footer-kl34 .footer-nav-col h4,
    #main-footer-kl34 .footer-services-col h4 {
        font-size: 0.6875rem;
        margin-bottom: 0.65rem;
    }

    #main-footer-kl34 .footer-nav-col .space-y-2 > *,
    #main-footer-kl34 .footer-services-col .space-y-2 > * {
        font-size: 0.6875rem;
    }

    #main-footer-kl34 .footer-contact-col h4 {
        font-size: 0.6875rem;
        margin-bottom: 0.65rem;
    }

    #main-footer-kl34 .footer-contact-col .text-sm {
        font-size: 0.6875rem;
    }
}

@media (min-width: 1024px) {
    #main-footer-kl34 .footer-lists-col {
        display: contents;
    }

    #main-footer-kl34 .footer-brand-col {
        display: block;
    }

    #main-footer-kl34 .footer-brand-copy p {
        margin-bottom: 1rem;
    }

    #main-footer-kl34 .footer-veteran-badge {
        max-width: none;
    }
}
