@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.blink-animation {
  animation: blink 1s linear infinite;
}
html {
  height: 100%;
}
body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.content-wrap {
  flex: 1;
}
:root {
  --primary-color: #0d253f;
  --secondary-color: #01b4e4;
  --text-color: #333;
  --bg-color: #f4f7f9;
  --border-color: #dee2e6;
}
body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  padding-top: 143px; /* Adjusted to compensate for fixed header */
}
.btn-primary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  font-weight: 500;
}
.btn-primary:hover {
  background-color: #019dc2;
  border-color: #019dc2;
}
.btn-outline-secondary {
  border-color: var(--border-color);
  color: var(--text-color);
}
.btn-outline-secondary:hover {
  background-color: var(--text-color);
  color: #fff;
}

/* modib Header Styles */
.header-modib {
  background-color: #fff;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030; /* Higher than category-bar sticky z-index */
}
.main-header {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border-color);
}
.main-header .nav-link {
  color: #6c757d;
  font-size: 0.9rem;
}
.main-logo {
  max-height: 31px;
}
.brand-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}
.search-form {
  position: relative;
  width: 135px; /* User requested width */
}
.search-form .form-control {
  border-radius: 20px;
  padding: 0.21rem 2.5rem; /* User requested vertical padding */
  background-color: #f1f1f1;
  border: 1px solid #f1f1f1;
}
.search-form .btn {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  color: #6c757d;
  z-index: 4;
}
.user-account {
  color: var(--text-color);
  font-weight: 500;
}

.category-bar {
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.category-bar .nav-link {
  font-weight: 500;
  color: var(--text-color);
  padding: 0.75rem 1rem;
}
.category-bar .nav-link.active,
.category-bar .nav-link:hover {
  color: var(--secondary-color);
}

.content-wrap.sticky-padding {
  padding-top: 60px; /* Adjust to category-bar height */
}

/* Body Content Styles */
.hero-section {
  position: relative;
  width: 100%; /* Responsive width for all screens */
  height: 375px; /* Fixed height for all screens */
  min-height: 375px; /* Ensure minimum height is also fixed */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 0.55rem; /* Adjusted margin for better spacing */
  display: flex; /* Use flexbox for content alignment */
  align-items: flex-end; /* Align content to the bottom */
  color: white; /* Default text color for overlay */
}

.hero-section .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Removed background here */
  display: flex;
  align-items: flex-end; /* Align content to the bottom */
  padding: 30px; /* Padding for content inside overlay */
}

.hero-section .hero-content-wrapper {
  max-width: 700px; /* Limit content width for readability */
  width: fit-content; /* Make width fit content */
  padding: 5px 20px; /* Reduced vertical padding for the background */
  background: linear-gradient(
    to right,
    rgba(0, 125, 250, 0.9) 0%,
    transparent 100%
  ); /* Blue gradient behind text */
  border-radius: 5px; /* Slightly rounded corners for the background */
}

.hero-section .hero-content-wrapper p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.hero-section .hero-content-wrapper .d-flex.align-items-center {
  margin-top: -5px; /* Move author info up slightly on desktop */
}

.hero-section .badge {
  background: linear-gradient(
    to right,
    #28a745,
    #ffa500
  ); /* Green to Orange gradient for category badge */
  color: white;
  padding: 0.5em 0.75em;
  border-radius: 0.25rem;
  position: absolute; /* Position for desktop */
  top: 15px; /* Position for desktop */
  right: 15px; /* Position for desktop */
  z-index: 2; /* Ensure it's above the image */
}

.badge-gradient-modib {
  background: linear-gradient(
    to right,
    #28a745,
    #ffa500
  ); /* Green to Orange gradient for category badge */
  color: white;
}

