/* ==========================================================
   NEWS PAGE-SPECIFIC STYLES
   - 4:3 images
   - Smaller date badges
   - Subtle accent for text content
========================================================== */

/* RTL Fixes for News Cards */
html[lang="fa"] .news-card,
[dir="rtl"] .news-card {
  text-align: right;
}

html[lang="fa"] .news-card-body,
[dir="rtl"] .news-card-body {
  text-align: right;
  padding: 25px;
}

html[lang="fa"] .news-title,
[dir="rtl"] .news-title {
  text-align: right;
}

html[lang="fa"] .news-text,
[dir="rtl"] .news-text {
  text-align: right;
}

/* Fix news footer in RTL */
html[lang="fa"] .news-footer,
[dir="rtl"] .news-footer {
  display: flex;
  justify-content: flex-start;
  text-align: right;
  padding: 0 25px 25px 25px;
}

/* --- Month list (initially hidden) --- */
.month-filter-list {
  list-style: none;
  padding-left: 16px;
  margin-top: 4px;
  display: none;
}
[dir="rtl"] .month-filter-list {
  padding-right: 16px;
  padding-left: 0;
}
.month-filter-list.show {
  display: block;
}
.month-filter-link {
  display: block;
  padding: 4px 0;
  font-size: 0.9rem;
  text-decoration: none;
  color: #555;
  transition: color 0.3s;
}
.month-filter-link:hover,
.month-filter-link.active {
  color: #004d8e;
  font-weight: 600;
}

/* Fix read more button with proper arrow for RTL */
html[lang="fa"] .btn-read-more,
[dir="rtl"] .btn-read-more {
  display: inline-flex;
  align-items: center;
}
html[lang="fa"] .btn-read-more::after,
[dir="rtl"] .btn-read-more::after {
  content: "\F12F"; /* Bootstrap icon code for left arrow */
  font-family: bootstrap-icons !important;
  margin-right: 8px;
  font-size: 0.9rem;
  display: inline-block;
  transition: all 0.3s ease;
}
html[lang="fa"] .btn-read-more:hover::after,
[dir="rtl"] .btn-read-more:hover::after {
  transform: translateX(-5px);
}

/* Fix badge positioning for RTL */
html[lang="fa"] .news-date-badge,
[dir="rtl"] .news-date-badge {
  right: 15px;
  left: auto;
  transform: rotate(3deg);
}
html[lang="fa"] .news-tag-badge,
[dir="rtl"] .news-tag-badge {
  left: 15px;
  right: auto;
}

/* Section title RTL fix */
html[lang="fa"] .section-title,
[dir="rtl"] .section-title {
  text-align: right;
}
html[lang="fa"] .section-title::after,
[dir="rtl"] .section-title::after {
  left: auto;
  right: 0;
}

/* Fix featured news content in RTL */
html[lang="fa"] .featured-news-content,
[dir="rtl"] .featured-news-content {
  text-align: right;
}

/* Fix date icon spacing for RTL */
html[lang="fa"] .news-date i,
[dir="rtl"] .news-date i {
  margin-right: 0;
  margin-left: 5px;
}

/* Make AOS animations work correctly in RTL */
html[lang="fa"] [data-aos="fade-up"],
[dir="rtl"] [data-aos="fade-up"] {
  transform: translate3d(0, 30px, 0);
}
html[lang="fa"] [data-aos="fade-up"].aos-animate,
[dir="rtl"] [data-aos="fade-up"].aos-animate {
  transform: translate3d(0, 0, 0);
}

/* Fix button arrow alignment */
html[lang="fa"] .btn-primary i,
[dir="rtl"] .btn-primary i {
  margin-right: 0;
  margin-left: 8px;
}

/* News grid RTL fixes */
html[lang="fa"] .row,
[dir="rtl"] .row {
  direction: rtl;
}
@media (min-width: 768px) {
  html[lang="fa"] .text-md-end,
  [dir="rtl"] .text-md-end {
    text-align: left !important;
  }
}

/* Basic navigation fixes (RTL) */
.navbar-brand.airport-logo {
  margin-right: auto;
}
[dir="rtl"] .navbar-brand.airport-logo {
  margin-left: auto;
  margin-right: initial;
}
[dir="rtl"] .navbar-collapse {
  margin-right: 2.8rem;
}
.navbar-collapse {
  margin-left: 2.8rem;
}
@media (max-width: 991.98px) {
  [dir="rtl"] .navbar-collapse,
  .navbar-collapse {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Featured News Styles */
.featured-news-container {
  position: relative;
  margin-top: -50px;
  z-index: 10;
  margin-bottom: 50px;
}
.featured-news-card {
  background-color: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}
.featured-news-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

/* 
   Use aspect-ratio for featured news images (4:3)
   so they don’t get overly tall.
*/
.featured-news-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.featured-news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}
.featured-news-card:hover .featured-news-image img {
  transform: scale(1.05);
}

/* 
   Subtle accent for featured-news-content 
   to distinguish text area
*/
.featured-news-content {
  background: #f9fbfd; /* Slightly off-white accent */
  padding: 30px;
  transition: background 0.3s ease;
}
.featured-news-card:hover .featured-news-content {
  background: #f5f8fc; /* a bit darker on hover */
}

.featured-news-title {
  color: #004d8e;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 15px;
}

/* Date styling */
.news-date {
  display: inline-block;
  background-color: #ff6b00;
  color: white;
  padding: 6px 18px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 15px;
  box-shadow: 0 3px 8px rgba(255,107,0,0.3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 2px solid rgba(255,255,255,0.2);
}
.news-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 8px;
  text-transform: uppercase;
}
[dir="rtl"] .news-tag {
  margin-left: 8px;
  margin-right: 0;
}
.tag-event {
  background-color: #e3f2fd;
  color: #1565c0;
}

/* News Card Styles */
.news-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  height: 100%;
  transition: all 0.3s ease;
  border: none;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/*
   Use aspect-ratio: 4/3 for 
   regular news images as well
*/
.news-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}
.news-card:hover .news-image img {
  transform: scale(1.05);
}

