/* ============================================
   News Section - Hatay BB
   Modern Design with Owl Carousel Support
   ============================================ */

/* Section Container */
.hbb-news-section {
  padding: var(--hbb-section-spacing) 0;
  background-color: var(--hbb-white);
  overflow: hidden;
}

.hbb-news-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
  width: 100%;
}

/* Section Header */
.hbb-news-header {
  margin-bottom: var(--hbb-spacing-2xl);
  text-align: center;
}

.hbb-news-label {
  display: inline-block;
  font-size: var(--hbb-section-label-size);
  font-weight: var(--hbb-font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--hbb-section-label-spacing);
  color: var(--hbb-gold);
  margin-bottom: var(--hbb-spacing-sm);
}

.hbb-news-title {
  font-size: var(--hbb-section-title-size);
  font-weight: var(--hbb-font-bold);
  color: var(--hbb-navy);
  margin: 0;
  line-height: 1.2;
}

/* Two Column Layout */
.hbb-news-grid {
  display: flex;
  gap: var(--hbb-spacing-xl);
  align-items: stretch;
  max-width: 100%;
}

.hbb-news-grid > * {
  flex-shrink: 0;
}

/* ============================================
   Left Column - News Slider (Owl Carousel)
   ============================================ */

.hbb-news-slider-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Owl Carousel Overrides for News */
.hbb-news-slider.owl-carousel {
  position: relative;
  border-radius: var(--hbb-radius-xl);
  overflow: hidden;
  box-shadow: var(--hbb-shadow-lg);
  background-color: var(--hbb-primary, #002b55);
  aspect-ratio: 3 / 2;
}

.hbb-news-slider.owl-carousel .owl-stage-outer {
  border-radius: var(--hbb-radius-xl);
  overflow: hidden;
  height: 100% !important;
}

.hbb-news-slider.owl-carousel .owl-stage {
  height: 100% !important;
}

.hbb-news-slider.owl-carousel .owl-item {
  height: 100% !important;
}

/* News Slide Item */
.hbb-news-slide {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: none;
}

.hbb-news-slide.active {
  display: block;
}

/* Owl Carousel specific - show all items in owl-stage */
.owl-carousel .hbb-news-slide {
  display: block !important;
}

.hbb-news-slide__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hbb-news-slide__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--hbb-spacing-xl);
  background: linear-gradient(to top, rgba(0, 43, 85, 0.95) 0%, rgba(0, 43, 85, 0.7) 60%, transparent 100%);
}

.hbb-news-slide__title {
  color: var(--hbb-white);
  font-size: var(--hbb-news-slide-title-size);
  font-weight: var(--hbb-font-semibold);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hbb-news-slide__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--hbb-transition-fast);
}

.hbb-news-slide__title a:hover {
  color: var(--hbb-gold);
}

/* ============================================
   Pagination Controls
   ============================================ */

.hbb-news-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hbb-spacing-md);
  margin-top: var(--hbb-spacing-lg);
  flex-wrap: wrap;
  padding: var(--hbb-spacing-sm) var(--hbb-spacing-lg);
  border-radius: var(--hbb-radius-xl);
  background: linear-gradient(90deg, #031a33 0%, #032b57 50%, #053f7c 100%);
  box-shadow: var(--hbb-shadow-md);
}

.hbb-news-pagination__dots {
  display: flex;
  align-items: center;
  gap: var(--hbb-spacing-xs);
  flex-wrap: wrap;
  flex: 1;
}

.hbb-news-pagination__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  font-size: var(--hbb-font-sm);
  font-weight: var(--hbb-font-semibold);
  color: rgba(255, 255, 255, 0.8);
  background-color: transparent;
  border: none;
  border-radius: var(--hbb-radius-md);
  cursor: pointer;
  transition: background-color var(--hbb-transition-fast), color var(--hbb-transition-fast), transform var(--hbb-transition-fast), opacity var(--hbb-transition-fast);
  opacity: 0.7;
}

.hbb-news-pagination__dot:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.hbb-news-pagination__dot.active {
  background-color: var(--hbb-gold);
  color: var(--hbb-navy);
  opacity: 1;
}

.hbb-news-pagination__all {
  display: inline-flex;
  align-items: center;
  gap: var(--hbb-spacing-xs);
  padding: var(--hbb-spacing-sm) var(--hbb-spacing-xl);
  font-size: var(--hbb-font-sm);
  font-weight: var(--hbb-font-semibold);
  color: var(--hbb-white);
  text-decoration: none;
  border-radius: var(--hbb-radius-lg);
  transition: background-color var(--hbb-transition-fast), color var(--hbb-transition-fast), transform var(--hbb-transition-fast);
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hbb-news-pagination__all svg path {
  stroke: currentColor;
}

.hbb-news-pagination__all:hover {
  background-color: var(--hbb-gold);
  color: var(--hbb-navy);
  transform: translateX(2px);
}

/* ============================================
   Right Column - Mayor Card
   ============================================ */

.hbb-mayor-card {
  width: 380px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f0f4f8 0%, var(--hbb-white) 100%);
  border-radius: var(--hbb-radius-xl);
  overflow: hidden;
  box-shadow: var(--hbb-shadow-md);
  transition: all var(--hbb-transition-base);
  display: flex;
  flex-direction: column;
}

