/*
Theme Name: LocalREBrand
Theme URI: https://localrebrand.com
Description: Custom theme matching the LocalREBrand main site design.
Version: 1.0
Author: CloseDaily
Author URI: https://closedaily.com
*/

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1a2e;
  background: #fafbfe;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --dark: #0f172a;
  --gray-900: #1a1a2e;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
}

/* ── NAV ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.5px; text-decoration: none; }
.logo-local { color: var(--gray-900); }
.logo-re { color: var(--primary); }
.logo-brand { color: var(--gray-900); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 0.9rem; font-weight: 500; color: var(--gray-700); }
.nav-links a { text-decoration: none; color: var(--gray-700); }
.nav-links a:hover { color: var(--primary); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.95rem;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  padding: 12px 24px; transition: all 0.2s; text-decoration: none;
  line-height: 1;
}
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }
.btn-primary { background: var(--primary); color: #ffffff !important; }
.btn-primary:hover { background: var(--primary-dark); color: #ffffff !important; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.nav-links .btn-primary {
  padding: 10px 20px; font-size: 0.88rem; letter-spacing: -0.01em;
  box-shadow: 0 1px 3px rgba(37,99,235,0.3);
}

/* ── BLOG HEADER ── */
.blog-header {
  padding: 100px 24px 48px;
  text-align: center;
  background: linear-gradient(180deg, #f0f5ff 0%, #fafbfe 100%);
}
.blog-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900; color: var(--dark);
  margin-bottom: 8px;
}
.blog-header p { color: var(--gray-500); font-size: 1.05rem; max-width: 520px; margin: 0 auto; }

/* ── MAIN LAYOUT ── */
.site-content {
  max-width: 1100px; margin: 0 auto; padding: 48px 24px;
  display: grid; grid-template-columns: 1fr 320px; gap: 48px;
}
.site-content.full-width { grid-template-columns: 1fr; max-width: 800px; }

/* ── POST CARDS (archive) ── */
.post-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); border: 1px solid var(--gray-100);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 32px;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.post-card-thumb { width: 100%; height: 220px; object-fit: cover; }
.post-card-body { padding: 28px; }
.post-card-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.8rem; color: var(--gray-500); margin-bottom: 12px;
}
.post-card-cat {
  display: inline-block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: var(--primary); background: var(--primary-light);
  padding: 3px 10px; border-radius: 100px;
}
.post-card-title {
  font-size: 1.3rem; font-weight: 800; line-height: 1.3;
  color: var(--dark); margin-bottom: 10px;
}
.post-card-title a { text-decoration: none; color: inherit; }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt { font-size: 0.92rem; color: var(--gray-500); line-height: 1.7; margin-bottom: 16px; }
.post-card-link {
  font-size: 0.88rem; font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: 4px;
}
.post-card-link:hover { gap: 8px; }

/* ── SINGLE POST ── */
.single-header { margin-bottom: 32px; }
.single-cat { margin-bottom: 12px; }
.single-title { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900; color: var(--dark); line-height: 1.2; margin-bottom: 12px; }
.single-meta { font-size: 0.85rem; color: var(--gray-500); display: flex; align-items: center; gap: 12px; }
.single-thumb { border-radius: var(--radius); margin-bottom: 32px; width: 100%; }

.post-content { font-size: 1.02rem; line-height: 1.8; color: var(--gray-700); }
.post-content h2 { font-size: 1.5rem; font-weight: 800; color: var(--dark); margin: 40px 0 16px; }
.post-content h3 { font-size: 1.2rem; font-weight: 700; color: var(--dark); margin: 32px 0 12px; }
.post-content p { margin-bottom: 20px; }
.post-content ul, .post-content ol { margin: 0 0 20px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content blockquote {
  border-left: 4px solid var(--primary); padding: 16px 24px; margin: 24px 0;
  background: var(--primary-light); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: var(--gray-700);
}
.post-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: var(--primary-dark); }
.post-content img { border-radius: var(--radius-sm); margin: 24px 0; }
.post-content pre {
  background: var(--dark); color: #e2e8f0; padding: 20px; border-radius: var(--radius-sm);
  overflow-x: auto; font-size: 0.88rem; margin: 24px 0;
}
.post-content code { font-size: 0.88rem; background: var(--gray-100); padding: 2px 6px; border-radius: 4px; }
.post-content pre code { background: none; padding: 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.post-content th, .post-content td { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); text-align: left; font-size: 0.92rem; }
.post-content th { font-weight: 600; color: var(--dark); background: var(--gray-100); }

/* ── POST NAVIGATION ── */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--gray-100);
}
.post-nav a {
  display: block; padding: 20px; background: var(--white);
  border-radius: var(--radius-sm); border: 1px solid var(--gray-100);
  text-decoration: none; transition: border-color 0.2s;
}
.post-nav a:hover { border-color: var(--primary); }
.post-nav-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-500); margin-bottom: 4px; }
.post-nav-title { font-size: 0.95rem; font-weight: 600; color: var(--dark); }

/* ── SIDEBAR ── */
.sidebar {}
.widget {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); border: 1px solid var(--gray-100);
  margin-bottom: 24px;
}
.widget-title { font-size: 0.9rem; font-weight: 700; color: var(--dark); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px; }
.widget ul { list-style: none; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 0.9rem; }
.widget li:last-child { border-bottom: none; }
.widget a { color: var(--gray-700); text-decoration: none; }
.widget a:hover { color: var(--primary); }

.cta-widget {
  background: linear-gradient(135deg, var(--dark) 0%, #1e3a5f 100%);
  color: var(--white); text-align: center;
}
.cta-widget .widget-title { color: var(--white); }
.cta-widget p { font-size: 0.88rem; color: rgba(255,255,255,0.7); margin-bottom: 16px; line-height: 1.6; }
.cta-widget .btn { display: inline-block; }

/* ── PAGINATION ── */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 32px 0; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  border: 1px solid var(--gray-100); color: var(--gray-700);
  transition: all 0.2s;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ── FOOTER ── */
.site-footer { padding: 48px 24px; border-top: 1px solid var(--gray-100); background: var(--white); }
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
}
.footer-tagline { font-size: 0.8rem; color: var(--gray-500); margin-top: 4px; }
.footer-links { display: flex; gap: 24px; font-size: 0.85rem; color: var(--gray-500); }
.footer-links a { text-decoration: none; color: var(--gray-500); }
.footer-links a:hover { color: var(--primary); }
.footer-powered { text-align: right; font-size: 0.8rem; color: var(--gray-500); }
.footer-powered a { color: var(--primary); font-weight: 600; text-decoration: none; }
.footer-copy { margin-top: 4px; font-size: 0.75rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .site-content { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-powered { text-align: center; }
  .post-nav { grid-template-columns: 1fr; }
}
