/**
 * SEO Master Blog - Main Stylesheet
 * Modern, SEO-optimized WordPress blog theme
 * 
 * @package SEO_Master_Blog
 * @since 1.0.0
 */

/* ==========================================================================
   CSS Variables (Colors)
   ========================================================================== */
:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --accent-color: #8b5cf6;
    --background-color: #ffffff;
    --surface-color: #f9fafb;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --link-color: #2563eb;
    --header-bg-color: rgba(255, 255, 255, 0.95);
    --footer-bg-color: #1f2937;
    --footer-text-color: #ffffff;
    --body-font-size: 16px;
    --container-width: 1200px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --box-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --box-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --box-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    --backdrop-blur: blur(10px);
    
    /* Dark mode variables */
    --dark-mode-bg: #0f172a;
    --dark-mode-surface: #1e293b;
    --dark-mode-text: #f1f5f9;
    --dark-mode-text-light: #94a3b8;
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */
.dark-mode {
    --background-color: var(--dark-mode-bg);
    --surface-color: var(--dark-mode-surface);
    --text-color: var(--dark-mode-text);
    --text-light: var(--dark-mode-text-light);
    --header-bg-color: rgba(15, 23, 42, 0.95);
    --footer-bg-color: #0a0f1a;
    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --box-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --box-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

.dark-mode body {
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
}

.dark-mode .post-card,
.dark-mode .widget,
.dark-mode .sidebar .widget {
    background: var(--dark-mode-surface);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .site-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    box-shadow: var(--box-shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.dark-mode-toggle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--box-shadow-lg);
}

/* Fixed position dark mode toggle in footer */
.footer .dark-mode-toggle,
.site-footer .dark-mode-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    z-index: 999;
    font-size: 1.5rem;
}

.footer .dark-mode-toggle:hover,
.site-footer .dark-mode-toggle:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--box-shadow-xl);
}

.dark-mode-toggle .light-mode-icon {
    display: none;
}

.dark-mode .dark-mode-toggle .dark-mode-icon {
    display: none;
}

.dark-mode .dark-mode-toggle .light-mode-icon {
    display: block;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--body-font-size);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--body-font-size);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    word-wrap: break-word;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover,
a:focus {
    color: var(--secondary-color);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.content-area {
    flex: 1;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    background-color: var(--header-bg-color);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.site-header.scrolled {
    padding: 0.75rem 0;
    box-shadow: var(--box-shadow-md);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-branding {
    flex: 0 0 auto;
}

.site-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.site-title a {
    color: var(--text-color);
    text-decoration: none;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition);
    display: inline-block;
}

.site-title a:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    text-decoration: none;
}

.site-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0 0;
}

.custom-logo {
    max-height: 60px;
    width: auto;
}