.hero-section .hero-content-wrapper .btn-primary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  font-weight: 500;
  padding: 10px 25px;
  border-radius: 5px;
}
.hero-section .hero-content-wrapper small {
  color: #fff !important;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  /* Smaller screens (mobile) */
  .hero-author-name-mobile {
    font-size: 0.8rem; /* Smaller font size for author name on mobile */
  }
  .hero-author-info-mobile {
    margin-top: -5px; /* Move author info up slightly */
  }
  .hero-section .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    margin-bottom: 0 !important;
  }
  .hero-section {
    height: 265px; /* Adjusted height for mobile */
    min-height: 265px; /* Adjusted height for mobile */
  }
  .hero-section .hero-overlay {
    padding: 15px; /* Lowered padding to bring content down */
  }
  .hero-section .hero-content-wrapper {
    padding: 2px 15px; /* Reduced vertical padding */
  }
  .hero-section .hero-content-wrapper h1 {
    font-size: 1.2rem; /* Adjusted title font size for mobile */
    line-height: 1.3; /* Ensure enough space for two lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 10px; /* Lower the title slightly */
  }
  .hero-section .hero-content-wrapper h1 a:hover,
  .hero-section .hero-content-wrapper h1 a:active {
    color: #ffa500 !important; /* Orange color on hover/click */
  }
  .hero-section .hero-content-wrapper p {
    display: none; /* Hide description on very small screens */
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  /* Tablet screens */
  .hero-section .hero-content-wrapper h1 {
    font-size: 2rem;
  }
}

/* Hero Carousel Styling */
#heroCarousel {
  margin-bottom: 0.55rem;
}

#heroCarousel .carousel-item {
  transition: opacity 0.6s ease-in-out;
}

/* Carousel Controls (Prev/Next Buttons) */
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
  width: 50px;
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  opacity: 0.7;
  transition: all 0.3s ease;
}

#heroCarousel .carousel-control-prev {
  left: 15px;
}

#heroCarousel .carousel-control-next {
  right: 15px;
}

#heroCarousel .carousel-control-prev:hover,
#heroCarousel .carousel-control-next:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.5);
}

#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon {
  width: 24px;
  height: 24px;
}

/* Carousel Indicators (Dots) */
#heroCarousel .carousel-indicators {
  bottom: 15px;
  margin-bottom: 0;
  z-index: 3;
}

#heroCarousel .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  opacity: 0.7;
  transition: all 0.3s ease;
}

#heroCarousel .carousel-indicators .active {
  background-color: rgba(255, 255, 255, 1);
  opacity: 1;
  transform: scale(1.2);
}

