/**
 * ConfidenceTalk Website Header & Footer Styles
 *
 * Header and footer use --color-primary as background (theme's actual primary color).
 * Hover and active states use per-theme accent/light colors defined in each theme:
 *   --color-primary-light    = lightened version of primary (e.g. #eedccd for bronze)
 *   --color-text-link        = accent link color (e.g. #CD853F for bronze)
 *   --color-text-body        = white text on primary backgrounds
 *
 * Each theme gets its own hover/scroll/active visual identity naturally
 * through the theme's CSS variables — no hardcoded colors.
 *
 * @package ConfidenceTalk
 */

/* ============================================================
   LEVEL 1: HEADER
   ============================================================ */
.ct-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: var(--color-primary, #2c3e50);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ct-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 24px;
}

.ct-header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.ct-header-logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.ct-header-logo-link:hover {
    text-decoration: none;
}

.ct-header-brand {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.3px;
}

/* NAVIGATION */
.ct-header-nav {
    display: flex;
    align-items: center;
}

.ct-header-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ct-header-menu-item {
    margin: 0;
    padding: 0;
}

/* Mobile dropdown CTA group — only rendered into the menu on small screens */
.ct-header-menu-cta {
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Normal state: always white text on theme-colored header */
.ct-header-menu-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 450;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 6px 0;
    white-space: nowrap;
}

/* Hover: full white */
.ct-header-menu-link:hover {
    color: #fff;
    text-decoration: none;
}

/* Active/selected: full white text + bottom border accent */
.ct-header-menu-item-active .ct-header-menu-link,
.ct-header-menu-link.active {
    color: #fff;
    font-weight: 500;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

/* HEADER RIGHT */
.ct-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

a.ct-header-btn,
.ct-header-btn {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.2s ease;
    white-space: nowrap;
}

a.ct-header-btn:hover,
.ct-header-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none;
    color: #fff;
}

/* ============================================================
   PRIMARY CTA — "GOLDEN BEACON" (Dashboard / Try Free)
   Mirrors the Hostess Guide's "Open dashboard" chip + orb glow:
   a metallic gold pill, a liquid-gold shimmer sweep (::before),
   an always-on expanding ping ring (::after, top bar only) and a
   warm bronze breathing glow. Animations are GPU-friendly and
   disabled under prefers-reduced-motion.
   ============================================================ */
.ct-header-btn.ct-header-btn-primary {
    position: relative;
    background: linear-gradient(135deg, #ffe3ae 0%, #f0c98a 50%, #d99b4a 100%);
    color: #1a1308;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    font-weight: 700;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 0 0 1px rgba(139, 69, 19, 0.25),
        0 6px 18px -4px rgba(139, 69, 19, 0.6);
    animation: ctHeaderGlow 3.4s ease-in-out infinite;
    transition: filter 0.18s ease, transform 0.18s ease;
}

/* Label sits above the shimmer sweep; uppercased with light
   tracking for a premium CTA look (keeps the "Dashboard" string
   translatable + screen-reader friendly). A subtle two-edge bevel
   raises the lettering off the gold — light top edge + soft dark
   bottom shade (static, reduced-motion safe). */
.ct-header-btn-label {
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-shadow:
        0 -1px 0 rgba(255, 255, 255, 0.7),
        0 1px 1px rgba(0, 0, 0, 0.28);
}

/* Liquid-gold shimmer sweep — contained within the button shape */
.ct-header-btn.ct-header-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.6) 50%, transparent 58%);
    background-size: 250% 100%;
    background-position: 140% 0;
    animation: ctHeaderSheen 4.8s ease-in-out infinite;
    pointer-events: none;
}

/* Always-on expanding ping ring (like the orb's .ct-avp-ring).
   Top bar only — the button is cloned into the mobile dropdown,
   where a full-width ring would look oversized. */
.ct-header-right .ct-header-btn.ct-header-btn-primary::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid rgba(205, 133, 63, 0.55);
    animation: ctHeaderPing 2.8s ease-out infinite;
    pointer-events: none;
}

.ct-header-btn.ct-header-btn-primary:hover {
    background: linear-gradient(135deg, #ffe3ae 0%, #f0c98a 50%, #d99b4a 100%);
    color: #1a1308;
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.ct-header-btn.ct-header-btn-primary:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    filter: brightness(1.06);
}

/* "You are here" — deeper gold, no motion chrome */
.ct-header-btn.ct-header-btn-primary.ct-header-btn-active {
    background: linear-gradient(135deg, #d99b4a 0%, #c7853a 100%);
    color: #1a1308;
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.55),
        0 6px 18px -4px rgba(139, 69, 19, 0.5);
    animation: none;
    transform: none;
}

.ct-header-btn.ct-header-btn-primary.ct-header-btn-active::before,
.ct-header-btn.ct-header-btn-primary.ct-header-btn-active::after {
    animation: none;
    display: none;
}

.ct-header-btn.ct-header-btn-primary.ct-header-btn-active:hover {
    filter: none;
}

/* Warm breathing bronze glow */
@keyframes ctHeaderGlow {
    0%,
    100% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.7),
            0 0 0 1px rgba(139, 69, 19, 0.25),
            0 6px 18px -4px rgba(139, 69, 19, 0.6);
    }
    50% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.7),
            0 0 0 1px rgba(139, 69, 19, 0.3),
            0 10px 28px -4px rgba(139, 69, 19, 0.85);
    }
}

