/* ============================================
   TULSA SPCA – Responsive Styles
   Breakpoints:
   - 1200px : Large laptop
   - 1024px : Tablet landscape
   - 768px  : Tablet portrait
   - 600px  : Large mobile
   - 480px  : Small mobile
============================================ */

/* ── Global: Cap circle sizes ─────────────────── */
.mission__icon,
.adoption__step-icon {
  width: 258px;
  max-width: 258px;
  height: auto;
}
.mission__icon svg,
.adoption__step-icon svg {
  width: 100%;
  height: auto;
  max-width: 258px;
}

/* ── Waves ────────────────────────────────────── */
.hero__wave,
.site-footer__wave {
  overflow: hidden;
  line-height: 0;
}
.hero__wave svg,
.site-footer__wave svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Tablet: scale waves down so they don't overwhelm the layout */
@media (max-width: 1024px) {
  .hero__wave svg,
  .site-footer__wave svg {
    max-height: 160px;
  }
}

/* Mobile: hide waves entirely */
@media (max-width: 768px) {
  .hero__wave,
  .site-footer__wave {
    display: none;
  }
}

/* ── Mobile Nav ───────────────────────────────── */
.site-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background-color 0.2s;
}
.site-header__toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}
.site-header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  transform-origin: center;
}
/* Animated X when open */
.site-header__toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header__toggle.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.site-header__toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Overlay — mobile only */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 97;
}
@media (max-width: 768px) {
  .nav-overlay.is-visible {
    display: block;
  }
}

/* Mobile nav panel — full width, slides in from right */
.site-header__nav.is-open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--color-white);
  padding: 0 0 40px;
  box-shadow: none;
  z-index: 98;
  overflow-y: auto;
  animation: slideInRight 0.25s ease;
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Hide mobile-only elements on desktop */
.nav-mobile-header,
.submenu-toggle {
  display: none;
}

/* Nav header bar */
.site-header__nav.is-open .nav-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  background: var(--color-white);
  z-index: 1;
}
.site-header__nav.is-open .nav-mobile-header img {
  height: 38px;
  width: auto;
}
.nav-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--color-text);
  flex-shrink: 0;
}

/* Nav list */
.site-header__nav.is-open ul {
  flex-direction: column !important;
  gap: 0 !important;
  margin-right: 0 !important;
  width: 100%;
  padding: 8px 24px;
  align-items: stretch;
}
.site-header__nav.is-open ul li {
  width: 100%;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: left;
}
.site-header__nav.is-open ul li:last-child {
  border-bottom: none;
}

/* Parent link row — link text + separate chevron toggle */
.site-header__nav.is-open ul li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text);
  text-align: left;
}
.site-header__nav.is-open ul li a:hover {
  color: var(--color-green);
}

/* Hide the CSS ::after chevron on mobile — we use a JS button instead */
.site-header__nav.is-open ul li.menu-item-has-children > a::after {
  display: none;
}

/* Chevron toggle button — sits beside the link text */
.submenu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  color: var(--color-text);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.submenu-toggle svg {
  display: block;
  width: 16px;
  height: 16px;
}
.site-header__nav.is-open .submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-item-has-children.is-open > a .submenu-toggle,
.menu-item-has-children.is-open > .submenu-toggle {
  transform: rotate(180deg);
}

/* Submenu */
.site-header__nav.is-open ul li .sub-menu {
  position: static !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  box-shadow: none !important;
  padding: 0 0 8px 16px !important;
  transform: none !important;
  display: none;
  background: transparent;
  border-radius: 0;
}
.site-header__nav.is-open ul li.is-open > .sub-menu {
  display: block;
}
.site-header__nav.is-open ul li .sub-menu li {
  border-bottom: none;
}
.site-header__nav.is-open ul li .sub-menu li a {
  font-size: 16px;
  font-weight: 400;
  padding: 10px 0;
  color: var(--color-text);
  opacity: 0.75;
  justify-content: flex-start;
}
.site-header__nav.is-open ul li .sub-menu li a:hover {
  color: var(--color-green);
  opacity: 1;
}

/* Donate button */
.site-header__nav.is-open .btn--primary {
  display: block;
  margin: 24px 24px 0;
  text-align: center;
  padding: 16px;
  font-size: 0.9rem;
  width: calc(100% - 48px);
}

