/* ============================================================
   MENU & HEADER STYLES — The Best News Network
   ============================================================ */

/* Header Layout */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 200;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    pointer-events: none;
    box-sizing: border-box;
}
.site-header > * {
    pointer-events: auto;
}

/* Hide any WordPress page title on homepage */
body.home .entry-title,
body.home .page-title,
body.blog .entry-title,
body.blog .page-title,
body.home .site-main > .page-header,
body.blog .site-main > .page-header {
    display: none !important;
}

/* Logo Styles */
.header-logo {
    position: relative;
    z-index: 201;
}
.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}
.logo-link:hover {
    transform: scale(1.1);
}

.site-brand-mark {
    display: block;
    width: 54px;
    height: 57px;
    object-fit: contain;
    filter:
        drop-shadow(0 0 7px rgba(255, 255, 255, 0.2))
        drop-shadow(0 0 13px rgba(41, 236, 255, 0.12));
}

/* Custom logo image */
.logo-link .custom-logo-img,
.logo-link .custom-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 50%;
    max-width: 60px;
    max-height: 60px;
}

/* WordPress custom-logo-link override */
.custom-logo-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}
.custom-logo-link img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover;
    border-radius: 50%;
}

/* Planet Logo */
.planet-logo {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.planet-sphere {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #4a4a5a, #000 70%);
    box-shadow: inset -4px -4px 10px rgba(0,0,0,0.8), 0 0 15px rgba(255,255,255,0.1);
    position: relative;
    z-index: 2;
}

.planet-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #00cec9;
    border-bottom-color: #fd79a8;
    transform: translate(-50%, -50%) rotate(-20deg);
    box-shadow: 
        0 -4px 12px rgba(0, 206, 201, 0.4),
        0 4px 12px rgba(253, 121, 168, 0.4),
        inset 0 2px 6px rgba(0, 206, 201, 0.3),
        inset 0 -2px 6px rgba(253, 121, 168, 0.3);
    z-index: 1;
    animation: ring-spin 8s linear infinite;
}

@keyframes ring-spin {
    from { transform: translate(-50%, -50%) rotate(-20deg) scale(1); }
    50% { transform: translate(-50%, -50%) rotate(-20deg) scale(1.05); }
    to { transform: translate(-50%, -50%) rotate(-20deg) scale(1); }
}

.logo-tooltip {
    position: absolute;
    top: 50%;
    left: calc(100% + 12px);
    transform: translateY(-50%) translateX(-10px);
    background: #fff;
    color: #0a0a0a;
    padding: 6px 14px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 201;
}
.header-logo:hover .logo-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* View Switch */
.view-switch {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 200;
    pointer-events: auto;
}
.view-separator {
    color: rgba(255,255,255,0.6);
    font-size: 10px;
    pointer-events: none;
}
.view-btn {
    background: none;
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    padding: 4px 0;
    letter-spacing: 0.5px;
}
.view-btn.active {
    opacity: 1;
}
.view-btn:hover {
    opacity: 0.8;
    background: none;
    box-shadow: none;
    transform: none;
}
.view-label {
    display: block;
}

/* Menu Toggle Button */
.menu-toggle {
    height: 48px;
    background: #fff;
    color: #0a0a0a;
    border: none;
    border-radius: 100px;
    padding: 0 22px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 201;
}
.menu-toggle:hover {
    color: #0a0a0a;
    background: #fff;
    box-shadow: none;
    transform: scale(1.05);
}
.menu-dot {
    font-size: 18px;
    line-height: 1;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: 100vh;
    background: #f5f5f7;
    z-index: 300;
    overflow: hidden;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
body.menu-open .menu-overlay {
    width: 420px;
}
@media (max-width: 768px) {
    body.menu-open .menu-overlay {
        width: 100vw;
    }
}

.menu-overlay-inner {
    padding: 132px 40px 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
    transition-delay: 0s;
    min-width: 380px;
}

.menu-brand {
    position: absolute;
    top: 24px;
    left: 32px;
    display: flex;
    width: 220px;
    min-height: 82px;
    align-items: center;
    padding: 9px 12px;
    border-radius: 12px;
    background: #08233d;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
}

.menu-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.menu-brand:hover {
    transform: translateY(-2px);
}
body.menu-open .menu-overlay-inner {
    opacity: 1;
    transition-delay: 0.3s;
}

/* Close Button */
.menu-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0a0a0a;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    z-index: 301;
}
.menu-close:hover {
    color: #fff;
    background: #0a0a0a;
    box-shadow: none;
    transform: scale(1.1) rotate(90deg);
}