/* Smaller date-badge styles */
.news-date-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #ff6b00, #ff9a44);
  color: white;
  text-align: center;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(255,107,0,0.3);
  border: 2px solid rgba(255,255,255,0.3);
  transform: rotate(-3deg);
  transition: all 0.3s ease;
  z-index: 2;
}
.news-card:hover .news-date-badge {
  transform: rotate(0deg) scale(1.05);
}
.date-day {
  display: block;
  padding: 3px 10px 2px;
  font-size: 1rem;
  font-weight: 700;
}
.date-month {
  display: block;
  background-color: rgba(0,0,0,0.25);
  padding: 2px 10px;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
}
.news-tag-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

/* 
   Subtle accent for news-card-body 
   to highlight text area 
*/
.news-card-body {
  background: #f9fbfd; /* same accent as featured for consistency */
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease;
}
.news-card:hover .news-card-body {
  background: #f5f8fc; 
}

.news-title {
  color: #333;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}
.news-card:hover .news-title {
  color: #004d8e;
}

.news-text {
  color: #555;
  margin-bottom: 15px;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* limit text lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

/* Card footer */
.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px 20px 20px;
  margin-top: auto;
}
.btn-read-more {
  background-color: #004d8e;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 8px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-read-more i {
  transition: transform 0.3s ease;
}
.btn-read-more:hover {
  background-color: #003366;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  color: white;
}
.btn-read-more:hover i {
  transform: translateX(3px);
}
[dir="rtl"] .btn-read-more:hover i {
  transform: translateX(-3px);
}

/* Breadcrumb styling */
.breadcrumb-container {
  margin-bottom: 30px;
}
.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 0.5rem;
}
.breadcrumb-item a {
  color: #555;
  text-decoration: none;
  transition: all 0.3s ease;
}
.breadcrumb-item a:hover {
  color: #004d8e;
}
.breadcrumb-item.active {
  color: #004d8e;
  font-weight: 600;
}

/* Sidebar */
.year-filter-sidebar {
  padding: 25px;
  border-radius: 12px;
  height: fit-content;
  position: sticky;
  top: 100px;
}
.year-filter-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #004d8e;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ff6b00;
}
.year-filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.year-filter-item {
  margin-bottom: 10px;
}
.year-filter-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  border-left: 3px solid transparent;
}
[dir="rtl"] .year-filter-link {
  text-align: right;
  border-left: none;
  border-right: 3px solid transparent;
}
.year-filter-link:hover,
.year-filter-link.active {
  background-color: #e7f0f7;
  color: #004d8e;
  font-weight: 600;
  border-left-color: #004d8e;
}
[dir="rtl"] .year-filter-link:hover,
[dir="rtl"] .year-filter-link.active {
  border-left-color: transparent;
  border-right-color: #004d8e;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .featured-news-image {
    aspect-ratio: 4/3;
  }
  .year-filter-sidebar {
    position: static;
    margin-bottom: 30px;
  }
}
@media (max-width: 767px) {
  .featured-news-container {
    margin-top: -30px;
  }
  .featured-news-image {
    aspect-ratio: 4/3;
  }
  .featured-news-title {
    font-size: 1.5rem;
  }
  .featured-news-content {
    padding: 20px;
  }
  .news-image {
    aspect-ratio: 4/3;
  }
  .news-card-body {
    padding: 20px;
  }
  .news-title {
    font-size: 1.1rem;
  }
  .news-footer {
    padding: 0 20px 20px 20px;
    flex-direction: column;
    align-items: flex-start;
  }
  [dir="rtl"] .news-footer {
    align-items: flex-end;
  }
  .btn-read-more {
    margin-top: 15px;
    width: 100%;
    justify-content: center;
  }
  .year-filter-sidebar {
    padding: 20px;
  }
  .year-filter-title {
    font-size: 1.2rem;
  }
  .year-filter-link {
    padding: 8px 12px;
  }
}

/* Make news cards hidden initially for filtering */
.news-item-container.hidden {
  display: none;
}

/* ===== Hero Banner Styles ===== */
.news-hero {
  position: relative;
  width: 100%;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  color: #fff;
}
.news-hero .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 0;
}
.news-hero .hero-card {
  position: relative;
  z-index: 1;
  padding: 2rem 3rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.4);
  text-align: center;
  max-width: 800px;
}
.news-hero .hero-card h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.news-hero .hero-card p {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}
.news-hero .hero-card .btn-primary {
  padding: 0.75rem 2rem;
  border-radius: 50px;
}
@media (max-width: 768px) {
  .news-hero { min-height: 40vh; }
  .news-hero .hero-card { padding: 1.5rem 2rem; }
  .news-hero .hero-card h1 { font-size: 1.8rem; }
  .news-hero .hero-card p { font-size: 1rem; }
}
