/**
 * Culture Theme - Main Stylesheet
 *
 * A modern, webapp-inspired design system for
 * Culture Community + editorial magazine.
 */

/* ═══════════════════════════════════
   1. CSS Variables & Reset
   ═══════════════════════════════════ */

:root {
    --ct-primary: #2c3e50;
    --ct-accent: #e67e22;
    --ct-success: #27ae60;
    --ct-error: #e74c3c;
    --ct-warning: #f39c12;

    --ct-bg: #f8f9fa;
    --ct-surface: #ffffff;
    --ct-surface-alt: #f1f3f5;
    --ct-text: #1a1a2e;
    --ct-text-muted: #6c757d;
    --ct-border: #e0e0e0;

    --ct-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ct-font-serif: 'Playfair Display', Georgia, serif;
    --ct-radius: 12px;
    --ct-radius-sm: 8px;
    --ct-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --ct-shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --ct-transition: 0.2s ease;
    --ct-header-h: 64px;
    --ct-mobile-bar-h: 60px;
    --ct-max-w: 1200px;
    --ct-content-w: 720px;
}

/* Dark mode overrides */
.ct-dark {
    --ct-bg: #0f0f1a;
    --ct-surface: #1a1a2e;
    --ct-surface-alt: #16213e;
    --ct-text: #e8e8e8;
    --ct-text-muted: #a0a0b0;
    --ct-border: #2a2a4a;
    --ct-shadow: 0 1px 3px rgba(0,0,0,0.3);
    --ct-shadow-lg: 0 10px 30px rgba(0,0,0,0.4);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

body {
    font-family: var(--ct-font);
    background: var(--ct-bg);
    color: var(--ct-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--ct-accent);
    text-decoration: none;
    transition: color var(--ct-transition);
}

a:hover {
    color: var(--ct-primary);
}

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

.ct-skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--ct-accent);
    color: #fff;
    padding: 8px 16px;
    z-index: 100000;
    font-size: 14px;
}

.ct-skip-link:focus {
    top: 0;
}

/* ═══════════════════════════════════
   2. Header
   ═══════════════════════════════════ */

.ct-header {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--ct-surface);
    border-bottom: 1px solid var(--ct-border);
    height: var(--ct-header-h);
    transition: transform 0.3s, box-shadow 0.3s;
}

.ct-header--sticky {
    position: sticky;
}

.ct-header--hidden {
    transform: translateY(-100%);
}

.ct-header__inner {
    max-width: var(--ct-max-w);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 100%;
    gap: 16px;
    overflow: hidden;
}

.ct-header__brand {
    flex-shrink: 1;
    min-width: 0;
    margin-right: auto;
}

.ct-header__brand a {
    display: flex;
    align-items: center;
}

.ct-header__brand img {
    height: 36px; /* overridden by Customizer inline style */
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.ct-header__site-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--ct-text);
    letter-spacing: -0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.ct-header__nav {
    flex-shrink: 0;
    display: flex;
    overflow: hidden;
}

.ct-nav-list {
    list-style: none;
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
}

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

.ct-nav-list a {
    display: block;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ct-text-muted);
    border-radius: var(--ct-radius-sm);
    transition: all var(--ct-transition);
}

.ct-nav-list a:hover,
.ct-nav-list .current-menu-item > a,
.ct-nav-list .current_page_item > a {
    color: var(--ct-text);
    background: var(--ct-surface-alt);
}

/* Dropdown */
.ct-nav-list .sub-menu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--ct-surface);
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius-sm);
    box-shadow: var(--ct-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s;
    z-index: 100;
    padding: 4px;
}

.ct-nav-list li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ct-nav-list .sub-menu a {
    padding: 8px 12px;
    font-size: 13px;
}

.ct-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ct-header__search-toggle,
.ct-header__hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--ct-radius-sm);
    color: var(--ct-text-muted);
    transition: all var(--ct-transition);
}

.ct-header__search-toggle:hover,
.ct-header__hamburger:hover {
    background: var(--ct-surface-alt);
    color: var(--ct-text);
}

.ct-header__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
}

.ct-header__hamburger span {
    width: 20px;
    height: 2px;
    background: currentColor;
    transition: all 0.3s;
}

.ct-header__avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--ct-accent);
}

.ct-header__login-btn {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--ct-border);
    border-radius: 20px;
    color: var(--ct-text);
    transition: all var(--ct-transition);
}

