/*
Theme Name: TeamHub
Theme URI: https://teamwork1.ru
Author: TeamWork1
Author URI: https://teamwork1.ru
Description: Профессиональная тема для блога о командной работе. Современный корпоративный дизайн с карточной сеткой постов, адаптивной версткой и чистой типографикой.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: teamhub
Tags: blog, grid-layout, custom-logo, custom-menu, featured-images, translation-ready, responsive-layout
*/

/* ============================================
   CSS Reset & Base
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #2d3748;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: #1a365d;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #38b2ac;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: #1a202c;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* ============================================
   Layout Utilities
   ============================================ */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-gray {
    background-color: #f7fafc;
}

/* ============================================
   Screen Reader Text
   ============================================ */

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

.screen-reader-text:focus {
    background-color: #f7fafc;
    clip: auto !important;
    clip-path: none;
    color: #1a365d;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ============================================
   Header
   ============================================ */

.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.site-branding .custom-logo {
    max-height: 40px;
    width: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    color: #1a365d;
    text-decoration: none;
}

.site-title a:hover {
    color: #38b2ac;
}

.site-description {
    display: none;
    font-size: 0.8rem;
    color: #718096;
    margin: 0;
}

/* ============================================
   Navigation
   ============================================ */

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #4a5568;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a,
.nav-menu li.current_page_item a {
    color: #1a365d;
    background-color: #f7fafc;
}

/* Submenu */
.nav-menu li ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 100;
}

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

.nav-menu li ul.sub-menu li a {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #1a365d;
}

.menu-toggle .hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #1a365d;
    position: relative;
    transition: all 0.3s ease;
}

.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: #1a365d;
    left: 0;
    transition: all 0.3s ease;
}

.menu-toggle .hamburger::before {
    top: -7px;
}

.menu-toggle .hamburger::after {
    top: 7px;
}

.menu-toggle.active .hamburger {
    background-color: transparent;
}

.menu-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Header Search */
.header-search {
    position: relative;
    margin-left: 0.5rem;
}

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

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

/* ============================================
   Hero / Page Headers
   ============================================ */

.page-hero {
    background: linear-gradient(135deg, #1a365d 0%, #2a4a7f 100%);
    padding: 3rem 0;
    text-align: center;
    color: #ffffff;
}

.page-hero h1 {
    color: #ffffff;
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.page-hero p {
    color: #bee3f8;
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Post Grid (Homepage / Archive)
   ============================================ */

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

.post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.post-card__image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #e2e8f0;
}

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

.post-card:hover .post-card__image img {
    transform: scale(1.05);
}

.post-card__image .category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
}

.post-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a365d 0%, #38b2ac 100%);
    color: #ffffff;
    font-size: 2.5rem;
}

.post-card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-card__title a {
    color: #1a202c;
}

.post-card__title a:hover {
    color: #38b2ac;
}

.post-card__excerpt {
    font-size: 0.9375rem;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.post-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: #a0aec0;
    padding-top: 1rem;
    border-top: 1px solid #f7fafc;
}

.post-card__date {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.post-card__author {
    font-weight: 500;
    color: #718096;
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 50px;
    background-color: #38b2ac;
    color: #ffffff;
    line-height: 1.5;
}

.category-badge:hover {
    background-color: #319795;
    color: #ffffff;
}

.category-badge--blue {
    background-color: #1a365d;
}

.category-badge--teal {
    background-color: #38b2ac;
}

.category-badge--orange {
    background-color: #dd6b20;
}

.category-badge--green {
    background-color: #38a169;
}

.category-badge--purple {
    background-color: #805ad5;
}

/* ============================================
   No Image Placeholder
   ============================================ */

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 50%, #38b2ac 100%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 3rem;
}

/* ============================================
   Single Post
   ============================================ */

.single-hero {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a365d 0%, #2a4a7f 100%);
}

.single-hero img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.single-hero__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.single-hero__content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    color: #ffffff;
}

