/* ===================== BLOG HERO ===================== */
.blog-hero {
  padding: 100px 24px 40px; text-align: center;
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 100%);
}
.blog-hero__title {
  font-size: 2rem; font-weight: 900; line-height: 1.2;
  margin-bottom: 12px; color: var(--gray-900);
}
.blog-hero__title span {
  background: var(--gradient); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.blog-hero__sub {
  font-size: 0.92rem; color: var(--gray-600); line-height: 1.6;
  max-width: 540px; margin: 0 auto 20px;
}
.blog-hero__categories {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.blog-cat {
  padding: 6px 16px; border-radius: 60px; font-size: 0.78rem;
  font-weight: 600; cursor: pointer; transition: 0.3s;
  border: 1px solid var(--gray-200); background: var(--white);
  color: var(--gray-600);
}
.blog-cat:hover, .blog-cat.active {
  background: var(--blue-700); color: var(--white);
  border-color: var(--blue-700);
}

@media (min-width: 768px) {
  .blog-hero { padding: 120px 40px 50px; }
  .blog-hero__title { font-size: 3rem; }
  .blog-hero__sub { font-size: 1.05rem; }
}

/* ===================== FEATURED POST ===================== */
.blog-featured {
  display: grid; gap: 24px; background: var(--white);
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  overflow: hidden; transition: 0.3s;
}
.blog-featured:hover { box-shadow: var(--shadow-lg); }
.blog-featured__img {
  aspect-ratio: 16/9; overflow: hidden;
  background: var(--gray-100);
}
.blog-featured__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s;
}
.blog-featured:hover .blog-featured__img img { transform: scale(1.03); }
.blog-featured__body { padding: 24px; }
.blog-featured__cat {
  display: inline-block; padding: 4px 12px; border-radius: 60px;
  background: var(--blue-50); color: var(--blue-700);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 12px;
}
.blog-featured__title {
  font-size: 1.4rem; font-weight: 800; line-height: 1.3;
  color: var(--gray-900); margin-bottom: 10px;
}
.blog-featured__title a { transition: color 0.3s; }
.blog-featured__title a:hover { color: var(--blue-600); }
.blog-featured__excerpt {
  font-size: 0.9rem; color: var(--gray-600); line-height: 1.7;
  margin-bottom: 16px;
}
.blog-featured__meta {
  display: flex; gap: 16px; font-size: 0.78rem; color: var(--gray-400);
}
.blog-featured__meta strong { color: var(--blue-700); }

@media (min-width: 768px) {
  .blog-featured { grid-template-columns: 1fr 1fr; }
  .blog-featured__body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
  .blog-featured__title { font-size: 1.8rem; }
}

/* ===================== BLOG GRID ===================== */
.blog-grid {
  display: grid; gap: 20px;
}
.blog-card {
  display: block; background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); overflow: hidden; transition: 0.3s;
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.blog-card__img {
  aspect-ratio: 16/9; overflow: hidden; background: var(--gray-100);
}
.blog-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.blog-card:hover .blog-card__img img { transform: scale(1.05); }
.blog-card__body { padding: 16px; }
.blog-card__cat {
  display: inline-block; padding: 3px 10px; border-radius: 60px;
  background: var(--blue-50); color: var(--blue-700);
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 8px;
}
.blog-card__title {
  font-size: 1.05rem; font-weight: 700; line-height: 1.35;
  color: var(--gray-900); margin-bottom: 6px;
}
.blog-card__excerpt {
  font-size: 0.82rem; color: var(--gray-600); line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card__meta {
  display: flex; gap: 12px; font-size: 0.72rem; color: var(--gray-400);
}

@media (min-width: 600px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* ===================== BLOG SECTION ALIGNMENT ===================== */
.blog-hero + .section .section__title,
.blog-hero ~ .section .section__title,
.blog-hero ~ .section .section__sub {
  text-align: center;
}
.blog-hero ~ .section .section__sub {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ===================== FAQ ===================== */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  margin-bottom: 10px; overflow: hidden; transition: 0.3s;
}
.faq-item:hover { border-color: var(--blue-400); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 20px; cursor: pointer; background: var(--white);
  font-size: 0.92rem; font-weight: 600; color: var(--gray-900);
  transition: 0.3s; border: none; width: 100%; text-align: left;
  font-family: inherit;
}
.faq-q:hover { background: var(--blue-50); }
.faq-q__icon {
  width: 24px; height: 24px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--blue-50);
  color: var(--blue-700); font-size: 1rem; font-weight: 700;
  transition: transform 0.3s, background 0.3s;
}
.faq-item.open .faq-q__icon {
  transform: rotate(45deg); background: var(--blue-700); color: var(--white);
}
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s;
  padding: 0 20px;
}
.faq-item.open .faq-a {
  max-height: 400px; padding: 0 20px 16px;
}
.faq-a p {
  font-size: 0.88rem; color: var(--gray-600); line-height: 1.7;
}

/* ===================== BLOG POST PAGE ===================== */
.post-hero {
  padding: 100px 24px 32px; text-align: center;
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 100%);
}
.post-hero__cat {
  display: inline-block; padding: 5px 14px; border-radius: 60px;
  background: var(--gradient); color: var(--white);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 14px;
}
.post-hero__title {
  font-size: 1.6rem; font-weight: 900; line-height: 1.25;
  color: var(--gray-900); margin-bottom: 16px; max-width: 700px; margin-left: auto; margin-right: auto;
}
.post-hero__meta {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--gray-400);
}
.post-hero__meta strong { color: var(--blue-700); }

