/*
Theme Name: AI Box
Theme URI: https://aibox.com
Author: AI Box
Author URI: https://aibox.com
Description: A clean, modern theme for AI Box — auto-generated from the live design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-box
Tags: blog, dark, modern, elementor-ready, custom-menu
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #0d0f16;
  --fg: #f0f1f5;
  --card-bg: #151723;
  --secondary-bg: #1d2030;
  --secondary-fg: #b6bcc9;
  --muted-fg: #7b849d;
  --primary: #8e5eed;
  --primary-fg: #ffffff;
  --accent: #e830ab;
  --accent-fg: #ffffff;
  --border-color: #252837;
  --font-display: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

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

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; color: var(--fg); }

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

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

.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 768px; margin: 0 auto; padding: 0 2rem; }
.container-wide { max-width: 1024px; margin: 0 auto; padding: 0 2rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--border-color);
  background: #0d0f16cc;
  backdrop-filter: blur(12px);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.site-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-size: 1.25rem; font-weight: 700;
  color: var(--fg); text-decoration: none;
}
.site-logo svg, .site-logo img { height: 48px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a {
  font-size: 0.875rem; font-weight: 500; color: var(--muted-fg);
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--fg); text-decoration: none; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color); padding: 3rem 0; text-align: center;
}
.site-footer .container { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.site-footer .site-logo { justify-content: center; }
.site-footer p { font-size: 0.875rem; color: var(--muted-fg); margin-top: 0; }

/* Hero */
.hero {
  padding: 6rem 0; text-align: center;
  background: linear-gradient(135deg, hsl(250 40% 16%) 0%, hsl(260 50% 22%) 30%, hsl(280 40% 20%) 60%, hsl(230 35% 14%) 100%);
  border-radius: 0 0 1.5rem 1.5rem;
}
.hero h1 { font-size: 3.5rem; line-height: 1.1; }
.hero p { max-width: 560px; margin: 1.25rem auto 0; font-size: 1.125rem; color: var(--muted-fg); }

/* Category filters — glassmorphism pill bar */
.categories { padding: 2.5rem 0 1.5rem; }
.categories .container {
  display: flex; gap: 0.75rem; padding: 0.5rem 0.75rem;
  overflow-x: auto; border-radius: 9999px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(20px); width: fit-content;
}
.cat-btn {
  flex-shrink: 0; border: none; border-radius: 9999px;
  padding: 0.375rem 1rem; font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: background 0.2s, color 0.2s;
  background: transparent; color: var(--muted-fg);
}
.cat-btn:hover { color: var(--fg); }
.cat-btn.active { background: var(--fg); color: var(--bg); }

/* Post cards */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 2rem; }
.post-card {
  display: flex; flex-direction: column; border-radius: 1rem;
  background: var(--card-bg); border: 1px solid var(--border-color);
  overflow: hidden; transition: border-color 0.2s;
}
.post-card:hover { border-color: var(--muted-fg); }
.post-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.post-card .card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.post-card h3 { font-size: 1.25rem; }
.post-card h3 a { color: var(--fg); }
.post-card h3 a:hover { color: var(--primary); text-decoration: none; }
.post-card .meta { font-size: 0.875rem; color: var(--muted-fg); }
.post-card .category { font-size: 0.875rem; color: var(--muted-fg); margin-top: auto; }

.featured-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: stretch;
  border-radius: 1.5rem; background: var(--card-bg); border: 1px solid var(--border-color);
  overflow: hidden; transition: border-color 0.2s;
}
.featured-card:hover { border-color: var(--muted-fg); }
.featured-card img { width: 100%; height: 100%; object-fit: cover; }
.featured-card .card-body { padding: 2rem; display: flex; flex-direction: column; justify-content: center; gap: 1.25rem; }
.featured-card h2 { font-size: 2rem; line-height: 1.2; }
.featured-card h2 a { color: var(--fg); }
.featured-card h2 a:hover { color: var(--primary); text-decoration: none; }

@media (max-width: 768px) {
  .featured-card { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.5rem; }
}

/* Single post — centered clean header */
.single-header { padding: 5rem 0; text-align: center; }
.single-header h1 { font-size: 2.75rem; line-height: 1.15; margin-top: 1.5rem; }
.single-header .subtitle { max-width: 640px; margin: 1.5rem auto 0; font-size: 1.125rem; color: var(--muted-fg); }
.single-meta { display: flex; justify-content: center; gap: 1rem; font-size: 0.875rem; color: var(--muted-fg); }
.single-meta .cat { color: var(--primary); }

/* Prose / Content */
.entry-content { font-size: 1.125rem; line-height: 1.8; color: var(--secondary-fg); }
.entry-content h2 { font-size: 1.75rem; margin-top: 2.5em; margin-bottom: 0.8em; }
.entry-content h3 { font-size: 1.375rem; margin-top: 2.5em; margin-bottom: 0.8em; }
.entry-content p { margin-bottom: 1.5em; }
.entry-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.entry-content blockquote {
  border-left: 2px solid var(--primary); padding-left: 1.5rem;
  font-style: italic; color: var(--muted-fg); margin: 2em 0;
}
.entry-content img { border-radius: 1rem; margin: 2em 0; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin: 1.5em 0; }
.entry-content li { margin-bottom: 0.5em; }
.entry-content pre {
  background: var(--secondary-bg); border-radius: 0.75rem;
  padding: 1.5rem; overflow-x: auto; margin: 2em 0;
}
.entry-content code {
  background: var(--secondary-bg); border-radius: 0.25rem;
  padding: 0.125rem 0.375rem; font-size: 0.875rem; color: var(--primary);
}
.entry-content pre code { background: none; padding: 0; }

/* 404 */
.page-404 { padding: 5rem 0; text-align: center; }
.page-404 h1 { font-size: 6rem; color: var(--muted-fg); }
.page-404 p { color: var(--muted-fg); margin-top: 1rem; }
.page-404 a {
  display: inline-block; margin-top: 2rem; padding: 0.75rem 1.5rem;
  background: var(--fg); color: var(--bg); border-radius: 9999px;
  font-weight: 500; text-decoration: none;
}