/* Mobile adjustments for carousel controls */
@media (max-width: 767.98px) {
  #heroCarousel .carousel-control-prev,
  #heroCarousel .carousel-control-next {
    width: 40px;
    height: 40px;
  }

  #heroCarousel .carousel-control-prev {
    left: 10px;
  }

  #heroCarousel .carousel-control-next {
    right: 10px;
  }

  #heroCarousel .carousel-control-prev-icon,
  #heroCarousel .carousel-control-next-icon {
    width: 20px;
    height: 20px;
  }

  #heroCarousel .carousel-indicators {
    bottom: 10px;
  }

  #heroCarousel .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
  }
}
.post-card {
  position: relative; /* Added for absolute positioning of badge */
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 20px;
  background-color: #fff;
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.post-card img {
  height: 200px;
  object-fit: cover;
}

/* Horizontal Scroll Container for News Widget */
.horizontal-scroll-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.horizontal-scroll-wrapper {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
  padding-bottom: 10px;
}

/* Hide scrollbar for webkit browsers (Chrome, Safari) */
.horizontal-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

/* Desktop: 4 cards visible */
.scroll-card-item {
  flex: 0 0 calc(25% - 0.375rem);
  min-width: calc(25% - 0.375rem);
}

/* Mobile: 2 cards visible */
.scroll-card-item.scroll-card-mobile {
  flex: 0 0 calc(50% - 0.25rem);
  min-width: calc(50% - 0.25rem);
}

.scroll-card-item .post-card {
  margin-bottom: 0;
}
.sidebar-ads .ad-space-container:not(:last-child) {
  margin-bottom: 1.5rem;
}
.sidebar-ad-image {
  height: 275px;
  object-fit: cover;
  width: 100%; /* Ensure it takes full width of its container */
}

/* Beritasatu Widget Styles */
.beritasatu-widget-container {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background-color: #fff;
}

.beritasatu-network-iframe {
  display: block;
  width: 100%;
  border: none;
  border-radius: 8px;
}

/* Network Widget Styles (Generic for all network widgets) */
.network-widget-container {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1rem; /* Reduced default spacing */
  line-height: 0; /* Remove line-height gap below iframe */
}

.network-widget-iframe {
  display: block;
  width: 100%;
  border: none;
  border-radius: 8px;
  height: 1030px; /* Increased slightly to prevent title cutoff */
  margin: 0;
  padding: 0;
}

/* Responsive adjustments for Beritasatu Widget */
@media (max-width: 767.98px) {
  .beritasatu-network-iframe {
    height: 1020px !important; /* Optimized height for mobile - shows all titles without excess white space */
  }

  .network-widget-iframe {
    height: 1060px; /* Adjusted to 1060px: Sweet spot between 1040px (cut title) and 1070px (too much whitespace) */
  }

  .network-widget-container {
    margin-bottom: 1.25rem; /* Adjusted spacing with ads below on mobile */
  }
}

@media (min-width: 768px) {
  .beritasatu-network-iframe {
    height: 1020px !important; /* Optimized height for desktop - shows full content without excess space */
  }

  .network-widget-iframe {
    height: 1030px; /* Adjusted height for desktop */
  }
}

/* Dark mode support for Beritasatu Widget */
body.dark-mode .beritasatu-widget-container {
  background-color: #1a1a1a;
  border: 1px solid #333;
}


.section-title {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}
.popular-news-widget .card-header h5 {
  font-size: 1rem;
  font-weight: 600;
}
.post-detail-image {
  max-height: 350px;
  object-fit: cover;
  width: 100%;
  border-radius: 0;
}
@media (max-width: 767.98px) {
  .post-detail-image {
    height: 250px;
  }
}
.popular-news-widget .card-header h5 {
  font-size: 1rem;
  font-weight: 600;
}
.post-content p {
  font-size: 0.95rem;
  line-height: 1.9;
  margin-bottom: 1.25rem;
  color: var(--text-color);
}

/* Remove extra margin from last paragraph */
.post-content p:last-child {
  margin-bottom: 0;
}

/* Ensure empty paragraphs don't take space */
.post-content p:empty {
  display: none;
  margin: 0;
  padding: 0;
}
.post-content img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive video container */
.video-responsive {
  overflow: hidden;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  position: relative;
  height: 0;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}
.video-responsive iframe,
.video-responsive object,
.video-responsive embed {
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  position: absolute;
}

.image-description-caption {
  font-style: italic;
  background-color: #f8f9fa; /* Warna latar belakang terang */
  padding: 0.75rem 1.5rem; /* Adjusted top/bottom padding */
  border-radius: 0.25rem;
  display: block; /* Mengambil lebar penuh */
  margin-left: 0; /* Menghilangkan margin auto */
  margin-right: 0; /* Menghilangkan margin auto */
}
@media (min-width: 768px) {
  /* Corresponds to -md- breakpoint */
  .image-description-caption {
    padding-left: 3rem; /* For px-md-5 */
    padding-right: 3rem; /* For px-md-5 */
  }
}

/* ===== NEW HEADER DESIGN STYLES ===== */

/* Breadcrumb Navigation */
.breadcrumb-nav {
  display: flex;
  list-style: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-color);
}

.breadcrumb-nav .breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-nav .breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  padding: 0 0.5rem;
  color: #6c757d;
}

.breadcrumb-nav .breadcrumb-item a {
  color: #dc3545;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-nav .breadcrumb-item a:hover {
  color: #c82333;
  text-decoration: underline;
}

