/* =========================
   MEDIA PAGE
   ========================= */

/* ===== PAGE WIDTH LOCK ===== */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

img,
video,
iframe {
  max-width: 100%;
}

.page-media {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ===== NAVBAR ===== */
.page-media .nav-links a {
  color: #000 !important;
}

.page-media .logo {
  filter: brightness(0) invert(0) !important;
}

.page-media .navbar {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.page-media .navbar.solid {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
}

/* Make burger visible on white background */
@media (max-width: 950px) {
  .page-media .menu-toggle span {
    background: #000 !important;
  }
}

/* ===== PAGE LAYOUT ===== */
.media-page {
  width: 100%;
  max-width: 100%;
  padding: 145px 1.25rem 4rem;
  overflow-x: hidden;
}

.media-wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* ===== INTRO ===== */
.media-intro {
  margin-bottom: 1.3rem;
  text-align: center;
}

.media-intro h1 {
  font-family: "Permanent Marker", cursive;
  font-size: 2.8rem;
  margin-bottom: 0.4rem;
  line-height: 1.05;
}

.media-intro p {
  line-height: 1.7;
  color: #222;
  max-width: 760px;
  margin: 0 auto;
}

/* ===== FILTERS ===== */
.media-filters {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1.1rem auto 2.5rem;
}

.media-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.2rem;
  border-radius: 999px;
  border: 2px solid #000;
  background: transparent;
  color: #000;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.media-filter:hover {
  transform: translateY(-2px);
  background: #000;
  color: #fff;
}

.media-filter:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.25);
  outline-offset: 4px;
}

/* ===== INSTAGRAM BUTTON ===== */
.media-instagram {
  display: flex;
  justify-content: center;
  margin: 2.8rem 0 3.2rem;
}

.media-instagram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: fit-content;
  flex: 0 0 auto;
  min-height: 58px;
  padding: 0 1.8rem;
  background: #000;
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.55rem;
  letter-spacing: 1px;
  border: 3px solid #000;
  box-shadow: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.media-instagram-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
  background: #111;
}

.media-instagram-icon {
  width: 26px;
  height: 26px;
  display: block;
  flex: 0 0 auto;
}

/* ===== MEDIA SECTIONS ===== */
.media-sections {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.media-section {
  width: 100%;
  max-width: 100%;
  scroll-margin-top: 120px;
}

.media-section h2 {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 1px;
  font-size: 2rem;
  margin-bottom: 0.9rem;
}

/* Mobile/tablet row scroll */
.media-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.media-row::-webkit-scrollbar {
  display: none;
}

.media-row img {
  width: auto;
  height: 240px;
  aspect-ratio: 4 / 3;
  max-width: none;
  flex: 0 0 auto;
  border-radius: 18px;
  box-shadow: none;
  object-fit: cover;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.25s ease;
}

.media-row img:hover {
  transform: scale(1.03);
}

/* Desktop grid */
@media (min-width: 901px) {
  .media-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    overflow: visible;
    scroll-snap-type: none;
  }

  .media-row img {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
  }
}

/* ===== BOTTOM CTA ===== */
.media-bottom-cta {
  width: 100%;
  max-width: 100%;
  margin-top: 3.2rem;
}

.media-bottom-cta-inner {
  background: #000;
  color: #fff;
  border-radius: 22px;
  padding: 2.4rem 1.6rem;
  text-align: center;
  overflow: hidden;
}

.media-bottom-cta h2 {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 1px;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.media-bottom-cta p {
  line-height: 1.8;
  opacity: 0.95;
  margin-bottom: 1.35rem;
}

.media-bottom-cta-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.media-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 1.4rem;
  border-radius: 999px;
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.media-btn:hover {
  transform: translateY(-2px);
  background: #fff;
  color: #000;
}

/* ===== LIGHTBOX ===== */
.media-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  place-items: center;
  z-index: 4000;
  padding: 1.5rem;
}

.media-lightbox.show {
  display: grid;
}

