/* ==========================================================================
   LexNews Theme - Matching reference design
   ========================================================================== */

:root {
    --color-primary: #345d81;
    --color-primary-dark: #2a4e6e;
    --color-primary-light: #3e6d94;
    --color-accent: #2980b9;
    --color-accent-hover: #2471a3;
    --color-bg: #f0f0f0;
    --color-surface: #ffffff;
    --color-text: #222222;
    --color-text-secondary: #777777;
    --color-text-light: #999999;
    --color-border: #e0e0e0;

    --font-heading: 'Merriweather', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 15px;

    --container-max: 1140px;
    --container-pad: 24px;
    --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: var(--font-size-base); scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}
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: var(--font-heading); font-weight: 700; line-height: 1.3; }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
}

.screen-reader-text {
    clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
    height: 1px; width: 1px; margin: -1px;
    overflow: hidden; position: absolute; padding: 0; border: 0;
}

/* ==========================================================================
   HEADER - Matching LexNews exactly
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    background: var(--color-primary);
    align-items: center;
    box-shadow: 0 1px 8px 0 rgba(0,0,0,0.15);
}

.header-left {
    display: flex;
    align-items: center;
}

/* Burger menu button */
.header-nav__burger {
    height: 56px;
    width: 56px;
    position: relative;
    z-index: 9;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.header-nav__burger span {
    position: absolute;
    display: block;
    height: 2px;
    width: 20px;
    background: rgba(255,255,255,0.75);
    border-radius: 1px;
    transition: 0.25s ease-in-out;
    left: 18px;
}

.header-nav__burger span:first-child { top: 21px; }
.header-nav__burger span:nth-child(2) { top: 27px; }
.header-nav__burger span:nth-child(3) { top: 33px; }

/* Header logo */
.header-logo {
    padding-right: 20px;
}

.header-logo a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.header-logo img {
    display: block;
    max-height: 38px;
    max-width: 100%;
}

.custom-logo-link img {
    max-height: 38px;
    width: auto;
}

/* Header search */
.header-search {
    position: relative;
    width: 480px;
}

.header-search label {
    margin: 0;
    width: 100%;
}

.header-search .search-form {
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.header-search input.search-field {
    display: block;
    padding: 0 41px 0 15px;
    width: 100%;
    height: 40px;
    background: rgba(26,32,44,0.4);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-family: var(--font-body);
    outline: none;
    transition: background-color 0.35s ease-in-out;
    box-shadow: none;
}

.header-search input.search-field::placeholder {
    color: rgba(255,255,255,0.75);
}

.header-search input.search-field:focus {
    background: rgba(26,32,44,0.6);
}

.header-search .search-submit {
    position: absolute;
    right: 0;
    top: 0;
    height: 40px;
    width: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
}

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

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* ==========================================================================
   DRAWER NAVIGATION - Matching LegalClarity source
   ========================================================================== */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Drawer wrapper - slides in from left */
.header-nav__wrapper {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 9999;
    width: 280px;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.18);
}

.header-nav__wrapper.open {
    transform: translateX(0);
}

/* Head area - colored background with close button + logo */
.header-nav__head {
    height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 20px 18px;
    background: var(--color-primary);
    flex-shrink: 0;
}

.drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 0;
    opacity: 0.85;
    transition: opacity 0.15s;
}

.drawer-close:hover {
    opacity: 1;
}

.drawer-logo a {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
}

.drawer-logo svg { display: block; }

.drawer-logo .custom-logo-link img {
    max-height: 42px;
    width: auto;
    display: block;
}

/* Scrollable menu content */
.header-nav__content {
    position: relative;
    padding: 10px 0;
    flex: 1;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

.header-nav__content .nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.header-nav__content .nav .menu-item {
    display: block;
    width: 100%;
}

.header-nav__content .nav .menu-item a {
    position: relative;
    color: #718096;
    display: block;
    padding: 0 20px;
    height: 50px;
    line-height: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    white-space: nowrap;
    font-size: 18px;
    font-weight: 300;
    font-family: var(--font-body);
    transition: color 0.15s ease-in-out;
}

.header-nav__content .nav .menu-item a:hover,
.header-nav__content .nav .menu-item.current-menu-item a {
    color: #2d3748;
}

body.drawer-open { overflow: hidden; }

/* ==========================================================================
   HERO SLIDER - Matching LexNews exactly
   ========================================================================== */
.hero-slider {
    position: relative;
    max-height: 500px;
    overflow: hidden;
    background: var(--color-primary-dark);
}

.hero-slides {
    position: relative;
    height: 500px;
}

.hero-slide__item {
    position: absolute;
    inset: 0;
    height: 500px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    background-color: var(--color-primary);
}

.hero-slide__item.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

/* Gradient overlay */
.hero-slide__item::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 0;
    background-image: linear-gradient(180deg, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.95));
    background-repeat: repeat-x;
}

