@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: 39px;
}
.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;
    -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;
  }
}
.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;
}
.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 */
}
.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 {
  line-height: 1.8;
}
.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 */
  }
}

/* Share Buttons Styles */
.share-buttons-container {
  position: absolute;
  bottom: 1.5rem; /* Lowered */
  right: 3rem;
  display: flex;
  align-items: center;
  gap: 15px; /* Adjusted gap */
}
.share-buttons-container .share-text {
  color: var(--text-color);
  font-size: 0.9rem; /* Slightly larger */
  font-weight: 500;
}
.share-buttons-container .share-btn {
  font-size: 1.9rem !important; /* Increased size */
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  opacity: 0.8;
}
.share-buttons-container .share-btn:hover {
  transform: scale(1.15);
  opacity: 1;
}
/* Brand colors */
.share-btn.facebook-btn {
  color: #1877f2 !important;
}
.share-btn.twitter-btn {
  color: #000000 !important;
}
.share-btn.whatsapp-btn {
  color: #25d366 !important;
}

@media (max-width: 767.98px) {
  /* Corresponds to -md- breakpoint */
  .share-buttons-container {
    bottom: 1rem; /* Lowered */
    right: 1.5rem;
  }
}
@media (max-width: 576px) {
  .share-buttons-container .share-text {
    display: none;
  }
  .share-buttons-container {
    gap: 8px; /* Adjusted gap */
  }
  .share-buttons-container .share-btn {
    font-size: 1.6rem !important; /* Increased mobile size */
  }
}

/* Line Clamp for consistent text display */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-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;
  -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,
    #b30f00,
    #b3a100
  ); /* 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 */
  vertical-align: middle;
  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: #f8f9fa;
  border-left: 4px solid #007bff;
  font-size: 0.9rem; /* Smaller font for "Baca Juga:" text */
}
body.dark-mode .baca-juga-container {
  background-color: #343a40;
  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: underline;
}