/* Liquid-gold shimmer sweep */
@keyframes ctHeaderSheen {
    0% {
        background-position: 140% 0;
    }
    40%,
    100% {
        background-position: -90% 0;
    }
}

/* Expanding attention ring */
@keyframes ctHeaderPing {
    0% {
        transform: scale(0.9);
        opacity: 0.9;
    }
    70%,
    100% {
        transform: scale(1.28);
        opacity: 0;
    }
}

/* No motion chrome for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ct-header-btn.ct-header-btn-primary,
    .ct-header-btn.ct-header-btn-primary::before,
    .ct-header-btn.ct-header-btn-primary::after {
        animation: none;
    }
    .ct-header-btn.ct-header-btn-primary {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.7),
            0 0 0 1px rgba(139, 69, 19, 0.25),
            0 6px 18px -4px rgba(139, 69, 19, 0.6);
    }
    .ct-header-right .ct-header-btn.ct-header-btn-primary::after {
        display: none;
    }
    .ct-header-btn.ct-header-btn-primary:hover {
        transform: none;
        transition: none;
    }
}



a.ct-header-link,
.ct-header-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 450;
    text-decoration: none;
    transition: color 0.2s ease;
}

a.ct-header-link:hover,
.ct-header-link:hover {
    color: #fff;
    text-decoration: none;
}

/* ============================================================
   HAMBURGER (mobile)
   ============================================================ */
.ct-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

.ct-hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    transition: transform 0.2s ease;
}

.ct-hamburger-active .ct-hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.ct-hamburger-active .ct-hamburger-line:nth-child(2) {
    opacity: 0;
}

.ct-hamburger-active .ct-hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.ct-site-content {
    width: 100%;
    min-height: 400px;
    display: block;
}

.ct-site-content > .ct-gold-series {
    display: block;
}

/* ============================================================
   LEVEL 7: FOOTER (matches header)
   ============================================================ */
.ct-site-footer {
    background: var(--color-primary, #2c3e50);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
}

.ct-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.ct-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ct-footer-brand {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.ct-footer-divider {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    margin: 0 4px;
}

.ct-footer-location {
    font-size: 12px;
    color: #fff;
    white-space: nowrap;
}

.ct-footer-copy {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}

.ct-footer-links {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.ct-footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

/* Per-theme link accent on hover */
.ct-footer-links a:hover {
    color: var(--color-text-link, var(--color-primary-light, #CD853F));
    text-decoration: underline;
}

.ct-footer-dot {
    color: rgba(255, 255, 255, 0.35);
    font-size: 10px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .ct-header-inner {
        padding: 0 16px;
        height: 56px;
    }

    .ct-header-nav .ct-header-menu {
        display: none;
    }

    .ct-header-nav .ct-header-menu.ct-nav-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--color-primary, #2c3e50);
        padding: 16px 24px;
        z-index: 1001;
        gap: 8px;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    }

    .ct-hamburger {
        display: flex;
    }

    .ct-header-menu-link {
        font-size: 15px;
        padding: 8px 0;
    }

    .ct-footer-inner {
        height: auto;
        padding: 16px;
    }

    .ct-footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .ct-header-inner {
        padding: 0 12px;
        height: 52px;
    }

    .ct-header-brand {
        font-size: 16px;
    }

    .ct-header-right {
        gap: 8px;
    }

    /* Secondary header CTAs (Login/Logout/Admin) move into the dropdown menu;
       keep a single primary CTA (Try Free / Dashboard) in the top bar.
       SPECIFICITY FIX: must be .ct-header-btn.ct-header-btn-secondary (0,2,0) or
       a.ct-header-btn.ct-header-btn-secondary (0,1,2) — a bare .ct-header-btn-secondary
       (0,1,0) loses to the base a.ct-header-btn (0,1,1), leaving the Login button
       visible and overflowing the header by ~9px on phones. */
    a.ct-header-btn.ct-header-btn-secondary,
    .ct-header-btn.ct-header-btn-secondary {
        display: none !important;
    }

    .ct-header-right .ct-header-btn:not(.ct-header-btn-secondary) {
        order: -1;
        min-height: 44px;
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 8px;
    }

    /* Dropdown CTA group — full-width, thumb-friendly buttons */
    .ct-header-menu-cta {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .ct-header-menu-cta .ct-header-btn,
    .ct-header-menu-cta .ct-header-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 44px;
        padding: 12px 16px;
        font-size: 15px;
        white-space: normal;
        text-align: center;
    }

    .ct-header-link {
        font-size: 12px;
    }

    /* Footer: stack + wrap on small screens */
    .ct-footer-inner {
        flex-direction: column;
        gap: 12px;
        height: auto;
        padding: 14px 12px;
    }

    .ct-footer-left {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 6px;
    }

    .ct-footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ct-header-inner {
        padding: 0 10px;
        height: 48px;
    }

    .ct-header-brand {
        font-size: 14px;
    }

    .ct-header-right .ct-header-btn:not(.ct-header-btn-secondary) {
        min-height: 44px;
        padding: 7px 14px;
        font-size: 12px;
    }

    .ct-header-link {
        font-size: 11px;
    }

    .ct-footer-inner {
        padding: 12px 10px;
    }

    .ct-footer-links {
        font-size: 11px;
    }

    .ct-footer-divider {
        display: none;
    }
}