@media (min-width: 768px) {
  .post-hero { padding: 120px 40px 40px; }
  .post-hero__title { font-size: 2.4rem; }
}

.post-cover {
  max-width: 800px; margin: 0 auto; padding: 0 24px;
}
.post-cover img {
  width: 100%; border-radius: var(--radius); aspect-ratio: 16/9;
  object-fit: cover; box-shadow: var(--shadow-md);
}

.post-content {
  max-width: 720px; margin: 40px auto 0; padding: 0 24px;
}
.post-content h2 {
  font-size: 1.3rem; font-weight: 800; color: var(--gray-900);
  margin: 32px 0 12px; line-height: 1.3;
}
.post-content p {
  font-size: 0.95rem; color: var(--gray-700); line-height: 1.8;
  margin-bottom: 16px;
}
.post-content ul, .post-content ol {
  padding-left: 20px; margin-bottom: 16px;
}
.post-content li {
  font-size: 0.92rem; color: var(--gray-700); line-height: 1.7;
  margin-bottom: 6px;
}
.post-content li strong { color: var(--gray-900); }
.post-content a { color: var(--blue-600); font-weight: 500; text-decoration: underline; }
.post-content a:hover { color: var(--blue-700); }

.post-content table {
  width: 100%; border-collapse: collapse; margin-bottom: 24px;
  font-size: 0.88rem; border: 1px solid var(--gray-200);
  border-radius: 8px; overflow: hidden;
}
.post-content thead { background: var(--blue-700); }
.post-content thead th {
  padding: 10px 14px; text-align: left; font-weight: 700;
  color: #fff; font-size: 0.82rem; letter-spacing: 0.02em;
  white-space: nowrap;
}
.post-content tbody td {
  padding: 10px 14px; border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800); vertical-align: top; line-height: 1.5;
}
.post-content tbody tr:last-child td { border-bottom: none; }
.post-content tbody tr:nth-child(even) { background: var(--blue-50); }
.post-content tbody td strong { color: var(--gray-900); }
.post-content h3 {
  font-size: 1.1rem; font-weight: 700; color: var(--blue-700);
  margin: 24px 0 10px;
}

@media (max-width: 600px) {
  .post-content table {
    width: 100% !important; display: table !important;
    table-layout: fixed; border-collapse: collapse;
    overflow: hidden;
  }
  .post-content thead th {
    padding: 8px 10px; font-size: 0.75rem;
    white-space: normal; word-wrap: break-word;
  }
  .post-content tbody td {
    padding: 8px 10px; font-size: 0.8rem;
    white-space: normal; word-wrap: break-word;
  }
}

