/*
Theme Name: KivoAI Education Blog
Description: KivoAI tarafından geliştirilmiş modern eğitim blog teması. Yurtdışı eğitim danışmanlığı, blog yazarlığı ve eğitim içerikleri için özel tasarlanmış responsive ve minimal tema.
Author: KivoAI
Version: 1.0.0
License: GPL v2 or later
Text Domain: kivoai-education-blog
Domain Path: /languages
Tags: blog, education, consulting, responsive, minimal, modern, custom-pages, kivoai
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
*/

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #666;
    --accent-color: #f5f5f5;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --border-color: #dee2e6;
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Playfair Display', Georgia, serif;
    
    --line-height-base: 1.6;
    --line-height-heading: 1.2;
    
    --border-radius: 8px;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 30px rgba(0, 0, 0, 0.15);
    
    --container-width: 1200px;
    --container-padding: 20px;
    
    --transition: all 0.3s ease;
}

/* Base Styles */
html {
    height: 100%;
}

body {
    font-family: var(--font-primary);
    line-height: var(--line-height-base);
    color: var(--primary-color);
    background-color: var(--white);
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
    margin-top: 80px;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    line-height: var(--line-height-heading);
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

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

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

/* WordPress Specific */
.wp-block-image {
    margin: 2rem 0;
}

.wp-block-quote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--light-gray);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
}

.wp-block-separator {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 3rem 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-family: var(--font-primary);
    text-decoration: none;
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem var(--container-padding);
    max-width: var(--container-width);
    margin: 0 auto;
}

.logo {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding: 4rem 0 6rem;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
}

.hero-header {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    margin-bottom: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: start;
}

.hero-text {
    text-align: left;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin: 0 0 1.5rem 0;
    color: var(--primary-color);
    font-weight: 500;
    line-height: 1.6;
}

.hero-description {
    font-size: 1rem;
    margin: 0 0 2rem 0;
    color: var(--secondary-color);
    line-height: 1.7;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: var(--primary-color);
}

.feature-icon {
    font-size: 1.25rem;
}