.ct-header__login-btn:hover {
    border-color: var(--ct-accent);
    color: var(--ct-accent);
}

/* Search overlay */
.ct-search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--ct-surface);
    border-bottom: 1px solid var(--ct-border);
    box-shadow: var(--ct-shadow-lg);
    padding: 20px;
    animation: ct-slide-down 0.2s ease;
}

.ct-search-overlay[hidden] {
    display: none;
}

.ct-search-overlay__inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    align-items: center;
}

.ct-search-overlay .search-form {
    flex: 1;
    display: flex;
}

.ct-search-overlay .search-field {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--ct-border);
    border-radius: var(--ct-radius-sm);
    font-size: 16px;
    background: var(--ct-bg);
    color: var(--ct-text);
    outline: none;
    transition: border-color var(--ct-transition);
}

.ct-search-overlay .search-field:focus {
    border-color: var(--ct-accent);
}

.ct-search-overlay .search-submit {
    display: none;
}

.ct-search-overlay__close {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--ct-text-muted);
    padding: 8px;
}

@media (max-width: 768px) {
    .ct-header__nav { display: none; }
    .ct-header__hamburger { display: flex; }
    .ct-header__inner { gap: 12px; }
    .ct-header__site-name { font-size: 17px; }
    .ct-section { padding: 40px 16px; }
    .ct-section__title { font-size: 22px; }
    .ct-digest-banner { padding: 24px; gap: 16px; }
    .ct-comments__list .children { margin-left: 20px; }
    .ct-comment__avatar img { width: 36px; height: 36px; }
    .ct-post-nav .nav-links { flex-direction: column; padding: 0 16px; }
    .ct-article { padding: 32px 16px; }
    .ct-article__content { font-size: 16px; }
    .ct-page__inner { padding: 32px 16px; }
    .ct-comments { padding: 0 16px 32px; }
    .ct-related { padding: 0 16px; }
}

/* ═══════════════════════════════════
   3. Mobile Menu
   ═══════════════════════════════════ */

.ct-mobile-menu[hidden] {
    display: none;
}

.ct-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.ct-mobile-menu__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    animation: ct-fade-in 0.2s;
}

.ct-mobile-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: var(--ct-surface);
    box-shadow: var(--ct-shadow-lg);
    animation: ct-slide-left 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ct-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ct-border);
}

.ct-mobile-menu__brand {
    font-weight: 800;
    font-size: 18px;
}

.ct-mobile-menu__close {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--ct-text-muted);
    padding: 4px;
}

.ct-mobile-menu__list {
    list-style: none;
    padding: 12px;
}

.ct-mobile-menu__list a {
    display: block;
    padding: 12px 16px;
    color: var(--ct-text);
    font-size: 16px;
    font-weight: 500;
    border-radius: var(--ct-radius-sm);
    transition: background var(--ct-transition);
}

.ct-mobile-menu__list a:hover {
    background: var(--ct-surface-alt);
}

.ct-mobile-menu__list .sub-menu {
    list-style: none;
    padding-left: 16px;
}

.ct-mobile-menu__list .sub-menu a {
    font-size: 14px;
    color: var(--ct-text-muted);
}

.ct-mobile-menu__cta {
    padding: 16px 20px;
    border-top: 1px solid var(--ct-border);
}

/* ═══════════════════════════════════
   4. Mobile Bottom Bar
   ═══════════════════════════════════ */

.ct-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--ct-surface);
    border-top: 1px solid var(--ct-border);
    height: var(--ct-mobile-bar-h);
    padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 768px) {
    .ct-mobile-bar { display: flex; }
    body { padding-bottom: var(--ct-mobile-bar-h); }
}

.ct-mobile-bar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--ct-text-muted);
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--ct-transition);
    padding: 6px 0;
}

.ct-mobile-bar__item--active,
.ct-mobile-bar__item:hover {
    color: var(--ct-accent);
}

.ct-mobile-bar__item svg {
    flex-shrink: 0;
}

/* ═══════════════════════════════════
   5. Buttons
   ═══════════════════════════════════ */

.ct-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--ct-radius-sm);
    font-family: var(--ct-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--ct-transition);
    text-decoration: none;
    line-height: 1.4;
}

.ct-btn--accent {
    background: var(--ct-accent);
    color: #fff;
}

.ct-btn--accent:hover {
    background: #d35400;
    color: #fff;
}

