/*
Theme Name: Pulsessivo
Theme URI: https://pulsessivo.ai
Author: Pulsessivo
Author URI: https://pulsessivo.ai
Description: Pulsessivo AI - Sports Performance Analytics Platform. A modern theme for the blog with Next.js static homepage integration.
Version: 2.1.0
License: Proprietary
Text Domain: pulsessivo
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
Tags: blog, sports, analytics, modern, responsive

This theme loads the statically exported Next.js landing page for the homepage
and provides custom blog templates for WordPress posts.
*/

/* ========================================
   CSS Custom Properties (Dark Theme)
   ======================================== */
:root {
    --primary: #c8884c;
    --primary-foreground: #ffffff;
    --background: #0a0a0a;
    --foreground: #fafafa;
    --card: #171717;
    --card-foreground: #fafafa;
    --muted: #262626;
    --muted-foreground: #a3a3a3;
    --border: #262626;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Light theme fallbacks for page.php */
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-light: #dbeafe;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-background: #f8fafc;
    --color-card: #ffffff;
    --color-border: #e2e8f0;
}

/* ========================================
   Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Custom Scrollbar Styles
   ======================================== */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary);
}

/* Gradient Background for Blog Section */
.gradient-bg-features {
    background: linear-gradient(135deg, rgba(200, 136, 76, 0.1) 0%, transparent 50%);
    position: relative;
    overflow: hidden;
}

.gradient-bg-features::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(200, 136, 76, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* WordPress admin bar adjustments */
#wpadminbar {
    position: fixed !important;
    z-index: 15 !important;
}

/* ========================================
   Typography
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-weight: 700;
    line-height: 1.25;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

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

a:hover {
    opacity: 0.8;
}

/* ========================================
   Site Header - Landing Page Style
   ======================================== */
.landing-header {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background-color: #313131;
    border-bottom: 1px solid #5c4c3d;
}

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

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

@media (min-width: 1024px) {
    .landing-header {
        padding: 0 1.5rem;
    }
}

@media (prefers-color-scheme: light) {
    .landing-header {
        background-color: #cccccc;
    }
}

.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    margin-right: 0.75rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    color: var(--foreground);
    transition: background-color 0.2s;
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

.mobile-menu-toggle:hover {
    background-color: rgba(200, 136, 76, 0.1);
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.header-logo .logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.header-logo .logo-light {
    display: block;
}

.header-logo .logo-dark {
    display: none;
}

@media (prefers-color-scheme: dark) {
    .header-logo .logo-light {
        display: none;
    }

    .header-logo .logo-dark {
        display: block;
    }
}

.header-logo .logo-text {
    font-family: 'Inter', sans-serif;
    font-size: 27px;
    font-weight: 700;
    color: var(--foreground);
}

@media (max-width: 480px) {
    .header-logo .logo-text {
        display: none;
    }
}

.desktop-nav {
    display: none;
    margin-left: auto;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
    }
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
    color: var(--primary);
    opacity: 1;
}

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

/* Icon Buttons (Language & Theme Toggle) */
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px dashed #000;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

@media (prefers-color-scheme: dark) {
    .icon-button {
        border-color: #ccc;
    }
}

.icon-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    .icon-button:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
}

.icon-button svg {
    width: 24px;
    height: 24px;
}

/* Theme Toggle Icon States */
.theme-icon {
    width: 1.2rem;
    height: 1.2rem;
    transition: all 0.2s;
}

.moon-icon {
    transform: rotate(0deg) scale(1);
}

.sun-icon {
    position: absolute;
    transform: rotate(90deg) scale(0);
}

@media (prefers-color-scheme: dark) {
    .moon-icon {
        transform: rotate(-90deg) scale(0);
    }

    .sun-icon {
        transform: rotate(0deg) scale(1);
    }
}

/* Mobile Right Side (only shown on mobile) */
.mobile-right {
    display: flex;
    margin-left: auto;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .mobile-right {
        display: none;
    }
}

/* ========================================
   Mobile Sidebar - Landing Page Style
   ======================================== */
.mobile-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-backdrop.open {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 1024px) {
    .mobile-backdrop {
        display: none;
    }
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    background-color: #916533;
    z-index: 70;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.mobile-sidebar.open {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    .mobile-sidebar {
        display: none;
    }
}

.mobile-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    color: white;
    transition: background-color 0.2s;
}

.mobile-close:hover {
    background-color: rgba(0, 0, 0, 0.15);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 100px 9px 1.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 0.5rem;
    color: white;
    text-decoration: none;
    transition: background-color 0.2s;
}