.single-hero__categories {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.single-hero__title {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.single-hero__meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.8);
}

.single-hero__meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Single no-image header */
.single-header-noimage {
    background: linear-gradient(135deg, #1a365d 0%, #2a4a7f 100%);
    padding: 4rem 0;
    text-align: center;
}

.single-header-noimage .single-hero__content {
    text-align: center;
}

.single-header-noimage .single-hero__categories {
    justify-content: center;
}

.single-header-noimage .single-hero__meta {
    justify-content: center;
}

/* Article Content */
.single-content {
    padding: 3rem 0;
}

.article-body {
    max-width: 760px;
    margin: 0 auto;
}

.entry-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #2d3748;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content h2 {
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.entry-content h3 {
    font-size: 1.375rem;
    margin: 2rem 0 0.75rem;
}

.entry-content h4 {
    font-size: 1.125rem;
    margin: 1.5rem 0 0.75rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.entry-content ul {
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content blockquote {
    border-left: 4px solid #38b2ac;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    background-color: #f7fafc;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #4a5568;
}

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

.entry-content pre {
    background-color: #1a202c;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.entry-content code {
    background-color: #f7fafc;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: #1a365d;
}

.entry-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.entry-content img {
    border-radius: 8px;
    margin: 2rem 0;
}

.entry-content a {
    color: #38b2ac;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.entry-content a:hover {
    color: #1a365d;
}

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

.entry-content th,
.entry-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.entry-content th {
    background-color: #f7fafc;
    font-weight: 600;
}

.entry-content hr {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 2.5rem 0;
}

.entry-content .wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.entry-content .wp-caption-text {
    font-size: 0.875rem;
    color: #718096;
    text-align: center;
    padding-top: 0.5rem;
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.post-tags a {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    color: #4a5568;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.post-tags a:hover {
    background-color: #1a365d;
    border-color: #1a365d;
    color: #ffffff;
}

/* Post Navigation */
.post-navigation {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s ease;
}

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

.post-navigation .nav-previous:hover,
.post-navigation .nav-next:hover {
    border-color: #38b2ac;
}

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

.post-navigation a {
    font-weight: 600;
    color: #1a365d;
    font-size: 0.9375rem;
}

.post-navigation a:hover {
    color: #38b2ac;
}

/* ============================================
   Page Template
   ============================================ */

.page-content {
    padding: 3rem 0;
}

.page-content .article-body {
    max-width: 760px;
    margin: 0 auto;
}

/* ============================================
   Comments
   ============================================ */

.comments-area {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 0;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid #f7fafc;
}

.comment .children {
    list-style: none;
    padding-left: 2rem;
    margin-top: 0;
    border-left: 2px solid #e2e8f0;
}

.comment-body {
    display: flex;
    gap: 1rem;
}

.comment-author .avatar {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.comment-content-wrap {
    flex: 1;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.comment-author-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #1a202c;
}

.comment-date {
    font-size: 0.8125rem;
    color: #a0aec0;
}

.comment-content p {
    margin-bottom: 0.75rem;
    color: #4a5568;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.comment-reply-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #38b2ac;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.comment-reply-link:hover {
    color: #1a365d;
}

/* Comment Form */
.comment-respond {
    margin-top: 2rem;
    padding: 2rem;
    background-color: #f7fafc;
    border-radius: 12px;
}

.comment-reply-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.comment-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.375rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1rem;
    background-color: #ffffff;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #38b2ac;
    box-shadow: 0 0 0 3px rgba(56, 178, 172, 0.15);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form .form-submit .submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background-color: #1a365d;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.comment-form .form-submit .submit:hover {
    background-color: #38b2ac;
}

.comment-form .form-submit .submit:active {
    transform: scale(0.98);
}

/* ============================================
   Pagination
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    padding: 2rem 0 3rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #4a5568;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.pagination .page-numbers:hover {
    border-color: #38b2ac;
    color: #38b2ac;
}

.pagination .page-numbers.current {
    background-color: #1a365d;
    border-color: #1a365d;
    color: #ffffff;
}

.pagination .page-numbers.dots {
    border: none;
    background: none;
}

.pagination .prev.page-numbers,
.pagination .next.page-numbers {
    font-weight: 600;
    padding: 0 1rem;
}

/* ============================================
   Sidebar / Widgets
   ============================================ */

.widget-area {
    padding: 2rem 0;
}

.widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #38b2ac;
    color: #1a202c;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f7fafc;
}

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

.widget ul li a {
    color: #4a5568;
    font-size: 0.9375rem;
}

.widget ul li a:hover {
    color: #38b2ac;
}

/* ============================================
   Search Form
   ============================================ */

.search-form {
    display: flex;
    gap: 0;
    position: relative;
}

.search-form .search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px 0 0 8px;
    font-family: inherit;
    font-size: 0.9375rem;
    background-color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form .search-field:focus {
    outline: none;
    border-color: #38b2ac;
    box-shadow: 0 0 0 3px rgba(56, 178, 172, 0.15);
}

.search-form .search-submit {
    padding: 0.75rem 1.25rem;
    background-color: #1a365d;
    color: #ffffff;
    border: 1px solid #1a365d;
    border-radius: 0 8px 8px 0;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.search-form .search-submit:hover {
    background-color: #38b2ac;
    border-color: #38b2ac;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    background-color: #1a202c;
    color: #a0aec0;
    padding: 3rem 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-info {
    font-size: 0.875rem;
}

.footer-info .footer-site-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.125rem;
    display: block;
    margin-bottom: 0.375rem;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #a0aec0;
    font-size: 1.125rem;
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background-color: #38b2ac;
    color: #ffffff;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.8125rem;
}

/* ============================================
   404 Page
   ============================================ */

.error-404-page {
    text-align: center;
    padding: 5rem 0;
}

.error-404-page .error-code {
    font-size: 8rem;
    font-weight: 800;
    color: #e2e8f0;
    line-height: 1;
    margin-bottom: 1rem;
}

.error-404-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-404-page p {
    font-size: 1.125rem;
    color: #718096;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.error-404-page .search-form {
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================
   WordPress Alignment Classes
   ============================================ */

.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignwide {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* ============================================
   WordPress Gallery
   ============================================ */

.wp-block-gallery,
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.wp-block-gallery .wp-block-image,
.gallery-item {
    margin: 0;
}

.wp-block-gallery img,
.gallery-item img {
    border-radius: 6px;
}

/* ============================================
   WordPress Embeds
   ============================================ */

.wp-block-embed {
    margin-bottom: 1.5rem;
}

.wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .header-inner {
        height: 60px;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    .main-navigation .nav-menu.active {
        display: flex;
    }

    .nav-menu li a {
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }

    .nav-menu li ul.sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 0;
    }

    .page-hero h1 {
        font-size: 1.75rem;
    }

    .single-hero img {
        height: 300px;
    }

    .single-hero__title {
        font-size: 1.75rem;
    }

    .single-hero__meta {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

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

    .post-navigation .nav-next {
        text-align: left;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .comment-body {
        flex-direction: column;
    }

    .comment .children {
        padding-left: 1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .entry-content h2 {
        font-size: 1.5rem;
    }

    .entry-content h3 {
        font-size: 1.25rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .post-card__content {
        padding: 1.25rem;
    }

    .single-hero__title {
        font-size: 1.5rem;
    }

    .error-404-page .error-code {
        font-size: 5rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .site-header,
    .site-footer,
    .post-navigation,
    .comments-area,
    .search-form,
    .menu-toggle {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .entry-content a {
        text-decoration: underline;
    }

    .entry-content a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* ============================================
   WordPress Admin Bar Fix
   ============================================ */

body.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}