/* Navigation */
.main-navigation {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.625rem 1rem;
    display: block;
    transition: var(--transition);
    border-radius: var(--border-radius-sm);
    position: relative;
    overflow: hidden;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-menu a:hover::before,
.nav-menu a:focus::before,
.nav-menu .current-menu-item > a::before {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a:focus,
.nav-menu .current-menu-item > a {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
    text-decoration: none;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
}

.hamburger {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-color);
    transition: var(--transition);
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Header Image */
.header-image {
    width: 100%;
    overflow: hidden;
    margin-bottom: 2rem;
}

.header-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs {
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: #9ca3af;
}

.breadcrumbs a {
    color: #6b7280;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    padding: 4rem 0;
    margin-bottom: 4rem;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.05;
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ==========================================================================
   Posts Grid
   ========================================================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: var(--background-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.post-card:hover {
    box-shadow: var(--box-shadow-xl);
    transform: translateY(-8px);
    border-color: rgba(37, 99, 235, 0.2);
}

.post-card:hover::before {
    transform: scaleX(1);
}

.post-thumbnail {
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16/9;
    position: relative;
    background: var(--surface-color);
}

.post-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    mix-blend-mode: overlay;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.1) rotate(1deg);
}

.post-card:hover .post-thumbnail::after {
    opacity: 0.2;
}

.post-card .entry-header {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card .entry-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-card .entry-title a {
    color: var(--text-color);
    transition: var(--transition);
    display: block;
    position: relative;
}

.post-card .entry-title a::after {
    content: '→';
    position: absolute;
    right: -1.5rem;
    opacity: 0;
    transition: var(--transition);
    color: var(--primary-color);
}

.post-card .entry-title a:hover {
    color: var(--primary-color);
    text-decoration: none;
    padding-right: 1.5rem;
}

.post-card .entry-title a:hover::after {
    opacity: 1;
    right: 0;
}

.post-card .entry-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-card .entry-content {
    padding: 0 1.5rem 1.5rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.read-more::after {
    content: '→';
    transition: var(--transition);
    opacity: 0;
    transform: translateX(-0.5rem);
}

.read-more:hover {
    color: var(--primary-color);
    text-decoration: none;
    padding-left: 0.5rem;
}

.read-more:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Single Post */
.single-post {
    max-width: 800px;
    margin: 0 auto;
}

.single-post .entry-header {
    margin-bottom: 2rem;
}

.single-post .entry-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.single-post .entry-meta {
    font-size: 0.875rem;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.single-post .post-thumbnail {
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.single-post .entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.single-post .entry-content ul,
.single-post .entry-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.single-post .entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6b7280;
}

.single-post .entry-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.tags-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags-links a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #f3f4f6;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    color: var(--text-color);
    transition: var(--transition);
}

.tags-links a:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
}

/* Page Content */
.page-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-content .entry-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.page-content .entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.content-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.sidebar {
    order: 2;
}

.sidebar .widget {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.sidebar .widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar ul li:last-child {
    border-bottom: none;
}

.sidebar a {
    color: var(--text-color);
    transition: var(--transition);
}

.sidebar a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Sidebar Position */
.content-area.has-sidebar {
    grid-template-columns: 1fr 300px;
}

.content-area.has-sidebar.left-sidebar {
    grid-template-columns: 300px 1fr;
}

.content-area.has-sidebar.left-sidebar .sidebar {
    order: 1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: linear-gradient(135deg, var(--footer-bg-color) 0%, #111827 100%);
    color: var(--footer-text-color);
    padding: 4rem 0 2rem;
    margin-top: 5rem;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.3;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget-area .widget {
    margin-bottom: 1.5rem;
}

.footer-widget-area .widget-title {
    color: var(--footer-text-color);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-widget-area a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-widget-area a:hover {
    color: var(--footer-text-color);
    text-decoration: none;
}

.site-info {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
}

.footer-menu ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-menu a:hover {
    color: var(--footer-text-color);
    text-decoration: none;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.social-links a {
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    color: var(--footer-text-color);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--gradient-primary);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.social-links a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-lg);
    text-decoration: none;
}

.social-links a:hover::before {
    width: 200px;
    height: 200px;
}

.copyright p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* ==========================================================================
   Forms
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button,
input[type="submit"],
input[type="button"],
.btn,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--gradient-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--box-shadow-md);
}

button::before,
input[type="submit"]::before,
input[type="button"]::before,
.btn::before,
.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before,
input[type="submit"]:hover::before,
input[type="button"]:hover::before,
.btn:hover::before,
.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.btn:hover,
.btn-primary:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-xl);
}

button:active,
input[type="submit"]:active,
input[type="button"]:active,
.btn:active,
.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--box-shadow-md);
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.search-form:focus-within {
    box-shadow: var(--box-shadow-xl);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.search-form input[type="search"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    box-shadow: none;
}

.search-form input[type="search"]:focus {
    box-shadow: none;
    outline: none;
}

.search-form button {
    padding: 0.75rem 1.5rem;
    min-width: auto;
    margin: 0;
    border-radius: var(--border-radius);
}

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #e5e7eb;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
    margin-bottom: 2rem;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f9fafb;
    border-radius: var(--border-radius);
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.comment-content {
    margin-bottom: 1rem;
}

.comment-reply-link {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.post-navigation,
.posts-navigation {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.nav-subtitle {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.nav-title {
    font-weight: 600;
    color: var(--text-color);
}

.nav-title a {
    color: var(--text-color);
    transition: var(--transition);
}

.nav-title a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.post-card,
.widget {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: calc(var(--index, 0) * 0.1s);
}

.post-card.fade-in,
.widget.fade-in {
    opacity: 1;
}

/* Loading shimmer effect */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 2000px 100%;
    animation: shimmer 2s infinite;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.5rem 1rem;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --body-font-size: 15px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .container {
        padding: 0 1rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--header-bg-color);
        backdrop-filter: var(--backdrop-blur);
        -webkit-backdrop-filter: var(--backdrop-blur);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--box-shadow-lg);
        gap: 0;
        margin-top: 1rem;
        border-radius: var(--border-radius);
    }
    
    .main-navigation {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu a {
        padding: 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .content-area.has-sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    .single-post .entry-title {
        font-size: 2rem;
    }
    
    .page-content .entry-title {
        font-size: 2rem;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .site-info {
        text-align: left;
    }
    
    .footer-menu ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-next {
        text-align: left;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .content-area.has-sidebar {
        grid-template-columns: 1fr 300px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .breadcrumbs,
    .nav-links,
    .comments-area {
        display: none;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    a {
        color: #000000;
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
}

