/* ============================================================================
   MARKETING HEADER — Combined single header
   Logo spans full height on desktop, text centered, nav full-width bottom
   ============================================================================
   KNOWN LIMITATION — HARDCODED COLOURS — DO NOT UPDATE
   This file is loaded on the PUBLIC site which does NOT load palette.css.
   Palette vars (--white-text, --hover-lift etc.) are UNDEFINED here.
   All colours MUST be hardcoded. Do NOT replace with palette CSS variables.
   ============================================================================ */

/* =============================================================================
   STICKY WRAPPER
   ============================================================================= */

.mk-header-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* =============================================================================
   LAYOUT — Two rows, logo overlays both via absolute positioning on desktop
   ============================================================================= */

.mk-header-grid {
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--mkt-header-background);
    background-image: var(--mkt-header-background-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Top row: centered text + actions right-aligned */
.mk-header-toprow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.5rem 2rem 0.5rem 0;
    min-height: 64px;
    position: relative;
}

/* =============================================================================
   LOGO — absolutely positioned on the grid, spans both rows on desktop
   ============================================================================= */

.mk-header-logo-area {
    position: absolute;
    left: 0.25rem;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    z-index: 15;
}

.mk-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.mk-logo-link:hover {
    text-decoration: none;
    color: inherit;
}

.mk-header-logo {
    height: 100%;
    max-height: 100px;
    width: auto;
    padding: 0.25rem 0;
    border: none;
}

/* =============================================================================
   TEXT AREA — centered company name + tagline
   ============================================================================= */

.mk-header-text-area {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.mk-text-link {
    display: flex;
    flex-direction: column;
    text-align: center;
    text-decoration: none;
    color: inherit;
    pointer-events: auto;
}

.mk-text-link:hover {
    text-decoration: none;
    color: inherit;
}

.mk-company-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--mkt-header-text);
}

.mk-company-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--mkt-header-tagline);
    opacity: 0.7;
}

/* =============================================================================
   ACTIONS — top right
   ============================================================================= */

.mk-header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 10;
}

.mk-phone {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
    color: var(--mkt-header-phone);
    text-decoration: none;
}

.mk-phone:hover {
    color: var(--mkt-header-text);
    text-decoration: none;
}

.mk-btn-book {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--mkt-book-background);
    color: var(--mkt-book-text);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.mk-btn-book:hover {
    background: var(--mkt-book-hover-background);
    color: var(--mkt-book-text);
    text-decoration: none;
}

/* =============================================================================
   NAV — full-width bottom row
   ============================================================================= */

.mk-header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-top: 0;
    min-height: 2.5rem;
    background-color: var(--mkt-nav-background);
    background-image: var(--mkt-nav-background-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    position: relative;
    z-index: 10;
}

.mk-nav-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.mk-nav-links a {
    display: block;
    padding: 0.85rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--mkt-nav-text);
    text-decoration: none;
    border: none;
    transition: color 0.2s ease, background 0.2s ease;
}

.mk-nav-links a:hover {
    color: var(--mkt-nav-hover-text);
    background: rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.mk-nav-links a.active {
    background: rgba(0, 0, 0, 0.1);
    color: var(--mkt-nav-active-text);
}

/* BOOK NOW link inside nav — hidden on desktop, shown in mobile hamburger menu */
.mk-nav-book-link {
    display: none !important;
}

/* =============================================================================
   HAMBURGER — Hidden on desktop
   ============================================================================= */

.mk-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 1rem;
}

.mk-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--mkt-hamburger);
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mk-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mk-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.mk-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =============================================================================
   RESPONSIVE — Tablet
   ============================================================================= */

@media (max-width: 1024px) {
    /* Logo still absolute but smaller, doesn't span nav */
    .mk-header-logo-area {
        position: absolute;
        left: 0.75rem;
        top: 0;
        bottom: auto;
        z-index: 15;
    }

    .mk-header-logo {
        height: 56px;
        max-height: 56px;
        padding: 0.25rem 0;
    }

    .mk-company-name {
        font-size: 1.15rem;
        letter-spacing: 1.5px;
    }

    .mk-company-subtitle {
        font-size: 0.65rem;
    }
}

/* =============================================================================
   RESPONSIVE — Mobile
   ============================================================================= */

