/* ==========================================================================
   Flavor Theme — Main Stylesheet
   Version: 2.0.0
   No CDN. No frameworks. Hand-written.
   Inspired by modern Arabic media platforms.
   ========================================================================== */

/* ---------- Reset ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #111;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: Arial, sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

hr {
    border: none;
    border-top: 1px dotted #ccc;
    margin: 1.5rem 0;
}

/* ---------- Accessibility ---------- */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal;
}

.screen-reader-text:focus {
    clip: auto;
    display: block;
    height: auto;
    width: auto;
    position: fixed;
    top: 5px;
    inset-inline-start: 5px;
    background: #000;
    color: #fff;
    padding: 0.75rem 1.25rem;
    z-index: 100000;
    font-size: 0.875rem;
}

/* ---------- Layout ---------- */

.container {
    max-width: 960px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ---------- WordPress Admin Bar Override ---------- */

html.wp-toolbar {
    padding-top: 0 !important;
}

/* ---------- Top Bar (Secondary Nav) ---------- */

.top-bar {
    background: transparent;
    border-bottom: 1px solid #f0f0f0;
}

.top-bar .container {
    display: flex;
}

.top-bar-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.top-bar-list li {
    display: inline;
}

.top-bar-list a {
    display: block;
    padding: 0.5rem 0.625rem;
    color: #666;
    font-weight: 400;
    font-size: 0.8125rem;
    transition: color 0.2s ease;
}

.top-bar-list a:hover {
    color: #111;
}

/* ---------- Header ---------- */

.site-header {
    border-bottom: 1px solid #eee;
    background: #fff;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    gap: 2rem;
}

.site-brand a {
    display: flex;
    align-items: center;
}

.site-brand img {
    height: 2.25rem;
    width: auto;
}

.site-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ---------- Navigation ---------- */

.main-nav {
    display: flex;
    align-items: center;
    flex: 1;
}

.main-nav .nav-list {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    flex: 1;
}

.main-nav .nav-list li {
    position: relative;
}

.main-nav .nav-list a {
    display: block;
    padding: 0.5rem 0.875rem;
    font-weight: 500;
    color: #555;
    transition: color 0.2s ease, background 0.2s ease;
    border-radius: 0.5rem;
}

.main-nav .nav-list a:hover,
.main-nav .nav-list .current-menu-item > a,
.main-nav .nav-list .current_page_item > a {
    color: #111;
    background: #f5f5f5;
}

/* Dropdown */
.main-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    min-width: 12rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0.75rem;
    padding: 0.5rem 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 10000;
    text-align: right;
    direction: rtl;
}

.main-nav .nav-list li:hover > .sub-menu {
    display: block;
}

.main-nav .sub-menu a {
    padding: 0.5rem 1rem;
    font-weight: 400;
    color: #555;
    border-radius: 0;
}

.main-nav .sub-menu a:hover {
    background: #f8f8f8;
    color: #111;
}

/* Mobile toggle */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.header-lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    color: #666;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.header-lang-btn:hover {
    color: #111;
    border-color: #111;
}

.header-actions .header-search-toggle {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    justify-content: center;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 2.25rem;
    height: 2.25rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: #111;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Header Search ---------- */

.main-nav .header-search-toggle {
    margin-inline-start: 0.25rem;
}

.header-search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #555;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.header-search-toggle:hover {
    color: #111;
}

/* Style: dropdown (default) */
.header-search-box.search-style-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 1rem 1.5rem;
    z-index: 999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.header-search-box.search-style-dropdown.is-open {
    display: block;
}

.header-search-box.search-style-dropdown .search-form {
    max-width: 100%;
}

/* Style: inline */
.search-inline {
    margin-inline-start: 0.5rem;
    flex-shrink: 1;
    min-width: 0;
}

.search-inline .search-form {
    max-width: 14rem;
    border-color: #eee;
}

.search-inline .search-input {
    padding: 0.375rem 0.75rem;
}

.search-inline .search-submit {
    padding: 0.375rem 0.5rem;
}

/* Style: overlay */
.header-search-box.search-style-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 2rem;
}

.header-search-box.search-style-overlay.is-open {
    display: flex;
}

.header-search-box.search-style-overlay .search-form {
    max-width: 36rem;
    width: 100%;
    border-color: rgba(255, 255, 255, 0.2);
}

.header-search-box.search-style-overlay .search-input {
    color: #fff;
    font-size: 1.25rem;
    padding: 1rem 1.25rem;
}

