/*
Theme Name: Speak Dari Hub
Description: A wide, accessible WordPress theme with a configurable site navigation menu.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: speak-dari-hub
*/

:root {
    color-scheme: light;
    --hub-ink: #17212b;
    --hub-muted: #526170;
    --hub-accent: #175c91;
    --hub-border: #dce3e9;
    --hub-surface: #ffffff;
    --hub-page: #f5f7f9;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--hub-page);
    color: var(--hub-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

a {
    color: var(--hub-accent);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #e6a700;
    outline-offset: 3px;
}

.site-header {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid var(--hub-border);
    background: var(--hub-surface);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
    padding: 0.8rem clamp(1rem, 3vw, 2.5rem);
}

.site-branding {
    min-width: 0;
}

.site-branding-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.custom-logo-link {
    display: block;
    flex: 0 0 auto;
}

.custom-logo {
    display: block;
    width: auto;
    max-width: 56px;
    max-height: 56px;
    object-fit: contain;
}

.site-title {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    font-weight: 700;
    line-height: 1.2;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-description {
    margin: 0.2rem 0 0;
    color: var(--hub-muted);
    font-size: 0.9rem;
}

.primary-navigation ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.primary-navigation li {
    position: relative;
}

.primary-navigation a {
    display: block;
    padding: 0.55rem 0.8rem;
    border-radius: 0.35rem;
    color: var(--hub-ink);
    font-weight: 600;
    text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a,
.primary-navigation .current_page_item > a {
    background: #eaf2f8;
    color: var(--hub-accent);
}

.primary-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    min-width: 12rem;
    padding: 0.35rem;
    border: 1px solid var(--hub-border);
    border-radius: 0.45rem;
    background: var(--hub-surface);
    box-shadow: 0 0.5rem 1.5rem rgb(23 33 43 / 12%);
}

.primary-navigation li:hover > .sub-menu,
.primary-navigation li:focus-within > .sub-menu {
    display: block;
}

.site-main {
    width: 100%;
    min-height: calc(100vh - 10rem);
    padding: clamp(1rem, 2.5vw, 2rem) clamp(0.75rem, 2vw, 1.5rem);
}

.page-content,
.post-content {
    width: 100%;
    margin: 0 auto;
}

.entry-title {
    margin: 0 0 1rem;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1.2;
}

.entry-content > :first-child {
    margin-top: 0;
}

.entry-content > :last-child {
    margin-bottom: 0;
}

.entry-content iframe {
    max-width: 100%;
}

.entry-content img,
.entry-content video {
    max-width: 100%;
    height: auto;
}

.post-list {
    display: grid;
    gap: 1.5rem;
}

.post-card {
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid var(--hub-border);
    border-radius: 0.6rem;
    background: var(--hub-surface);
}

.post-card .entry-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.site-footer {
    padding: 1.25rem clamp(1rem, 3vw, 2.5rem);
    border-top: 1px solid var(--hub-border);
    background: var(--hub-surface);
    color: var(--hub-muted);
    text-align: center;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 720px) {
    .site-header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .primary-navigation,
    .primary-navigation ul {
        width: 100%;
    }

    .primary-navigation ul {
        gap: 0.15rem;
    }

    .primary-navigation a {
        padding: 0.45rem 0.6rem;
    }

    .primary-navigation .sub-menu {
        position: static;
        display: block;
        min-width: 0;
        padding: 0 0 0 0.75rem;
        border: 0;
        box-shadow: none;
    }
}
