/*
Theme Name: TheAItrendZ
Theme URI: https://theaitrendz.com
Author: TheAItrendZ
Author URI: https://theaitrendz.com
Description: A modern dark blog theme for TheAItrendZ - AI News, Trends & Insights. Built with Elementor compatibility, featuring a stunning dark aesthetic with magenta and cyan accent colors.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theaitrendz
Tags: blog, dark, elementor, ai, technology, custom-menu, custom-logo, featured-images, threaded-comments
*/

/* ============================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================ */
:root {
    /* Colors */
    --color-bg-primary: #0d0d1a;
    --color-bg-secondary: #141428;
    --color-bg-card: #1a1a35;
    --color-bg-card-hover: #222245;
    --color-bg-header: rgba(13, 13, 26, 0.95);
    --color-bg-footer: #0a0a15;
    --color-bg-input: #1e1e3a;

    --color-accent-primary: #e91e8c;
    --color-accent-primary-hover: #ff2da0;
    --color-accent-secondary: #00d4ff;
    --color-accent-gradient: linear-gradient(135deg, #e91e8c, #c41876);

    --color-text-primary: #f0f0f5;
    --color-text-secondary: #a0a0b8;
    --color-text-muted: #6a6a85;
    --color-text-heading: #ffffff;

    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(233, 30, 140, 0.3);

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow-pink: 0 0 20px rgba(233, 30, 140, 0.15);
    --shadow-glow-cyan: 0 0 20px rgba(0, 212, 255, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 800px;
    --header-height: 80px;
    --sidebar-width: 320px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-heading);
    line-height: 1.25;
    margin-bottom: var(--space-md);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    margin-bottom: var(--space-lg);
    color: var(--color-text-secondary);
}

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

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

blockquote {
    border-left: 4px solid var(--color-accent-primary);
    padding: var(--space-lg) var(--space-xl);
    margin: var(--space-xl) 0;
    background: var(--color-bg-card);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

code, pre {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

code {
    background: var(--color-bg-card);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--color-accent-secondary);
}

pre {
    background: var(--color-bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: var(--space-xl);
    border: 1px solid var(--color-border);
}

pre code {
    background: none;
    padding: 0;
    color: var(--color-text-primary);
}

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

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.site-content {
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--header-height);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: var(--color-bg-header);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition-base);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.site-logo img {
    height: 45px;
    width: auto;
}

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

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-xs);
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
    text-transform: capitalize;
    position: relative;
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a,
.nav-menu li.current_page_item a {
    color: var(--color-text-heading);
}

.nav-menu li.current-menu-item a::after,
.nav-menu li.current_page_item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--color-accent-primary);
    border-radius: var(--radius-pill);
}

/* Sub-menu */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    padding: var(--space-sm) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    list-style: none;
    flex-direction: column;
    z-index: 100;
}

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

.nav-menu .sub-menu li a {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
}

.nav-menu .sub-menu li a:hover {
    background: var(--color-bg-card-hover);
    color: var(--color-accent-primary);
}

/* Search Toggle */
.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-accent-secondary);
    color: var(--color-bg-primary);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--text-lg);
    margin-left: var(--space-md);
}

