/* ========== Layout Container ========== */
.blog-layout {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
  gap: 32px;
  font-family: "Helvetica Neue", sans-serif;
}

/* Anchor scroll offset */
section {
  scroll-margin-top: 100px;
}

/* ========== Sidebar Navigation ========== */
.sidebar-nav {
  width: 250px;
  scroll-behavior: smooth;
  padding: 100px 15px;
  background-color: #ffffff;
  border-right: 1px solid #ccc;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: hidden;
  flex-shrink: 0;
}

.sidebar-nav h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  border-bottom: 2px solid #4caf50;
  padding-bottom: 6px;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

.sidebar-nav a {
  color: #333;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sidebar-nav a:hover {
  color: #4caf50;
}

/* ========== Blog Images ========== */
.blog-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 4px solid #6c6c6c;
  margin: 20px auto;
}

/* Section-specific images (float layout) */
.blog-content section img {
  float: left;
  margin: 15px;
  max-width: 320px;
  margin-bottom: 1rem;
  height: auto;
  border-radius: 8px;
  border: 3px solid #ccc;
}

/* Clear float */
.blog-content section::after {
  content: "";
  display: block;
  clear: both;
}

/* Centered heading */
.content-heading {
  text-align: center;
}

/* Top margin for inline images */
.content img {
  margin-top: 2.5rem;
  border-radius: 20px;
}

/* Community farming image style */
.image-community-farming {
  height: 35vh;
  margin-left: 35px;
}

/* ========== Responsive: Tablet and below ========== */
@media (max-width: 1024px) {
  .blog-layout {
    flex-direction: column;
  }

  .sidebar-nav {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #ccc;
    padding: 16px;
  }

  .sidebar-nav h3 {
    text-align: center;
  }

  .sidebar-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }

  .sidebar-nav li {
    margin: 0;
  }

  .blog-content img,
  .blog-content section img {
    float: none;
    margin: 0 auto 20px;
    display: block;
  }
}

/* ========== Hero Section ========== */
.hero-content {
  height: 100vh;
}

/* Section spacing control */
.sections {
  margin-top: -7rem;
}

section {
  margin-bottom: 3rem;
}

/* ========== Image Grid (Visible Signs Section) ========== */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.image-item {
  text-align: center;
}

.image-item img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin-bottom: 8px;
}

.image-item .caption {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.4;
}

/* ========== Embedded Video Styling ========== */
.video-frame {
  width: 65%;
  margin: auto;
}

@media (max-width: 1024px) {
  .video-frame {
    width: 100%;
  }
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ========== Adaptation Grid Section ========== */
#adaptation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
}

@media (max-width: 768px) {
  #adaptation {
    grid-template-columns: 1fr;
    text-align: center;
  }

  #adaptation img {
    max-width: 100%;
    margin: 0 auto;
  }
}

/* ========== Innovation Cards ========== */
.card-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.info-card {
  background-color: #f4f6f8;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.info-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  color: #2b4b4b;
}

.info-card p {
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
}

/* Mobile card layout */
@media (max-width: 768px) {
  .card-wrapper {
    grid-template-columns: 1fr;
  }
}

/* ========== Statistics Table ========== */
.stats-table-wrapper {
  margin-top: 2rem;
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  border: 2px solid #2a2a2a;
  color: #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
}

.stats-table th,
.stats-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.stats-table th {
  background-color: #e3f4ea;
  font-weight: 500;
}

.stats-table tbody tr:hover {
  background-color: #f2f2f2;
}

@media (max-width: 768px) {
  .stats-table th,
  .stats-table td {
    padding: 0.75rem;
  }
}

/* ========== Youth Climate Image ========== */
.youth-climate {
  height: auto;
  width: 90%;
  margin: auto;
}

@media (max-width: 1024px) {
  .youth-climate {
    width: 100%;
  }
}
