/* Home Page Styles - Mobile First */

/* Hero Section - Mobile */
.hero-section {
  padding: 20px 0;
  color: #ffffff;
}

.hero-content {
  display: flex;
  flex-direction: column;
}

.hero-main {
  order: -1; /* Main content first on mobile */
  border-bottom: 1px solid #fff1eb11;
  padding-bottom: 50px;
}

.featured-post {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.featured-image {
  width: 100%;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 271px;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.featured-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.featured-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  font-family: "Eudoxus Sans", sans-serif;
  font-weight: 400;
  line-height: 1;
}

.featured-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.6px;
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  text-align: center;
}

.featured-title a {
  color: #ffffff;
  text-decoration: none;
}

.featured-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  line-height: 1.4;
  font-family: "Eudoxus Sans", sans-serif;
  font-weight: 400;
}

.featured-subtitle > p {
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 125%;
  text-align: center;
  opacity: 0.5;
  letter-spacing: -0.44px;
  text-transform: capitalize;
}

.featured-author {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-family: "Eudoxus Sans", sans-serif;
  font-weight: 500;
  margin: 0;
}

/* Sidebar Posts - Mobile */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 50px;
  border-top: 1px solid #fff1eb11;
  padding-bottom: 50px;
}

.sidebar-post {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin: 0;
  border: none;
}

.sidebar-post:last-child {
  border: none;
  margin: 0;
  padding: 0;
}

.sidebar-thumbnail {
  width: 100%;
  overflow: hidden;
}

