/* ============================================================
   blog-styles.css  –  Shared styles for all blog pages.
   Depends on shared-nav.css for header, nav, buttons, and
   CSS custom properties (--brand-navy, --brand-orange, etc.).
   ============================================================ */

/* === Blog Layout === */
.blog-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 6rem 1.5rem 3rem;
}
@media (min-width: 768px) {
  .blog-container { padding-top: 7rem; }
}

/* === Article Hero Image === */
.article-hero {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* === Article Header === */
.article-header {
  margin-bottom: 2.5rem;
}
.article-title {
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--brand-navy);
  margin: 0 0 0.75rem;
}
@media (min-width: 768px) {
  .article-title { font-size: 2.25rem; }
}
.article-meta {
  font-size: 0.875rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.article-meta .sep { color: #d1d5db; }

/* === Prose (Article Body) === */
.prose {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #1f2937;
}
.prose p {
  margin: 0 0 1.5rem;
}
.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
}
.prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--brand-charcoal);
  margin: 2rem 0 0.75rem;
  line-height: 1.35;
}
.prose h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--brand-charcoal);
  margin: 1.5rem 0 0.5rem;
}
.prose a {
  color: var(--brand-orange);
  text-decoration: none;
}
.prose a:hover {
  text-decoration: underline;
}
.prose strong {
  font-weight: 600;
}
.prose ul, .prose ol {
  margin: 0 0 1.5rem 1.5rem;
  padding: 0;
}
.prose li {
  margin-bottom: 0.5rem;
}
.prose ol {
  list-style: decimal;
}
.prose ul {
  list-style: disc;
}
.prose blockquote {
  border-left: 4px solid var(--brand-orange);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  font-style: italic;
  color: #4b5563;
  background: #faf8f4;
  border-radius: 0 0.25rem 0.25rem 0;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2.5rem 0;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* === Tables === */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.prose th {
  text-align: left;
  font-weight: 600;
  color: var(--brand-navy);
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}
.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
}
.prose tbody tr:nth-child(even) {
  background: #faf8f4;
}

/* === CTA Box === */
.blog-cta-box {
  background: var(--warm-light);
  border: 1px solid var(--warm-mid);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 2rem 0;
}
.blog-cta-box p {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--brand-charcoal);
}
.blog-cta-box p:last-child { margin-bottom: 0; }
.blog-cta-btn {
  display: inline-block;
  background: var(--brand-charcoal);
  color: #fff;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}
.blog-cta-btn:hover {
  background: #5a4d3a;
  text-decoration: none;
}

/* === About Blurb (bottom of articles) === */
.blog-about-blurb {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 3rem 0 2rem;
}
.blog-about-blurb h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-navy);
  margin: 0 0 0.5rem;
}
.blog-about-blurb p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #4b5563;
  margin: 0 0 0.75rem;
}
.blog-about-blurb p:last-child { margin-bottom: 0; }
.blog-about-blurb a {
  color: var(--brand-orange);
  text-decoration: none;
}
.blog-about-blurb a:hover { text-decoration: underline; }

/* === Related Articles === */
.related-articles {
  margin: 3rem 0 2rem;
}
.related-articles h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin: 0 0 1.25rem;
}
.related-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
.related-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  text-decoration: none;
  transition: box-shadow 0.2s, border-color 0.2s;
  display: block;
}
.related-card:hover {
  border-color: var(--brand-orange);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.related-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-navy);
  margin: 0 0 0.375rem;
  line-height: 1.35;
}
.related-card p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

/* === Blog Index Cards === */
.blog-hero {
  padding: 6rem 1.5rem 2rem;
  text-align: center;
}
@media (min-width: 768px) {
  .blog-hero { padding-top: 7rem; }
}
.blog-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin: 0 0 0.5rem;
}
@media (min-width: 768px) {
  .blog-hero h1 { font-size: 2.5rem; }
}
.blog-hero p {
  font-size: 1.0625rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
}
.blog-grid-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.blog-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}
.blog-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.blog-card:hover {
  border-color: var(--brand-orange);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.blog-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--brand-navy);
  margin: 0 0 0.5rem;
  line-height: 1.35;
}
.blog-card .card-excerpt {
  font-size: 0.9375rem;
  color: #4b5563;
  line-height: 1.55;
  margin: 0 0 1rem;
  flex: 1;
}
.blog-card .card-meta {
  font-size: 0.8125rem;
  color: #9ca3af;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.blog-card .card-meta .sep { color: #d1d5db; }

/* === Footer (matches about.html) === */
.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 2rem 1.5rem;
}
.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-logo { height: 28px; width: auto; border-radius: 2px; }
.footer-text { font-size: 0.875rem; letter-spacing: 0.025em; }
.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer-link {
  font-size: 0.875rem;
  opacity: 0.8;
  transition: opacity 0.2s;
  color: #d1d5db;
  text-decoration: none;
}
.footer-link:hover { opacity: 1; color: #fff; }
.footer-separator { color: #6b7280; }

/* === Login Modal (matches about.html) === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-content {
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 32rem;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.modal-header-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.modal-logo { height: 24px; width: auto; }
.modal-title { font-size: 0.875rem; font-weight: 600; color: var(--brand-navy); }
.modal-close {
  color: #9ca3af;
  font-size: 1.5rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
}
.modal-close:hover { color: #4b5563; }
.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.875rem; color: #4b5563; margin-bottom: 0.25rem; }
.form-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  box-sizing: border-box;
}
.form-input:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 2px rgba(224,154,27,0.2);
}
.login-center { text-align: center; margin-bottom: 1.5rem; }
.login-title { font-size: 1.25rem; font-weight: 600; color: #111827; margin-bottom: 0.5rem; }
.login-subtitle { font-size: 0.875rem; color: #4b5563; }
.login-icon { width: 48px; height: 48px; margin: 0 auto 1rem; color: #16a34a; }
.login-info-box { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 0.5rem; padding: 1rem; margin: 1rem 0; }
.login-info-content { display: flex; align-items: flex-start; gap: 0.75rem; }
.login-info-icon { width: 20px; height: 20px; color: #2563eb; flex-shrink: 0; margin-top: 2px; }
.login-info-title { font-size: 0.875rem; font-weight: 500; color: #1e40af; }
.login-info-text { font-size: 0.75rem; color: #2563eb; margin-top: 0.25rem; }
.login-buttons { display: flex; gap: 0.75rem; margin-top: 1rem; }
.login-buttons .btn-secondary { flex: 1; }
.login-error { padding: 0.75rem; background: #fef2f2; border: 1px solid #fecaca; border-radius: 0.5rem; display: none; margin-top: 1rem; }
.login-error.visible { display: block; }
.login-error-text { font-size: 0.875rem; color: #dc2626; }
.login-loading, .login-success { text-align: center; padding: 2rem 0; display: none; }
.login-loading.visible, .login-success.visible { display: block; }
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--brand-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