.post-content .post-faq { margin-bottom: 24px; }
.post-content .post-faq details.post-faq__item {
  border: 1px solid var(--gray-200) !important; border-radius: 8px !important;
  margin-bottom: 8px !important; overflow: hidden; transition: 0.3s;
  background: var(--white);
}
.post-content .post-faq details.post-faq__item:hover { border-color: var(--blue-400) !important; }
.post-content .post-faq details.post-faq__item[open] { border-color: var(--blue-500) !important; background: var(--blue-50) !important; }
.post-content .post-faq details.post-faq__item summary {
  padding: 14px 18px !important; font-size: 0.92rem !important; font-weight: 600 !important;
  color: var(--gray-900) !important; cursor: pointer; list-style: none;
  display: flex !important; align-items: center; justify-content: space-between;
  transition: 0.3s; margin: 0 !important; line-height: 1.4;
}
.post-content .post-faq details.post-faq__item summary::-webkit-details-marker { display: none; }
.post-content .post-faq details.post-faq__item summary::marker { display: none; content: ''; }
.post-content .post-faq details.post-faq__item summary::after {
  content: '+'; font-size: 1.2rem; font-weight: 700;
  color: var(--blue-700); flex-shrink: 0; margin-left: 12px;
  transition: transform 0.3s;
}
.post-content .post-faq details.post-faq__item[open] summary::after { content: '−'; }
.post-content .post-faq details.post-faq__item summary:hover { background: var(--blue-50); }
.post-content .post-faq details.post-faq__item p {
  padding: 0 18px 14px !important; font-size: 0.88rem !important; color: var(--gray-600) !important;
  line-height: 1.7 !important; margin: 0 !important;
}
.post-content .post-faq details.post-faq__item p a { color: var(--blue-600) !important; font-weight: 500; }

@media (max-width: 480px) {
  .post-content .post-faq details.post-faq__item summary { padding: 12px 14px !important; font-size: 0.85rem !important; }
  .post-content .post-faq details.post-faq__item p { padding: 0 14px 12px !important; font-size: 0.82rem !important; }
}

.post-tags {
  max-width: 720px; margin: 32px auto 0; padding: 0 24px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.post-tag {
  padding: 5px 14px; border-radius: 60px; font-size: 0.75rem;
  font-weight: 500; background: var(--blue-50); color: var(--blue-700);
  border: 1px solid var(--blue-100);
}

.post-nav {
  max-width: 720px; margin: 40px auto; padding: 0 24px;
  display: flex; justify-content: space-between; gap: 16px;
}
.post-nav a {
  padding: 10px 20px; border-radius: var(--radius-sm); font-size: 0.85rem;
  font-weight: 600; background: var(--blue-50); color: var(--blue-700);
  border: 1px solid var(--blue-100); transition: 0.3s;
}
.post-nav a:hover { background: var(--blue-700); color: var(--white); }

/* ===================== NAV ACTIVE ===================== */
.nav__active { color: var(--blue-700) !important; font-weight: 700 !important; }

/* ===================== MOBILE ===================== */
@media (max-width: 480px) {
  .blog-hero { padding: 80px 20px 32px; }
  .blog-hero__title { font-size: 1.5rem; }
  .blog-hero__sub { font-size: 0.82rem; }
  .blog-featured__title { font-size: 1.15rem; }
  .blog-featured__body { padding: 16px; }
  .blog-card__body { padding: 14px; }
  .blog-card__title { font-size: 0.95rem; }
  .faq-q { font-size: 0.84rem; padding: 14px 16px; }
  .faq-a p { font-size: 0.82rem; }
  .post-hero__title { font-size: 1.35rem; }
  .post-content h2 { font-size: 1.15rem; }
  .post-content p, .post-content li { font-size: 0.88rem; }
}