/* Nav list inside mobile panel */
.site-header__nav.is-open ul {
  flex-direction: column !important;
  gap: 0 !important;
  margin-right: 0 !important;
  width: 100%;
  padding: 8px 20px;
  align-items: flex-end;
}
.site-header__nav.is-open ul li {
  width: 100%;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: right;
}
.site-header__nav.is-open ul li:last-child {
  border-bottom: none;
}
.site-header__nav.is-open ul li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  text-align: right;
}
.site-header__nav.is-open ul li a:hover {
  color: var(--color-green);
}

/* Flip chevron arrows to right-align */
.site-header__nav.is-open ul li.menu-item-has-children > a::after {
  margin-left: auto;
  margin-right: 0;
}

/* Mobile submenu */
.site-header__nav.is-open ul li .sub-menu {
  position: static !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  box-shadow: none !important;
  padding: 0 0 8px 16px !important;
  transform: none !important;
  display: none;
  background: transparent;
  border-radius: 0;
}
.site-header__nav.is-open ul li.is-open > .sub-menu {
  display: block;
}
.site-header__nav.is-open ul li .sub-menu li {
  border-bottom: none;
}
.site-header__nav.is-open ul li .sub-menu li a {
  font-size: 15px;
  font-weight: 400;
  padding: 10px 0;
  color: var(--color-text);
  opacity: 0.75;
  justify-content: flex-end;
}
.site-header__nav.is-open ul li .sub-menu li a:hover {
  color: var(--color-green);
  opacity: 1;
}

/* Donate button right-aligned in mobile nav */
.site-header__nav.is-open .btn--primary {
  display: block;
  margin: 20px 20px 0 auto;
  text-align: center;
  padding: 14px 28px;
  font-size: 0.85rem;
  width: auto;
}

/* ── 1200px ───────────────────────────────────── */
@media (max-width: 1200px) {
  .site-header__nav ul {
    gap: 24px;
    margin-right: 24px;
  }

  .hero__content {
    max-width: 460px;
  }
  .hero__heading {
    font-size: 2.4rem;
  }

  .mission__card-text {
    font-size: 0.9rem;
  }

  .site-footer__two-wrap {
    width: auto;
    gap: 40px;
  }
}

/* ── 1024px ───────────────────────────────────── */
@media (max-width: 1024px) {
  .hero {
    padding-top: 50px;
  }
  .hero__content {
    flex: 0 0 48%;
    max-width: 400px;
    margin-right: 0;
    padding-bottom: 60px;
  }
  .hero__heading {
    font-size: 2rem;
  }
  .hero__image {
    flex: 0 0 52%;
    margin-left: -40px;
  }

  .section-header__heading {
    font-size: 42px;
  }

  .mission {
    padding: 70px 0;
  }
  .mission__grid {
    gap: 30px;
  }

  /* Adoption steps — 2 columns on tablet, tighter gap */
  .adoption__steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .featured-pets__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .site-footer__two-wrap {
    width: 100%;
    flex-direction: row;
    gap: 60px;
  }
  .site-footer__right {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
  }
  .site-footer__badges {
    justify-content: flex-start;
  }
}