.sidebar-thumbnail img {
  width: 100%;
  height: 220.932px;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.sidebar-thumbnail-small {
  /* width: 100%; */
  overflow: hidden;
}

.sidebar-thumbnail-small img {
  width: auto;
  height: 77px;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.sidebar-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-title {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.51px;
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  width: 100%;
}

.sidebar-title a {
  color: #ffffff;
  text-decoration: none;
}

.sidebar-small-title {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.51px;
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

.sidebar-small-title a {
  color: #ffffff;
  text-decoration: none;
}

.sidebar-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  gap: 5px;
  flex-direction: column;
  align-items: flex-start;
  font-family: "Eudoxus Sans", sans-serif;
  font-weight: 500;
  margin: 0;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: capitalize;
}

.author-avatar {
  border-radius: 50%;
  width: 24px;
  height: 24px;
}

/* Compact sidebar posts */
.sidebar-post.compact {
  display: flex;
  flex-direction: row;
  gap: 12px;
  padding: 0;
  margin: 0;
  border: none;
}

.sidebar-post.compact:last-child {
  border: none;
  margin: 0;
  padding: 0;
}

/* Section Headers - Mobile */
.section-header,
.podcast-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.kini-section-header-container {
  margin-bottom: 30px;
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-title,
.section-podcast-title {
  font-size: 30px;
  width: 149px;
  font-weight: 500;
  color: #ffffff;
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  line-height: 1.15;
  text-transform: capitalize;
}

.see-more-btn {
  background: none;
  border: 1px solid rgba(255, 241, 235, 0.2);
  color: #ffffff;
  padding: 12px 16px;
  text-decoration: none;
  border-radius: 32px;
  font-size: 12px;
  font-family: "Eudoxus Sans", sans-serif;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
  white-space: nowrap;
}

.see-more-btn:hover {
  background: rgba(255, 241, 235, 0.1);
  border-color: rgba(255, 241, 235, 0.4);
  color: #ffffff;
}

/* Trending News - Mobile */
.trending-section {
  padding: 0;
}

.trending-section,
.kini-big-deal-section,
.global-updates-section,
.policy-ethics-section,
.product-spotlight-section,
.ai-africa-section,
.podcast-video-section,
.dynamic-category-section {
  border-top: 1px solid #fff1eb05;
  padding-top: 50px;
  padding-bottom: 50px;
}

.trending-posts,
.trending-podcast-posts {
  gap: 24px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.trending-posts::-webkit-scrollbar,
.trending-podcast-posts::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.trending-post,
.podcast-post {
  /* flex: 0 0 auto; */
  width: calc(100vw - 48px); /* Full width minus container padding */
  max-width: 400px;
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-bottom: 15px;
}

.trending-thumbnail {
  width: 100%;
  overflow: hidden;
}

.trending-thumbnail img {
  width: auto;
  height: 77px;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.trending-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trending-title {
  font-size: 20px;
  font-weight: 500;
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  letter-spacing: 0.51px;
  line-height: 1.15;
}

.trending-title a {
  color: #ffffff;
  text-decoration: none;
}

.trending-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  gap: 8px;
  font-family: "Eudoxus Sans", sans-serif;
  font-weight: 500;
  align-items: center;
  margin: 0;
}

/* Trending Slideshow Controls */
.trending-section {
  position: relative;
}

.trending-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.trending-nav {
  display: none; /* Hide navigation on mobile */
  gap: 8px;
}

.trending-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 20px;
}

.trending-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.trending-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Grid Sections - Mobile */
.section-posts {
  display: flex;
  flex-direction: column;
  /* overflow-x: auto; */
  /* gap: 40px; */
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.section-posts::-webkit-scrollbar {
  display: none;
}

.section-post {
  flex: 0 0 auto;
  width: calc(100vw - 48px);
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-bottom: 1px solid red;
  padding-bottom: 20px;
  padding-top: 20px;
  border: none;
  margin: 0;
  transition: all 0.3s ease;
}

.section-post:hover {
  opacity: 0.9;
}

.post-thumbnail {
  width: 100%;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: 220.288px;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.post-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-title {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.51px;
  margin: 0 0 8px 0;
  font-family: "Unbounded", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  max-width: 294px;
  max-height: 69px; /* ~3 lines at 1.15 line-height */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.post-title a {
  color: #ffffff;
  text-decoration: none;
}

.post-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  line-height: 1.4;
  font-family: "Eudoxus Sans", sans-serif;
  font-weight: 400;
  width: 294px;
  height: 40px;
  opacity: 0.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 20px;
}

.post-subtitle p {
  margin: 0;
  font-family: "Eudoxus Sans";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  text-transform: capitalize;
  opacity: 0.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  gap: 24px;
  flex-direction: column;
  justify-content: space-between;
  font-family: "Eudoxus Sans", sans-serif;
  font-weight: 500;
  margin: 0;
}

.post-date {
  /* color: #fff; */
  font-family: "Eudoxus Sans", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

/* AI in Africa Section - Mobile */
.ai-africa-section {
  padding: 32px 0;
}

.ai-africa-section .section-posts {
  margin-top: 24px;
}

.section-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}

.filter-buttons::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  background: transparent;
  border: 1px solid rgba(255, 241, 235, 0.2);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 64px;
  font-size: 12px;
  font-family: "Eudoxus Sans", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: -0.14px;
  white-space: nowrap;
  font-weight: 500;
  text-transform: capitalize;
}

.filter-btn.active {
  border-color: #fff1eb;
}

.filter-btn:hover {
  background: rgba(255, 241, 235, 0.1);
  border-color: rgba(255, 241, 235, 0.4);
}

.navigation-arrows {
  display: none; /* Hide on mobile */
  gap: 8px;
}

.nav-arrow {
  background: transparent;
  border: 1px solid rgba(255, 241, 235, 0.2);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 64px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 20px;
}

.nav-arrow:hover {
  border-color: rgba(255, 241, 235, 0.4);
}

.nav-arrow.left {
  opacity: 0.2;
}

/* Podcast & Video Section - Mobile */
.podcast-video-section {
  padding: 32px 0;
}

.podcast-video-section > .container {
  display: flex;
  flex-direction: column;
}

.podcast-posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.podcast-post {
  display: flex;
  flex-direction: row;
  gap: 12px;
  padding: 0;
}

.podcast-thumbnail {
  width: 100%;
  overflow: hidden;
}

.podcast-thumbnail img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.podcast-title {
  font-size: 17px;
  font-weight: 500;
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  letter-spacing: 0.51px;
  line-height: 1.15;
}

.podcast-title a {
  color: #ffffff;
  text-decoration: none;
}

/* CTA Banner - Mobile */
.cta-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  padding: 32px 0 0 0;
  margin: 32px 0;
  position: relative;
  overflow: visible; /* Allow image to stick out if needed */
}

.cta-content {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0; /* Remove padding to let image be flush */
  background-color: transparent; /* Background on inner wrapper or handle differently? */
  /* The design has orange background behind text and maybe image. */
}

/* We need an orange box. Let's use ::before or style a wrapper. 
   But looking at HTML, cta-content has the background. */

.cta-content {
  background-color: #ed7221;
  padding: 0 0 40px 0px;
  border-radius: 0;
  overflow: visible;
  margin-top: 100px; /* Push down to make room for image sticking up? */
}

.cta-image {
  position: relative;
  margin-top: -140px; /* Pull image up */
  overflow: visible;
  /* margin-bottom: 16px; */
}

.cta-image img {
  width: 355px;
  object-fit: contain;
  display: block;
}

.cta-text {
  color: #ffffff;
  z-index: 3;
  position: relative;
  text-align: center;
  width: 100%;
}

.cta-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 24px;
  font-family: "Unbounded", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  line-height: 1.1;
}

.cta-button {
  background: #000000;
  color: #ffffff;
  padding: 16px 32px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  display: inline-block;
  transition: background 0.3s ease;
  font-family: "Eudoxus Sans", sans-serif;
  font-size: 14px;
}

.cta-button:hover {
  background: #333;
}

/* Tablet Styles */
@media (min-width: 768px) {
  .hero-section {
    padding: 48px 0;
  }

  .hero-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 24px;
  }

  .hero-main {
    order: 0;
  }

  .featured-title {
    font-size: 32px;
  }

  .featured-subtitle {
    font-size: 16px;
  }

  .section-title,
  .section-podcast-title {
    font-size: 32px;
    text-transform: capitalize;
  }

  .sidebar-thumbnail img {
    height: auto;
  }

  .trending-posts,
  .trending-podcast-posts {
    /* display: grid;
    grid-template-columns: repeat(2, 1fr); */
    overflow-x: visible;
  }

  .section-posts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow-x: visible;
  }

  .section-post {
    width: 100%;
    max-width: none;
  }

  .section-controls {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .navigation-arrows {
    display: flex;
  }

  .cta-title {
    font-size: 48px;
  }

  .cta-image {
    display: block;
  }
}

/* Desktop Styles */
@media (min-width: 1024px) {
  .hero-section {
    padding: 64px 0;
  }

  .hero-left {
    border-right: 1px solid #fff1eb05;
    padding-right: 24px;
  }

  .hero-right {
    border-left: 1px solid #fff1eb05;
    padding-left: 24px;
  }

  .hero-sidebar {
    max-width: 322px;
    padding-top: 0px;
    border-top: none;
    padding-bottom: 0px;
  }

  .hero-content {
    gap: 24px;
  }

  .featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .featured-title {
    color: #fff;
    text-align: center;
    font-family: "Unbounded", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-size: 46px;
    font-weight: 500;
    line-height: 110%;
  }

  .featured-subtitle > p {
    font-size: 22px;
    font-style: normal;
    font-weight: 400;
    line-height: 125%;
    letter-spacing: -0.44px;
    text-transform: capitalize;
  }

  .hero-main {
    border-bottom: none;
    padding-bottom: 0px;
  }

  .featured-image img {
    height: 440px;
    margin-bottom: 16px;
    object-fit: cover;
  }

  .sidebar-post.compact {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .sidebar-thumbnail img {
    width: 100%;
    max-width: 322px;
    height: 207.406px;
    object-fit: cover;
  }

  /* .sidebar-content {
    gap: 20px;
  } */

  .sidebar-thumbnail-small > img,
  .trending-thumbnail img {
    width: auto;
    height: 77px;
    aspect-ratio: 1/1;
  }

  .trending-thumbnail {
    width: 100px;
  }

  .sidebar-small-title {
    color: #fff;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 115%;
    letter-spacing: 0.51px;
    width: 100%;
    max-width: 220px;
  }

  .section-title,
  .section-podcast-title {
    font-size: 40px;
    width: auto !important;
    text-transform: capitalize;
  }

  .section-podcast-title {
    width: 375.855px;
    border-right: 1px solid #fff1eb05;
    margin-right: 24px;
  }

  .section-header,
  .podcast-section-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
  }

  .trending-section,
  .kini-big-deal-section,
  .global-updates-section,
  .policy-ethics-section,
  .product-spotlight-section,
  .ai-africa-section,
  .podcast-video-section,
  .dynamic-category-section {
    padding-top: 64px;
    padding-bottom: 0px;
  }

  .trending-content {
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
  }

  .trending-post {
    padding-right: 24px;
    border-right: 1px solid #fff1eb05;
  }

  .trending-posts,
  .trending-podcast-posts {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    /* grid-template-columns: repeat(4, 1fr); */
    gap: 24px;
    box-sizing: content-box;
    width: auto;
    overflow: scroll;
  }

  .trending-podcast-posts {
    overflow-x: auto;
  }

  .podcast-video-section > .container {
    flex-direction: row;
  }

  .trending-title {
    width: 217px;
    font-size: 17px;
  }

  .trending-controls {
    margin-bottom: 48px;
  }

  .section-post {
    display: flex;
    max-width: 294px;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 20px;
    margin-right: 20px;
    border-right: 1px solid #fff1eb05;
  }

  .section-posts {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
  }

  .post-thumbnail {
    width: 100%;
    height: 189.371px;
    align-self: stretch;
    aspect-ratio: 294/189.37;
    object-fit: cover;
  }

  .post-thumbnail img {
    height: 189.371px;
  }

  .post-content {
    display: flex;
    flex-direction: column;
    padding: 0px 0 0 0;
    gap: 5px;
  }

  .post-title {
    color: #fff;
    font-family: "Unbounded", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-size: 20px;
    font-weight: 500;
    line-height: 115%;
    letter-spacing: -0.6px;
    max-width: 294px;
    max-height: 69px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
  }

  .post-subtitle {
    width: 294px;
    height: 40px;
    opacity: 0.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 20px;
  }

  .post-subtitle p {
    color: #fff;
    font-family: "Eudoxus Sans", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    text-transform: capitalize;
    opacity: 0.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .post-meta {
    display: flex;
    gap: 5px;
  }

  .post-date {
    /* color: #fff; */
    font-family: "Eudoxus Sans", sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .author-info {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .sidebar-thumbnail-small img {
    width: auto;
    height: 77px;
  }

  .author-avatar {
    width: 24px;
    height: 24px;
  }

  .author .post-author {
    color: #fff;
    font-family: "Eudoxus Sans", sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 100%;
    opacity: 0.5;
    text-transform: capitalize;
  }

  .ai-africa-section .section-posts {
    margin-top: 48px;
  }

  .podcast-section-header,
  .section-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }

  .cta-banner {
    display: flex;
    align-items: center;
  }

  .cta-content {
    padding: 64px 80px 32px 80px;
  }

  .cta-image {
    width: 278.589px;
    height: 342.267px;
    position: absolute;
    top: 94px;
    left: 0px;
  }

  .cta-title {
    font-size: 56px;
    /* width: 801.344px; */
  }

  .cta-text {
    text-align: center;
  }
}
