/* ==========================================================================
   PALM TREE WORKSHOPS — Header CSS
   Sticky header: Logo (left) · Nav links (center) · Burger button (right)
   ========================================================================== */

/* ──────────────────────────────────────────────
   ELEMENTOR HEADER SECTION
   Target the Elementor Pro "header" location template.
   All Elementor sections inside the header inherit these rules.
────────────────────────────────────────────── */
#ptw-site-header,
.elementor-location-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    height: var(--ptw-header-height);
    display: flex;
    align-items: center;
    padding-inline: var(--ptw-gap-md);

    /* Start transparent on hero pages */
    background-color: transparent;
    transition: background-color var(--ptw-duration) var(--ptw-ease),
                box-shadow var(--ptw-duration) var(--ptw-ease);
}

/* Scrolled state — applied by JS */
#ptw-site-header.is-scrolled,
.elementor-location-header.is-scrolled {
    background-color: var(--ptw-white);
    box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

/* On dark-background sections the header text stays white */
#ptw-site-header.is-dark,
.elementor-location-header.is-dark {
    color: var(--ptw-white);
}

/* On white bg sections */
#ptw-site-header.is-light,
.elementor-location-header.is-light {
    color: var(--ptw-black);
}


/* ──────────────────────────────────────────────
   HEADER INNER LAYOUT
────────────────────────────────────────────── */
.ptw-header-inner {
    width: 100%;
    max-width: var(--ptw-max-width);
    margin-inline: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--ptw-gap-md);
}


/* ──────────────────────────────────────────────
   LOGO
────────────────────────────────────────────── */
.ptw-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.ptw-logo__icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.ptw-logo__text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: var(--ptw-tracking-wide);
    text-transform: uppercase;
    line-height: 1.3;
    white-space: nowrap;
}

.ptw-logo:hover {
    opacity: 0.75;
}


/* ──────────────────────────────────────────────
   HEADER NAVIGATION (3 inline links)
────────────────────────────────────────────── */
.ptw-header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ptw-gap-lg);
}

.ptw-header-nav a {
    font-size: var(--ptw-text-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: capitalize;
    white-space: nowrap;
    position: relative;
    color: inherit;
}

/* Underline hover effect */
.ptw-header-nav a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--ptw-duration) var(--ptw-ease);
}

.ptw-header-nav a:hover {
    opacity: 1;
}

.ptw-header-nav a:hover::after {
    transform: scaleX(1);
}


/* ──────────────────────────────────────────────
   BURGER BUTTON (right side)
────────────────────────────────────────────── */
.ptw-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 5px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    flex-shrink: 0;
    color: inherit;
}

.ptw-burger__line {
    display: block;
    height: 1.5px;
    background-color: currentColor;
    transition: width var(--ptw-duration) var(--ptw-ease),
                transform var(--ptw-duration) var(--ptw-ease),
                opacity var(--ptw-duration) var(--ptw-ease);
}

.ptw-burger__line:nth-child(1) { width: 24px; }
.ptw-burger__line:nth-child(2) { width: 18px; }

.ptw-burger:hover .ptw-burger__line { width: 24px; }


/* ──────────────────────────────────────────────
   RESPONSIVE — hide center nav on mobile/tablet
────────────────────────────────────────────── */
@media (max-width: 900px) {
    .ptw-header-nav {
        display: none;
    }
    .ptw-header-inner {
        grid-template-columns: auto 1fr auto;
    }
}

@media (max-width: 480px) {
    #ptw-site-header,
    .elementor-location-header {
        padding-inline: var(--ptw-gap-sm);
    }
}