.search-toggle:hover {
    background: #33ddff;
    transform: scale(1.05);
    box-shadow: var(--shadow-glow-cyan);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all var(--transition-base);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

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

.search-overlay-inner {
    width: 100%;
    max-width: 600px;
    padding: 0 var(--space-xl);
}

.search-overlay .search-form {
    display: flex;
    border-bottom: 3px solid var(--color-accent-primary);
    padding-bottom: var(--space-sm);
}

.search-overlay .search-field {
    width: 100%;
    background: transparent;
    border: none;
    font-size: var(--text-4xl);
    color: var(--color-text-heading);
    font-family: var(--font-heading);
    outline: none;
}

.search-overlay .search-field::placeholder {
    color: var(--color-text-muted);
}

.search-overlay .search-submit {
    background: none;
    border: none;
    color: var(--color-accent-primary);
    font-size: var(--text-2xl);
    cursor: pointer;
}

.search-close {
    position: absolute;
    top: var(--space-xl);
    right: var(--space-xl);
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: var(--text-3xl);
    cursor: pointer;
    transition: color var(--transition-fast);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-close:hover {
    color: var(--color-accent-primary);
}

/* ============================================
   HERO SECTION (Featured Post)
   ============================================ */
.hero-section {
    padding: var(--space-3xl) 0;
}

.hero-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-thumbnail {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.hero-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.hero-post:hover .hero-thumbnail img {
    transform: scale(1.03);
}

.hero-thumbnail::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    width: 40px;
    height: 40px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 0 L25 15 L40 20 L25 25 L20 40 L15 25 L0 20 L15 15 Z' fill='%23e91e8c'/%3E%3C/svg%3E") no-repeat;
    background-size: contain;
    z-index: 2;
}

.hero-content {
    padding: var(--space-lg) 0;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.hero-meta .meta-date {
    color: var(--color-text-secondary);
}

.hero-meta .meta-separator {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--color-accent-primary);
    display: inline-block;
}

.hero-meta .meta-category a {
    color: var(--color-accent-primary);
    font-weight: 500;
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: var(--space-lg);
    color: var(--color-text-heading);
}

.hero-title a {
    color: inherit;
    transition: color var(--transition-fast);
}

.hero-title a:hover {
    color: var(--color-accent-primary);
}

.hero-excerpt {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--color-accent-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--color-accent-primary-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-pink);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
}

.btn-arrow::after {
    content: '→';
    transition: transform var(--transition-fast);
}

.btn-arrow:hover::after {
    transform: translateX(4px);
}

/* ============================================
   POST CARDS GRID
   ============================================ */
.posts-section {
    padding: var(--space-2xl) 0 var(--space-4xl);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2xl);
}

.section-title {
    font-size: var(--text-2xl);
    position: relative;
    padding-bottom: var(--space-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--color-accent-primary);
    border-radius: var(--radius-pill);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.post-card {
    background: transparent;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-base);
}

.post-card:hover {
    transform: translateY(-4px);
}

.post-card-thumbnail {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.post-card-content {
    padding: 0;
}

.post-card-title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
    line-height: 1.35;
}

.post-card-title a {
    color: var(--color-text-heading);
    transition: color var(--transition-fast);
}

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

.post-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.post-card-meta .meta-separator {
    width: 5px;
    height: 5px;
    border-radius: var(--radius-full);
    background: var(--color-accent-primary);
}

.post-card-meta .meta-category a {
    color: var(--color-text-secondary);
    font-weight: 500;
}

.post-card-meta .meta-category a:hover {
    color: var(--color-accent-primary);
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-post-header {
    padding: var(--space-3xl) 0 var(--space-xl);
    text-align: center;
}

.single-post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.single-post-meta .meta-separator {
    width: 5px;
    height: 5px;
    border-radius: var(--radius-full);
    background: var(--color-accent-primary);
}

.single-post-title {
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1.15;
    max-width: 800px;
    margin: 0 auto var(--space-xl);
}

.single-post-thumbnail {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-3xl);
    aspect-ratio: 21/9;
}

.single-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-post-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding-bottom: var(--space-3xl);
}

.single-post-content h2 {
    margin-top: var(--space-3xl);
    font-size: var(--text-3xl);
}

.single-post-content h3 {
    margin-top: var(--space-2xl);
    font-size: var(--text-2xl);
}

.single-post-content p {
    font-size: var(--text-lg);
    line-height: 1.8;
}

.single-post-content ul,
.single-post-content ol {
    padding-left: var(--space-xl);
    margin-bottom: var(--space-lg);
    color: var(--color-text-secondary);
}

