/* Additions on top of the Webflow stylesheet. */

/* Footer categories dropdown (src/components/Footer.astro). */
.footer-categories {
  border-top: 1px solid #444;
  margin-top: 20px;
  padding-top: 20px;
}
.footer-categories-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white, #fff);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.footer-categories-toggle::-webkit-details-marker {
  display: none;
}
.footer-categories-toggle:hover {
  opacity: 0.8;
}
.footer-categories-chevron {
  transition: transform 0.2s;
}
.footer-categories[open] .footer-categories-chevron {
  transform: rotate(180deg);
}
.footer-categories-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  column-gap: 40px;
  margin-top: 20px;
}
.footer-categories-list .footer-link {
  margin-bottom: 12px;
}

/* Article pages: line the date row up with the title. Webflow's .date has
   7px of left padding that the .flex-date-div._2 row doesn't offset. */
.flex-date-div._2 > .date:first-child {
  padding-left: 0;
}

/* AI Times covers are portrait (1091x1420, like a magazine cover). Size the
   card image to that shape so the whole cover shows instead of being cropped. */
._220-px-post-image.is-cover {
  height: auto;
  aspect-ratio: 1091 / 1420;
}

/* Searchable list pages: breathing room between the pagination and the
   section below it. */
/* Webflow's .section.top-page sets padding-bottom: 0, so match its specificity. */
.section.top-page.listing-section {
  padding-bottom: 80px;
}
@media screen and (max-width: 479px) {
  .section.top-page.listing-section {
    padding-bottom: 50px;
  }
}

/* AI Times Magazine: roomier grid for the portrait covers. */
._3-column-grid.magazine-grid {
  grid-column-gap: 40px;
  grid-row-gap: 64px;
}
@media screen and (max-width: 991px) {
  ._3-column-grid.magazine-grid {
    grid-column-gap: 28px;
    grid-row-gap: 48px;
  }
}

/* AI Times Magazine: featured latest cover. */
.magazine-featured {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-bottom: 64px;
  margin-bottom: 64px;
  border-bottom: 1px solid #e6e6e6;
}
.magazine-featured-cover {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(10, 22, 40, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.magazine-featured-cover:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(10, 22, 40, 0.24);
}
.magazine-featured-cover img {
  display: block;
  width: 100%;
  height: auto;
}
.magazine-featured-label {
  font-family: Roboto, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #0568f2;
  margin-bottom: 14px;
}
.magazine-featured-title {
  font-family: Roboto, sans-serif;
  font-size: 36px;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 18px;
}
.magazine-featured-title a {
  color: #000;
  text-decoration: none;
}
.magazine-featured-title a:hover {
  opacity: 0.75;
}
.magazine-featured-summary {
  font-family: Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #444;
  margin: 0 0 22px;
}
.magazine-featured-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}
.magazine-featured-date {
  font-family: Roboto, sans-serif;
  font-size: 14px;
  color: #777;
}
.magazine-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  background: #eef4ff;
  color: #0568f2;
  font-family: Roboto, sans-serif;
  font-size: 13px;
  font-weight: 700;
}
.magazine-featured-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 100px;
  background: #0568f2;
  color: #fff;
  font-family: Roboto, sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 5px 18px rgba(5, 104, 242, 0.35);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.magazine-featured-button:hover {
  background: #0454c4;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(5, 104, 242, 0.45);
}
@media screen and (max-width: 991px) {
  .magazine-featured {
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 36px;
  }
  .magazine-featured-title {
    font-size: 28px;
  }
  .magazine-featured-summary {
    font-size: 16px;
  }
}
@media screen and (max-width: 767px) {
  .magazine-featured {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 48px;
    margin-bottom: 48px;
  }
  .magazine-featured-cover {
    max-width: 420px;
  }
  .magazine-featured-title {
    font-size: 26px;
  }
}

/* "Get Halo" banner: lift, glow and a light sweep on hover. */
a.center-advertising-div {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
}
a.center-advertising-div::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
  pointer-events: none;
  transition: left 0.8s ease;
}
a.center-advertising-div:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
  filter: brightness(1.05);
}
a.center-advertising-div:hover::after {
  left: 120%;
}
@media (prefers-reduced-motion: reduce) {
  a.center-advertising-div,
  a.center-advertising-div::after,
  .magazine-featured-cover,
  .magazine-featured-button {
    transition: none;
  }
  a.center-advertising-div:hover,
  .magazine-featured-cover:hover,
  .magazine-featured-button:hover {
    transform: none;
  }
}