.media-lightbox-inner {
  position: relative;
  max-width: 1050px;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.media-lightbox-img {
  width: 100%;
  height: auto;
  display: block;
}

.media-lightbox-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.media-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

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

/* =========================
   FOOTER
   ========================= */

.site-footer {
  width: 100%;
  max-width: 100%;
  background: #000;
  color: #fff;
  text-align: center;
  padding: 1.5rem 1rem 1.8rem;
  margin-top: 4rem;
  overflow: hidden;
}

.footer-legal {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  line-height: 1.6;
  text-decoration: none;
  border-bottom: none;
  outline: none;
}

.footer-legal span,
.footer-legal a,
.footer-link {
  text-decoration: none;
  border-bottom: none;
  outline: none;
}

.footer-link {
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.footer-link:hover {
  text-decoration: underline;
}

/* ===== FOOTER PARTNERS ===== */
.footer-partners {
  width: 100%;
  max-width: 100%;
  text-align: center;
  margin-bottom: 1.2rem;
  overflow: visible;
}

.footer-partners-title {
  font-size: 0.85rem;
  letter-spacing: 1px;
  opacity: 0.7;
  margin: 0 0 0.75rem 0;
}

.footer-logos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
  column-gap: 2rem;
  overflow: visible;
}

.footer-logos a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: visible;
}

.footer-logos img {
  width: auto;
  max-width: 100%;
  object-fit: contain;
  opacity: 0.9;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  display: block;
}

.footer-logos img[alt="ION"] {
  height: 155px;
}

.footer-logos img[alt="SolarGuard"] {
  height: 72px;
}

.footer-logos img[alt="ROC Bike Customs"] {
  height: 38px;
}

.footer-logos img:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 700px) {
  html,
  body,
  .page-media,
  main,
  section,
  .media-page,
  .media-wrap,
  .media-intro,
  .media-filters,
  .media-instagram,
  .media-sections,
  .media-section,
  .media-bottom-cta,
  .media-bottom-cta-inner,
  .site-footer {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    touch-action: pan-y;
  }

  .media-page {
    padding: 120px 1rem 3.5rem;
  }

  .media-intro h1 {
    font-size: 2.35rem;
  }

  .media-intro p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .media-filters {
    gap: 0.6rem;
    margin-bottom: 2.1rem;
  }

  .media-filter {
    font-size: 0.9rem;
    padding: 0 1rem;
  }

  .media-instagram {
    margin: 2.2rem 0 2.7rem;
  }

  .media-instagram-link {
    width: 100%;
    max-width: 300px;
    font-size: 1.35rem;
    padding: 0 1.2rem;
  }

  .media-row {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 0.6rem;
  }

  .media-row img {
    height: 200px;
    max-width: none;
  }

  .media-bottom-cta-inner {
    padding: 2rem 1rem;
  }

  .media-bottom-cta h2 {
    font-size: 1.9rem;
  }

  .media-bottom-cta p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .media-btn {
    width: 100%;
    max-width: 260px;
  }

  .media-lightbox {
    padding: 1rem;
  }

  .footer-logos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 0.75rem;
    max-width: 100%;
    padding: 0 0.25rem;
  }
}

@media (max-width: 600px) {
  .footer-legal .footer-break {
    display: block;
    height: 0;
  }

  .footer-legal .footer-sep {
    display: none;
  }
}

@media (min-width: 601px) {
  .footer-legal .footer-break {
    display: none;
  }

  .footer-legal .footer-sep {
    display: inline;
  }
}

/* ===== KEEP MOBILE FOOTER LOGO SIZES CONSISTENT ACROSS ALL PAGES ===== */
@media (max-width: 700px) {
  .site-footer .footer-logos img[alt="ION"] {
    height: 76px !important;
    max-height: none !important;
    max-width: 120px !important;
  }

  .site-footer .footer-logos img[alt="SolarGuard"] {
    height: 50px !important;
    max-height: none !important;
    max-width: 110px !important;
  }

  .site-footer .footer-logos img[alt="ROC Bike Customs"] {
    height: 28px !important;
    max-height: none !important;
    max-width: 120px !important;
  }
}

/* ===== MOBILE MENU: STAY VISIBLE AFTER SCROLL ===== */
@media (max-width: 950px) {
  .navbar,
  .navbar.solid,
  .nav-bar {
    overflow: visible !important;
  }

  .navbar.solid {
    backdrop-filter: none !important;
  }

  .mobile-menu {
    position: fixed !important;
    z-index: 99999 !important;
    display: none;
    overflow: visible !important;
  }
}