.hero-slide__item .container {
    position: relative;
    z-index: 1;
    height: 100%;
    box-sizing: border-box;
    padding-bottom: 88px;
    display: flex;
    align-items: flex-end;
}

.hero-slide__content {
    width: 50%;
}

.hero-slide__categories {
    display: -webkit-box;
    margin-bottom: 5px;
    max-height: 18px;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.hero-slide__categories a {
    text-decoration: none;
    color: #fff;
    transition: color 0.3s;
}

.hero-slide__categories a:hover {
    color: #a0aec0;
}

.hero-slide__title {
    margin-top: 0;
    font-size: 2.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-slide__title a {
    text-decoration: none;
    color: #fff;
    transition: color 0.3s;
}

.hero-slide__title a:hover {
    color: #cbd5e0;
}

/* Post meta in hero */
.hero-slide__item .post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 40px;
}

.hero-slide__item .meta__avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.hero-slide__item .meta__details {
    display: flex;
    flex-direction: column;
}

.hero-slide__item .meta__author-name {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-slide__item .meta__author-date {
    color: rgba(255,255,255,0.65);
    font-size: 0.8rem;
}

/* ---------- Hero Pager (Bottom Indicator Bar) ---------- */
.hero-pager {
    position: relative;
    margin-top: -88px;
    z-index: 2;
    margin-bottom: 0;
}

.hero-pager__inner {
    display: flex;
    height: 88px;
}

.hero-pager__item {
    list-style: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
    flex: 1;
    height: 88px;
    border-top: 1px solid rgba(255,255,255,0.5);
    border-right: none;
    background: none;
    cursor: pointer;
    padding: 18px 10px 22px 10px;
    border-bottom: none;
    border-left: none;
    text-align: left;
    transition: border-color 0.25s ease-in-out;
    border-top-width: 3px;
    border-top-style: solid;
    border-top-color: transparent;
}

.hero-pager__item.active {
    border-top-color: #fff;
}

/* Numbered circle */
.hero-pager__index {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-body);
    text-align: center;
    line-height: 24px;
    transition: all 0.25s ease-in-out;
    margin-right: 10px;
}

.hero-pager__item.active .hero-pager__index {
    background: #fff;
    color: #2d3748;
}

/* Headline text */
.hero-pager__headline {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-body);
    line-height: 1.35;
    transition: color 0.25s ease-in-out;
}

.hero-pager__item.active .hero-pager__headline {
    color: #fff;
}

.hero-pager__item:hover .hero-pager__headline {
    color: rgba(255,255,255,0.9);
}

/* ==========================================================================
   LATEST ARTICLES CAROUSEL
   ========================================================================== */
.latest-section {
    padding: 40px 0 36px;
    background: var(--color-surface);
}

.section-heading {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--color-text);
}

.latest-carousel-wrapper {
    position: relative;
    overflow: hidden;
}

.latest-carousel {
    overflow: hidden;
    padding: 0 var(--container-pad);
    max-width: var(--container-max);
    margin: 0 auto;
}

.latest-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
    padding: 6px 0;
}

.latest-card {
    flex: 0 0 275px;
    background: #fff;
    box-shadow: 0 1px 4px 0 rgba(26,32,44,0.15);
    border: none;
    border-radius: 0;
    overflow: hidden;
    height: 100%;
}

.latest-card.no-image .latest-card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 20px 20px;
    box-sizing: border-box;
}

.latest-card-body { padding: 20px; }

.latest-card-cat {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
    margin-bottom: 5px;
    max-height: 18px;
    color: #718096;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
}