/* ── 768px ────────────────────────────────────── */
@media (max-width: 900px) {
  /* Header */
  .site-header__toggle {
    display: flex;
  }
}
/* ── 768px ────────────────────────────────────── */
@media (max-width: 768px) {
  /* Hero */
  .hero {
    padding-top: 40px;
    overflow: visible;
  }
  .hero__inner {
    flex-direction: column;
    gap: 0;
  }
  .hero__content {
    flex: unset;
    width: 100%;
    max-width: 100%;
    padding-bottom: 30px;
    margin-right: 0;
    text-align: center;
    align-items: center;
  }
  .hero__subtext {
    margin-inline: auto;
  }
  .hero__buttons {
    justify-content: center;
  }
  .hero__image {
    flex: unset;
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
  }
  .hero__image img {
    max-width: 480px;
    margin-inline: auto;
  }

  /* Section headers */
  .section-header__heading {
    font-size: 36px;
  }
  .section-header__subtext {
    font-size: 0.9rem;
  }
  .section-header {
    margin-bottom: 40px;
  }

  /* Mission */
  .mission {
    padding: 60px 0;
  }
  .mission__grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  /* Adoption steps — 1 column on mobile */
  .adoption {
    padding: 60px 0;
  }
  .adoption__steps {
    grid-template-columns: 1fr !important;
    gap: 40px;
  }
  .adoption__step-icon {
    max-width: 200px;
    margin-inline: auto;
  }

  /* Featured Pets — stack to 1 column on mobile */
  .featured-pets {
    padding: 60px 0 0;
  }
  .featured-pets__grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  .featured-pets__grid .pet-card {
    flex: unset;
    width: 100%;
  }

  /* Page hero heading — smaller on mobile */
  .page-hero__heading {
    font-size: 36px !important;
  }
  .page-hero {
    height: 240px;
  }

  /* Page builder H2 */
  .pb-heading,
  .pb-wysiwyg h2,
  h2 {
    font-size: 26px !important;
  }

  /* Page builder 2 column — stack on mobile */
  .pb-2col__grid,
  .pb-2col__grid.pb-2col--60-40,
  .pb-2col__grid.pb-2col--40-60,
  .pb-2col__grid.pb-2col--50-50 {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }
  .pb-2col__img {
    max-height: 300px;
    min-height: unset;
  }
  .pb-2col--reverse .pb-2col__col:first-child {
    order: 2;
  }
  .pb-2col--reverse .pb-2col__col:last-child {
    order: 1;
  }

  .pb-cols__grid--3 {
    grid-template-columns: 1fr;
  }
  .pb-cols__grid--4 {
    grid-template-columns: 1fr;
  }

  .pb-pricing__grid {
    grid-template-columns: 1fr;
  }
  .pb-testimonials__grid {
    grid-template-columns: 1fr;
  }

  .pb-slider__slide img {
    height: 280px;
  }
  .pb-banner__heading {
    font-size: 32px;
  }

  /* Footer — top padding on mobile */
  .site-footer__body {
    padding-top: 40px;
  }
  .site-footer__two-wrap {
    flex-direction: column;
    gap: 40px;
    width: 100%;
  }
  .site-footer__right {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-footer__badges {
    justify-content: flex-start;
  }
  .site-footer__bottom {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 6px;
  }
}

/* ── 600px ────────────────────────────────────── */
@media (max-width: 600px) {
  .container {
    padding-inline: 20px;
  }
  .site-header .container,
  .site-footer__body .container {
    padding-inline: 20px;
  }

  .site-header__logo img {
    height: 42px;
  }

  .hero__heading {
    font-size: 1.8rem;
  }
  .hero__subtext {
    font-size: 0.875rem;
  }
  .hero__buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .hero__buttons .btn {
    width: 100%;
    text-align: center;
  }

  .section-header__heading {
    font-size: 30px;
  }

  /* Adoption steps — cap circle size and center on small mobile */
  .adoption__steps {
    grid-template-columns: 1fr !important;
  }
  .adoption__step {
    max-width: 280px;
    margin-inline: auto;
  }
  .adoption__step-title {
    font-size: 20px;
  }

  .mission__card-title {
    font-size: 20px;
  }

  .featured-pets__grid {
    grid-template-columns: 1fr;
  }
  .pet-card__name {
    font-size: 20px;
  }

  .site-footer__label {
    font-size: 16px;
  }
  .site-footer__col-heading {
    font-size: 16px;
  }
  .site-footer__hours-list {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .site-footer__hours-list dt {
    margin-top: 10px;
  }
  .site-footer__hours-list dt:first-child {
    margin-top: 0;
  }
  .site-footer__badges img {
    width: 64px;
    height: 64px;
  }
}

/* ── 480px ────────────────────────────────────── */
@media (max-width: 480px) {
  .hero__heading {
    font-size: 1.6rem;
  }
  .hero__image img {
    max-width: 100%;
  }

  .section-header__heading {
    font-size: 26px;
  }

  .btn {
    font-size: 0.75rem;
    padding: 12px 22px;
  }

  .site-footer__petco {
    max-width: 90px;
  }
}