.ct-btn--lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: var(--ct-radius);
}

.ct-btn--block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ═══════════════════════════════════
   6. Hero Section
   ═══════════════════════════════════ */

.ct-hero {
    background: var(--ct-primary);
    color: #fff;
    text-align: center;
    padding: 80px 20px 60px;
    position: relative;
    overflow: hidden;
}

.ct-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(230,126,34,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(39,174,96,0.1) 0%, transparent 50%);
}

.ct-hero__inner {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.ct-hero__heading {
    font-family: var(--ct-font-serif);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.ct-hero__sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    opacity: 0.85;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* ═══════════════════════════════════
   7. Sections & Layout
   ═══════════════════════════════════ */

.ct-main {
    min-height: 60vh;
}

.ct-section {
    padding: 60px 20px;
}

.ct-section__inner {
    max-width: var(--ct-max-w);
    margin: 0 auto;
}

.ct-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.ct-section__title {
    font-family: var(--ct-font-serif);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.ct-section__link {
    font-size: 14px;
    font-weight: 600;
    color: var(--ct-accent);
    white-space: nowrap;
}

/* ═══════════════════════════════════
   8. Featured Post
   ═══════════════════════════════════ */

.ct-featured__card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    background: var(--ct-surface);
    border-radius: var(--ct-radius);
    box-shadow: var(--ct-shadow-lg);
    overflow: hidden;
}

.ct-featured__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ct-featured__content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ct-featured__title {
    font-family: var(--ct-font-serif);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin: 12px 0 16px;
}

.ct-featured__title a {
    color: var(--ct-text);
}

.ct-featured__excerpt {
    color: var(--ct-text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.ct-featured__meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--ct-text-muted);
}

@media (max-width: 768px) {
    .ct-featured__card {
        grid-template-columns: 1fr;
    }
    .ct-featured__content {
        padding: 24px;
    }
    .ct-featured__title {
        font-size: 22px;
    }
}

/* ═══════════════════════════════════
   9. Badges
   ═══════════════════════════════════ */

.ct-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--ct-accent);
    color: #fff;
}

.ct-badge--sm {
    padding: 2px 10px;
    font-size: 10px;
}

.ct-badge--accent {
    background: var(--ct-accent);
    color: #fff;
}

