/* Breaking News Bar */
.breaking-news-bar {
  display: flex;
  align-items: stretch;
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  height: 48px;
  overflow: hidden;
}

.breaking-news-label {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #942522;
  color: white;
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
  min-width: 200px;
  height: 100%;
}

.white-circle {
  width: 15px;
  height: 15px;
  background: white;
  border-radius: 50%;
}

/* Scrolling news section */
.scrolling-news-container {
  flex: 1 1 auto;
  background: white;
  overflow: hidden;
}

#newsCarousel .owl-item {
  height: 100%;
  background-color: white;
}

.breaking-news-item .post-thumbnail {
  display: contents;
}

.breaking-news-item img {
  width: 48px !important;
  height: 48px;
  object-fit: cover;
}
.breaking-news-item .post-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: medium;
  line-height: 1.2;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .breaking-news-label {
    min-width: 160px;
  }
}
@media (max-width: 480px) {
  .breaking-news-bar {
    display: block;
    width: 100%;
    height: 80px;
    overflow: visible;
  }
  .breaking-news-label {
    min-width: 100%;
    height: 30px;
  }
  .scrolling-news-container {
    position: relative;
    height: 50px;
    overflow: visible;
    display: flex;
    flex-direction: row;
    align-items: center;
  }
  .breaking-news-item img {
    width: 40px !important;
    height: 40px;
    object-fit: cover;
  }
}

/* Homepage News */
.homepage-news-grid {
  display: grid;
  grid-template-areas:
    "large medium1 small1"
    "large medium1 small2"
    "large medium2 small3"
    "large medium2 small4";
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(4, 100px);
  gap: 1rem;
}
.news-grid-large {
  grid-area: large;
}
.news-grid-medium:nth-child(2) {
  grid-area: medium1;
}
.news-grid-medium:nth-child(3) {
  grid-area: medium2;
}
.news-grid-small:nth-child(4) {
  grid-area: small1;
}
.news-grid-small:nth-child(5) {
  grid-area: small2;
}
.news-grid-small:nth-child(6) {
  grid-area: small3;
}
.news-grid-small:nth-child(7) {
  grid-area: small4;
}

.homepage-news {
  height: 100%;
  background-color: white;
  color: #939598;
  font-size: 11px;
  line-height: 13px;
}

.news-grid-large {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.news-grid-large-carousel,
.news-grid-large-carousel .owl-stage,
.news-grid-large-carousel .owl-stage-outer,
.news-grid-large-carousel .owl-item {
  width: 100%;
  height: 100%;
}

.news-grid-medium {
  position: relative;
}

.news-grid-medium .post-thumbnail {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.news-grid-large-item .post-thumbnail img,
.news-grid-medium .post-thumbnail img {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: auto;
  transform: translateY(-50%);
  object-fit: cover;
}

.news-grid-large-item .post-thumbnail::after,
.news-grid-medium .post-thumbnail::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to top, black, transparent);
  pointer-events: none;
}

.news-grid-large-item .post-details,
.news-grid-medium .post-details {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 0 1.5rem 1rem;
}

.news-grid-large-item .post-title,
.news-grid-medium .post-title {
  color: white;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-grid-large-item .post-title {
  font-size: 20px;
  line-height: 1.28;
}

.news-grid-medium .post-title {
  font-size: 16px;
  line-height: 1.28;
}

.news-grid-small a {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: row;
}

.news-grid-small .post-thumbnail {
  display: contents;
}

.news-grid-small .post-thumbnail img {
  width: 100px;
  height: 100px;
  object-fit: cover;
}

.news-grid-small .post-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 1rem;
  padding-right: 1rem;
}

.news-grid-small .post-title {
  color: black;
  font-size: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.most-view-post img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.most-view-post .post-title {
  font-size: 16px;
  line-height: 18px;
  color: black;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 35px; /* Adjust based on line height */
}

.news-grid-large-carousel .owl-nav {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.news-grid-large-carousel:hover .owl-nav {
  opacity: 1;
  pointer-events: none;
}

.news-grid-large-carousel .owl-nav button.owl-prev,
.news-grid-large-carousel .owl-nav button.owl-next {
  background: rgba(255, 255, 255, 0.85);
  border: none;
  color: #222;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  outline: none;
  pointer-events: auto;
}

.news-grid-large-carousel .owl-nav button.owl-prev:hover,
.news-grid-large-carousel .owl-nav button.owl-next:hover {
  background: #ad2025;
  color: #fff;
  pointer-events: auto;
}

.news-grid-large-carousel .owl-nav button span {
  font-size: 40px;
  line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .homepage-news-grid {
    grid-template-areas:
      "large large"
      "medium1 medium2"
      "small1 small1"
      "small2 small2"
      "small3 small3"
      "small4 small4";
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 4fr 2fr 1fr 1fr 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .homepage-news-grid {
    grid-template-areas:
      "large"
      "medium1"
      "medium2"
      "small1"
      "small2"
      "small3"
      "small4";
    grid-template-columns: 1fr;
    grid-template-rows: 2fr 2fr 2fr 1fr 1fr 1fr 1fr;
  }
}