.single-post-content li {
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

.single-post-content img {
    border-radius: var(--radius-md);
    margin: var(--space-xl) 0;
}

/* Author Box */
.author-box {
    display: flex;
    gap: var(--space-xl);
    padding: var(--space-xl);
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    margin: var(--space-3xl) 0;
    border: 1px solid var(--color-border);
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.author-info h4 {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    margin-bottom: var(--space-sm);
}

.author-info p {
    font-size: var(--text-sm);
    margin-bottom: 0;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-2xl);
}

.post-navigation .nav-link {
    padding: var(--space-lg);
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    border: 1px solid var(--color-border);
}

.post-navigation .nav-link:hover {
    border-color: var(--color-accent-primary);
    transform: translateY(-2px);
}

.post-navigation .nav-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    display: block;
}

.post-navigation .nav-title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    color: var(--color-text-heading);
    font-weight: 600;
}

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

/* Related Posts */
.related-posts {
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--color-border);
}

.related-posts .section-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.related-posts .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ============================================
   SINGLE PAGE
   ============================================ */
.page-header {
    padding: var(--space-3xl) 0 var(--space-xl);
    text-align: center;
}

.page-title {
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: var(--space-lg);
}

.page-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding-bottom: var(--space-3xl);
}

.page-content p {
    font-size: var(--text-lg);
    line-height: 1.8;
}

/* ============================================
   ARCHIVE PAGE
   ============================================ */
.archive-header {
    padding: var(--space-3xl) 0 var(--space-xl);
    text-align: center;
}

.archive-title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
}

.archive-description {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.archive-posts {
    padding: var(--space-xl) 0 var(--space-4xl);
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-header {
    padding: var(--space-3xl) 0 var(--space-xl);
    text-align: center;
}

.search-header .search-query {
    color: var(--color-accent-primary);
}

.search-results-count {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.search-result-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.search-result-item:hover {
    padding-left: var(--space-md);
}

.search-result-thumbnail {
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.search-result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-content .post-card-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
}

.search-result-excerpt {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: 1.7;
}

/* ============================================
   404 PAGE
   ============================================ */
.error-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
}

.error-404-number {
    font-size: 12rem;
    font-weight: 900;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-lg);
}

.error-404 h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
}

.error-404 p {
    font-size: var(--text-lg);
    max-width: 500px;
    margin-bottom: var(--space-xl);
}

.error-404 .search-form {
    display: flex;
    max-width: 400px;
    width: 100%;
    margin-bottom: var(--space-xl);
}

/* ============================================
   SEARCH FORM (General)
   ============================================ */
.search-form {
    display: flex;
    position: relative;
}

.search-form .search-field {
    width: 100%;
    padding: 14px 20px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill) 0 0 var(--radius-pill);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: var(--text-base);
    outline: none;
    transition: border-color var(--transition-fast);
}

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

.search-form .search-field::placeholder {
    color: var(--color-text-muted);
}

.search-form .search-submit {
    padding: 14px 24px;
    background: var(--color-accent-primary);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-sm);
    transition: background var(--transition-fast);
}

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

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--color-bg-footer);
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-4xl);
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-3xl);
    padding-bottom: var(--space-3xl);
}

.footer-about .footer-logo img {
    height: 40px;
    width: auto;
    margin-bottom: var(--space-lg);
}

.footer-about p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.7;
}

.footer-title {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-heading);
    margin-bottom: var(--space-lg);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent-primary);
    padding-left: 4px;
}

.footer-social {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-bg-card);
    color: var(--color-text-secondary);
    font-size: var(--text-lg);
    transition: all var(--transition-base);
    border: 1px solid var(--color-border);
}

.footer-social a:hover {
    background: var(--color-accent-primary);
    color: #fff;
    border-color: var(--color-accent-primary);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding: var(--space-lg) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-copyright {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.footer-bottom-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.footer-bottom-links a {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.footer-bottom-links a:hover {
    color: var(--color-accent-primary);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-3xl) 0;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
    text-decoration: none;
}

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

.pagination .prev,
.pagination .next {
    width: auto;
    padding: 0 var(--space-lg);
    border-radius: var(--radius-pill);
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-area {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--color-border);
}

.comments-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-2xl);
}

