/*
 * nekoto-technique.com: dark header and menu (plan B), for the GoDaddy "Go" theme.
 * Lives in WordPress at Appearance > Customize > Additional CSS (paste this whole file there).
 * The menu items themselves are in Appearance > Menus > 主要; two of them carry a CSS class:
 *   免費諮詢  -> nav-cta          (drawn as the button on the right)
 *   自製工具  -> nav-parent-only  (opens its dropdown; has no page of its own)
 */

/* --- Colours (same as the pages in assets/css/base.css) --- */
:root {
    --nk-header-bg: #0b1222;
    --nk-header-line: #1e293b;
    --nk-menu-bg: #1e293b;
    --nk-menu-line: #334155;
    --nk-text: #f1f5f9;
    --nk-muted: #94a3b8;
    --nk-primary: #38bdf8;
}

/* --- Page background around the content: dark instead of light grey --- */
body {
    background-color: #0f172a;
}

/* --- Header bar --- */
#site-header.site-header {
    background-color: var(--nk-header-bg);
    border-bottom: 1px solid var(--nk-header-line);
    color: var(--nk-text);
}

#site-header .site-title,
#site-header .site-title a {
    color: var(--nk-text);
    white-space: nowrap; /* keep 巨大浣熊網頁設計 on one line */
}

#site-header .site-description {
    color: var(--nk-muted);
}

/* Smaller logo and title: the 156px logo made the header 200px tall and pushed the menu onto two lines. */
#site-header .custom-logo {
    width: auto;
    max-height: 64px;
}

#site-header .site-title {
    font-size: 26px;
}

/* Below 1200px the tagline would wrap into a narrow column beside the menu, so hide it there. */
@media (max-width: 1199px) {
    #site-header .site-description { display: none; }
}

@media (max-width: 1023px) {
    #site-header .custom-logo { max-height: 48px; }
    #site-header .site-title { font-size: 20px; }

    /* Phone menu (opened with the ☰ button) is a full-screen panel: dark like the header. */
    #site-header .header__navigation,
    #site-header .header__navigation-inner {
        background-color: var(--nk-header-bg);
    }

    #site-header .primary-menu > li.nav-cta > a {
        display: inline-block;
        margin-top: 0.5rem;
    }
}

/* Desktop: the menu takes the room it needs, on one line. */
@media (min-width: 1024px) {
    #site-header .header__title-nav {
        flex: 1 1 auto;
        justify-content: space-between;
        gap: 2rem;
    }

    #site-header .primary-menu {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
    }
}

#site-header .header__search-toggle,
#site-header .nav-toggle {
    color: var(--nk-text);
}

/* --- Top-level menu --- */
#site-header .primary-menu > li > a {
    color: var(--nk-text);
    white-space: nowrap;
    transition: color 0.2s;
}

#site-header .primary-menu > li > a:hover,
#site-header .primary-menu > li.current-menu-item > a,
#site-header .primary-menu > li.current-menu-ancestor > a {
    color: var(--nk-primary);
}

/* 自製工具: the item only opens its dropdown */
#site-header .nav-parent-only > a {
    cursor: default;
}

/* --- Dropdowns --- */
#site-header .primary-menu .sub-menu {
    background-color: var(--nk-menu-bg);
    border: 1px solid var(--nk-menu-line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

#site-header .primary-menu a {
    text-transform: none; /* the theme lowercases menu links (Coser -> coser) */
}

#site-header .primary-menu .sub-menu a {
    color: var(--nk-text);
}

#site-header .primary-menu .sub-menu a:hover {
    color: var(--nk-primary);
}

/* --- 免費諮詢 button --- */
#site-header .primary-menu > li.nav-cta > a {
    padding: 0.45em 1.1em;
    border-radius: 6px;
    background-color: var(--nk-primary);
    color: #0f172a;
    font-weight: 700;
    transition: background-color 0.2s, box-shadow 0.2s;
}

#site-header .primary-menu > li.nav-cta > a:hover,
#site-header .primary-menu > li.nav-cta.current-menu-item > a {
    background-color: #fff;
    color: #0f172a;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
}

/* --- Search box that drops down from the magnifier --- */
#site-header .search-modal-inner {
    background-color: var(--nk-header-bg);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--nk-header-bg);
    color: var(--nk-muted);
    border-top: 1px solid var(--nk-header-line);
}

.site-footer a {
    color: var(--nk-text);
}
