/* ============================================================
   BLOG — shared styles for index.php and post.php
   ============================================================ */

/* Blog hero */
.blog-hero {
  background: var(--navy);
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.blog-hero-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.blog-hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}

.blog-hero-content p {
  font-size: 1rem;
  color: rgba(255,255,255,.5);
  line-height: 1.75;
  max-width: 580px;
  margin: 0 auto;
}

/* Active nav link */
.nav-active {
  color: white !important;
  background: rgba(255,255,255,.08) !important;
}

/* Blog listing */
.blog-main {
  padding: 80px 0 110px;
  background: var(--gray-100);
  min-height: 60vh;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37,99,235,.2);
}

.blog-card:hover::before { opacity: 1; }

.blog-card-cat {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.blog-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.45;
  margin: 0;
}

.blog-card-excerpt {
  font-size: 0.84rem;
  color: var(--gray-600);
  line-height: 1.65;
  flex: 1;
  margin: 0;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-200);
}

.blog-card-date {
  font-size: 0.76rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-card-read {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Empty state */
.blog-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray-400);
}

.blog-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.blog-empty h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

/* ============================================================
   POST PAGE
   ============================================================ */
.post-hero {
  background: var(--navy);
  padding: 140px 0 70px;
  position: relative;
}

.post-hero-inner {
  max-width: 820px;
  margin: 0 auto;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.4);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.post-back:hover { color: white; }

.post-meta-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.2rem;
}

.post-date {
  font-size: 0.8rem;
  color: rgba(255,255,255,.3);
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-hero-inner h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}

.post-excerpt {
  font-size: 1.05rem;
  color: rgba(255,255,255,.45);
  line-height: 1.7;
  margin: 0;
}

/* Post body */
.post-body-section {
  padding: 70px 0 110px;
  background: var(--gray-100);
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 50px;
  align-items: start;
}

.post-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 48px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  font-size: 0.97rem;
  color: var(--gray-800);
  line-height: 1.85;
}

.post-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 2.2rem 0 1rem;
  line-height: 1.3;
}

.post-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 1.8rem 0 0.8rem;
}

.post-content p { margin: 0 0 1.2rem; }

.post-content ul,
.post-content ol {
  padding-left: 1.6rem;
  margin: 0 0 1.2rem;
}

.post-content li { margin-bottom: 0.4rem; }

.post-content strong { color: var(--gray-800); font-weight: 700; }

.post-content a {
  color: var(--blue);
  text-decoration: underline;
}

.post-sources {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.post-sources h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
}

.post-sources ul {
  padding-left: 1.2rem;
  margin: 0;
}

.post-sources li {
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.post-sources a {
  color: var(--blue);
  text-decoration: none;
}

.post-sources a:hover { text-decoration: underline; }

/* Sidebar */
.post-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.75rem;
}

.sidebar-card > p {
  font-size: 0.84rem;
  color: var(--gray-600);
  line-height: 1.65;
  margin: 0;
}

.sidebar-services {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-services a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 8px;
  transition: var(--transition);
}

.sidebar-services a:hover {
  background: var(--gray-100);
  color: var(--blue);
}

.sidebar-services i { font-size: 0.95rem; color: var(--blue); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { position: static; }
}

@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
  .post-content { padding: 28px 20px; }
}
