/*
Theme Name: Modern Blog Press
Theme URI: https://example.com/
Author: OpenAI
Author URI: https://openai.com/
Description: A modern, responsive WordPress blog theme with featured post hero, clean cards, sidebar, and polished single post layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: modern-blog-press
*/

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f9fbff;
  --text: #172033;
  --muted: #667085;
  --border: #e6ebf2;
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --accent: #10b981;
  --shadow: 0 12px 30px rgba(23, 32, 51, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --container: 1200px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f7f9fc 0%, #eff4fb 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
input, button, textarea, select { font: inherit; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.site-header {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.84); border-bottom: 1px solid rgba(230,235,242,0.8);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; }
.branding { display: flex; align-items: center; gap: 14px; }
.site-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; }
.site-description { font-size: 0.92rem; color: var(--muted); margin-top: 2px; }
.logo-mark {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.25); position: relative;
}
.logo-mark::before, .logo-mark::after { content: ""; position: absolute; border-radius: 999px; background: rgba(255,255,255,0.88); }
.logo-mark::before { width: 18px; height: 18px; left: 9px; top: 9px; }
.logo-mark::after { width: 11px; height: 11px; right: 8px; bottom: 8px; }
.main-nav ul { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.main-nav li a { padding: 10px 14px; border-radius: 999px; color: #3b4456; transition: .25s ease; }
.main-nav li.current-menu-item a, .main-nav li a:hover { background: #eef2ff; color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.search-toggle, .primary-btn, button, input[type="submit"] { border: 0; border-radius: 999px; cursor: pointer; }
.primary-btn, input[type="submit"] {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; padding: 12px 18px; box-shadow: 0 14px 24px rgba(79, 70, 229, 0.22);
}
.search-toggle { width: 46px; height: 46px; display: grid; place-items: center; background: #eef2ff; color: var(--primary); }
.header-search { display: none; padding-bottom: 16px; }
.header-search.is-open { display: block; }
.header-search form { position: relative; }
.header-search input[type="search"] { width: 100%; border: 1px solid var(--border); background: #fff; border-radius: 18px; padding: 16px 20px; box-shadow: var(--shadow); }
.hero-section { padding: 34px 0 28px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .9fr); gap: 24px; }
.hero-card, .feature-list, .post-card, .widget, .single-card, .archive-hero, .author-box, .comment-respond, .comments-area, .pagination-wrap, .not-found-card {
  background: rgba(255,255,255,0.92); border: 1px solid rgba(230,235,242,0.95); box-shadow: var(--shadow); border-radius: var(--radius);
}
.hero-card { overflow: hidden; display: grid; min-height: 480px; position: relative; }
.hero-card .hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-content {
  position: absolute; inset: auto 0 0 0; padding: 34px;
  background: linear-gradient(180deg, rgba(10,16,28,0.05), rgba(10,16,28,0.82)); color: #fff;
}
.hero-badge, .post-pill {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.18); padding: 7px 12px; font-size: 0.85rem; font-weight: 600;
}
.hero-title { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.06; margin: 14px 0 14px; letter-spacing: -0.05em; }
.hero-excerpt, .entry-summary, .archive-description, .widget p, .entry-content p, .entry-content li, .comment-body { color: var(--muted); }
.hero-excerpt { max-width: 70ch; color: rgba(255,255,255,0.88); }
.hero-meta, .card-meta, .entry-meta, .widget .post-date { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.92rem; }
.hero-meta { margin: 18px 0 0; color: rgba(255,255,255,0.9); }
.feature-list { padding: 20px; }
.feature-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.feature-heading h3, .section-title, .widget-title { margin: 0; font-size: 1.15rem; letter-spacing: -0.03em; }
.feature-item { display: grid; grid-template-columns: 106px 1fr; gap: 14px; padding: 12px; border-radius: 18px; transition: .25s ease; }
.feature-item:hover { background: var(--surface-2); }
.feature-item + .feature-item { margin-top: 10px; }
.feature-item img { width: 106px; height: 92px; object-fit: cover; border-radius: 16px; }
.feature-item h4 { margin: 8px 0 6px; font-size: 1rem; line-height: 1.35; }
.feature-item p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.content-area { padding: 18px 0 70px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 28px; }
.posts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.post-card { overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(23, 32, 51, 0.12); }
.post-thumb { aspect-ratio: 16 / 10; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.post-body { padding: 22px; }
.card-meta { color: var(--muted); margin: 12px 0 0; }
.card-title, .entry-title, .page-title, .archive-title, .not-found-title { margin: 12px 0 10px; line-height: 1.12; letter-spacing: -0.04em; }
.card-title { font-size: 1.45rem; }
.entry-title { font-size: clamp(2rem, 4vw, 3.5rem); }
.sidebar .widget { padding: 22px; }
.sidebar .widget + .widget { margin-top: 22px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li + li { margin-top: 12px; }
.widget a:hover { color: var(--primary); }
.widget_search form, .search-form { display: flex; gap: 10px; }
.search-form label { flex: 1; }
.search-field { width: 100%; border: 1px solid var(--border); background: #fff; border-radius: 16px; padding: 13px 16px; }
.tagcloud a, .wp-block-tag-cloud a { display: inline-block; padding: 8px 12px; border-radius: 999px; background: #eef2ff; color: var(--primary); margin: 0 8px 8px 0; font-size: 0.88rem !important; }
.pagination-wrap { margin-top: 28px; padding: 14px; }
.nav-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.page-numbers { min-width: 44px; height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #fff; border: 1px solid var(--border); }
.page-numbers.current, .page-numbers:hover { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-color: transparent; }
.single-wrapper, .archive-wrapper, .page-wrapper { padding: 34px 0 70px; }
.single-card, .archive-hero, .not-found-card { overflow: hidden; }
.single-header, .archive-hero, .page-header, .not-found-card { padding: 30px; }
.featured-banner { margin-top: 18px; border-radius: 22px; overflow: hidden; }
.featured-banner img { width: 100%; max-height: 620px; object-fit: cover; }
.entry-content { padding: 0 30px 30px; }
.entry-content h2, .entry-content h3, .entry-content h4 { line-height: 1.2; letter-spacing: -0.03em; margin: 30px 0 14px; }
.entry-content h2 { font-size: 2rem; }
.entry-content h3 { font-size: 1.45rem; }
.entry-content a { color: var(--primary); text-decoration: underline; }
.entry-content blockquote { margin: 24px 0; padding: 24px 26px; border-left: 4px solid var(--primary); background: #f7f9ff; border-radius: 0 18px 18px 0; font-size: 1.1rem; color: #344054; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content code, .entry-content pre { background: #0f172a; color: #e2e8f0; border-radius: 14px; }
.entry-content pre { padding: 18px; overflow: auto; }
.post-taxonomy { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 30px 30px; }
.post-taxonomy a { padding: 9px 12px; border-radius: 999px; background: #eef2ff; color: var(--primary); font-size: .92rem; }
.author-box, .comments-area, .comment-respond { padding: 24px; margin-top: 22px; }
.site-footer { padding: 28px 0 42px; background: #0f172a; color: rgba(255,255,255,0.78); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; }
.footer-nav a:hover { color: #fff; }
.archive-description { max-width: 70ch; }
.not-found-card { padding: 32px; }
.not-found-card .search-form { margin-top: 18px; }
.mobile-menu-toggle { display: none; width: 46px; height: 46px; place-items: center; background: #eef2ff; color: var(--primary); border-radius: 14px; }
@media (max-width: 1080px) {
  .hero-grid, .content-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .header-inner { flex-wrap: wrap; }
  .main-nav { width: 100%; display: none; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding-top: 6px; }
  .main-nav li a { display: block; border-radius: 14px; }
  .mobile-menu-toggle { display: grid; }
  .posts-grid, .feature-item { grid-template-columns: 1fr; }
  .feature-item img { width: 100%; height: 180px; }
  .hero-card { min-height: 380px; }
}
@media (max-width: 580px) {
  .container { width: min(calc(100% - 20px), var(--container)); }
  .hero-content, .single-header, .archive-hero, .page-header, .entry-content, .post-taxonomy, .not-found-card, .sidebar .widget, .post-body, .feature-list, .comments-area, .comment-respond, .author-box { padding-left: 18px; padding-right: 18px; }
  .hero-title, .entry-title { letter-spacing: -0.04em; }
}