/* Menu Links */
.menu-nav-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.primary-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.primary-menu li {
    margin: 8px 0;
}
.primary-menu a {
    color: #0a0a0a;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 500;
    line-height: 1.15;
    position: relative;
    display: inline-block;
    transition: padding-left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.primary-menu a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6c5ce7;
    transform: translateY(-50%) scale(0);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.primary-menu a:hover {
    padding-left: 28px;
    color: #0a0a0a;
}
.primary-menu a:hover::before {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

/* Menu Footer */
.menu-footer {
    margin-top: auto;
    padding-top: 24px;
}
.menu-email {
    display: block;
    color: #0a0a0a !important;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    margin-bottom: 20px;
    transition: opacity 0.3s ease;
}
.menu-email:hover {
    opacity: 0.6;
    color: #0a0a0a !important;
}
.menu-social-icons {
    display: flex;
    gap: 10px;
}
.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0a0a0a;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: transform 0.3s ease, background 0.3s ease;
}
.social-icon:hover {
    transform: scale(1.1);
    color: #fff !important;
    background: #333;
}

/* WordPress Admin Bar adjustment */
.admin-bar .site-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* Homepage placement mirrors the spiral composition. */
body.home .site-header,
body.blog .site-header {
    padding: 42px 52px;
}

body.home .view-switch,
body.blog .view-switch {
    top: 58px;
    gap: 11px;
}

body.home .logo-link,
body.blog .logo-link {
    width: 66px;
    height: 66px;
}

body.home .site-brand-mark,
body.blog .site-brand-mark {
    width: 61px;
    height: 64px;
}

body.home .planet-logo,
body.blog .planet-logo {
    width: 62px;
    height: 62px;
}

body.home .planet-sphere,
body.blog .planet-sphere {
    width: 43px;
    height: 43px;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.8), rgba(147, 70, 199, 0.65) 12%, #160a24 50%, #010103 76%);
    box-shadow:
        inset -7px -8px 13px rgba(0, 0, 0, 0.8),
        0 0 16px rgba(204, 74, 255, 0.48),
        0 0 26px rgba(44, 231, 255, 0.18);
}

body.home .planet-ring,
body.blog .planet-ring {
    width: 72px;
    height: 25px;
    border-width: 2px;
    filter: drop-shadow(0 0 5px rgba(181, 62, 255, 0.7));
}

body.home .view-btn,
body.blog .view-btn {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.02em;
}

body.home .view-separator,
body.blog .view-separator {
    font-size: 13px;
}

body.home .menu-toggle,
body.blog .menu-toggle {
    min-width: 116px;
    height: 57px;
    justify-content: center;
    padding: 0 25px;
    font-size: 21px;
    font-weight: 400;
    letter-spacing: -0.02em;
}

body.home .menu-dot,
body.blog .menu-dot {
    display: none;
}

@media (max-width: 700px) {
    body.home .site-header,
    body.blog .site-header {
        padding: 20px 18px;
    }

    body.home .view-switch,
    body.blog .view-switch {
        top: 30px;
    }

    body.home .logo-link,
    body.blog .logo-link {
        width: 52px;
        height: 52px;
    }

    body.home .site-brand-mark,
    body.blog .site-brand-mark {
        width: 48px;
        height: 51px;
    }

    body.home .planet-logo,
    body.blog .planet-logo {
        width: 48px;
        height: 48px;
    }

    body.home .planet-sphere,
    body.blog .planet-sphere {
        width: 34px;
        height: 34px;
    }

    body.home .planet-ring,
    body.blog .planet-ring {
        width: 56px;
        height: 19px;
    }

    body.home .view-btn,
    body.blog .view-btn {
        font-size: 14px;
    }

    body.home .menu-toggle,
    body.blog .menu-toggle {
        min-width: 78px;
        height: 43px;
        padding: 0 18px;
        font-size: 15px;
    }
}

@media (max-width: 430px) {
    body.home .view-switch,
    body.blog .view-switch {
        top: 73px;
        display: flex;
    }

    .menu-brand {
        left: 20px;
        width: 190px;
        min-height: 72px;
    }
}
