/**
 * AD Neon 3.0.23 – editorial/mobile refinements.
 * Enqueued after the base theme styles, cache-plugin independent.
 * This file is part of the theme: no Additional CSS snippet is necessary.
 */

/* Keep the original modal interaction and keyboard handling from the base theme. */
@media (max-width: 1039px) {
  /* The header background is controlled by the WordPress Customizer.
     The menu button follows its Navbar Link Color setting. */
  body .site-header .mobile-nav-toggle,
  body .site-header .mobile-nav-toggle .toggle-inner {
    color: var(--ad-neon-menu-icon-color, currentColor);
  }
  body .site-header .mobile-nav-toggle {
    position: relative;
    inset: auto;
    min-width: 48px;
    min-height: 48px;
    width: 48px;
    height: 48px;
    padding: 0;
    margin-left: auto;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
  }
  body .site-header .mobile-nav-toggle .toggle-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
  }
  /* Orbital-inspired three-line icon; its color follows the Customizer. */
  body .site-header .mobile-nav-toggle .site-nav-trigger {
    display: block;
    width: 26px;
    height: 26px;
    position: relative;
    overflow: visible;
    margin: 0;
    z-index: 1;
  }
  body .site-header .mobile-nav-toggle .site-nav-trigger > span {
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    width: 26px;
    height: 3px;
    margin-top: -1.5px;
    border-radius: 2px;
    background: var(--ad-neon-menu-icon-color, currentColor);
    transform: none;
    transition: none;
  }
  body .site-header .mobile-nav-toggle .site-nav-trigger > span::before,
  body .site-header .mobile-nav-toggle .site-nav-trigger > span::after {
    content: "";
    position: absolute;
    display: block;
    width: 26px;
    height: 3px;
    left: 0;
    right: 0;
    border-radius: 2px;
    background: var(--ad-neon-menu-icon-color, currentColor);
    transform: none;
    transition: none;
  }
  body .site-header .mobile-nav-toggle .site-nav-trigger > span::before { top: -8px; }
  body .site-header .mobile-nav-toggle .site-nav-trigger > span::after { top: 8px; }
  /* Keep the textual menu name available to assistive technology. */
  body .site-header .mobile-nav-toggle .toggle-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  body .site-header .mobile-nav-toggle:focus-visible {
    outline: 2px solid var(--ad-neon-menu-icon-color, currentColor);
    outline-offset: 3px;
  }
}

@media (max-width: 767px) {
  /* iPhone widths of ~414px must not trigger the base theme's 2-column rule. */
  body.home .entry-item,
  body.blog .entry-item,
  body.archive .entry-item,
  body.search .entry-item {
    box-sizing: border-box;
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  /* First three stories: the original Hostinger full-bleed, square-edge
     layout, with a 16:9 frame for the publisher's landscape photos. */
  body.home .featured-item,
  body.blog .featured-item {
    box-sizing: border-box;
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }
  body.home .featured-item .featured-wrapper,
  body.blog .featured-item .featured-wrapper {
    min-height: 0;
    max-height: none;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    overflow: hidden;
    background: #101010;
    box-shadow: none;
  }
  body.home .featured-item .featured-wrapper > a,
  body.blog .featured-item .featured-wrapper > a {
    display: block;
    position: relative;
    height: 100%;
  }
  body.home .featured-item img,
  body.blog .featured-item img {
    height: 100%;
    width: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
  }
  body.home .featured-item .featured-wrapper > a::after,
  body.blog .featured-item .featured-wrapper > a::after {
    background: linear-gradient(180deg, rgba(0,0,0,.04) 28%, rgba(0,0,0,.82) 100%);
  }
  body.home .featured-item .entry-title,
  body.blog .featured-item .entry-title {
    font-size: clamp(1.22rem, 4.7vw, 1.48rem);
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -.015em;
    padding: 16px 17px 18px;
    margin: 0;
    text-wrap: pretty;
    overflow-wrap: break-word;
  }
}

/* Desktop reading width: the Customizer controls listings (home/categories),
   but a single news article with no sidebar stays at the original 52rem.
   This intentionally does not affect mobile/tablet or posts with sidebars. */
@media (min-width: 1040px) {
  body.single-post.no-sidebar main.site-main > .default-header > .container,
  body.single-post.no-sidebar main.site-main > #content-wrapper.container {
    width: 52rem;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .site-header .mobile-nav-toggle .site-nav-trigger * {
    transition: none;
  }
}

/* AD Neon 3.0.24: only related posts use the Customizer's container width.
   The single-article reading area and every other story grid stay unchanged. */
body.single-post .entry-related.container {
  box-sizing: border-box;
  margin-top: 2.25rem;
  margin-bottom: 3rem;
}

body.single-post .entry-related > h3 {
  margin: 0 0 1.1rem;
  line-height: 1.25;
}

body.single-post .ad-neon-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
  min-width: 0;
}

body.single-post .ad-neon-related-grid > .ad-neon-related-card {
  display: block;
  box-sizing: border-box;
  min-width: 0;
  width: auto;
  max-width: none;
  flex: none;
  padding: 0;
  margin: 0;
}

body.single-post .ad-neon-related-card > a {
  display: block;
  text-decoration: none;
}

body.single-post .ad-neon-related-card .ad-neon-related-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  background-color: #eee;
}

body.single-post .ad-neon-related-card .entry-title {
  margin: .65rem 0 0;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: break-word;
}

@media (min-width: 640px) and (max-width: 1023px) {
  body.single-post .ad-neon-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  body.single-post .ad-neon-related-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
  }
}