/* Category color mapping */
.ct-badge--interviews { background: #8e44ad; }
.ct-badge--profiles { background: #2980b9; }
.ct-badge--news { background: #e74c3c; }
.ct-badge--reviews { background: #27ae60; }
.ct-badge--essays { background: #2c3e50; }
.ct-badge--poems,
.ct-badge--poetry { background: #e67e22; }
.ct-badge--fiction { background: #1abc9c; }
.ct-badge--opinion { background: #f39c12; }
.ct-badge--features { background: #9b59b6; }

/* ═══════════════════════════════════
   10. Event Cards (Homepage)
   ═══════════════════════════════════ */

.ct-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 16px;
}

.ct-event-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--ct-surface);
    border-radius: var(--ct-radius-sm);
    border: 1px solid var(--ct-border);
    transition: all var(--ct-transition);
    color: var(--ct-text);
    text-decoration: none;
}

.ct-event-card:hover {
    border-color: var(--ct-accent);
    box-shadow: var(--ct-shadow);
    color: var(--ct-text);
}

.ct-event-card__date-block {
    flex-shrink: 0;
    width: 56px;
    text-align: center;
    background: var(--ct-surface-alt);
    border-radius: var(--ct-radius-sm);
    padding: 8px 4px;
}

.ct-event-card__month {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ct-accent);
    letter-spacing: 1px;
}

.ct-event-card__day {
    display: block;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
}

.ct-event-card__body {
    flex: 1;
    min-width: 0;
}

.ct-event-card__title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ct-event-card__meta {
    font-size: 12px;
    color: var(--ct-text-muted);
    display: flex;
    gap: 12px;
}

.ct-event-card__type {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.ct-event-card__type--physical {
    background: rgba(230,126,34,0.15);
    color: var(--ct-accent);
}

.ct-event-card__type--virtual {
    background: var(--ct-surface-alt);
    color: var(--ct-text-muted);
}

/* ═══════════════════════════════════
   11. Magazine Grid / Cards
   ═══════════════════════════════════ */

.ct-magazine-grid,
.ct-archive__grid--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 24px;
}

.ct-archive__grid--list {
    display: grid;
    gap: 16px;
}

.ct-archive__grid--list .ct-card {
    display: flex;
    gap: 20px;
}

.ct-archive__grid--list .ct-card__thumb {
    flex-shrink: 0;
    width: 200px;
    height: 140px;
}

.ct-card {
    background: var(--ct-surface);
    border-radius: var(--ct-radius);
    box-shadow: var(--ct-shadow);
    overflow: hidden;
    transition: box-shadow var(--ct-transition), transform var(--ct-transition);
}

.ct-card:hover {
    box-shadow: var(--ct-shadow-lg);
    transform: translateY(-2px);
}

.ct-card__thumb {
    display: block;
    overflow: hidden;
}

.ct-card__thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s;
}

.ct-card:hover .ct-card__thumb img {
    transform: scale(1.03);
}

.ct-card__body {
    padding: 20px;
}

.ct-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 8px 0;
}

.ct-card__title a {
    color: var(--ct-text);
}

.ct-card__title a:hover {
    color: var(--ct-accent);
}

.ct-card__excerpt {
    font-size: 14px;
    color: var(--ct-text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.ct-card__meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--ct-text-muted);
}

@media (max-width: 600px) {
    .ct-archive__grid--list .ct-card {
        flex-direction: column;
    }
    .ct-archive__grid--list .ct-card__thumb {
        width: 100%;
        height: 200px;
    }
}

/* ═══════════════════════════════════
   12. Chapters Grid (Homepage)
   ═══════════════════════════════════ */

.ct-chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
    gap: 16px;
}

.ct-chapter-card {
    display: block;
    background: var(--ct-surface);
    border-radius: var(--ct-radius-sm);
    overflow: hidden;
    border: 1px solid var(--ct-border);
    transition: all var(--ct-transition);
    text-decoration: none;
    color: var(--ct-text);
}

.ct-chapter-card:hover {
    border-color: var(--ct-accent);
    box-shadow: var(--ct-shadow);
    color: var(--ct-text);
}

.ct-chapter-card__thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.ct-chapter-card__body {
    padding: 14px;
}

.ct-chapter-card__title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px;
}

.ct-chapter-card__count {
    font-size: 12px;
    color: var(--ct-text-muted);
}

/* ═══════════════════════════════════
   13. Digest Banner (Homepage)
   ═══════════════════════════════════ */

.ct-digest-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 40px;
    background: var(--ct-primary);
    color: #fff;
    border-radius: var(--ct-radius);
}

.ct-digest-banner h2 {
    font-family: var(--ct-font-serif);
    font-size: 24px;
    margin: 12px 0 8px;
}

.ct-digest-banner p {
    opacity: 0.8;
    font-size: 14px;
}

@media (max-width: 600px) {
    .ct-digest-banner {
        flex-direction: column;
        padding: 24px;
        text-align: center;
    }
}

/* ═══════════════════════════════════
   14. Single Article
   ═══════════════════════════════════ */

.ct-article {
    max-width: var(--ct-content-w);
    margin: 0 auto;
    padding: 40px 20px;
}

.ct-article__header {
    margin-bottom: 32px;
    text-align: center;
}

.ct-article__title {
    font-family: var(--ct-font-serif);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 12px 0 16px;
    letter-spacing: -0.5px;
}

.ct-post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
    color: var(--ct-text-muted);
    flex-wrap: wrap;
}

.ct-post-meta a {
    color: var(--ct-text);
    font-weight: 600;
}

.ct-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ct-reading-time::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ct-text-muted);
}

.ct-article__hero {
    margin-bottom: 32px;
    border-radius: var(--ct-radius);
    overflow: hidden;
}

.ct-article__hero img {
    width: 100%;
    height: auto;
}

.ct-article__hero-caption {
    text-align: center;
    font-size: 13px;
    color: var(--ct-text-muted);
    padding: 8px 0;
}