@media (max-width: 768px) {
    /* Logo goes inline, centered above text */
    .mk-header-grid {
        align-items: center;
    }

    .mk-header-logo-area {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        justify-content: center;
        width: 100%;
        padding: 0.75rem 0 0.25rem 0;
    }

    .mk-header-logo {
        height: 48px;
        max-height: 48px;
        padding: 0;
    }

    /* Text area goes inline, centered */
    .mk-header-text-area {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        pointer-events: auto;
        flex: 1;
        min-width: 0;
        justify-content: center;
    }

    .mk-text-link {
        text-align: center;
    }

    .mk-header-toprow {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 1rem;
        min-height: auto;
    }

    .mk-company-name {
        font-size: 1.05rem;
        letter-spacing: 1px;
        white-space: nowrap;
    }

    .mk-company-subtitle {
        font-size: 0.65rem;
        letter-spacing: 1px;
        white-space: normal;
        line-height: 1.4;
    }

    .mk-header-actions {
        position: fixed;
        right: 0.75rem;
        top: 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex-shrink: 0;
        z-index: 1001;
    }

    .mk-phone {
        display: none;
    }

    /* Hamburger moves into top row, nav bar collapses */
    .mk-header-nav {
        min-height: 0;
        background-color: var(--mkt-nav-background);
        background-image: var(--mkt-nav-background-image, none);
        background-repeat: repeat;
    }

    .mk-hamburger {
        display: block;
        padding: 0.5rem;
        margin: 0;
    }

    .mk-nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--mkt-nav-background);
        background-image: var(--mkt-nav-background-image, none);
        background-repeat: repeat;
    }

    .mk-nav-links.active {
        display: flex;
    }

    .mk-nav-links a {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
        border-top: 1px solid var(--subtle-border);
    }

}

/* =============================================================================
   RESPONSIVE — Phone only
   ============================================================================= */

@media (max-width: 768px) {
    .mk-btn-book {
        display: none;
    }

    /* Show BOOK NOW in hamburger menu */
    .mk-nav-book-link {
        display: block !important;
        background: var(--mkt-book-background);
        font-weight: 500;
        letter-spacing: 2px;
    }
}

/* =============================================================================
   ACCESSIBILITY THEMES — override marketing header colours
   ============================================================================= */

body[data-theme="highcontrast"] .mk-header-grid {
    background: #000000;
}

body[data-theme="highcontrast"] .mk-company-name,
body[data-theme="highcontrast"] .mk-company-subtitle,
body[data-theme="highcontrast"] .mk-phone {
    color: #ffffff;
}

body[data-theme="highcontrast"] .mk-header-nav {
    background: #1a1a1a;
}

body[data-theme="highcontrast"] .mk-nav-links a {
    color: #ffffff;
}

body[data-theme="highcontrast"] .mk-nav-links a:hover {
    color: #000000;
    background: #ffffff;
}

body[data-theme="highcontrast"] .mk-nav-links a.active {
    background: #333333;
    color: #ffffff;
}

body[data-theme="highcontrast"] .mk-btn-book {
    background: #ffffff;
    color: #000000;
}

body[data-theme="highcontrast"] .mk-btn-book:hover {
    background: #cccccc;
    color: #000000;
}

body[data-theme="highcontrast"] .mk-hamburger span {
    background: #ffffff;
}

body[data-theme="dyslexic"] .mk-header-grid {
    background: #faf8f5;
}

body[data-theme="dyslexic"] .mk-company-name,
body[data-theme="dyslexic"] .mk-company-subtitle,
body[data-theme="dyslexic"] .mk-phone {
    color: #333333;
}

body[data-theme="dyslexic"] .mk-header-nav {
    background: #e8e4dc;
}

body[data-theme="dyslexic"] .mk-nav-links a {
    color: #333333;
}

body[data-theme="dyslexic"] .mk-nav-links a:hover {
    color: #000000;
    background: rgba(0, 0, 0, 0.08);
}

body[data-theme="dyslexic"] .mk-nav-links a.active {
    background: rgba(0, 0, 0, 0.1);
    color: #333333;
}

body[data-theme="dyslexic"] .mk-btn-book {
    background: #333333;
    color: #faf8f5;
}

body[data-theme="dyslexic"] .mk-btn-book:hover {
    background: #555555;
    color: #faf8f5;
}

body[data-theme="dyslexic"] .mk-hamburger span {
    background: #333333;
}