.latest-card-cat:hover { color: #1a202c; }

.latest-card-title {
    min-height: 44px;
    margin: 0;
    font-weight: 400;
}

.latest-card-title a {
    text-decoration: none;
    display: -webkit-box;
    margin: 0;
    max-height: 50px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #1280be;
    line-height: 1.25;
}

.latest-card-title a:hover { color: #0e618f; }

.latest-card .post-meta {
    margin-top: 20px;
    display: flex;
    align-items: center;
}

.latest-card .post-meta .meta__avatar img {
    border-radius: 100px;
    max-height: 32px;
    max-width: 32px;
}

.latest-card .post-meta .meta__details {
    line-height: 16px;
    margin-left: 10px;
}

.latest-card .post-meta .meta__author-name {
    font-size: 12px;
    font-weight: 600;
    color: #1280be;
}

.latest-card .post-meta .meta__author-date {
    color: #718096;
    font-size: 12px;
}

.latest-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-bottom: 4px;
}

.latest-carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all var(--transition);
}

.latest-carousel-dots .dot.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* ==========================================================================
   CATEGORY CHANNELS - Matching LexNews exactly
   ========================================================================== */
.channels {
    margin-top: 40px;
}

.channels-container {
    padding: 0;
}

.channels-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0;
    margin-bottom: 40px;
}

.channels-col {
    padding: 0 10px;
}

/* Sidebar card */
.channel-content__card {
    background: var(--color-primary);
    box-shadow: 0 1px 4px 0 rgba(26,32,44,0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    resize: vertical;
    padding: 20px;
    height: 100%;
    color: #fff;
    box-sizing: border-box;
}

.channel-content__card h3 {
    font-family: var(--font-heading);
    margin: 0 0 0.625rem;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.channel-content__card .channel-content__description {
    display: inline-block;
    display: -webkit-box;
    margin: 0;
    max-height: 120px;
    overflow: hidden;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    margin-bottom: 20px;
}

.channel-content__card .channel-content__description p {
    margin: 0;
}

.channel-content__btn {
    font-family: var(--font-body);
    background: #fff;
    align-self: flex-start;
    color: var(--color-primary);
    display: inline-block;
    padding: 0 18px;
    height: 36px;
    line-height: 36px;
    border: 1px solid transparent;
    border-radius: 3px;
    box-shadow: 0 0 0 transparent;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: none;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    transition: all 0.15s ease;
}

.channel-content__btn:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    text-decoration: none;
    transform: translateY(-1px);
    color: var(--color-primary);
    background: #e6e6e6;
}

/* Post block item (text-only cards) */
.post-block-item {
    box-shadow: 0 1px 4px 0 rgba(26,32,44,0.15);
    position: relative;
    border: none;
    border-radius: 0;
    height: 100%;
    background: #fff;
}

.post-block-item.no-image .pbi-details {
    padding-top: 30px;
}

.post-block-item.no-image .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0 20px 20px;
    box-sizing: border-box;
}

.post-block-item__categories {
    width: 100%;
    display: -webkit-box;
    margin-bottom: 5px;
    max-height: 18px;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    color: #718096;
    font-size: 0.8125rem;
    font-weight: 700;
}

.post-block-item__categories a {
    color: #718096;
    text-transform: uppercase;
    text-decoration: none;
}

.post-block-item__categories a:hover {
    color: #1a202c;
}

.post-block-item__title {
    min-height: 44px;
    margin: 0;
    font-weight: 400;
}

.post-block-item__title a {
    text-decoration: none;
    display: -webkit-box;
    margin: 0;
    max-height: 50px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #1280be;
    line-height: 1.25;
}

.post-block-item__title a:hover {
    color: #0e618f;
}

/* Post meta in cards */
.post-block-item .post-meta {
    margin-top: 20px;
    display: flex;
    align-items: center;
}

.post-block-item .post-meta .meta__avatar img {
    border-radius: 100px;
    max-height: 32px;
    max-width: 32px;
}

.post-block-item .post-meta .meta__details {
    line-height: 16px;
    margin-left: 10px;
}

.post-block-item .post-meta .meta__author-name {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1280be;
    font-weight: 600;
}

.post-block-item .post-meta .meta__author-date {
    color: #718096;
    font-size: 12px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 28px 0;
    text-align: center;
}

.footer-links { margin-bottom: 12px; }

.footer-links ul, .footer-menu {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 0;
}

.footer-links a, .footer-menu a {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    transition: color var(--transition);
}

.footer-links a:hover, .footer-menu a:hover {
    color: var(--color-text);
    text-decoration: underline;
}

.footer-copyright { margin-bottom: 12px; }
.footer-copyright p { font-size: 0.75rem; color: var(--color-text-light); }

.footer-logo {
    opacity: 0.4;
    display: flex;
    justify-content: center;
}

.footer-logo img { max-height: 30px; }

/* ==========================================================================
   SINGLE POST
   ========================================================================== */
