/* =========================================================
   NEWS MODULE
   Templates:
   - page-news.php
   - single-news.php
   - single-post.php
   Shortcode:
   - [news_archive]
========================================================= */

.aag-news-container {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
}

/* ------------------------------
   News Hero
------------------------------ */

.aag-news-hero {
  background: #00374b;
  color: #ffffff;
  border-radius: 0 0 36px 36px;
  padding: 64px 0 56px;
  margin-bottom: 60px;
}

.aag-news-hero__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

.aag-news-hero__title,
.aag-news-hero h1 {
  max-width: 850px;
  color: #ffffff !important;
  font-size: 34px;
  line-height: 1.1;
  margin: 0;
}

.aag-news-back,
.aag-back-link {
  color: #ffffff !important;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.aag-news-back:hover,
.aag-back-link:hover {
  opacity: 0.8;
}

/* ------------------------------
   News Page / Archive
------------------------------ */

.aag-news-page {
  padding: 64px 0 56px;
}

.aag-news-filters {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.aag-news-filters a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: #004658;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.aag-news-filters a:hover {
  background: #00a6a6;
  color: #ffffff;
}

.aag-news-grid-wrap {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
}

.aag-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.aag-news-grid .aag-news-item {
  text-decoration: none;
  display: block;
}

.aag-news-img {
  width: 100%;
  height: 160px;
  border-radius: 32px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  position: relative;
}

.aag-news-overlay,
.aag-news-card-overlay,
.aag-news-archive-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.aag-news-overlay h3,
.aag-news-card-overlay h3,
.aag-news-archive-overlay h3 {
  font-size: 16px;
  font-weight: 400 !important;
  color: #ffffff !important;
  margin: 0 0 10px;
  line-height: 1.3;
}

.aag-news-overlay span,
.aag-news-card-overlay span {
  width: 26px;
  height: 26px;
  background: #ffffff;
  color: #00364A;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ------------------------------
   News Cards / Shortcode
------------------------------ */

.aag-news-cards,
.aag-news-archive {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.aag-news-card,
.aag-news-archive-card {
  height: 200px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  display: block;
  text-decoration: none;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-color: #00374b;
}

.aag-news-date {
  margin-top: 10px;
  font-size: 14px;
  font-style: italic;
  color: #00374b;
}

/* ------------------------------
   Single News / Single Post
------------------------------ */

.aag-news-single {
  background: #ffffff;
  padding: 64px 0 56px;
}

.aag-news-single__content {
  margin: 70px 0;
}

.aag-news-single__content .aag-news-container {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 50px;
  align-items: start;
}

.aag-news-single__image {
  margin: 0;
}

.aag-news-single__image img {
  width: 100%;
  border-radius: 36px;
  display: block;
}

.aag-news-single__body,
.aag-news-single__excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: #333333;
}

.aag-news-single__excerpt {
  font-weight: 700;
  margin-bottom: 24px;
}

.aag-news-single__date {
  font-weight: 700;
  font-style: italic;
  color: #00374b;
  margin-bottom: 24px;
}

.aag-news-single__body a,
.aag-news-single__source {
  color: #00374b;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: underline;
}

.aag-news-single__body a:hover,
.aag-news-single__source:hover {
  opacity: 0.75;
}

/* Single news hero desktop */
.aag-news-single .aag-news-hero {
  padding: 74px 0 58px;
  margin-bottom: 64px;
}

.aag-news-single .aag-news-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
}

.aag-news-single .aag-news-hero__title,
.aag-news-single .aag-news-hero h1 {
    max-width: 760px;
    font-size: 30px;
    line-height: 1.15;
    margin: 0;
}

.aag-news-single .aag-news-back {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 20px;
}

/* ------------------------------
   More News
------------------------------ */

.aag-news-more,
.aag-more-news-section {
  max-width: 1100px;
  margin: 80px auto;
  padding: 0 30px;
}

.aag-news-more__title,
.aag-more-news-section h2 {
  color: #00374b;
  font-size: 36px;
  margin-bottom: 30px;
}

/* Temporary page-specific navbar overlap fix.
   Keep only if page ID 2914 is still the News page. */

body.page-id-2914 .entry-content,
body.page-id-2914 #main-content,
body.page-id-2914 .et_pb_section:first-child {
  padding-top: 120px !important;
}

/* =========================================================
   RESPONSIVE NEWS MODULE
========================================================= */

@media (max-width: 1024px) {
  .aag-news-grid,
  .aag-news-cards,
  .aag-news-archive {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .aag-news-container,
  .aag-news-grid-wrap,
  .aag-news-filters {
    width: min(100% - 32px, 1100px);
  }

  .aag-news-hero {
    padding: 62px 0 34px;
    margin-bottom: 44px;
    border-bottom-left-radius: 52px;
    border-bottom-right-radius: 52px;
  }

  .aag-news-hero__inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 16px !important;
  }

  .aag-news-hero__title,
  .aag-news-hero h1 {
    font-size: 25px !important;
    line-height: 1.08 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .aag-news-back,
  .aag-back-link {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 20px !important;
    line-height: 1 !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  .aag-news-page {
    padding: 44px 0 52px;
  }

  .aag-news-filters {
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: nowrap;
}

.aag-news-filters a {
  font-size: 14px;
  padding: 9px 14px;
  white-space: nowrap;
}

  .aag-news-grid,
  .aag-news-cards,
  .aag-news-archive {
    grid-template-columns: 1fr;
  }

  .aag-news-img {
    height: 240px;
  }

  .aag-news-card,
  .aag-news-archive-card {
    height: 220px;
  }

  /* SINGLE NEWS MOBILE */

  .aag-news-single {
    padding-top: 0 !important;
  }

  .aag-news-single .aag-news-hero {
    padding: 88px 0 34px !important;
    margin-bottom: 36px !important;
  }

  .aag-news-single .aag-news-hero__inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 12px !important;
  }

  .aag-news-single .aag-news-hero__title,
  .aag-news-single .aag-news-hero h1 {
    font-size: 28px !important;
    line-height: 1.12 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .aag-news-single .aag-news-back,
  .aag-news-single .aag-back-link {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 20px !important;
    line-height: 1 !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  .aag-news-single__content {
    margin: 44px 0;
  }

  .aag-news-single__content .aag-news-container {
    display: block;
  }

  .aag-news-single__image {
    margin-bottom: 28px;
  }

  .aag-news-more,
  .aag-more-news-section {
    margin: 56px auto;
    padding: 0 20px;
  }
}