.ct-article__content {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 40px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.ct-article__content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.ct-article__content iframe,
.ct-article__content video,
.ct-article__content embed,
.ct-article__content object {
    max-width: 100%;
}

.ct-article__content p {
    margin-bottom: 1.5em;
}

.ct-article__content h2 {
    font-family: var(--ct-font-serif);
    font-size: 24px;
    margin: 2em 0 0.8em;
}

.ct-article__content h3 {
    font-size: 20px;
    margin: 1.5em 0 0.6em;
}

.ct-article__content blockquote {
    border-left: 3px solid var(--ct-accent);
    padding: 16px 24px;
    margin: 2em 0;
    background: var(--ct-surface-alt);
    border-radius: 0 var(--ct-radius-sm) var(--ct-radius-sm) 0;
    font-style: italic;
    font-size: 18px;
}

.ct-article__content img {
    border-radius: var(--ct-radius-sm);
    margin: 2em 0;
}

.ct-article__content pre {
    background: var(--ct-primary);
    color: #e8e8e8;
    padding: 20px;
    border-radius: var(--ct-radius-sm);
    overflow-x: auto;
    font-size: 14px;
    margin: 2em 0;
}

.ct-article__content ul,
.ct-article__content ol {
    padding-left: 1.5em;
    margin-bottom: 1.5em;
}

/* Article footer */
.ct-article__footer {
    padding-top: 24px;
    border-top: 1px solid var(--ct-border);
}

.ct-article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.ct-tag {
    display: inline-block;
    padding: 4px 14px;
    background: var(--ct-surface-alt);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ct-text-muted);
    transition: all var(--ct-transition);
}

.ct-tag:hover {
    background: var(--ct-accent);
    color: #fff;
}

/* Share bar */
.ct-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.ct-share__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ct-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ct-share__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ct-surface-alt);
    color: var(--ct-text-muted);
    border: none;
    cursor: pointer;
    transition: all var(--ct-transition);
}

.ct-share__link:hover {
    background: var(--ct-accent);
    color: #fff;
}

/* Author bio */
.ct-author-bio {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: var(--ct-surface-alt);
    border-radius: var(--ct-radius);
    margin-bottom: 32px;
}

.ct-author-bio__avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.ct-author-bio__name {
    margin: 0 0 4px;
    font-size: 16px;
}

.ct-author-bio__name a {
    color: var(--ct-text);
}

.ct-author-bio__desc {
    font-size: 14px;
    color: var(--ct-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ═══════════════════════════════════
   15. Post Navigation
   ═══════════════════════════════════ */

.ct-post-nav .nav-links {
    display: flex;
    gap: 16px;
    margin: 32px 0;
    max-width: var(--ct-content-w);
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.ct-post-nav .nav-previous,
.ct-post-nav .nav-next {
    flex: 1;
    padding: 16px;
    background: var(--ct-surface);
    border-radius: var(--ct-radius-sm);
    border: 1px solid var(--ct-border);
    transition: border-color var(--ct-transition);
}

.ct-post-nav .nav-previous:hover,
.ct-post-nav .nav-next:hover {
    border-color: var(--ct-accent);
}

.ct-post-nav .nav-next {
    text-align: right;
}

.ct-post-nav a {
    text-decoration: none;
}

.ct-post-nav__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ct-text-muted);
    margin-bottom: 4px;
}

.ct-post-nav__title {
    display: block;
    font-weight: 600;
    color: var(--ct-text);
    font-size: 14px;
}

/* ═══════════════════════════════════
   16. Related Posts
   ═══════════════════════════════════ */

.ct-related {
    max-width: var(--ct-content-w);
    margin: 0 auto 40px;
    padding: 0 20px;
}

.ct-related__title {
    font-family: var(--ct-font-serif);
    font-size: 22px;
    margin-bottom: 20px;
}

.ct-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.ct-related__card {
    background: var(--ct-surface);
    border-radius: var(--ct-radius-sm);
    overflow: hidden;
    box-shadow: var(--ct-shadow);
    transition: box-shadow var(--ct-transition);
}

.ct-related__card:hover {
    box-shadow: var(--ct-shadow-lg);
}

.ct-related__thumb img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.ct-related__card-title {
    padding: 12px 14px 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.ct-related__card-title a {
    color: var(--ct-text);
}

.ct-related__date {
    display: block;
    padding: 0 14px 12px;
    font-size: 12px;
    color: var(--ct-text-muted);
}

@media (max-width: 600px) {
    .ct-related__grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════
   17. Archive
   ═══════════════════════════════════ */

.ct-archive__header {
    padding: 40px 0 20px;
    text-align: center;
}

.ct-archive__title {
    font-family: var(--ct-font-serif);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.ct-archive__desc {
    color: var(--ct-text-muted);
    font-size: 16px;
    margin-top: 8px;
}

.ct-category-nav {
    border-bottom: 1px solid var(--ct-border);
    margin-bottom: 32px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ct-category-nav__list {
    list-style: none;
    display: flex;
    gap: 4px;
    justify-content: center;
    padding: 0 0 12px;
}

.ct-category-nav__list a {
    display: block;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ct-text-muted);
    border-radius: 20px;
    white-space: nowrap;
    transition: all var(--ct-transition);
}

.ct-category-nav__list a:hover,
.ct-category-nav__list .current-menu-item a {
    background: var(--ct-accent);
    color: #fff;
}

.ct-pagination {
    margin-top: 40px;
    text-align: center;
}

.ct-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.ct-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--ct-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--ct-text-muted);
    border: 1px solid var(--ct-border);
    transition: all var(--ct-transition);
}

.ct-pagination .page-numbers:hover,
.ct-pagination .page-numbers.current {
    background: var(--ct-accent);
    border-color: var(--ct-accent);
    color: #fff;
}

/* ═══════════════════════════════════
   18. Page
   ═══════════════════════════════════ */

.ct-page__inner {
    max-width: var(--ct-content-w);
    margin: 0 auto;
    padding: 40px 20px;
}

.ct-page__title {
    font-family: var(--ct-font-serif);
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 32px;
}

.ct-page__content {
    font-size: 17px;
    line-height: 1.8;
    overflow-wrap: break-word;
    word-break: break-word;
}

.ct-page__content p {
    margin-bottom: 1.5em;
}

/* ═══════════════════════════════════
   19. Comments
   ═══════════════════════════════════ */

.ct-comments {
    max-width: var(--ct-content-w);
    margin: 0 auto;
    padding: 0 20px 40px;
}

.ct-comments__title {
    font-size: 22px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ct-border);
}

.ct-comments__list {
    list-style: none;
}

.ct-comment {
    margin-bottom: 20px;
}

.ct-comment__body {
    display: flex;
    gap: 14px;
}

.ct-comment__avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.ct-comment__content {
    flex: 1;
    background: var(--ct-surface-alt);
    padding: 16px;
    border-radius: var(--ct-radius-sm);
}

.ct-comment__header {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 8px;
}

.ct-comment__author {
    font-weight: 600;
    font-size: 14px;
}

.ct-comment__date {
    font-size: 12px;
    color: var(--ct-text-muted);
}

.ct-comment__text {
    font-size: 14px;
    line-height: 1.6;
}

.ct-comment__actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 12px;
}

