/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

:root {
  --side-padding-desktop: 0px;
  --side-padding-tablet: 20px;
  --side-padding-mobile: 20px;
  --max-width: 1200px;
}

body {
  background: #fff;
  color: #000;
  overflow-x: hidden;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--side-padding-desktop);
  padding-right: var(--side-padding-desktop);
}

/* TOP SECTION */
.top-section {
  background: #c6e400;
  padding-bottom: 30px;
}

/* NAVBAR */
.navbar {
  padding: 10px 0;
}

.nav-container {
  background: #fff;
  border-radius: 50px;
  padding: 12px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
}

.logo {
  font-weight: bold;
  font-size: 24px;
  flex-shrink: 0;
}

.search-box {
  flex: 1 1 400px; /* flex-grow, flex-shrink, base width */
  max-width: 500px; /* limit search box width */
  margin-left: 20px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 35px 10px 15px;
  border-radius: 30px;
  border: none;
  background: #f1f1f1;
}

.search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: pointer;
}

/* HERO */
.hero {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-title {
  font-family: "Cinzel", serif;
  color: #000;
  font-size: 90px;
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
}

.date {
  font-family: "Cinzel", serif;
  font-weight: 800;
  font-variation-settings:
    "wght" 800,
    "wdth" 75;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: -1px;
  white-space: nowrap;
  align-self: flex-start;
}

/* CATEGORIES */
.categories-section {
  padding-top: 20px;
  margin-top: 20px;
  padding-bottom: 30px;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  margin-top: 10px;
}

/* CATEGORY ITEMS */
.category {
  padding: 12px 24px; /* increased from 8px 16px */
  border-radius: 30px;
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-weight: 500;
  font-size: 16px; /* larger text */
  transition: all 0.2s ease; /* optional: smooth hover effect */
}

.category.active {
  background: #000;
  color: #fff;
}

/* POSTS */
.posts {
  padding: 10px;
}

.posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.posts > * {
  min-width: 0;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.post-actions button {
  border: none;
  background: #eee;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 6px;
}

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card {
  cursor: pointer;
  background: #fff;
  border-radius: 12px;
  /* REMOVE overflow hidden to allow share menu to escape */
  overflow: visible; /* was hidden before */
  position: relative; /* important for absolute positioning inside */
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%; /* 🔥 makes all cards equal */
}

.post-card:hover {
  transform: translateY(-5px);
}

/* CONTENT */
.post-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1; /* 🔥 fills remaining space */
}

/* META (date | category | read time) */
.post-meta {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

.post-meta .divider {
  margin: 0 6px;
}

/* TITLE */
.post-title {
  font-family: 'Inter', sans-serif;
  font-size: 20px; 
  font-weight: 800;
  margin-bottom: 8px;
  cursor: pointer;
  line-height: 1.3;
  letter-spacing: -0.3px;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* 🔥 max 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2
}

/* EXCERPT */
.post-excerpt {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  line-height: 1.5;
  opacity: 0.9;
   display: -webkit-box;
  -webkit-line-clamp: 3; /* 🔥 max 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 3; 
}

/* ACTIONS */
.post-actions {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
}

.post-actions button {
  border: none;
  background: #f1f1f1;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.post-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* important for clean zoom */
  transition: transform 0.4s ease;
}

.post-card:hover .post-image img {
  transform: scale(1.08); /* subtle zoom */
}

.share-menu {
  display: none;
  position: absolute;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  top: 100%; /* place below the button */
  right: 0;
  z-index: 999; /* float above everything else */
  min-width: 140px;
}

.share-menu a {
  display: block;
  padding: 6px 10px;
  text-decoration: none;
  color: #000;
  font-size: 14px;
}

.share-menu a:hover {
  background: #f5f5f5;
}

.share-menu.show {
  display: block;
}

.share-wrapper {
  position: relative; /* keep for button/menu alignment */
  display: inline-block;
  z-index: 100; /* ensures it floats above other elements */
}

.post-card.active {
  z-index: 1000;
}

.love-btn.liked {
  background: #ff4d6d;
  color: white;
  cursor: not-allowed;
  opacity: 0.8;
}

.hero,
.categories-section {
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: 50px;   /* 🔥 controls size globally */
  width: auto;
  object-fit: contain;
  display: block;
  border-radius: 10px;
}

/* BROWSE SECTION */
.browse-section {
  margin: 40px auto;
}

.browse-title {
  font-family: "Cinzel", serif;
  font-size: 40px;
  font-weight: 900;
  margin-bottom: 20px;
}

/* horizontal scroll */
/* .browse-slider {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
} */

.browse-slider::-webkit-scrollbar {
  display: none; /* chrome */
}

.browse-item {
  flex: 0 0 auto;
  padding: 12px 22px;
  background: #eee;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.3s;
}

.browse-item:hover {
  background: #000;
  color: #fff;
}

.browse-section {
  grid-column: 1 / -1; /* 🔥 span full width */
  margin: 30px 0;
}

.browse-slider {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-behavior: smooth;
}

.browse-slider::-webkit-scrollbar {
  display: none;
}

.browse-item {
  flex: 0 0 auto;

  width: 90px;
  height: 90px;            /* 🔥 makes it a circle */
  border-radius: 50%;       /* 🔥 perfect circle */

  background: #eee;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
  padding: 10px;

  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;

  /* 🔥 allow wrapping by WORDS only */
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;

  transition: 0.3s;
}

.browse-container {
  position: relative;
  display: flex;
  align-items: center;
}

/* Buttons */
.browse-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;

  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #000;
  color: #fff;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Position buttons */
.browse-btn.prev {
  left: -10px;
}

.browse-btn.next {
  right: -10px;
}

/* Give space so buttons don’t overlap items */
.browse-slider {
  margin: 0 40px;
}

/* LOAD MORE BUTTON */
.load-more-container {
  display: flex;
  justify-content: center;   /* 🔥 centers horizontally */
  align-items: center;
  margin: 40px 0;           /* space above & below */
}

.load-more-btn {
  padding: 14px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  border: none;

  background: #000;
  color: #fff;

  cursor: pointer;
  transition: all 0.3s ease;
}

/* Hover effect */
.category:hover {
  background: #333;
  transform: translateY(-2px);
}

/* Click effect */
.load-more-btn:active {
  transform: scale(0.97);
}

.post-page {
  max-width: 1200px; /* match container */
  margin: 40px auto;
}

.post-page-title {
  font-family: "Cinzel", serif;
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 10px;
  line-height: 1.2;
}

.post-page-meta {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
}

.post-page-meta .divider {
  margin: 0 8px;
}

.post-page-image img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
}

.post-page-content {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

/* POST PAGE */
.post-full {
  /* max-width: 750px; */
  margin: auto;
}

.post-full-title {
  font-size: 36px;
  margin-bottom: 15px;
  line-height: 1.2;
}

.post-full-excerpt {
  font-size: 18px;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.5;
}

.post-meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 20px;
}

.post-full-image {
  width: 100%;
  max-width: 100%;
  border-radius: 30px; /* 🔥 smoother curve on ALL devices */
  margin: 0 auto 25px auto; /* center it */
  display: block;
}

.post-full-image {
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.post-full-content {
  line-height: 1.8;
  margin-bottom: 30px;
}

/* RELATED */
.related-title {
  margin: 40px 0 20px;
}

.post-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* LEFT: IMAGE */
.post-header-left {
  flex: 1;
  order: 2; /* image below text on mobile */
}

.post-header-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  order: 1; /* text first on mobile */
}

/* HEADER SECTION */
.post-header-section {
  padding: 40px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 25px; /* same as nav-container */
  padding-right: 25px;
}

/* CONTENT SECTION */
.post-content-section {
  padding: 20px 0 40px;
}

.post-header-left img {
  width: 100%;
  border-radius: 30px;
  display: block;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  object-fit: cover;
  max-height: 800px; /* big image */
}

/* TEXT SIDE */
.post-header-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* MAIN LAYOUT */
.post-content-layout {
  display: flex;
  gap: 40px;
}

/* LEFT: CONTENT */
.post-content-main {
  flex: 7; /* 70% */
  min-width: 0;
}

/* RIGHT: ADS */
.post-ads {
  flex: 3; /* 30% */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* AD CARD */
.ad-card img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

.inline-ad {
  margin: 20px 0;
}

.inline-ad img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

.ad-card {
  position: relative; /* needed for absolute positioning */
  display: block;
  object-fit: contain;
}

.ad-label {
  position: absolute;
  top: 5px;
  left: 5px;
  font-size: 12px; /* small text */
  font-weight: normal;
  color: black; /* plain text */
  background: rgba(255, 255, 255, 0.7); /* faded white */
  border-radius: 50%; /* small round */
  width: 20px;  /* adjust size */
  height: 20px; /* adjust size */
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* doesn’t block clicks */
}
.ad-card img {
  width: 100%;              /* fill container width */
  aspect-ratio: 1 / 1;      /* make square */
  object-fit: contain;       /* show full image without cropping */
  display: block;            /* remove inline gaps */
}

mark {
  background: #c6e400;
  color: #000;
  padding: 2px 4px;
  border-radius: 4px;
}

.search-suggestions {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  max-height: 250px;
  overflow-y: auto;
  display: none;
  z-index: 999;
}

.search-suggestions div {
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.search-suggestions div:hover {
  background: #f5f5f5;
}

.search-suggestions .active {
  background: #eaeaea;
}

.breadcrumb {
  font-size: 14px;
  margin: 15px 0;
  color: #777;
  padding-left: 30px;
}

.breadcrumb a {
  text-decoration: none;
  color: #333;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.separator {
  margin: 0 6px;
}

.footer {
  background: #f8f8f8;
  border-top: 1px solid #eee;
  margin-top: 60px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding: 40px 0;
  flex-wrap: wrap;
}

.footer-social a {
  display: inline-block;              /* 🔥 makes it button-like */
  padding: 8px 14px;
  border: 1.5px solid #c6e400;        /* 🔥 your brand color */
  border-radius: 30px;                /* 🔥 rounded pill shape */
  text-decoration: none;
  color: #000;
  font-size: 14px;
  margin-right: 8px;
  margin-bottom: 8px;
  transition: all 0.25s ease;
}

.footer-social a:hover {
  background: #c6e400;
  color: #000;
  transform: translateY(-2px);
}

.footer h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.footer p {
  color: #666;
  font-size: 14px;
}

.footer h4 {
  margin-bottom: 10px;
  font-size: 14px;
}

.footer a {
  display: block;
  text-decoration: none;
  color: #000;
  font-size: 14px;
  margin-bottom: 6px;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid #eee;
  padding: 15px 0;
  text-align: center;
  font-size: 13px;
  color: #666;
}

/* MOBILE */
@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
  }
}

@media (min-width: 1024px) {
  .post-ads {
    position: sticky;
    top: 100px;
  }
}

@media (max-width: 1024px) {
  .post-content-layout {
    flex-direction: column;
  }

  .post-ads {
    display: none; /* hide sidebar ads */
  }
}

/* 🔥 DESKTOP ONLY: PERFECT 2-COLUMN */
@media (min-width: 1024px) {
  .post-header {
    flex-direction: row;
    align-items: flex-start;
    gap: 50px;
  }

  .post-header-left,
  .post-header-right {
    flex: 1;
    order: initial; /* reset order */
  }

  /* 🔥 RESET ORDER FOR DESKTOP */
  .post-header-left {
    order: 1; /* image LEFT */
  }

  .post-header-right {
    order: 2; /* text RIGHT */
  }

  /* 🔥 IMPORTANT: DO NOT FORCE IMAGE SIZE */
  .post-header-left img {
    width: 100%;
    height: auto; /* maintain aspect ratio */
    max-height: 700px; /* bigger on large screens */
  }
}

@media (max-width: 768px) {
  .browse-btn {
    display: none;
  }

  .browse-slider {
    margin: 0; /* reset spacing */
  }
}

@media (max-width: 1024px) {
  .posts {
    grid-template-columns: repeat(2, 1fr); /* tablet */
  }
}

@media (max-width: 768px) {
  .posts {
    grid-template-columns: 1fr; /* single column on mobile */
  }
}

@media (min-width: 1280px) {
  .browse-item {
    width: 160px;
    height: 160px;
    font-size: 16px;
  }
}

/* MEDIA QUERIES: TABLET & MOBILE */
@media (max-width: 1024px) {
  .hero {
    padding: 30px 60px;
  }
  .hero-title {
    font-size: 60px;
  }
  .date {
    font-size: 22px;
  }
  .nav-container {
    padding: 15px 20px;
  }
  .categories-section {
    padding: 0 60px;
    padding-bottom: 25px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 20px 40px;
    gap: 20px;
  }
  .hero-title {
    font-size: 45px;
  }
  .date {
    font-size: 18px;
  }
  .search-box {
    margin-left: 15px;
  }
  .categories-section {
    padding: 0 40px;
    padding-bottom: 20px;
  }
  .category {
    padding: 10px 20px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 15px 20px;
  }
  .hero-title {
    font-size: 36px;
  }
  .date {
    font-size: 16px;
  }

  .categories-section {
    padding: 0 20px;
    padding-bottom: 15px;
  }

  /* NAVBAR FIX: keep logo + search horizontal on small mobile */
  .nav-container {
    flex-direction: row; /* keep horizontal */
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
  }

  .logo {
    font-size: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .logo img {
  height: 40px;   /* main control — adjust if needed */
  width: auto;    /* keeps aspect ratio */
  max-height: 100%; /* prevents overflow */
  object-fit: contain;
  display: block;
}

  .search-box {
    flex: 1 1 auto; /* grow to remaining space */
    max-width: none; /* allow flexible width */
    margin-left: 10px;
  }

  .search-box input {
    font-size: 14px; /* smaller text on mobile */
    padding: 8px 30px 8px 12px; /* smaller padding */
  }

  .search-icon {
    right: 8px;
  }
}

@media (max-width: 480px) {
  .share-menu {
    right: auto;
    left: 0;
  }
}

@media (max-width: 1024px) {
  .container {
    padding-left: var(--side-padding-tablet);
    padding-right: var(--side-padding-tablet);
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: var(--side-padding-mobile);
    padding-right: var(--side-padding-mobile);
  }
}