.header-search-box.search-style-overlay .search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.header-search-box.search-style-overlay .search-submit {
    color: rgba(255, 255, 255, 0.5);
    padding: 1rem;
}

.header-search-box.search-style-overlay .search-submit:hover {
    color: #fff;
}

/* Style: modal */
.header-search-box.search-style-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.header-search-box.search-style-modal.is-open {
    display: flex;
}

.header-search-box.search-style-modal .search-form {
    max-width: 32rem;
    width: 100%;
    background: #fff;
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.header-search-box.search-style-modal .search-input {
    font-size: 1.125rem;
    padding: 1rem 1.25rem;
}

.header-search-box.search-style-modal .search-submit {
    padding: 1rem;
}

/* Search close button */
.search-close {
    position: absolute;
    top: 1.5rem;
    inset-inline-end: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
    transition: opacity 0.2s ease;
}

.search-close:hover {
    opacity: 0.7;
}

.search-style-modal .search-close {
    color: #111;
}

/* ---------- Hero ---------- */

.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.hero-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: 2rem;
}

.hero-heading {
    font-size: 2.5rem;
    line-height: 1.3;
    max-width: 40rem;
}

.hero-btn {
    background: #fff;
    color: #000;
    font-size: 1rem;
}

.hero-btn:hover {
    background: #f0f0f0;
}

/* ---------- Section ---------- */

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    padding-bottom: 0;
    border-bottom: none;
    margin-bottom: 1.25rem;
    color: #111;
}

/* ---------- Featured Banner ---------- */

.featured-banner {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
}

.featured-banner-link {
    display: block;
    position: relative;
}

.featured-banner-img {
    position: relative;
    aspect-ratio: 21 / 9;
    overflow: hidden;
}

.featured-banner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-banner-link:hover .featured-banner-img img {
    transform: scale(1.02);
}

.featured-banner.has-image .featured-banner-content {
    position: absolute;
    bottom: 0;
    inset-inline: 0;
    padding: 3rem 2rem 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    color: #fff;
}

.featured-banner:not(.has-image) .featured-banner-content {
    padding: 3rem 2rem;
    text-align: center;
}

.featured-banner-cat {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.2rem 0.625rem;
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
}

.featured-banner.has-image .featured-banner-cat {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.featured-banner:not(.has-image) .featured-banner-cat {
    background: #f0f0f0;
    color: #111;
}

.featured-banner-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.4;
    max-width: 40rem;
}

.featured-banner.has-image .featured-banner-title {
    color: #fff;
}