.ct-comment__actions a {
    color: var(--ct-text-muted);
    font-weight: 500;
}

.ct-comments__list .children {
    list-style: none;
    margin-left: 48px;
    margin-top: 12px;
}

.ct-comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--ct-border);
    border-radius: var(--ct-radius-sm);
    font-family: var(--ct-font);
    font-size: 15px;
    background: var(--ct-surface);
    color: var(--ct-text);
    resize: vertical;
    transition: border-color var(--ct-transition);
}

.ct-comment-form textarea:focus {
    border-color: var(--ct-accent);
    outline: none;
}

.ct-comment-form p {
    margin-bottom: 16px;
}

.ct-comment-form input[type="text"],
.ct-comment-form input[type="email"],
.ct-comment-form input[type="url"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--ct-border);
    border-radius: var(--ct-radius-sm);
    font-family: var(--ct-font);
    font-size: 14px;
    background: var(--ct-surface);
    color: var(--ct-text);
    transition: border-color var(--ct-transition);
}

.ct-comment-form input:focus {
    border-color: var(--ct-accent);
    outline: none;
}

/* ═══════════════════════════════════
   20. 404
   ═══════════════════════════════════ */

.ct-404 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 20px;
}

.ct-404__code {
    display: block;
    font-size: 100px;
    font-weight: 900;
    color: var(--ct-accent);
    line-height: 1;
    opacity: 0.3;
}

.ct-404__title {
    font-family: var(--ct-font-serif);
    font-size: 32px;
    margin: 16px 0 12px;
}

.ct-404__desc {
    color: var(--ct-text-muted);
    margin-bottom: 24px;
}

.ct-404__search {
    margin-top: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.ct-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--ct-text-muted);
}

.ct-empty h2 {
    margin-bottom: 8px;
    color: var(--ct-text);
}

/* ═══════════════════════════════════
   21. Footer
   ═══════════════════════════════════ */

.ct-footer {
    background: var(--ct-primary);
    color: #fff;
    padding: 48px 0 24px;
}

