/*
Theme Name: ModelHive Blog
Theme URI: https://modelhive.ai
Description: Custom theme matching the modelhive.ai website design
Author: ModelHive
Author URI: https://modelhive.ai
Version: 1.0
License: Proprietary
Text Domain: modelhive
*/

/* ===== CSS Variables ===== */
:root {
  --bg: #ffffff;
  --fg: hsl(222.2, 84%, 4.9%);
  --primary: hsl(243, 59%, 53%);
  --primary-fg: #ffffff;
  --muted: hsl(210, 40%, 96.1%);
  --muted-fg: hsl(215.4, 16.3%, 46.9%);
  --border: hsl(214.3, 31.8%, 91.4%);
  --card: #ffffff;
  --card-fg: hsl(222.2, 84%, 4.9%);
  --radius: 0.5rem;
  --max-w: 1152px;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-600: #475569;
  --slate-900: #0f172a;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 300;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

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

a:hover {
  color: hsl(243, 59%, 40%);
}

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 300;
  line-height: 1.3;
  color: var(--fg);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* ===== Layout ===== */
.site-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
}

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

@media (min-width: 640px) {
  .container {
    padding: 0 2rem;
  }
}

/* ===== Header ===== */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.9);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--fg);
}

.site-brand svg {
  width: 32px;
  height: 32px;
}

.site-brand span {
  font-size: 1.25rem;
  font-weight: 700;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-nav a {
  font-size: 0.875rem;
  color: var(--muted-fg);
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.header-nav .btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  transition: background 0.15s ease;
}

.header-nav .btn-primary:hover {
  background: hsl(243, 59%, 45%);
  color: var(--primary-fg);
}

/* ===== Blog Content ===== */
.blog-header {
  padding: 3rem 0 2rem;
  text-align: center;
}

.blog-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.blog-header .subtitle {
  color: var(--muted-fg);
  font-size: 1.125rem;
}

.posts-grid {
  display: grid;
  gap: 2rem;
  padding: 2rem 0 4rem;
}

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

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

/* ===== Post Card ===== */
.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.post-card-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--muted);
}

.post-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted-fg);
  margin-bottom: 0.75rem;
}

.post-card-category {
  background: hsl(243, 59%, 53%, 0.1);
  color: var(--primary);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

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

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

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

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

/* ===== Single Post ===== */
.single-post-header {
  padding: 3rem 0 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.single-post-header .post-category {
  display: inline-block;
  background: hsl(243, 59%, 53%, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.single-post-header h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .single-post-header h1 {
    font-size: 2.75rem;
  }
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
}

.single-post-meta .author {
  font-weight: 500;
  color: var(--fg);
}

.single-post-featured {
  max-width: 960px;
  margin: 0 auto 2rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.single-post-featured img {
  width: 100%;
  display: block;
}

/* ===== Article Content (Prose) ===== */
.entry-content {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 4rem;
  font-size: 1.0625rem;
  line-height: 1.8;
}

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

.entry-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.entry-content h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.entry-content ul, .entry-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

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

.entry-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--muted);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted-fg);
  font-style: italic;
}

.entry-content pre {
  background: var(--slate-900);
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.entry-content code {
  background: var(--muted);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.entry-content pre code {
  background: none;
  padding: 0;
}

.entry-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.entry-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.entry-content th, .entry-content td {
  border: 1px solid var(--border);
  padding: 0.75rem;
  text-align: left;
  font-size: 0.875rem;
}

.entry-content th {
  background: var(--muted);
  font-weight: 500;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0 4rem;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  transition: all 0.15s ease;
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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

/* ===== Sidebar ===== */
.content-area {
  display: grid;
  gap: 3rem;
  padding: 2rem 0 4rem;
}

@media (min-width: 1024px) {
  .content-area.has-sidebar {
    grid-template-columns: 1fr 300px;
  }
}

.sidebar .widget {
  margin-bottom: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.sidebar .widget-title {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 1rem;
}

.sidebar .widget ul {
  list-style: none;
  padding: 0;
}

.sidebar .widget li {
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border);
}

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

.sidebar .widget a {
  font-size: 0.875rem;
  color: var(--muted-fg);
}

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

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--slate-50);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  gap: 2.5rem 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .footer-grid {
    align-items: start;
    column-gap: 2rem;
    grid-template-columns: minmax(18rem, 1.8fr) repeat(3, 1fr);
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: var(--fg);
}

.footer-brand svg {
  width: 32px;
  height: 32px;
}

.footer-brand span {
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-tagline {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-fg);
  max-width: 20rem;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li {
  padding: 0.25rem 0;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--muted-fg);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-col .company-info {
  font-size: 0.875rem;
  color: var(--muted-fg);
  line-height: 1.6;
}

.footer-col .company-name {
  color: var(--fg);
  font-weight: 400;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.footer-bottom-links a {
  color: var(--muted-fg);
}

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

.footer-copyright {
  font-size: 0.875rem;
  color: var(--muted-fg);
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--muted-fg);
  opacity: 0.7;
  max-width: 42rem;
  line-height: 1.6;
  margin-top: 0.75rem;
}

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

.search-form input[type="search"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--fg);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s ease;
}

.search-form input[type="search"]:focus {
  border-color: var(--primary);
}

.search-form button {
  background: var(--primary);
  color: var(--primary-fg);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-form button:hover {
  background: hsl(243, 59%, 45%);
}

/* ===== Comments ===== */
.comments-area {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
  border-top: 1px solid var(--border);
}

.comments-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment-body {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.comment-meta {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.comment-author {
  font-weight: 500;
}

.comment-content p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.comment-respond {
  margin-top: 2rem;
}

.comment-respond label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.comment-respond input:focus,
.comment-respond textarea:focus {
  border-color: var(--primary);
}

.comment-respond .submit {
  background: var(--primary);
  color: var(--primary-fg);
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.comment-respond .submit:hover {
  background: hsl(243, 59%, 45%);
}

/* ===== 404 ===== */
.error-404 {
  text-align: center;
  padding: 6rem 0;
}

.error-404 h1 {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.error-404 p {
  color: var(--muted-fg);
  margin-bottom: 2rem;
}

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

.alignwide {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  max-width: 100%;
}

.wp-block-image {
  margin-bottom: 1.5rem;
}

.wp-block-image img {
  border-radius: var(--radius);
}