.breadcrumb-nav .breadcrumb-item.active {
  color: #6c757d;
}

/* Article Title - Larger and More Prominent */
.article-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-color);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .article-title {
    font-size: 1.75rem;
  }
}

/* Inline Share Buttons - Circular Icons */
.inline-share-buttons {
  display: flex;
  gap: 0.5rem;
}

.share-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.share-icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Brand Colors for Each Platform */
.share-icon-btn.facebook-btn {
  background-color: #1877f2;
}

.share-icon-btn.facebook-btn:hover {
  background-color: #0c63d4;
}

.share-icon-btn.twitter-btn {
  background-color: #000000;
}

.share-icon-btn.twitter-btn:hover {
  background-color: #333333;
}

.share-icon-btn.telegram-btn {
  background-color: #0088cc;
}

.share-icon-btn.telegram-btn:hover {
  background-color: #006699;
}

.share-icon-btn.whatsapp-btn {
  background-color: #25d366;
}

.share-icon-btn.whatsapp-btn:hover {
  background-color: #1da851;
}

.share-icon-btn.copy-btn {
  background-color: #dc3545;
}

.share-icon-btn.copy-btn:hover {
  background-color: #c82333;
}

.share-icon-btn.copy-btn.copied {
  background-color: #28a745;
}

/* Mobile Responsive for New Header */
@media (max-width: 576px) {
  .article-title {
    font-size: 1.25rem;
  }

  /* Hide share buttons in header on mobile */
  .header-share-buttons {
    display: none !important;
  }
}

/* Mobile Share Section (Below Image Description) */
.mobile-share-section {
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

body.dark-mode .mobile-share-section {
  border-color: #444;
}

.share-icon-btn-mobile {
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
}

/* Dark Mode Support for New Header */
body.dark-mode .breadcrumb-nav .breadcrumb-item a {
  color: #ff6b6b;
}

body.dark-mode .breadcrumb-nav .breadcrumb-item a:hover {
  color: #ff5252;
}

body.dark-mode .breadcrumb-nav .breadcrumb-item.active {
  color: #adb5bd;
}

body.dark-mode .article-title {
  color: #f8f9fa;
}

body.dark-mode .article-header-container {
  background-color: #1a1a1a;
}

body.dark-mode .author-avatar {
  border: 2px solid #444;
}

/* Dark Mode for Article Content */
body.dark-mode .article-container {
  background-color: #1a1a1a !important;
  color: #e9ecef;
}

body.dark-mode .post-content {
  color: #e9ecef;
}

body.dark-mode .post-content p {
  color: #e9ecef;
}

body.dark-mode .post-content h1,
body.dark-mode .post-content h2,
body.dark-mode .post-content h3,
body.dark-mode .post-content h4,
body.dark-mode .post-content h5,
body.dark-mode .post-content h6 {
  color: #f8f9fa;
}

body.dark-mode .image-description-caption {
  background-color: #2d2d2d !important;
  color: #adb5bd !important;
}

/* ===== END NEW HEADER DESIGN STYLES ===== */

/* Modern Share Button Styles */
.share-button-modern {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.share-button-modern:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.share-button-modern:active {
  transform: translateY(0);
}

.share-button-modern i {
  font-size: 0.9rem;
}

/* Share Modal Styles */
.share-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.share-modal.active {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

.share-modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 24px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: scale(0.7);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.share-modal.active .share-modal-content {
  transform: scale(1);
  opacity: 1;
}

.share-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
}

.share-modal-close:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: rotate(90deg);
}

.share-modal-header {
  text-align: center;
  margin-bottom: 30px;
}

.share-modal-icon {
  font-size: 2.2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
}

.share-modal-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 8px;
}

.share-modal-header p {
  color: #718096;
  font-size: 0.8rem;
  margin: 0;
}

.share-modal-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.share-modal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: white;
  text-decoration: none;
  color: #1a202c;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.share-modal-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.share-modal-btn-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 1.3rem;
  color: white;
}

