:root {
    --planet-header-height: 78px;
    --planet-header-bg: var(--brand-blue-900, #0046a5);
    --planet-header-bg-2: var(--brand-blue-700, #338af3);
    --planet-header-text: var(--neutral-000, #ffffff);
    --planet-header-accent: var(--brand-yellow-500, #ffda44);
    --planet-header-shadow: 0 10px 28px rgba(0, 50, 110, 0.22);
    --planet-font-family: 'Roboto', sans-serif;
}

body {
    padding-top: 0;
}

#page {
    padding-top: var(--planet-header-height);
    padding-bottom: 0px;
}

body.admin-bar .planet-global-header {
    top: 32px;
}

body.admin-bar #page {
    padding-top: calc(var(--planet-header-height) + 32px);
}

@media (max-width: 782px) {
    body.admin-bar .planet-global-header {
        top: 46px;
    }

    body.admin-bar #page {
        padding-top: calc(var(--planet-header-height) + 46px);
    }
}

.planet-global-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9998;
    width: 100%;
    min-height: var(--planet-header-height);
    background: linear-gradient(90deg, var(--planet-header-bg) 0%, var(--planet-header-bg-2) 100%);
    color: var(--planet-header-text);
    box-shadow: var(--planet-header-shadow);
}

.planet-header-inner {
    min-height: var(--planet-header-height);
    margin: 0 auto;
    padding: 10px 100px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
}

.planet-branding {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.planet-logo-image,
.planet-logo-fallback {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    display: block;
    object-fit: cover;
}

.planet-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--planet-header-accent);
    font-family: var(--planet-font-family);
}

.planet-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.planet-brand-title {
    font-family: var(--planet-font-family);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.045em;
    font-size: 1.2rem;
}

.planet-brand-tagline {
    font-family: var(--planet-font-family);
    font-size: 0.72rem;
    opacity: 0.9;
    letter-spacing: 0.08em;
}

.planet-header-nav {
    justify-self: center;
    width: 100%;
}

.planet-header-menu {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
}

.planet-header-menu li {
    margin: 0;
}

.planet-header-menu > li {
    position: relative;
}

.planet-header-menu > li > a {
    color: var(--planet-header-text);
    text-decoration: none;
    font-family: var(--planet-font-family);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.88rem;
    /* font-weight: 600; */
    position: relative;
    padding: 4px 0;
    transition: color 0.25s ease;
}

.planet-header-menu > li > a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: var(--planet-header-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.planet-header-menu > li.menu-item-has-children > a {
    padding-right: 16px;
}

.planet-header-menu > li.menu-item-has-children > a::before {
    content: '';
    position: absolute;
    right: 2px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-65%) rotate(45deg);
}

