/* ═══════════════════════════════════════════════════
   Blog Pages Styles
   ═══════════════════════════════════════════════════ */

/* ── Blog Index Hero ── */
.blog-hero {
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-700) 50%, var(--green-600) 100%);
  color: var(--white);
  padding: 60px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.blog-hero h1 {
  font-size: 2.5rem;
  color: var(--white);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.blog-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 550px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Blog Controls (Search & Filters) ── */
.blog-controls {
  margin: 40px 0 30px;
}

.blog-controls .search-bar {
  display: flex;
  max-width: 500px;
  margin: 0 auto 24px;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 50px;
  overflow: hidden;
  transition: var(--transition);
}

.blog-controls .search-bar:focus-within {
  border-color: var(--green-400);
  box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.1);
}

.blog-controls .search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--gray-800);
}

.blog-controls .search-bar button {
  background: none;
  border: none;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--gray-500);
  transition: var(--transition);
}

.blog-controls .search-bar button:hover {
  color: var(--green-700);
}

.category-filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--green-400);
  color: var(--green-700);
}

.filter-btn.active {
  background: var(--green-700);
  color: var(--white);
  border-color: var(--green-700);
}

/* ── Blog Grid ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
  margin-bottom: 50px;
}

/* ── Blog Cards ── */
.blog-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.blog-section .blog-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-section .blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.blog-card-image {
  height: 180px;
  background: linear-gradient(135deg, var(--green-200), var(--green-400));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.blog-section .blog-card .blog-card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--green-100) 0%, var(--green-200) 50%, var(--green-300) 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blog-section .blog-card .blog-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' fill='none' viewBox='0 0 24 24' stroke='%232E7D32' stroke-width='0.5' opacity='0.15'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25'/%3E%3C/svg%3E") center/80px repeat;
}

.category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--green-700);
  color: var(--white);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 1;
}

.blog-card-content {
  padding: 20px;
}

.blog-section .blog-card .blog-card-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  font-size: 0.82rem;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.blog-card-content h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.blog-section .blog-card .blog-card-content h2 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.blog-section .blog-card .blog-card-content h2 a {
  color: var(--gray-900);
  text-decoration: none;
  transition: var(--transition);
}

.blog-section .blog-card .blog-card-content h2 a:hover {
  color: var(--green-700);
}

.blog-card-content p {
  font-size: 0.9rem;
  color: var(--gray-600);
}

.blog-section .blog-card .blog-card-content > p:last-child {
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0;
  flex: 1;
}

/* Blog Card Thumbnails */
.blog-card-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    height: 200px;
    background: #1a2332;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Article Page Layout ── */
.article-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.article-content {
  min-width: 0;
}

/* ── Article Header ── */
.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
}

.article-header h1 {
  font-size: 2.2rem;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--gray-900);
}

/* ── Article Meta ── */
.article-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--gray-500);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Article Section (Main Content) ── */
.article-section {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--gray-800);
}

.article-section h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--gray-900);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-200);
}

.article-section h3 {
  font-size: 1.2rem;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--gray-900);
}

.article-section p {
  margin-bottom: 16px;
}

.article-section ul,
.article-section ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-section li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.article-section a {
  color: var(--green-700);
  text-decoration: underline;
  text-decoration-color: var(--green-300);
  text-underline-offset: 2px;
  transition: var(--transition);
}

.article-section a:hover {
  color: var(--green-600);
  text-decoration-color: var(--green-600);
}

/* ── Article Images ── */
.article-hero-image {
    margin: 1.5rem 0 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.article-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 450px;
}

.article-inline-image {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
}

.article-inline-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

/* ── Medical Disclaimer ── */
.medical-disclaimer {
  background: #fef3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 40px;
}

.medical-disclaimer h3 {
  color: #856404;
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 8px;
}

.medical-disclaimer p {
  color: #856404;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ── Related Articles ── */
.related-articles {
  margin-top: 40px;
  padding: 28px;
  background: var(--green-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--green-200);
}

.related-articles h3 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--green-800);
}

.related-articles ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-articles li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--green-200);
}

.related-articles li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.related-articles a {
  color: var(--green-700);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
}

.related-articles a:hover {
  color: var(--green-600);
  text-decoration: underline;
}

/* ── Article Sidebar ── */
.article-sidebar .sidebar-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}

.article-sidebar .sidebar-box h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  color: var(--gray-900);
}

.article-sidebar .sidebar-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-sidebar .sidebar-box li {
  margin-bottom: 10px;
}

.article-sidebar .sidebar-box a {
  color: var(--gray-600);
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition);
}

.article-sidebar .sidebar-box a:hover {
  color: var(--green-700);
}

/* ── Responsive ── */
@media (max-width: 968px) {
  .article-wrapper {
    grid-template-columns: 1fr;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .blog-hero h1 {
    font-size: 1.8rem;
  }
  .article-header h1 {
    font-size: 1.6rem;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
}