.ct-footer__inner {
    max-width: var(--ct-max-w);
    margin: 0 auto;
    padding: 0 20px;
}

.ct-footer__widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.ct-footer-widget__title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    opacity: 0.8;
}

.ct-footer-widget a {
    color: rgba(255,255,255,0.7);
    transition: color var(--ct-transition);
}

.ct-footer-widget a:hover {
    color: #fff;
}

.ct-footer-widget ul {
    list-style: none;
}

.ct-footer-widget li {
    margin-bottom: 8px;
    font-size: 14px;
}

.ct-footer__nav {
    padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
}

.ct-footer__menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.ct-footer__menu a {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 500;
}

.ct-footer__menu a:hover {
    color: #fff;
}

.ct-footer__bottom {
    text-align: center;
}

.ct-footer__tagline {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 8px;
}

.ct-footer__copy {
    font-size: 13px;
    opacity: 0.5;
    margin: 0;
}

/* ═══════════════════════════════════
   22. Widget Styles
   ═══════════════════════════════════ */

.ct-widget {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--ct-surface);
    border-radius: var(--ct-radius-sm);
    border: 1px solid var(--ct-border);
}

.ct-widget__title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    color: var(--ct-text-muted);
}

.ct-widget ul {
    list-style: none;
}

.ct-widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--ct-border);
    font-size: 14px;
}

.ct-widget li:last-child {
    border-bottom: none;
}

/* ═══════════════════════════════════
   23. Plugin Override Styles
   ═══════════════════════════════════ */

/* Culture Community plugin elements inherit theme vars */
.culture-passport,
.culture-event,
.culture-referral,
.culture-register__form,
.culture-digest {
    font-family: var(--ct-font);
}

.ct-dark .culture-passport,
.ct-dark .culture-event,
.ct-dark .culture-referral,
.ct-dark .culture-register__form {
    background: var(--ct-surface);
    color: var(--ct-text);
}

.ct-dark .culture-register__field input,
.ct-dark .culture-register__field select,
.ct-dark .culture-digest__comment-form textarea {
    background: var(--ct-bg);
    color: var(--ct-text);
    border-color: var(--ct-border);
}

.ct-dark .culture-passport__chapters,
.ct-dark .culture-passport__qr,
.ct-dark .culture-passport__badges,
.ct-dark .culture-passport__upgrade {
    border-bottom-color: var(--ct-border);
}

.ct-dark .culture-digest__comments {
    background: var(--ct-surface-alt);
}

.ct-dark .culture-digest__paragraph {
    border-bottom-color: var(--ct-border);
}

.ct-dark .culture-digest__reaction {
    background: var(--ct-surface);
    border-color: var(--ct-border);
}

/* Plugin template pages in theme layout */
.culture-template {
    font-family: var(--ct-font);
}

.ct-dark .culture-template a {
    color: var(--ct-accent);
}

/* ═══════════════════════════════════
   24. Search Form
   ═══════════════════════════════════ */

.search-form {
    display: flex;
    gap: 8px;
}

.search-form .search-field {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--ct-border);
    border-radius: var(--ct-radius-sm);
    font-size: 15px;
    font-family: var(--ct-font);
    background: var(--ct-surface);
    color: var(--ct-text);
    outline: none;
    transition: border-color var(--ct-transition);
}

.search-form .search-field:focus {
    border-color: var(--ct-accent);
}

.search-form .search-submit {
    padding: 10px 20px;
    background: var(--ct-accent);
    color: #fff;
    border: none;
    border-radius: var(--ct-radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--ct-transition);
}

.search-form .search-submit:hover {
    background: #d35400;
}

/* ═══════════════════════════════════
   25. Animations
   ═══════════════════════════════════ */

@keyframes ct-slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ct-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ct-slide-left {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* ═══════════════════════════════════
   26. Accessibility
   ═══════════════════════════════════ */

:focus-visible {
    outline: 2px solid var(--ct-accent);
    outline-offset: 2px;
}

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

/* ═══════════════════════════════════
   27. Print
   ═══════════════════════════════════ */

@media print {
    .ct-header,
    .ct-footer,
    .ct-mobile-bar,
    .ct-share,
    .ct-related,
    .ct-post-nav {
        display: none;
    }
    body {
        background: #fff;
        color: #000;
    }
    .ct-article__content {
        font-size: 12pt;
    }
}