.hero-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hero-image img {
    width: 220px;
    height: 280px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 3px solid var(--white);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.image-caption {
    text-align: center;
    background: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    width: 100%;
}

.image-caption h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.image-caption p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Posts */
.blog-posts {
    padding: 4rem 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.load-more {
    text-align: center;
}

.post-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.post-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.post-date {
    color: var(--secondary-color);
}

.post-category {
    color: var(--primary-color);
    font-weight: 500;
}

.post-title {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.post-excerpt {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.read-more:hover {
    text-decoration: underline;
}

/* Testimonials */
.testimonials {
    padding: 4rem 0;
    background: var(--light-gray);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    text-align: center;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-style: italic;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--primary-color);
    margin: 0;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.author-info {
    text-align: center;
}

.author-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: var(--primary-color);
}

.author-info span {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-contact h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 240px;
        gap: 2rem;
    }
    
    .hero-image img {
        width: 180px;
        height: 230px;
    }
    
    .hero-features {
        gap: 0.75rem;
    }
    
    .feature-item {
        font-size: 0.95rem;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 15px;
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem var(--container-padding);
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        margin-bottom: 1rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        padding: 2rem 0 3rem;
    }
    
    .hero-header {
        margin-bottom: 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text {
        text-align: center;
        order: 2;
    }
    
    .hero-image {
        order: 1;
    }
    
    .hero-image img {
        width: 160px;
        height: 200px;
    }
    
    .hero-features {
        justify-content: center;
        align-items: center;
    }
    
    .feature-item {
        justify-content: center;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* WordPress Required Classes */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.alignleft {
    float: left;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

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

.wp-caption {
    margin-bottom: 1rem;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

/* Single Post Layout - Critical CSS */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.post-main {
    min-width: 0;
}

.post-sidebar {
    min-width: 0;
    position: static;
    padding-top: 20px; /* Small top padding for breathing room */
}

/* Sidebar Widgets - WordPress + Custom */
.post-sidebar .sidebar-widget,
.post-sidebar .widget {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.post-sidebar .widget-title,
.post-sidebar h3.widget-title,
.post-sidebar .widget h3,
.post-sidebar .widgettitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* WordPress specific widget styles */
.post-sidebar .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-sidebar .widget li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.post-sidebar .widget li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.post-sidebar .widget a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.post-sidebar .widget a:hover {
    color: var(--primary-color);
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 0.75rem;
}

.table-of-contents .toc-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 0.5rem 0;
    border-left: 3px solid transparent;
    padding-left: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.table-of-contents .toc-link:hover {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background: var(--light-gray);
}

.table-of-contents .toc-link.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background: var(--light-gray);
    font-weight: 500;
}

/* TOC heading levels */
.table-of-contents .toc-h3 {
    padding-left: 1.5rem;
    font-size: 0.85rem;
}

.table-of-contents .toc-h4 {
    padding-left: 2.25rem;
    font-size: 0.8rem;
}

.toc-loading {
    color: var(--secondary-color);
    font-style: italic;
    padding: 1rem 0;
    text-align: center;
}

.recent-posts .recent-post {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.recent-posts .recent-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-posts .recent-post img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--border-radius);
    flex-shrink: 0;
}

.recent-post-content {
    flex: 1;
    min-width: 0;
}

.recent-post-content h4 {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    font-weight: 500;
}

.recent-post-content h4 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.recent-post-content h4 a:hover {
    color: var(--secondary-color);
}

.recent-post-date {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin: 0;
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
}

.newsletter-btn {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-btn:hover {
    opacity: 0.9;
}

/* Search Widget */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-field {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 0.9rem;
}

.search-submit {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    min-width: 80px;
    font-weight: 500;
    white-space: nowrap;
}

.search-submit:hover {
    background: #333;
    transform: translateY(-1px);
}

/* Banner Placeholder */
.banner-placeholder {
    background: var(--light-gray);
    border: 2px dashed var(--border-color);
    text-align: center;
    padding: 3rem 1rem;
    border-radius: var(--border-radius);
}

/* Blog Specific Styles */

/* Page Header */
.page-header {
    padding: 2rem 0 3rem;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
    text-align: center;
}

.page-title {
    margin-bottom: 0.5rem;
    font-size: clamp(2rem, 4vw, 3rem);
}

.page-subtitle {
    color: var(--secondary-color);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Layout */
.blog-content {
    padding: 3rem 0;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.blog-main {
    min-width: 0;
}

/* Featured Post */
.featured-post {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 3rem;
    transition: var(--transition);
}

.featured-post:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.featured-post .post-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.featured-post .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.featured-post:hover .post-image img {
    transform: scale(1.02);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.featured-post .post-content {
    padding: 2rem;
}

.featured-post .post-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.featured-post .post-excerpt {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Blog Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-post-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.blog-post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.blog-post-card .post-image {
    height: 200px;
    overflow: hidden;
}

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

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

.blog-post-card .post-content {
    padding: 1.5rem;
}

.blog-post-card .post-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-post-card .post-excerpt {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Blog Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.blog-sidebar .sidebar-widget {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.blog-sidebar .widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.widget-description {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Search Widget */
.blog-sidebar .search-form {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    transition: var(--transition);
}

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

/* Categories */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.category-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.category-list a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list a:hover {
    color: var(--primary-color);
}

.category-list span {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Tags */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--light-gray);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.875rem;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-link {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.page-link:hover:not(.disabled) {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-link.disabled {
    color: var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive Post Layout */
@media (max-width: 1024px) {
    .post-layout {
        grid-template-columns: 1fr 280px;
        gap: 2rem;
    }
    
    .blog-layout {
        grid-template-columns: 1fr 280px;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .post-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .post-sidebar {
        order: 2;
    }
    
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-sidebar {
        position: static;
        order: 2;
    }
    
    .featured-post .post-image {
        height: 250px;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-post-card .post-image {
        height: 180px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* CRITICAL FIXES - Related Posts and Search */
/* Related Posts - Override any other styles */
.related-posts {
    margin: 3rem 0;
    clear: both;
}

.related-posts h3 {
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

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

.related-post {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.related-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.related-post img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: all 0.3s ease;
}

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

.related-post-content {
    padding: 1rem;
}

.related-post-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: var(--primary-color);
    font-weight: 600;
}

.related-post-content h4 a {
    color: var(--primary-color);
    text-decoration: none;
}

.related-post-date {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

/* Search Form Fix */
.post-sidebar .search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.post-sidebar .search-field {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.post-sidebar .search-submit {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    min-width: 80px;
    font-weight: 500;
    white-space: nowrap;
}

.post-sidebar .search-submit:hover {
    background: #333;
}

/* Footer Fix */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main {
    flex: 1;
}

/* Responsive for Related Posts */
@media (max-width: 1024px) {
    .related-posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}