.comment-list {
    list-style: none;
}

.comment {
    padding: var(--space-xl);
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--color-border);
}

.comment .children {
    list-style: none;
    margin-top: var(--space-lg);
    padding-left: var(--space-xl);
    border-left: 2px solid var(--color-accent-primary);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.comment-author img {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-full);
}

.comment-author .fn {
    font-weight: 600;
    color: var(--color-text-heading);
}

.comment-metadata a {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.comment-content p {
    font-size: var(--text-sm);
    margin-bottom: var(--space-sm);
}

.reply a {
    font-size: var(--text-xs);
    color: var(--color-accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Comment Form */
.comment-respond {
    margin-top: var(--space-2xl);
}

.comment-form label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--color-text-secondary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: var(--text-base);
    outline: none;
    margin-bottom: var(--space-lg);
    transition: border-color var(--transition-fast);
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--color-accent-primary);
}

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

.comment-form .submit {
    background: var(--color-accent-primary);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.comment-form .submit:hover {
    background: var(--color-accent-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-pink);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-xl));
}

.widget {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    border: 1px solid var(--color-border);
}

.widget-title {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-heading);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.widget ul li a {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

.widget ul li a:hover {
    color: var(--color-accent-primary);
}

/* ============================================
   FORMS (General)
   ============================================ */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-accent-primary);
}

/* ============================================
   WORDPRESS CORE ALIGNMENT
   ============================================ */
.alignleft {
    float: left;
    margin-right: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.alignright {
    float: right;
    margin-left: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.aligncenter {
    display: block;
    margin: var(--space-xl) auto;
}

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

.alignfull {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.wp-caption {
    max-width: 100%;
    margin-bottom: var(--space-lg);
}

.wp-caption-text {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    padding-top: var(--space-sm);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.gallery-item img {
    border-radius: var(--radius-md);
}

.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;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--color-bg-card);
    clip: auto !important;
    clip-path: none;
    color: var(--color-text-primary);
    display: block;
    font-size: var(--text-sm);
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ============================================
   LOADING / ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
    }

    .hero-post {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }

    .search-result-item {
        grid-template-columns: 150px 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.5rem;
        --header-height: 64px;
    }

    .container,
    .container-narrow {
        padding: 0 var(--space-md);
    }

    /* Mobile Nav */
    .menu-toggle {
        display: flex;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-bg-secondary);
        flex-direction: column;
        align-items: flex-start;
        padding: calc(var(--header-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
        transition: right var(--transition-base);
        border-left: 1px solid var(--color-border);
        z-index: 999;
    }

    .main-navigation.active {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        padding: var(--space-md) 0;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        border: none;
        padding-left: var(--space-lg);
    }

    .search-toggle {
        margin-left: 0;
        margin-top: var(--space-lg);
    }

    /* Mobile Grid */
    .posts-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .search-result-item {
        grid-template-columns: 1fr;
    }

    .error-404-number {
        font-size: 8rem;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    :root {
        --text-5xl: 1.75rem;
        --text-4xl: 1.5rem;
    }

    .hero-title {
        font-size: var(--text-3xl);
    }

    .single-post-title {
        font-size: var(--text-3xl);
    }

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

    .search-overlay .search-field {
        font-size: var(--text-2xl);
    }
}

/* ============================================
   ELEMENTOR OVERRIDES
   ============================================ */
.elementor-page .site-content {
    padding-top: 0;
}

.elementor-editor-active .site-header {
    position: relative;
}

/* Ensure Elementor sections work well with dark theme */
.elementor-section {
    color: var(--color-text-primary);
}

.elementor-widget-text-editor {
    color: var(--color-text-secondary);
}

.elementor-heading-title {
    color: var(--color-text-heading);
}
