:root {
  --primary-color: #ff4757;
  --secondary-color: #2f3542;
  --accent-color: #ff6b81;
  --light-bg: #f1f2f6;
  --dark-text: #2f3542;
  --light-text: #f1f2f6;
}

/* Base Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-bg);
  color: var(--dark-text);
}

/* Navigation */
.navbar-brand {
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--primary-color);
}

.main-nav {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-link {
  font-size: 1.2rem; /* Increase or decrease as needed (e.g., 0.95rem or 1.1rem) */
  margin-right: 1.5rem; /* Adds spacing between links */
  font-weight: 500;
  color: var(--secondary-color);
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.nav-link:last-child {
  margin-right: 0; /* Avoid extra space on the last item */
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-icon {
  font-size: 1.2rem;
  margin-right: 0.3rem;
}

/* Trending Section */
.trending-section {
  background-color: var(--secondary-color);
  color: white;
  padding: 0.5rem 0;
}

.trending-link {
  color: white;
  text-decoration: none;
  margin: 0 1rem;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.trending-link:hover {
  color: var(--accent-color);
}

/* Search Components */
.search-box {
  position: relative;
  max-width: 300px;
}

.search-input {
  border-radius: 50px;
  padding-left: 2.5rem;
  border: 1px solid #ddd;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
}

/* Card Components */
.card-tag-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 2;
}

.card-img-container {
  position: relative;
}

.content-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 1.5rem;
  border: 0;
}

.content-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card-img-top {
  height: 220px;
  object-fit: cover;
  width: 100%;
}

.card-title {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: bold;
  line-height: 1.2;
  height: auto;
}

/* Desktop (≥ 992px) */
@media (min-width: 992px) {
  .card-title {
    font-size: 1rem;
    line-height: 1.3rem;
    height: 2.6rem;
  }
}

/* Tablet (≥ 768px and < 992px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .card-title {
    font-size: 0.95rem;
    line-height: 1.25rem;
    height: 2.5rem;
  }
}

/* Mobile (< 768px) */
@media (max-width: 767.98px) {
  .card-title {
    font-size: 1.25rem;
    line-height: 1.4rem;
    min-height: 2.4rem;
  }
}


/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background-color: white;
  z-index: 1050;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.show {
  right: 0;
}

.mobile-menu-header {
  padding: 1rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-menu-body {
  padding: 1rem;
}

.mobile-menu-link {
  display: block;
  padding: 0.75rem 0;
  color: var(--dark-text);
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
}

.mobile-menu-link:hover {
  color: var(--primary-color);
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.menu-overlay.show {
  opacity: 1;
  visibility: visible;
}

.mobile-search-container {
  display: none;
  padding: 1rem;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Footer */
.main-footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 2rem 0;
}

.footer-link {
  color: #ccc;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: white;
}

.footer-title {
  color: white;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Post Content */
.post-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

.post-title {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.post-meta {
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.post-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.post-text {
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Sidebar */
.sidebar {
  position: -webkit-sticky; /* For Safari */
  position: sticky;
  top: 80px;
  height: fit-content;
  align-self: flex-start;
}

.ad-container {
  margin-bottom: 1.5rem;
  /*background: white;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);*/
  overflow: hidden;
}

.ad-placeholder {
  width: 100%;
  padding: 1rem;
  text-align: center;
  background: #f8f9fa;
  color: #666;
}

/* Related Posts */
.related-posts {
  margin-top: 3rem;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary-color);
}

/* Responsive Breakpoints */
@media (max-width: 991.98px) {
  .sidebar {
    margin-top: 2rem;
  }

  .mobile-search-container .search-box {
    max-width: 100%;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .desktop-search {
    display: none;
  }

  .mobile-search-container {
    display: block;
  }
}

@media (min-width: 992px) {
  .mobile-menu-btn {
    display: none;
  }

  .mobile-search-container {
    display: none;
  }
}


.card-img-container {
  position: relative; /* important */
  border-radius: 0.5rem;
  overflow: hidden;
}

.card-overlay-tags {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 2;
}

.card-overlay-tags .tag-overlay {
  background-color: #cc0000;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
}



.gallery-thumbnails img.fixed-thumb {
  height: 160px;
  object-fit: cover;
  width: 100%;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.gallery-thumbnails img.fixed-thumb:hover {
  transform: scale(1.03);
}


.video-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.video-wrapper video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fixed-height-player {
  height: 540px !important; /* or 480px, 540px etc */
  width: 100% !important;
  object-fit: cover; /* optional: crop excess video */
}

.post-title {
  font-size: 1.4rem;       /* 24px on mobile */
  font-weight: 700;        /* Slightly bolder for emphasis */
  line-height: 1.3;
  text-decoration: none;
  color: #000;
  margin-bottom: 0.5em;
  display: block;

  @media (min-width: 768px) {
    font-size: 1.55rem;     /* ~28px on tablet */
  }

  @media (min-width: 992px) {
    font-size: 1.65rem;     /* ~36px on small desktops */
  }

  @media (min-width: 1200px) {
    font-size: 1.8rem;      /* ~40px on large screens */
  }
}

.video-title {
  /* Base mobile-first sizing */
  font-size: 1.4rem; /* 24px */
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  color: #000;
  display: block;
  margin-bottom: 0.5em;

  /* Desktop scaling */
  @media (min-width: 768px) {
    font-size: 1.5rem; /* 28.8px */
  }

  @media (min-width: 992px) {
    font-size: 1.6rem; /* 35.2px */
  }

  @media (min-width: 1200px) {
    font-size: 1.6rem; /* 41.6px */
  }
}

.badge { margin: 0 10px 0 0; font-weight: normal; }