.featured-banner-meta {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* Custom image banner */
.featured-banner-custom {
    background: transparent;
    overflow: visible;
}

.featured-banner-custom .container {
    display: flex;
    justify-content: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.featured-banner-custom img {
    width: 544px;
    height: 529px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 1rem;
}

.featured-banner-custom-link {
    display: block;
    transition: opacity 0.2s ease;
}

.featured-banner-custom-link:hover {
    opacity: 0.9;
}

/* ---------- Home Sections ---------- */

.home-section {
    padding: 2.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.home-section:last-of-type {
    border-bottom: none;
}

.home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.home-section-header .section-title {
    margin-bottom: 0;
}

.section-more {
    font-size: 0.875rem;
    font-weight: 600;
    color: #999;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.section-more:hover {
    color: #111;
}

/* ---------- Grid Cards ---------- */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-card {
    border-radius: 0.75rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.grid-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.grid-card-link {
    display: block;
}

.grid-card-img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 0.75rem;
}

.grid-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-card-link:hover .grid-card-img img {
    transform: scale(1.03);
}

.grid-card-body {
    padding: 0.75rem 0.25rem;
}

.grid-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

/* Legacy compat */
.home-latest {
    padding: 3rem 0;
}

.home-more {
    text-align: center;
    margin-top: 2rem;
}

/* ---------- Post Card ---------- */

.post-card {
    border-bottom: 1px solid #f0f0f0;
}

.post-card:last-child {
    border-bottom: none;
}

.post-card-link {
    display: block;
    padding: 1.25rem 0;
    transition: background 0.2s ease;
}

.post-card-link:hover {
    background: #fafafa;
    margin-inline: -1rem;
    padding-inline: 1rem;
    border-radius: 0.75rem;
}

.post-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    line-height: 1.5;
}

.post-card-meta {
    color: #999;
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.post-card-meta time {
    display: inline;
}

.meta-sep {
    margin-inline: 0.375rem;
    color: #ddd;
}

.post-card-excerpt {
    color: #666;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Card with thumbnail */
.post-card-link.has-thumb {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-card-link.has-thumb .post-card-body {
    flex: 1;
    min-width: 0;
}

.post-card-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    overflow: hidden;
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Archive ---------- */

.archive-page {
    padding: 2.5rem 0;
}

.archive-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.archive-title {
    font-size: 1.5rem;
}

.archive-desc,
.category-notice {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    color: #666;
    font-size: 1.125rem;
    line-height: 1.6;
    text-align: justify;
}

/* ---------- Pagination ---------- */

.pagination {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.pagination .page-numbers {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.pagination .page-numbers li {
    display: inline;
}

.pagination .page-numbers a,
.pagination .page-numbers span {
    display: inline-block;
    min-width: 2.25rem;
    padding: 0.375rem 0.75rem;
    font-weight: 600;
    border: 1px solid #eee;
    border-radius: 0.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

.pagination .page-numbers a:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}

.pagination .page-numbers .current {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* ---------- Single Post ---------- */

.single-post,
.single-page {
    padding: 0;
}

.entry-header {
    padding-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.entry-title {
    line-height: 1.35;
    margin-bottom: 0.625rem;
}

.post-meta {
    color: #999;
    font-size: 0.8125rem;
}

.entry-thumbnail {
    margin-bottom: 2rem;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.entry-thumbnail img {
    width: 100%;
}

/* ---------- Prose (content) ---------- */

.prose {
    text-align: justify;
    line-height: 1.8;
}

.prose p {
    margin-bottom: 1.125rem;
}

.prose h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.prose a {
    color: #111;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    text-decoration-color: #ccc;
    text-decoration-thickness: 1px;
    transition: text-decoration-color 0.2s ease;
}

.prose a:hover {
    text-decoration-color: #111;
}

.prose u,
.prose [style*="underline"],
.prose span[style*="underline"],
.prose .flavor-underline {
    text-decoration: underline !important;
    text-decoration-style: dotted !important;
    text-decoration-color: #ccc !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 3px !important;
}

.prose ul,
.prose ol {
    margin-bottom: 1.25rem;
    padding-inline-start: 1.5rem;
}

.prose ul {
    list-style: disc;
}

.prose ol {
    list-style: decimal;
}

.prose li {
    margin-bottom: 0.25rem;
    font-size: inherit;
}

.prose blockquote {
    border-inline-start: 3px solid #111;
    padding-inline-start: 1.25rem;
    margin-inline: 0;
    margin-bottom: 1.25rem;
    font-style: italic;
    color: #444;
}

.prose img {
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
    display: block;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Reset round style for media contexts */
.prose .gallery-item img,
.prose .wp-playlist img,
.prose .wp-video img,
.prose .entry-thumbnail img,
.prose figure.wp-caption img {
    border-radius: 0.75rem;
    max-width: 100%;
    margin-inline: auto;
    display: block;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.prose figure {
    margin-bottom: 1.5rem;
}

.prose figcaption {
    font-size: 0.8125rem;
    color: #999;
    margin-top: 0.5rem;
    text-align: center;
}

.prose pre {
    background: #f8f8f8;
    padding: 1rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.prose code {
    background: #f5f5f5;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.prose pre code {
    background: none;
    padding: 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.prose th,
.prose td {
    border: 1px solid #eee;
    padding: 0.5rem 0.75rem;
    text-align: inherit;
}

.prose th {
    background: #f8f8f8;
    font-weight: 700;
}

/* ---------- Entry Footer / Tags ---------- */

.entry-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.entry-tags {
    padding-bottom: 2rem;
}

.entry-tags a {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: #f0f0f0;
    border-radius: 0.25rem;
    margin-inline-end: 0.375rem;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    color: #555;
    transition: all 0.2s ease;
}

.entry-tags a:hover {
    background: #111;
    color: #fff;
}

.tags-label {
    font-weight: 600;
    margin-inline-end: 0.5rem;
}

/* ---------- Post Navigation ---------- */

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;
}

.post-nav-link {
    display: block;
    padding: 1.25rem;
    border: 1px solid #eee;
    border-radius: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-nav-link:hover {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.post-nav-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 0.375rem;
}

.post-nav-title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
}

.post-nav-next {
    text-align: start;
    grid-column: 2;
}

/* ---------- Search Form ---------- */

.search-form {
    display: flex;
    max-width: 28rem;
    border: 1px solid #eee;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.search-form:focus-within {
    border-color: #ccc;
}

.search-input {
    flex: 1;
    border: none;
    padding: 0.625rem 1rem;
    font-family: inherit;
    background: transparent;
    outline: none;
}

.search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0.625rem 0.875rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
}

.search-submit:hover {
    color: #111;
}

/* ---------- 404 ---------- */

.error-404 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-404 h1 {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1rem;
    color: #000000;
}

.error-404 p {
    font-size: 1.125rem;
    color: #000000;
}

.btn {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background: #111;
    color: #fff;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: background 0.2s ease;
}

.btn:hover {
    background: #333;
}

/* ---------- No Results ---------- */

.no-results {
    padding: 4rem 0;
    text-align: center;
}

.no-results h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.no-results p {
    color: #666;
    margin-bottom: 1.5rem;
}

.no-results .search-form {
    margin-inline: auto;
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.footer-nav {
    padding: 1.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    font-weight: 500;
    color: #666;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #111;
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom.has-extra .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: initial;
}

.copyright {
    color: #999;
    font-size: 0.875rem;
}

.footer-extra a,
.footer-extra span {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    font-weight: 600;
    color: #666;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-extra a:hover {
    color: #111;
    border-color: #111;
}

@media (max-width: 480px) {
    .footer-bottom.has-extra .container {
        flex-direction: column;
        text-align: center;
    }
}

/* ---------- WordPress Core ---------- */

.alignleft {
    float: inline-start;
    margin-inline-end: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: inline-end;
    margin-inline-start: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-inline: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.8125rem;
    color: #999;
    margin-top: 0.5rem;
}

.gallery {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    margin-inline: auto;
}

.gallery-columns-1 { grid-template-columns: 1fr; max-width: 360px; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }
.gallery-columns-7 { grid-template-columns: repeat(7, 1fr); }
.gallery-columns-8 { grid-template-columns: repeat(8, 1fr); }
.gallery-columns-9 { grid-template-columns: repeat(9, 1fr); }

@media (max-width: 768px) {
    .gallery-columns-4,
    .gallery-columns-5,
    .gallery-columns-6,
    .gallery-columns-7,
    .gallery-columns-8,
    .gallery-columns-9 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery-columns-3,
    .gallery-columns-4,
    .gallery-columns-5,
    .gallery-columns-6,
    .gallery-columns-7,
    .gallery-columns-8,
    .gallery-columns-9 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gallery-item {
    overflow: hidden;
    border-radius: 0.75rem;
}

.gallery-item img {
    border-radius: 0.75rem;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-caption {
    font-size: 0.75rem;
    color: #999;
    padding: 0.375rem 0;
    text-align: center;
}

/* ---------- Media: Audio / Video / Embeds ---------- */

.prose audio,
.prose video,
.wp-audio-shortcode,
.wp-video-shortcode {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-bottom: 1.25rem;
    margin-inline: auto;
    border-radius: 0.75rem;
    outline: none;
}

.prose video {
    background: #000;
}

.wp-video {
    margin-bottom: 1.25rem;
    margin-inline: auto;
}

/* WordPress media player overrides */
.mejs-container {
    margin-bottom: 1.25rem;
    margin-inline: auto;
    border-radius: 0.75rem;
    overflow: hidden;
}

.mejs-controls {
    background: #111 !important;
}

.mejs-time-current {
    background: #111 !important;
}

.mejs-time-loaded {
    background: rgba(255, 255, 255, 0.2) !important;
}

.mejs-horizontal-volume-current {
    background: #111 !important;
}

/* ---------- Media: Playlist ---------- */

.wp-playlist {
    margin-bottom: 1.25rem;
    margin-inline: auto;
    border: 1px solid #eee;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fafafa;
    padding: 0;
}

.wp-playlist-light {
    background: #fafafa;
    color: #111;
}

.wp-playlist-current-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.wp-playlist-current-item img {
    border-radius: 0.5rem;
    width: 56px;
    height: 56px;
    object-fit: cover;
    flex-shrink: 0;
}

.wp-playlist-caption {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
}

.wp-playlist-item-meta {
    font-size: 0.8125rem;
    color: #999;
    line-height: 1.4;
}

.wp-playlist-tracks {
    margin: 0;
    padding: 0;
    max-height: 20rem;
    overflow-y: auto;
}

.wp-playlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1.25rem;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.2s ease;
    gap: 0.75rem;
}

.wp-playlist-item:last-child {
    border-bottom: none;
}

.wp-playlist-item:hover {
    background: #f5f5f5;
}

.wp-playlist-playing {
    background: #f5f5f5;
    font-weight: 600;
}

.wp-playlist-item-title {
    font-size: 0.875rem;
    color: #111;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wp-playlist-item-length {
    font-size: 0.75rem;
    color: #999;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* ---------- Media: Embeds (iframe/oembed) ---------- */

.prose iframe,
.wp-block-embed iframe {
    max-width: 100%;
    border: none;
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
    margin-inline: auto;
    display: block;
}

/* PDF embeds */
.prose iframe[src*=".pdf"],
.prose object[data*=".pdf"],
.prose embed[src*=".pdf"] {
    width: 100%;
    min-height: 80vh;
    border: 1px solid #eee;
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
}

.prose object,
.prose embed {
    max-width: 100%;
    display: block;
    margin-bottom: 1.25rem;
    margin-inline: auto;
}

.wp-block-embed {
    margin-bottom: 1.25rem;
    margin-inline: auto;
    text-align: center;
}

.wp-block-embed__wrapper {
    position: relative;
}

/* Responsive video embed */
.wp-has-aspect-ratio .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.wp-has-aspect-ratio .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
}

/* PDF fallback link */
.wp-block-file {
    margin-bottom: 1.25rem;
}

.wp-block-file a:first-child {
    display: inline-block;
    font-weight: 600;
    color: inherit;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: #ccc;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.wp-block-file .wp-block-file__button {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #111;
    color: #fff;
    font-weight: 600;
    border-radius: 0.5rem;
    margin-inline-start: 0.75rem;
    font-size: 0.875rem;
    transition: background 0.2s ease;
}

.wp-block-file .wp-block-file__button:hover {
    background: #333;
}

.page-links {
    margin-top: 1.5rem;
    font-weight: 600;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .header-inner {
        height: 3.5rem;
    }

    .header-actions {
        display: flex;
    }

    .main-nav .header-search-toggle {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        inset-inline: 0;
        background: #fff;
        border-bottom: 1px solid #eee;
        padding: 0.5rem 1.5rem;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    }

    .main-nav.is-open {
        display: block;
    }

    .main-nav .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .main-nav .nav-list a {
        padding: 0.625rem 0;
        border-radius: 0;
        border-bottom: 1px solid #f5f5f5;
    }

    .main-nav .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0;
        padding-inline-start: 1rem;
        display: block;
    }

    .main-nav .sub-menu a {
        padding: 0.375rem 0;
    }

    .featured-banner-custom .container {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .featured-banner-custom img {
        width: 100%;
        height: auto;
    }

    .featured-banner-img {
        aspect-ratio: 16 / 9;
    }

    .featured-banner.has-image .featured-banner-content {
        padding: 2rem 1.25rem 1.5rem;
    }

    .featured-banner-title {
        font-size: 1.25rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-slide {
        min-height: 40vh;
        padding: 2.5rem 1.5rem;
    }

    .hero-heading {
        font-size: 1.75rem;
    }

    .hero {
        padding: 2.5rem 0;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .post-nav-next {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    .container {
        padding-inline: 1rem;
    }

    .error-404 h1 {
        font-size: 3.5rem;
    }
}

/* ---------- Back to Top ---------- */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    background: #fff;
    color: #666;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.5rem);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, color 0.2s ease, border-color 0.2s ease;
    z-index: 999;
    cursor: pointer;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    color: #111;
    border-color: #111;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
    }
}

/* ---------- Link Icons (prose) ---------- */

.prose a .flavor-icon-ext,
.prose a .flavor-icon-int {
    display: inline-block;
    vertical-align: middle;
    margin-inline-start: 0.15em;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.prose a:hover .flavor-icon-ext,
.prose a:hover .flavor-icon-int {
    opacity: 0.8;
}

/* Internal links: no icon */

/* ---------- Print ---------- */

@media print {
    .site-header,
    .site-footer,
    .nav-toggle,
    .post-nav,
    .pagination,
    .search-form {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    a {
        text-decoration: underline;
        text-decoration-style: dotted;
    }
}