.mobile-nav-link:hover {
    background-color: rgba(0, 0, 0, 0.15);
}

.mobile-nav-link svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.mobile-nav-link span {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
}

.mobile-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0 9px;
}

.mobile-footer p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin: 0;
}

/* Old header styles - keep for backward compatibility */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--foreground);
}

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

.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-nav a {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--foreground);
}

@media (max-width: 768px) {
    .site-nav {
        display: none;
    }
}

/* ========================================
   Button Styles
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

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

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

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

/* ========================================
   Site Footer
   ======================================== */
.site-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-top: 3px solid var(--primary);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(200, 136, 76, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(200, 136, 76, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 2px solid rgba(200, 136, 76, 0.2);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.4rem;
    color: #ffffff;
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: translateY(-2px);
}

.footer-logo img {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(200, 136, 76, 0.3));
}

.footer-tagline {
    color: #b8b8b8;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

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

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(200, 136, 76, 0.1) 0%, rgba(200, 136, 76, 0.2) 100%);
    color: #ffffff;
    transition: all 0.3s ease;
    border: 2px solid rgba(200, 136, 76, 0.3);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary) 0%, #d4944f 100%);
    border-color: var(--primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(200, 136, 76, 0.4);
}

.social-link:hover::before {
    left: 100%;
}

.social-icon {
    width: 24px;
    height: 24px;
    z-index: 1;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

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

.footer-column h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

.footer-column a {
    color: #cccccc;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.25rem 0;
    border-radius: 4px;
    position: relative;
    padding-left: 0;
}

.footer-column a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.footer-column a:hover {
    color: #ffffff;
    padding-left: 1rem;
}

.footer-column a:hover::before {
    width: 8px;
}

.footer-bottom {
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #999999;
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
    }
    
    .social-icon {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* ========================================
   Site Main
   ======================================== */
.site-main {
    min-height: 100vh;
}

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

/* Post Header */
.post-header {
    background: linear-gradient(135deg, rgba(200, 136, 76, 0.1) 0%, transparent 50%);
    padding: 3rem 0;
}

.post-header-container,
.post-content-container,
.post-footer-container,
.post-featured-image-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--foreground);
}

.post-categories {
    margin-bottom: 1rem;
}

.post-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    margin-right: 0.5rem;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Featured Image */
.post-featured-image {
    margin: 2rem 0;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Post Content */
.post-content {
    padding: 2rem 0;
}

.post-content-container {
    font-size: 1.125rem;
    line-height: 1.8;
}

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

.post-content-container h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
}

.post-content-container h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
}

.post-content-container ul,
.post-content-container ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

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

.post-content-container img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.post-content-container blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--muted-foreground);
}

.post-content-container pre {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content-container code {
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
}

/* Post Footer */
.post-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.post-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.post-share h3 {
    font-size: 1rem;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--foreground);
    transition: all 0.2s;
}

.share-btn:hover {
    background-color: var(--muted);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.post-tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--muted);
    color: var(--muted-foreground);
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

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

.post-back {
    text-align: center;
}

.post-back .btn {
    display: inline-flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .post-title {
        font-size: 1.75rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .post-share {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* ========================================
   Archive/Blog Listing Styles
   ======================================== */
.archive-page {
    min-height: 100vh;
}

/* Archive Header */
.archive-header {
    padding: 3rem 0;
    text-align: center;
}

.archive-header-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.archive-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(200, 136, 76, 0.1);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: 1px solid rgba(200, 136, 76, 0.3);
    margin-bottom: 1rem;
    animation: bounce-in 0.6s ease-out;
}

@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.archive-title {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    animation: fade-in-down 0.6s ease-out 0.1s backwards;
}

@keyframes fade-in-down {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.archive-description {
    color: var(--muted-foreground);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 900px;
    line-height: 1.6;
    animation: fade-in 0.6s ease-out 0.2s backwards;
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.archive-search {
    max-width: 400px;
    margin: 0 auto;
}

.archive-search form {
    position: relative;
}

.archive-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
}

.archive-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--foreground);
    font-size: 1rem;
}

.archive-search input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Categories */
.archive-categories {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.archive-categories-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.category-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid var(--border);
    color: var(--foreground);
    background-color: transparent;
    transition: all 0.2s;
}

.category-btn:hover {
    background-color: var(--muted);
}

.category-btn.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

/* Posts Grid */
.archive-posts {
    padding: 3rem 0 4rem;
}

@media (min-width: 768px) {
    .archive-posts {
        padding: 6rem 0 4rem;
    }
}

@media (min-width: 1024px) {
    .archive-posts {
        padding: 8rem 0 4rem;
    }
}

.archive-posts-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.post-card {
    background-color: rgba(23, 23, 23, 0.7);
    border: 1px solid rgba(200, 136, 76, 0.2);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@media (prefers-color-scheme: light) {
    .post-card {
        background-color: rgba(255, 255, 255, 0.7);
    }
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(200, 136, 76, 0.3);
}

.post-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(200, 136, 76, 0.2) 0%, rgba(200, 136, 76, 0.05) 100%);
}

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

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