.single-main {
    padding: 36px 0 60px;
    background: var(--color-surface);
}

.single-article { max-width: 780px; margin: 0 auto; }
.single-header { margin-bottom: 30px; }
.single-breadcrumb { margin-bottom: 16px; }

.category-badge {
    display: inline-block;
    padding: 3px 12px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 3px;
}

.category-badge:hover { opacity: 0.9; }

.single-title {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 14px;
}

.single-excerpt {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
}

.single-author-info { display: flex; align-items: center; gap: 10px; }
.single-author-info img { border-radius: 50%; }
.single-author { display: block; font-weight: 600; font-size: 0.85rem; }
.single-date { display: block; font-size: 0.78rem; color: var(--color-text-secondary); }

.single-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.single-featured-image img { width: 100%; }

.single-content, .entry-content { font-size: 1rem; line-height: 1.8; }
.entry-content h2 { font-size: 1.5rem; margin: 36px 0 14px; }
.entry-content h3 { font-size: 1.2rem; margin: 28px 0 10px; }
.entry-content p { margin-bottom: 18px; }
.entry-content ul, .entry-content ol { margin-bottom: 18px; padding-left: 24px; }
.entry-content li { margin-bottom: 6px; }
.entry-content a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--color-accent-hover); }

.entry-content blockquote {
    margin: 24px 0;
    padding: 18px 24px;
    border-left: 4px solid var(--color-accent);
    background: var(--color-bg);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content pre {
    background: var(--color-primary-dark);
    color: #e0e0e0;
    padding: 18px 22px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.entry-content code {
    font-family: 'SF Mono','Fira Code',monospace;
    font-size: 0.88em;
    background: var(--color-bg);
    padding: 1px 5px;
    border-radius: 3px;
}

.entry-content pre code { background: none; padding: 0; }
.entry-content img { border-radius: 6px; margin: 20px 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.entry-content th, .entry-content td { padding: 10px 14px; border: 1px solid var(--color-border); text-align: left; }
.entry-content th { background: var(--color-bg); font-weight: 600; }

.single-footer { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--color-border); }
.single-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag-link {
    display: inline-block;
    padding: 5px 12px;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.tag-link:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ==========================================================================
   AUTHOR BIO BOX
   ========================================================================== */
.about-author {
    box-sizing: border-box;
    max-width: 780px;
    margin: 40px auto 0;
    padding: 30px;
    background: #f7fafc;
    border-radius: 4px;
}

.about-author .post-meta {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.about-author .meta__avatar img {
    border-radius: 100px;
    width: 72px;
    height: 72px;
    object-fit: cover;
}

.about-author .meta__details {
    flex: 1;
}

.about-author .meta__author-name {
    font-size: 18px;
    font-weight: 600;
    color: #1280be;
    margin-bottom: 8px;
}

.about-author .meta__about {
    font-size: 14px;
    line-height: 1.7;
    color: #4a5568;
}

@media (max-width: 600px) {
    .about-author .post-meta { flex-direction: column; align-items: center; text-align: center; }
    .about-author .meta__avatar img { width: 60px; height: 60px; }
}

/* ==========================================================================
   POST NAVIGATION
   ========================================================================== */
.post-navigation { max-width: 780px; margin: 40px auto 0; }

.post-navigation .nav-links {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: start;
}

.nav-previous, .nav-next { display: flex; flex-direction: column; gap: 4px; }
.nav-next { text-align: right; }
.nav-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-light); }
.nav-title { font-family: var(--font-heading); font-size: 0.9rem; font-weight: 700; color: var(--color-text); }
.nav-title:hover { color: var(--color-accent); }
.nav-back { text-align: center; }
.nav-back a { color: var(--color-accent); font-size: 0.8rem; font-weight: 600; }
.nav-back a:hover { text-decoration: underline; }

/* ==========================================================================
   ARCHIVE / SEARCH / PAGE
   ========================================================================== */
.archive-main, .search-main { padding: 36px 0 60px; background: var(--color-surface); }
.archive-header { margin-bottom: 30px; }
.archive-title { font-size: 1.8rem; font-weight: 900; }
.archive-title span { color: var(--color-accent); }
.archive-description { margin-top: 10px; font-size: 0.95rem; color: var(--color-text-secondary); max-width: 680px; }

.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.page-main { padding: 36px 0 60px; background: var(--color-surface); }
.page-article { max-width: 780px; margin: 0 auto; }
.page-header { margin-bottom: 28px; }
.page-title { font-size: 2rem; font-weight: 900; }

.article-card {
    background: var(--color-surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.article-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

/* No-image card style (archive/category pages) */
.article-card.no-image {
    background: #fff;
    border: none;
    border-radius: 0;
    box-shadow: 0 1px 4px 0 rgba(26,32,44,0.15);
}

.article-card.no-image .card-content {
    padding: 30px 20px 20px;
    justify-content: space-between;
    height: 100%;
    box-sizing: border-box;
}

.article-card.no-image .card-category {
    color: #718096;
    font-size: 0.8125rem;
}

.article-card.no-image .card-title a {
    color: #1280be;
    font-size: 18px;
}

.article-card.no-image .card-title a:hover { color: #0e618f; }

.article-card.no-image .post-meta {
    margin-top: 20px;
    display: flex;
    align-items: center;
}

.article-card.no-image .post-meta .meta__avatar img {
    border-radius: 100px;
    max-height: 32px;
    max-width: 32px;
}

.article-card.no-image .post-meta .meta__details {
    line-height: 16px;
    margin-left: 10px;
}

.article-card.no-image .post-meta .meta__author-name {
    font-size: 12px;
    font-weight: 600;
    color: #1280be;
}

.article-card.no-image .post-meta .meta__author-date {
    color: #718096;
    font-size: 12px;
}

.card-thumbnail-link { display: block; overflow: hidden; }
.card-thumbnail { position: relative; padding-bottom: 58%; background: #e8e8e8; }

.card-thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .card-thumbnail img { transform: scale(1.05); }

.card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,#e0e0e0,#ccc);
    color: #aaa;
}

.card-content { padding: 12px 14px 16px; flex: 1; display: flex; flex-direction: column; }

.card-category {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.card-category:hover { color: var(--color-accent); }

.card-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 10px;
    flex: 1;
}

.card-title a { color: var(--color-text); }
.card-title a:hover { color: var(--color-accent); }

.card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--color-text-light);
}

.card-separator { color: var(--color-border); }

/* ==========================================================================
   404
   ========================================================================== */
.error-404-main { padding: 80px 0; background: var(--color-surface); }

.error-404-content { text-align: center; max-width: 560px; margin: 0 auto; }

.error-code {
    display: block;
    font-family: var(--font-heading);
    font-size: 7rem;
    font-weight: 900;
    color: var(--color-border);
    line-height: 1;
    margin-bottom: 12px;
}

.error-title { font-size: 1.8rem; margin-bottom: 12px; }
.error-message { font-size: 1rem; color: var(--color-text-secondary); margin-bottom: 28px; }
.error-search { margin-bottom: 20px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-light); }

/* ==========================================================================
   SEARCH FORM
   ========================================================================== */
.search-form { display: flex; max-width: 480px; margin: 0 auto; }

.search-form .search-field {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--color-border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    outline: none;
}

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

.search-form .search-submit {
    padding: 10px 20px;
    background: var(--color-primary);
    color: #fff;
    border: 2px solid var(--color-primary);
    border-radius: 0 4px 4px 0;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.search-form .search-submit:hover { background: var(--color-primary-light); }

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.legal-pagination, .navigation.pagination { margin-top: 40px; text-align: center; }

.legal-pagination .nav-links, .navigation.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.legal-pagination .page-numbers, .navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

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

/* ==========================================================================
   SIDEBAR / WIDGETS
   ========================================================================== */
.widget {
    margin-bottom: 28px;
    padding: 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

.widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary);
}

.widget li { padding: 6px 0; border-bottom: 1px solid var(--color-border); }
.widget li:last-child { border-bottom: none; }
.widget a { font-size: 0.85rem; color: var(--color-text); }
.widget a:hover { color: var(--color-accent); }

/* ==========================================================================
   COMMENTS
   ========================================================================== */
.comments-area { max-width: 780px; margin: 40px auto 0; }
.comments-title { font-size: 1.3rem; margin-bottom: 20px; }
.comment-list { list-style: none; padding: 0; }

.comment-body {
    padding: 18px;
    margin-bottom: 14px;
    background: var(--color-bg);
    border-radius: 6px;
}

.comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.comment-meta img { border-radius: 50%; }
.comment-author .fn { font-weight: 600; }
.comment-metadata { font-size: 0.75rem; color: var(--color-text-light); }
.comment-content { font-size: 0.9rem; }

.comment-respond { margin-top: 28px; }
.comment-reply-title { font-size: 1.1rem; margin-bottom: 14px; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--color-primary); }
.comment-form label { display: block; font-weight: 600; font-size: 0.8rem; margin-bottom: 4px; }
.comment-form p { margin-bottom: 14px; }

.comment-form .form-submit input {
    padding: 10px 28px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.comment-form .form-submit input:hover { background: var(--color-primary-light); }

.no-results { text-align: center; padding: 60px 20px; }
.no-results h2 { font-size: 1.4rem; margin-bottom: 10px; }
.no-results p { color: var(--color-text-secondary); margin-bottom: 20px; }

/* WP Core */
.alignleft { float: left; margin-right: 20px; margin-bottom: 14px; }
.alignright { float: right; margin-left: 20px; margin-bottom: 14px; }
.aligncenter { display: block; margin: 0 auto 14px; }
.wp-caption { max-width: 100%; margin-bottom: 14px; }
.wp-caption-text { font-size: 0.8rem; color: var(--color-text-light); text-align: center; margin-top: 6px; }
.sticky .card-title::before { content: '★ '; color: var(--color-accent); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
    .channels-row { grid-template-columns: 1fr 1fr 1fr; }
    .channels-col--sidebar { grid-column: 1 / -1; }
    .channel-content__card { flex-direction: row; align-items: center; gap: 20px; padding: 16px 20px; }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .header-search { width: 240px; }
}

@media (max-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-slide__content { width: 100%; }
    .hero-slide__title { font-size: 2rem; }
}

@media (max-width: 767px) {
    .header-search { box-sizing: border-box; width: 40%; }
    .header-left { width: 100%; }
    .header-logo { display: none; }
}

@media (max-width: 768px) {
    :root { --container-pad: 16px; }
    .hero-slides { height: 400px; }
    .hero-slide__item { height: 400px; }
    .hero-slide__title { font-size: 1.6rem; }

    .hero-pager { height: 60px; margin-top: -60px; }
    .hero-pager__inner { height: 60px; justify-content: center; gap: 10px; }
    .hero-pager__item { flex: none; width: auto; height: auto; border: none; padding: 0;
        width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; display: flex; align-items: center; justify-content: center; }
    .hero-pager__headline { display: none !important; }
    .hero-pager__index { display: none; }
    .hero-pager__item.active { background: transparent; box-shadow: 0 0 0 2px #fff; }

    .channels-row { grid-template-columns: 1fr 1fr; }
    .channels-col--sidebar { grid-column: 1 / -1; }

    .latest-card { flex: 0 0 220px; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .single-title { font-size: 1.6rem; }

    .post-navigation .nav-links { grid-template-columns: 1fr; gap: 14px; }
    .nav-next { text-align: left; }
}

@media (max-width: 480px) {
    .hero-slides { height: 320px; }
    .hero-slide__item { height: 320px; }
    .hero-slide__title { font-size: 1.3rem; }
    .hero-slide__item .container { padding-bottom: 70px; }
    .hero-slide__item .post-meta { padding-bottom: 10px; }

    .hero-pager { margin-top: -50px; height: 50px; }
    .hero-pager__inner { height: 50px; gap: 8px; }
    .hero-pager__item { width: 10px; height: 10px; }

    .channels-row { grid-template-columns: 1fr; }
    .channels-col { padding: 0; margin-bottom: 10px; }

    .posts-grid { grid-template-columns: 1fr; }
    .latest-card { flex: 0 0 100%; }
    .single-title { font-size: 1.4rem; }
    .archive-title { font-size: 1.4rem; }
    .error-code { font-size: 5rem; }

    .search-form { flex-direction: column; }
    .search-form .search-field { border-right: 2px solid var(--color-border); border-radius: 4px; margin-bottom: 6px; }
    .search-form .search-submit { border-radius: 4px; }

    .footer-links ul, .footer-menu { flex-direction: column; gap: 8px; }
}

@media print {
    .site-header, .site-footer, .post-navigation, .comments-area, .hero-pager, .header-nav__burger, .header-nav__wrapper, .drawer-overlay { display: none !important; }
    body { font-size: 12pt; color: #000; background: #fff; }
}

/* Hide post tags everywhere */
.tags-links,
.post-tags,
.entry-footer .tags-links,
.wp-block-post-tags,
.wp-block-tag-cloud,
a[rel="tag"],
.tag-list,
.tag-links,
.post-tag,
.tagcloud { display: none !important; }