.planet-header-menu > li > a:hover,
.planet-header-menu > li.current-menu-item > a,
.planet-header-menu > li.current-menu-parent > a,
.planet-header-menu > li.current-menu-ancestor > a {
    color: var(--brand-blue-050, #f1f6fe);
}

.planet-header-menu > li > a:hover::after,
.planet-header-menu > li.current-menu-item > a::after,
.planet-header-menu > li.current-menu-parent > a::after,
.planet-header-menu > li.current-menu-ancestor > a::after {
    transform: scaleX(1);
}

.planet-header-menu .sub-menu {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    transform: translate(-50%, -10px);
    min-width: 150px;
    margin: 0;
    padding: 10px 14px;
    list-style: none;
    background: var(--neutral-000, #ffffff);
    border: 1px solid var(--neutral-300, #d9d9d9);
    box-shadow: 0 12px 24px rgba(26, 33, 57, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10010;
}

.planet-header-menu > li:hover > .sub-menu,
.planet-header-menu > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.planet-header-menu .sub-menu li {
    margin: 0;
    border-bottom: 2px solid var(--brand-blue-700, #338af3);
}

.planet-header-menu .sub-menu li:last-child {
    border-bottom: 0;
}

.planet-header-menu .sub-menu a {
    display: block;
    padding: 14px 0;
    color: var(--brand-blue-900, #0046a5);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1rem;
    /* font-weight: 600; */
    letter-spacing: 0.02em;
    font-family: var(--planet-font-family);
}

.planet-header-menu .sub-menu a::after {
    display: none;
}

.planet-header-menu .sub-menu a:hover {
    color: var(--brand-blue-700, #338af3);
}

.planet-header-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
}

.planet-tool-icon,
.planet-search-btn {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    border: 1px solid var(--planet-tool-icon-border, rgba(255, 255, 255, 0.75));
    color: var(--planet-header-text);
    background: var(--planet-tool-icon-bg, rgb(251, 251, 251));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    text-decoration: none;
    transition: all 0.25s ease;
    font-family: var(--planet-font-family);
    font-weight: 700;
}

.planet-search-btn {
    cursor: pointer;
    padding: 0;
    color: var(--planet-search-icon-color, var(--brand-blue-900, #0046a5));
}

.planet-search-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.planet-tool-icon-image {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.planet-tool-icon:hover,
.planet-search-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.95);
}

.planet-language-dropdown {
    position: relative;
    margin-left: 8px;
}

.planet-language-toggle {
    color: var(--planet-header-text);
    font-family: var(--planet-font-family);
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.planet-language-caret {
    font-size: 0.68rem;
    transition: transform 0.2s ease;
}

.planet-language-dropdown.is-open .planet-language-caret {
    transform: rotate(180deg);
}

.planet-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.planet-flag-image {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.planet-flag-fallback {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--brand-yellow-500, #ffda44);
    color: var(--brand-blue-900, #0046a5);
    font-size: 0.55rem;
    line-height: 16px;
    text-align: center;
    font-weight: 700;
    display: inline-block;
}

.planet-language-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    min-width: 130px;
    border-radius: 8px;
    background: var(--neutral-000, #ffffff);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 10001;
}

.planet-language-dropdown.is-open .planet-language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.planet-language-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--neutral-900, #333333);
    text-decoration: none;
    padding: 7px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-family: var(--planet-font-family);
}

.planet-language-menu a:hover,
.planet-language-menu a.is-current {
    background: var(--brand-blue-050, #f1f6fe);
    color: var(--brand-blue-900, #0046a5);
}

.planet-menu-toggle {
    display: none;
    width: 40px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    padding: 7px;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
    cursor: pointer;
}

.planet-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--neutral-000, #ffffff);
}

@media (max-width: 1150px) {
    .planet-header-inner {
        grid-template-columns: auto auto 1fr;
        gap: 12px;
        padding: 10px 16px;
    }

    .planet-menu-toggle {
        display: inline-flex;
        justify-self: end;
    }

    .planet-header-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, var(--brand-blue-900, #0046a5) 0%, #003f89 100%);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .planet-header-nav.is-open {
        max-height: 80vh;
    }

    .planet-header-menu {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px 20px;
        gap: 14px;
    }

    .planet-header-menu > li {
        width: 100%;
    }

    .planet-header-menu > li > a {
        display: block;
        width: 100%;
    }

    .planet-header-menu .sub-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        min-width: 0;
        width: 100%;
        margin-top: 8px;
        padding: 4px 12px;
        box-shadow: none;
        border: 0;
        background: rgba(255, 255, 255, 0.1);
    }

    .planet-header-menu .sub-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }

    .planet-header-menu .sub-menu a {
        color: var(--neutral-000, #ffffff);
        font-size: 0.92rem;
        /* font-weight: 600; */
        padding: 10px 0;
    }

    .planet-header-tools {
        justify-self: end;
        gap: 6px;
    }
}

@media (max-width: 760px) {
    :root {
        --planet-header-height: 72px;
    }

    .planet-header-inner {
        grid-template-columns: auto auto 1fr;
        padding: 8px 12px;
        gap: 10px;
    }

    .planet-logo-image,
    .planet-logo-image-1,
    .planet-logo-fallback {
        width: 46px;
        height: 46px;
    }

    .planet-header-menu > li > a {
        font-size: 0.84rem;
    }

    .planet-brand-title {
        font-size: 1rem;
    }

    .planet-brand-tagline {
        font-size: 0.62rem;
    }

    .planet-header-tools {
        display: none;
    }
}

.planet-global-footer {
    margin-top: 0px;
    background: var(--brand-blue-900, #0046a5);
    color: var(--neutral-000, #ffffff);
    border-top: 2px solid rgba(255, 255, 255, 0.18);
}

.planet-footer-main {
    max-width: 1320px;
    margin: 0 auto;
    padding: 26px 24px 20px;
    display: grid;
    grid-template-columns: minmax(240px, 1.1fr) minmax(260px, 1fr) minmax(280px, 1.2fr);
    align-items: start;
    gap: 34px;
}

.planet-footer-branding {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.planet-footer-logo-image,
.planet-footer-logo-fallback {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.78);
    display: block;
    object-fit: cover;
}

.planet-footer-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-yellow-500, #ffda44);
    font-family: var(--planet-font-family);
}

.planet-footer-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.planet-footer-brand-title {
    font-family: var(--planet-font-family);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.045em;
    font-size: 2.85rem;
}

.planet-footer-brand-tagline {
    font-family: var(--planet-font-family);
    font-size: 0.95rem;
    opacity: 0.94;
    letter-spacing: 0.09em;
}

.planet-footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
}

.planet-footer-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--planet-font-family);
    font-size: 1rem;
    line-height: 1.12;
}

.planet-footer-contact-item span,
.planet-footer-contact-item a {
    color: var(--neutral-000, #ffffff);
    text-decoration: none;
}

.planet-footer-contact-icon {
    display: inline-flex;
    width: 1.1em;
    justify-content: center;
    font-family: var(--planet-font-family);
    font-size: 0.96em;
    font-weight: 700;
}

.planet-footer-contact-icon-image {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.planet-footer-nav {
    padding-top: 8px;
}

.planet-footer-menu {
    margin: 0;
    padding: 0;
    list-style: none;
    column-count: 2;
    column-gap: 40px;
}

.planet-footer-menu li {
    margin: 0 0 12px;
    break-inside: avoid-column;
}

.planet-footer-menu a {
    color: var(--neutral-000, #ffffff);
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--planet-font-family);
    letter-spacing: 0.03em;
    font-size: 1rem;
}

.planet-footer-menu a:hover {
    color: var(--brand-yellow-500, #ffda44);
}

.planet-footer-bottom {
    background: var(--brand-blue-700, #338af3);
    border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.planet-footer-bottom-inner {
    max-width: 1320px;
    margin: 0 auto;
    text-align: center;
    color: var(--neutral-000, #ffffff);
    font-family: var(--planet-font-family);
    font-size: 1rem;
    padding: 8px 20px;
}

@media (max-width: 1400px) {
    .planet-footer-brand-title {
        font-size: 2.1rem;
    }

    .planet-footer-contact-item,
    .planet-footer-menu a {
        font-size: 1rem;
    }

    .planet-footer-bottom-inner {
        font-size: 1rem;
    }
}

@media (max-width: 1200px) {
    .planet-footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .planet-footer-nav {
        grid-column: 1 / -1;
    }
}

@media (max-width: 980px) {
    .planet-footer-main {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 20px 16px 16px;
    }

    .planet-footer-branding {
        justify-content: center;
    }

    .planet-footer-contact {
        align-items: center;
        text-align: center;
    }

    .planet-footer-brand-title {
        font-size: 2rem;
    }

    .planet-footer-menu {
        column-count: 1;
        text-align: center;
    }

    .planet-footer-menu li {
        margin-bottom: 10px;
    }

    .planet-footer-bottom-inner {
        font-size: 0.92rem;
        padding: 7px 12px;
    }
}

/* ── Search Overlay ─────────────────────────────────────────── */
.planet-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 90px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.planet-search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.planet-search-modal {
    background: #ffffff;
    border-radius: 12px;
    width: calc(100% - 32px);
    max-width: 680px;
    padding: 24px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.planet-search-close {
    position: absolute;
    top: 0;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.planet-search-close:hover {
    background: #f0f0f0;
    color: #111;
}

.planet-search-form-wrap {
    display: flex;
    align-items: center;
    border: 2px solid var(--brand-blue-700, #338af3);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    margin-top: 4px;
}

.planet-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--planet-font-family);
    color: #222;
    background: transparent;
}

.planet-search-input::-webkit-search-cancel-button {
    display: none;
}

.planet-search-submit {
    background: var(--brand-blue-700, #338af3);
    border: none;
    cursor: pointer;
    padding: 12px 16px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.planet-search-submit:hover {
    background: var(--brand-blue-900, #0046a5);
}

.planet-search-submit svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.planet-search-loading {
    text-align: center;
    padding: 24px;
    color: #888;
    font-family: var(--planet-font-family);
    font-size: 0.9rem;
}

.planet-search-empty {
    text-align: center;
    padding: 24px;
    color: #888;
    font-family: var(--planet-font-family);
    font-size: 0.9rem;
    margin: 0;
}

.planet-search-result-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.planet-search-result-item {
    border-bottom: 1px solid #efefef;
}

.planet-search-result-item:last-child {
    border-bottom: none;
}

.planet-search-result-item a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
}

.planet-search-result-item a:hover .planet-search-result-title {
    color: var(--brand-blue-700, #338af3);
}

.planet-search-result-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.planet-search-result-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.planet-search-result-title {
    font-family: var(--planet-font-family);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand-blue-900, #0046a5);
    line-height: 1.3;
    transition: color 0.2s ease;
}

.planet-search-result-excerpt {
    font-family: var(--planet-font-family);
    font-size: 0.82rem;
    color: #666;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.planet-search-result-date {
    font-family: var(--planet-font-family);
    font-size: 0.75rem;
    color: #aaa;
}

.planet-search-view-all {
    display: block;
    margin-top: 14px;
    text-align: center;
    padding: 10px;
    background: var(--brand-blue-050, #f1f6fe);
    border-radius: 6px;
    color: var(--brand-blue-900, #0046a5);
    text-decoration: none;
    font-family: var(--planet-font-family);
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.planet-search-view-all:hover {
    background: var(--brand-blue-700, #338af3);
    color: #ffffff;
}

@media (max-width: 760px) {
    .planet-search-overlay {
        padding-top: 60px;
        align-items: flex-start;
    }

    .planet-search-modal {
        padding: 16px;
    }
}