.post-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
    font-weight: 700;
    color: rgba(200, 136, 76, 0.3);
}

.post-card-category {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.post-card-content {
    padding: 1.25rem;
}

.post-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.post-card-title a {
    color: var(--foreground);
    transition: color 0.2s;
}

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

.post-card-excerpt {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    gap: 1rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

.post-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

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

.post-card-link svg {
    transition: transform 0.2s;
}

.post-card:hover .post-card-link svg {
    transform: translateX(4px);
}

/* Pagination */
.archive-pagination {
    margin-top: 4rem;
}

.pagination-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pagination-links a,
.pagination-links span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--foreground);
    transition: all 0.2s;
}

.pagination-links a:hover {
    background-color: var(--muted);
}

.pagination-links .current {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 4rem 0;
}

.no-posts p {
    color: var(--muted-foreground);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

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

@media (max-width: 640px) {
    .archive-title {
        font-size: 1.75rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   404 Error Page Styles
   ======================================== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    background: linear-gradient(135deg, rgba(200, 136, 76, 0.05) 0%, transparent 50%);
}

.error-container {
    max-width: 600px;
    text-align: center;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    font-family: 'Anton', sans-serif;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.error-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.error-description {
    color: var(--muted-foreground);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.error-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.error-search {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.error-search p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.error-search form {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
    position: relative;
}

.error-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
    pointer-events: none;
}

.error-search input {
    flex: 1;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--foreground);
    font-size: 1rem;
}

.error-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.error-search button {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .error-code {
        font-size: 5rem;
    }

    .error-title {
        font-size: 1.75rem;
    }

    .error-actions {
        flex-direction: column;
    }

    .error-search form {
        flex-direction: column;
    }

    .error-search .search-icon {
        top: 1.5rem;
    }
}

/* ========================================
   Page Template Styles (Privacy, Terms, etc.)
   ======================================== */
.page-main {
    min-height: 100vh;
    padding-top: 100px;
    background: var(--color-background, #f8fafc);
}

.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

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

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text, #1e293b);
    margin: 0 0 1rem;
    line-height: 1.2;
}

.page-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted, #64748b);
}

.page-content {
    background: var(--color-card, #ffffff);
    border-radius: 0.75rem;
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.page-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text, #1e293b);
    margin: 2rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.page-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.page-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text, #1e293b);
    margin: 1.5rem 0 0.75rem;
}

.page-content p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-text, #1e293b);
    margin-bottom: 1rem;
}

.page-content ul,
.page-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.page-content li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.page-content a {
    color: var(--color-primary, #2563eb);
    text-decoration: underline;
}

.page-content a:hover {
    color: var(--color-primary-hover, #1d4ed8);
}

.page-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--color-primary, #2563eb);
    background: var(--color-primary-light, #dbeafe);
    border-radius: 0 0.5rem 0.5rem 0;
}

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

.page-content th,
.page-content td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.page-content th {
    font-weight: 600;
    background: var(--color-background, #f8fafc);
}

.page-main .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary, #2563eb);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    text-decoration: none;
    transition: color 0.2s;
}

.page-main .back-link:hover {
    color: var(--color-primary-hover, #1d4ed8);
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .page-content {
        padding: 1.5rem;
    }
}

/* ========================================
   WordPress Block Editor Alignment
   ======================================== */
.alignwide {
    margin-left: -2rem;
    margin-right: -2rem;
    max-width: calc(100% + 4rem);
}

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

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

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

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

/* ========================================
   WordPress Block Styles
   ======================================== */
.wp-block-image {
    margin: 1.5rem 0;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.wp-block-image figcaption {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.wp-block-quote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--primary);
    background-color: rgba(200, 136, 76, 0.1);
}

.wp-block-quote cite {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* ========================================
   Utility Classes
   ======================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    body {
        background: white;
        color: black;
    }

    header,
    footer,
    .navigation,
    .pagination {
        display: none !important;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    .post-content-container img {
        max-width: 100% !important;
    }
}