.hbb-mayor-card:hover {
  box-shadow: var(--hbb-shadow-xl);
  transform: translateY(-4px);
}

.hbb-mayor-card__image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.hbb-mayor-card__body {
  padding: var(--hbb-spacing-xl);
  background-color: #e3f2fd;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hbb-mayor-card__name {
  font-size: var(--hbb-mayor-card-name-size);
  font-weight: var(--hbb-font-bold);
  color: var(--hbb-navy);
  margin: 0 0 var(--hbb-spacing-xs);
  line-height: 1.3;
}

.hbb-mayor-card__title {
  font-size: var(--hbb-font-sm);
  font-weight: var(--hbb-font-medium);
  color: var(--hbb-gold);
  margin: 0 0 var(--hbb-spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hbb-mayor-card__description {
  font-size: var(--hbb-mayor-card-desc-size);
  line-height: 1.6;
  color: var(--hbb-text);
  margin: 0 0 var(--hbb-spacing-md);
  flex: 1;
}

.hbb-mayor-card__button,
.hbb-mayor-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--hbb-spacing-md) var(--hbb-spacing-xl);
  font-size: var(--hbb-font-base);
  font-weight: var(--hbb-font-semibold);
  color: var(--hbb-white);
  background-color: var(--hbb-navy);
  border: none;
  border-radius: var(--hbb-radius-md);
  text-decoration: none;
  transition: all var(--hbb-transition-base);
  cursor: pointer;
}

.hbb-mayor-card__button:hover,
.hbb-mayor-card__link:hover {
  background-color: var(--hbb-gold);
  transform: translateY(-2px);
  box-shadow: var(--hbb-shadow-md);
  color: var(--hbb-white);
}

/* ============================================
   Owl Carousel Navigation Customization
   ============================================ */

/* Hide Owl default nav and dots - we use custom pagination */
.hbb-news-slider.owl-carousel .owl-nav {
  display: none;
}

.hbb-news-slider.owl-carousel .owl-dots {
  display: none;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
  .hbb-news-grid {
    flex-direction: column;
    gap: var(--hbb-spacing-xl);
  }

  .hbb-news-slider-wrapper {
    width: 100%;
  }

  .hbb-mayor-card {
    width: 100%;
    max-width: 100%;
  }

  .hbb-news-title {
    font-size: var(--hbb-section-title-size-mobile);
  }
}

@media (max-width: 768px) {
  .hbb-news-section {
    padding: var(--hbb-section-spacing-mobile) 0;
  }

  .hbb-news-container {
    padding: 0 var(--hbb-spacing-md);
  }

  .hbb-news-header {
    margin-bottom: var(--hbb-spacing-lg);
  }

  .hbb-news-title {
    font-size: var(--hbb-section-title-size-mobile);
  }

  .hbb-news-slide__overlay {
    padding: var(--hbb-spacing-md);
  }

  .hbb-news-slide__title {
    font-size: var(--hbb-news-slide-title-mobile);
  }

  .hbb-news-pagination {
    flex-direction: column;
    align-items: stretch;
    padding: var(--hbb-spacing-md);
  }

  .hbb-news-pagination__dots {
    justify-content: center;
  }

  .hbb-news-pagination__dot {
    min-width: 2rem;
    height: 2rem;
    font-size: var(--hbb-font-xs);
  }

  .hbb-news-pagination__all {
    justify-content: center;
    width: 100%;
  }

  .hbb-mayor-card__body {
    padding: var(--hbb-spacing-lg);
  }
}

@media (max-width: 480px) {
  .hbb-news-pagination__dots {
    gap: var(--hbb-spacing-xs);
  }

  .hbb-news-pagination__dot {
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0;
  }

  /* Show only first 5 and last pagination dot on mobile */
  .hbb-news-pagination__dot:nth-child(n+6):nth-last-child(n+2) {
    display: none;
  }
}

/* ============================================
   Accessibility
   ============================================ */

.hbb-news-pagination__dot:focus-visible,
.hbb-news-pagination__all:focus-visible,
.hbb-mayor-card__button:focus-visible,
.hbb-mayor-card__link:focus-visible {
  outline: 3px solid var(--hbb-gold);
  outline-offset: 2px;
}

.hbb-news-slide__title a:focus-visible {
  outline: 2px solid var(--hbb-gold);
  outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   Gallery Module Compatibility
   Prevent conflicts with team-sec gallery
   ============================================ */

/* Ensure news section doesn't interfere with gallery sliders */
.hbb-news-section .team-sec {
  /* News-specific overrides that won't affect other team-sec instances */
}

/* Keep gallery-module.css slider styles intact */
.team-sec:not(.hbb-news-section .team-sec) .slider-arrow,
.team-sec:not(.hbb-news-section .team-sec) .swiper-slide,
.team-sec:not(.hbb-news-section .team-sec) .th-slider {
  /* Gallery module styles remain untouched */
}