.whatsapp-modal-btn .share-modal-btn-icon {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.whatsapp-modal-btn:hover {
  border-color: #25d366;
}

.facebook-modal-btn .share-modal-btn-icon {
  background: linear-gradient(135deg, #1877f2 0%, #0c63d4 100%);
}

.facebook-modal-btn:hover {
  border-color: #1877f2;
}

.twitter-modal-btn .share-modal-btn-icon {
  background: #000000;
}

.twitter-modal-btn:hover {
  border-color: #000000;
}

.copy-modal-btn .share-modal-btn-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.copy-modal-btn:hover {
  border-color: #667eea;
}

.copy-modal-btn.copied {
  border-color: #10b981;
  background: #f0fdf4;
}

.copy-modal-btn.copied .share-modal-btn-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Mobile Responsive Styles */
@media (max-width: 767.98px) {
  .share-button-modern {
    padding: 7px 14px;
    font-size: 0.75rem;
  }

  .share-button-text {
    display: inline;
  }

  .share-modal-content {
    padding: 30px 20px;
    max-width: 95%;
  }

  .share-modal-header h3 {
    font-size: 1.2rem;
  }

  .share-modal-header p {
    font-size: 0.75rem;
  }

  .share-modal-icon {
    font-size: 2rem;
  }

  .share-modal-buttons {
    gap: 12px;
  }

  .share-modal-btn {
    padding: 14px 10px;
    font-size: 0.75rem;
  }

  .share-modal-btn-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    margin-bottom: 6px;
  }
}

@media (max-width: 576px) {
  .share-button-text {
    display: none;
  }

  .share-button-modern {
    padding: 10px;
    width: 40px;
    height: 40px;
    justify-content: center;
  }

  .share-button-modern i {
    font-size: 1rem;
  }
}

/* Dark Mode Support for Share Modal */
body.dark-mode .share-modal-content {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

body.dark-mode .share-modal-header h3 {
  color: #e2e8f0;
}

body.dark-mode .share-modal-header p {
  color: #a0aec0;
}

body.dark-mode .share-modal-btn {
  background: #374151;
  color: #e2e8f0;
}

body.dark-mode .share-modal-btn:hover {
  background: #4b5563;
}

body.dark-mode .share-modal-close {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

body.dark-mode .share-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .copy-modal-btn.copied {
  background: #064e3b;
}

/* Line Clamp for consistent text display */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.popular-news-title {
  font-size: 0.8rem; /* Desired font size */
  line-height: 1.2; /* Desired line height */
  display: -webkit-box !important;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
.main-header .search-form {
  order: 3;
  width: 200px; /* Adjusted width - smaller */
  margin-top: 1rem;
}
.main-header .col-lg-3.order-lg-3 {
  order: 2;
}
.container {
  max-width: 1050px;
}

/* Widget Card Slider Styles */
.widget-modib-card-slider {
  background: linear-gradient(
    to right,
    #0d253f,
    #01b4e4
  ); /* Attractive background */
  border-radius: 5px; /* Even smaller border-radius */
  padding: 5px; /* Significantly reduced padding */
  margin-top: 0rem; /* Reduced margin */
}
@media (max-width: 767.98px) {
  .widget-modib-card-slider {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-radius: 0;
  }
}
.author-avatar {
  width: 20px; /* Minimal size */
  height: 20px; /* Minimal size */
  background-size: cover;
  background-position: center center;
  border: 1px solid #eee; /* Light border */
  border-radius: 50%;
  display: block;
}
/* Removed font-size for consistency with other widgets */
/* .widget-modib-card-slider .card-body .d-flex.align-items-center small {
    font-size: 0.7rem;
} */
.widget-modib-card-slider .section-title {
  color: #fff;
  margin-bottom: 0.5rem; /* Further adjusted margin */
  font-size: 1rem; /* Set to match tab titles */
  font-weight: 600; /* Set to match active tab title */
}
.widget-modib-card-slider .carousel-item {
  padding: 1px 0; /* Minimal padding for cards within carousel */
}
.widget-modib-card-slider .post-card {
  background-color: #fff; /* White background for cards */
  border: none;
  border-radius: 4px; /* Even smaller border-radius */
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Very light shadow */
  transition: transform 0.1s ease;
}
.widget-modib-card-slider .post-card {
  position: relative; /* For absolute positioning of badge */
}
.widget-modib-card-slider .card-category-badge {
  position: absolute;
  top: 10px; /* Adjust as needed */
  right: 10px; /* Adjust as needed */
  z-index: 2; /* Ensure it's above the image */
}
.widget-modib-card-slider .post-card:hover {
  transform: translateY(-1px); /* Minimal lift on hover */
}
.widget-modib-card-slider .post-card img {
  height: 120px; /* Increased image height for better aspect ratio */
  object-fit: cover;
}
.widget-modib-card-slider .post-card .card-body {
  padding: 10px 10px 5px 10px; /* Increased card body padding */
}
.widget-modib-card-slider .post-card .badge {
  font-size: 0.65rem; /* Slightly larger font size */
  padding: 0.25em 0.5em; /* Slightly larger badge padding */
}
.widget-modib-card-slider .post-card .card-title {
  font-size: 0.85rem; /* Slightly larger card title */
  line-height: 1.3; /* Adjusted line height */
  margin-bottom: 0.25rem; /* Reduced margin */
}
.card-body .flex-grow-1 h6 {
  font-size: 0.8rem; /* Smaller font size for title */
  line-height: 1.2; /* Adjust line height */
}
.widget-modib-card-slider .post-card .card-text {
  font-size: 0.7rem; /* Slightly larger card text */
}
.widget-modib-card-slider .carousel-control-prev,
.widget-modib-card-slider .carousel-control-next {
  width: 1.5%; /* Minimal control width */
  opacity: 0.5;
  color: #fff;
}
.widget-modib-card-slider .carousel-control-prev-icon,
.widget-modib-card-slider .carousel-control-next-icon {
  background-image: none;
  font-size: 1rem; /* Very small icons */
}
.widget-modib-card-slider .carousel-control-prev-icon::before {
  content: "\2039"; /* Left angle quote */
}
.widget-modib-card-slider .carousel-control-next-icon::before {
  content: "\203A"; /* Right angle quote */
}

/* Dark Mode Styles */
body.dark-mode {
  background-color: #1a202c; /* Dark background for body */
  color: #e2e8f0; /* Light text color for dark mode */
}

body.dark-mode .header-modib,
body.dark-mode .navbar.bg-white {
  background-color: #2d3748 !important; /* Dark background for header */
}

body.dark-mode .navbar-light .navbar-nav .nav-link {
  color: #e2e8f0 !important; /* Light nav link color */
}

body.dark-mode .btn-outline-secondary {
  border-color: #4a5568;
  color: #e2e8f0;
}

body.dark-mode .btn-outline-secondary:hover {
  background-color: #4a5568;
  color: #fff;
}

body.dark-mode .main-header-row .navbar-brand .brand-text {
  color: #e2e8f0; /* Light brand text color */
}

body.dark-mode .post-card {
  background-color: #2d3748; /* Dark background for post cards */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .post-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

body.dark-mode .section-title {
  color: #e2e8f0; /* Light section title color */
}

body.dark-mode .image-description-caption {
  background-color: #4a5568; /* Darker background for image caption */
  color: #e2e8f0;
}

body.dark-mode .share-buttons-container .share-text {
  color: #e2e8f0; /* Light share text color */
}

body.dark-mode .article-header-container {
  background-color: #2d3748 !important; /* Dark background for article header container */
}

body.dark-mode .article-container.bg-white {
  background-color: #2d3748 !important; /* Dark background for article container */
}

body.dark-mode .text-dark {
  color: #e2e8f0 !important; /* Light text for dark mode */
}

body.dark-mode .text-muted {
  color: #a0aec0 !important; /* Lighter muted text for dark mode */
}

body.dark-mode .alert-info {
  background-color: #2d3748;
  color: #e2e8f0;
  border-color: #4a5568;
}

body.dark-mode .alert-warning {
  background-color: #4a5568;
  color: #e2e8f0;
  border-color: #6b7280;
}

/* Dark Mode specific styles for widgets and posts */
body.dark-mode .modib-news-tabs .list-group-item h6 a {
  color: #e2e8f0 !important; /* Light color for widget titles */
}
body.dark-mode .modib-news-tabs .nav-tabs .nav-link {
  color: #a0aec0 !important; /* Inactive tab link color */
}
body.dark-mode .modib-news-tabs .nav-tabs .nav-link.active {
  color: #e2e8f0 !important; /* Active tab link color */
}
body.dark-mode .modib-news-tabs .tab-content {
  background-color: #2d3748;
}
body.dark-mode .modib-news-tabs .list-group-item {
  background-color: #2d3748;
}
body.dark-mode .modib-news-tabs .list-group-item small {
  color: #a0aec0 !important;
}
body.dark-mode .modib-news-tabs {
  background-color: #2d3748 !important;
}

body.dark-mode .popular-news-widget .card-header {
  background-color: #2d3748 !important;
}
body.dark-mode .popular-news-widget .card-header h5 {
  color: #e2e8f0 !important; /* Light color for popular news widget title */
}
body.dark-mode .popular-news-widget .card-body {
  background-color: #2d3748;
}
body.dark-mode .popular-news-widget .card {
  background-color: #2d3748;
}

body.dark-mode .popular-news-title a {
  color: #e2e8f0 !important; /* Ensure popular news widget title is light in dark mode */
}

body.dark-mode .topik-pilihan-section {
  background-color: #2d3748 !important; /* Dark background for topik pilihan section */
}
body.dark-mode .topik-pilihan-widget .card {
  background-color: #2d3748 !important; /* Dark background for topik pilihan cards */
}

/* Single Post Title */
body.dark-mode h1.text-dark {
  color: #e2e8f0 !important; /* Light color for single post title */
}

/* Override Bootstrap text-dark and text-muted for general use in dark mode */
body.dark-mode .text-dark {
  color: #e2e8f0 !important;
}
body.dark-mode .text-muted {
  color: #a0aec0 !important;
}

/* STYLES MOVED FROM HEADER.PHP */
.nav-padding-10px {
  padding-top: 2px !important;
  padding-bottom: 2px !important;
}
.nav-link {
  color: white !important;
}
.profile-pic-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.profile-pic-header {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
@media (min-width: 768px) {
  .profile-pic-wrapper {
    width: 29px;
    height: 29px;
  }
  .profile-pic-header {
    width: 25px;
    height: 25px;
  }
  .desktop-username-link {
    font-size: 0.85em;
  }
}
.horizontal-scroll-nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.horizontal-scroll-nav::-webkit-scrollbar {
  display: none;
}
@media (max-width: 767.98px) {
  html,
  body {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    display: none;
  }
}
.horizontal-scroll-nav .navbar-nav {
  display: inline-flex;
  flex-wrap: nowrap;
  flex-direction: row;
  width: 100%;
  justify-content: flex-start;
}
.horizontal-scroll-nav .nav-item {
  flex-shrink: 0;
  margin-right: 15px;
}
.horizontal-scroll-nav .nav-item:last-child {
  margin-right: 0;
}
.offcanvas-backdrop {
  display: none !important;
}
/* Baca Juga Style */
.baca-juga-container {
  padding: 10px 15px;
  margin: 20px 0;
  background-color: transparent;
  border-left: 4px solid #007bff;
  font-size: 0.9rem; /* Smaller font for "Baca Juga:" text */
}
body.dark-mode .baca-juga-container {
  background-color: transparent;
  border-left-color: #17a2b8;
}
.baca-juga-container a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem; /* Smaller font for the linked title */
}
.baca-juga-container a:hover {
  text-decoration: none;
}

/* MGID Advertisement Container Styles */
.mgid-ad-container {
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0;
  padding: 0;
  overflow: visible;
  background-color: transparent;
  min-height: 250px;
  position: relative;
}

/* Ensure MGID content is responsive */
.mgid-ad-container > div {
  width: 100%;
  max-width: 100%;
}

/* Mobile responsive adjustments */
@media (max-width: 767.98px) {
  .mgid-ad-container {
    margin: 1rem 0;
    min-height: 200px;
  }
}

/* Dark mode support */
body.dark-mode .mgid-ad-container {
  background-color: transparent;
}

/* ===== STICKY AD COLUMNS (LEFT & RIGHT) ===== */
.sticky-ad-column {
  position: sticky;
  top: 100px; /* Adjust based on header height */
  max-width: 160px;
  margin: 0;
  padding: 0;
}

.sticky-ad-left {
  text-align: center;
}

.sticky-ad-right {
  text-align: center;
}

/* Ad image styling for column ads */
.sticky-ad-column .ad-space-container {
  margin-bottom: 1rem;
}

.sticky-ad-column img {
  width: 160px;
  height: 600px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sticky-ad-column img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Dark mode support for sticky ads */
body.dark-mode .sticky-ad-column img {
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

body.dark-mode .sticky-ad-column img:hover {
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* Responsive - Hide on screens smaller than XXL (1400px) */
/* This ensures ads ONLY show on large desktop screens */
@media (max-width: 1399px) {
  .sticky-ad-column {
    display: none !important;
  }
}

/* ===== IN-ARTICLE ADS ===== */
.in-article-ad-wrapper {
  margin: 2rem auto;
  padding: 0;
  text-align: center;
  clear: both;
  max-width: 100%;
}

.in-article-ad-wrapper .ad-space-container {
  max-width: 100%;
  margin: 0 auto;
}

.in-article-ad-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Custom code ads (MGID, AdSense, etc.) */
.in-article-ad-wrapper .custom-code-ad {
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem 0;
  min-height: 250px;
}

/* Responsive for mobile */
@media (max-width: 767.98px) {
  .in-article-ad-wrapper {
    margin: 1.5rem auto;
  }

  .in-article-ad-wrapper .custom-code-ad {
    max-width: 100%;
    padding: 0.75rem 0;
    min-height: 200px;
  }
}

/* Dark mode support */
body.dark-mode .in-article-ad-wrapper {
  background-color: transparent;
}

body.dark-mode .in-article-ad-wrapper img {
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

/* ===== HIDE ADSENSE AUTO ADS IN HERO/FEATURED POST ===== */
/* Hide AdSense auto ads in main hero card (desktop & mobile) */
.hero-card ins.adsbygoogle,
.hero-card .adsbygoogle,
.card.hero-card ins.adsbygoogle,
.card.hero-card .adsbygoogle,
.sorotan-hero-card ins.adsbygoogle,
.sorotan-hero-card .adsbygoogle,
.featured-post ins.adsbygoogle,
.featured-post .adsbygoogle,
.main-post ins.adsbygoogle,
.main-post .adsbygoogle,
.card-img-top + ins.adsbygoogle,
.hero-image ins.adsbygoogle,
.hero-image .adsbygoogle {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  position: absolute !important;
  pointer-events: none !important;
}

/* Hide AdSense in any card with large image (hero-style) */
.card > a > img.card-img-top ~ ins.adsbygoogle,
.card > a > .card-img-top ~ .adsbygoogle {
  display: none !important;
}

/* Additional safety: hide AdSense overlays on images */
img.card-img-top + ins.adsbygoogle,
img.card-img-top ~ ins.adsbygoogle {
  display: none !important;
}
