/* =============================================================================
   PharmaCare — Responsive Layout
   Breakpoints (max-width unless noted):
   479px  — Mobile portrait
   639px  — Small devices
   767px  — Tablets portrait / mobile landscape
   1023px — Tablets landscape / iPad Pro portrait
   1279px — Laptops / iPad Pro landscape
   1439px — Desktop
   1440px+ — Large / wide displays
   ============================================================================= */

:root {
  --header-height: 80px;
  --header-height-compact: 72px;
  --page-gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(48px, 10vw, 128px);
  --section-y-sm: clamp(40px, 8vw, 80px);
  --touch-target: 44px;
  --container-max: 1400px;
}

/* --- Global foundation --- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open .page-content,
body.nav-open .site-footer {
  pointer-events: none;
  user-select: none;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

.site-wrapper {
  min-width: 0;
}

.page-content {
  padding-top: 0;
  min-height: auto;
}

.site-wrapper--home .page-content {
  padding-top: 0;
}

.page-banner {
  padding-top: calc(var(--header-height) + clamp(32px, 6vw, 56px));
  padding-bottom: clamp(48px, 8vw, 80px);
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

/* Fixed header offset for stacked inner sections */
[class$="__inner"],
.page-banner__inner,
.booking-progress__inner,
.booking-form__inner {
  box-sizing: border-box;
}

.site-header__inner {
  min-width: 0;
}

/* --- Mobile menu toggle (hidden on desktop) --- */
.site-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: var(--touch-target);
  height: var(--touch-target);
  padding: 0;
  margin: 0;
  border: 1px solid #54b67966;
  border-radius: 10px;
  background-color: #1a1d23;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 1101;
  -webkit-appearance: none;
  appearance: none;
}

.site-header__toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background-color: #efede7;
  flex-shrink: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-header--nav-open .site-header__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header--nav-open .site-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header--nav-open .site-header__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header__menu-item--cta {
  display: none;
}

@media (max-width: 1024px) {
  .site-header__nav {
    justify-content: flex-start;
  }

  .site-header__menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }
}

.site-header__cta--mobile {
  display: none;
}

/* --- Fluid typography --- */
.page-banner__heading {
  font-size: clamp(2rem, 5vw + 1rem, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.page-banner__text {
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.125rem);
  line-height: 1.55;
}

.about-intro__title,
.about-values__title,
.contact-faq__title,
.services-section__title,
.services-cta__title {
  font-size: clamp(1.5rem, 3vw + 0.75rem, 1.875rem);
  line-height: 1.2;
}

.home-testimonial-card__quote {
  font-size: clamp(1.125rem, 2vw + 0.5rem, 1.5rem);
  line-height: 1.45;
}

.home-stat-card__value {
  font-size: clamp(2rem, 4vw + 0.5rem, 3rem);
  line-height: 1.1;
}

/* --- Touch-friendly controls --- */
.home-btn,
.site-header__cta,
.site-header__link,
.booking-form__submit,
.contact-form__submit,
.locations-cta__button,
.services-cta__button,
.home-locations__view-all,
.booking-form__input,
.booking-form__select-input,
.booking-form__date-input,
.booking-form__textarea,
.contact-form__input,
.contact-form__textarea,
.service-card__link,
.location-card__cta,
.location-card__map-link {
  min-height: var(--touch-target);
}

.contact-form__input,
.booking-form__input,
.booking-form__select-input,
.booking-form__date-input {
  font-size: 16px;
}

/* =============================================================================
   LARGE SCREENS / WIDE DISPLAYS (1440px+)
   ============================================================================= */
@media (min-width: 1440px) {
  .site-header__inner,
  .site-footer__inner,
  .home-private-services__inner,
  .home-why-choose__inner,
  .home-testimonials__inner,
  .home-service-range__inner,
  .home-locations__inner,
  .home-cta__inner,
  .about-values__inner,
  .about-team__inner,
  .services-private__inner,
  .services-nhs__inner,
  .services-cta__inner {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* =============================================================================
   DESKTOP (1280px – 1439px)
   ============================================================================= */
@media (max-width: 1439px) {
  .site-header__inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .site-header__link {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* =============================================================================
   LAPTOPS / iPad Pro LANDSCAPE (1024px – 1279px)
   ============================================================================= */
@media (max-width: 1279px) {
  .about-values__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-private__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__main {
    gap: 40px;
  }

  .home-private-services__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =============================================================================
   TABLETS LANDSCAPE / iPad Pro PORTRAIT (768px – 1024px)
   ============================================================================= */
@media (max-width: 1024px) {
  :root {
    --header-height: var(--header-height-compact);
  }

  .home-hero {
    align-items: flex-start;
    min-height: auto;
    overflow-x: clip;
    overflow-y: visible;
  }

  .home-hero__inner {
    padding: calc(var(--header-height-compact) + 32px) var(--page-gutter) 64px;
  }

  .home-hero__content {
    padding-left: 0;
    padding-right: 0;
    background-color: transparent;
  }

  .home-hero__headline {
    font-size: clamp(2.25rem, 7vw, 2.75rem);
  }

  .site-header {
    padding: 0;
  }

  .site-header--nav-open {
    z-index: 1200;
  }

  .site-header__inner {
    height: var(--header-height-compact);
    padding: 0 var(--page-gutter);
    gap: 12px;
    flex-wrap: nowrap;
  }

  .site-header__logo-tagline {
    display: none;
  }

  .site-header__toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-header__cta--desktop {
    display: none;
  }

  .site-header__nav {
    position: fixed;
    top: var(--header-height-compact);
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: calc(100dvh - var(--header-height-compact));
    min-height: calc(100vh - var(--header-height-compact));
    z-index: 1190;
    flex: none;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 24px var(--page-gutter) max(32px, env(safe-area-inset-bottom));
    background-color: #0d0f12;
    border-top: 1px solid #21242c80;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .site-header--nav-open .site-header__nav {
    display: flex;
  }

  .site-header__menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .site-header__menu-item {
    padding: 0;
    width: 100%;
  }

  .site-header__link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-height: var(--touch-target);
    padding: 12px 16px;
    font-size: 17px;
    line-height: 24px;
    white-space: normal;
    color: #efede7 !important;
    background-color: #14161a;
    border: 1px solid #21242c;
    border-radius: 12px;
    text-decoration: none;
  }

  .site-header__link:hover,
  .site-header__link:focus-visible {
    background-color: #1a1d23;
    color: #efede7 !important;
    border-color: #54b67966;
  }

  .site-header__link--active,
  .site-header__link.site-header__link--active {
    color: #54b679 !important;
    background-color: #54b6791a;
    border-color: #54b67966;
  }

  .site-header__link-icon {
    filter: brightness(0) invert(1);
    opacity: 0.9;
  }

  .site-header__link--active .site-header__link-icon {
    filter: none;
    opacity: 1;
  }

  .site-header__menu-item--cta {
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #21242c80;
  }

  .site-header__cta--mobile {
    display: flex !important;
    width: 100%;
    min-height: var(--touch-target);
    justify-content: center;
    align-items: center;
    color: #0d0f12 !important;
    background-color: #54b679;
    border: none;
    font-size: 16px;
  }

  .about-intro__grid,
  .contact-info__grid,
  .location-card__layout,
  .home-locations__grid,
  .home-cta__grid,
  .home-service-range__grid {
    grid-template-columns: 1fr;
  }

  .about-team__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .location-card__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__main {
    grid-template-columns: 1fr;
  }

  .site-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-banner {
    padding-top: calc(var(--header-height-compact) + clamp(24px, 5vw, 40px));
    padding-bottom: clamp(40px, 7vw, 64px);
  }

  .home-private-services,
  .home-why-choose,
  .home-testimonials,
  .home-service-range,
  .home-locations,
  .home-cta {
    padding-top: var(--section-y-sm);
    padding-bottom: var(--section-y-sm);
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }

  .home-stats {
    min-height: auto;
  }

  .home-stats__inner {
    width: 100%;
    max-width: none;
    padding: var(--section-y-sm) var(--page-gutter);
  }

  .home-stats__bg {
    display: block;
  }

  .home-stats__bg-dark {
    position: absolute;
    inset: 0;
    flex: none;
    width: 100%;
    height: 100%;
  }

  .home-stats__bg-accent,
  .home-stats__bg-mask,
  .home-stats__bg-ring {
    display: none;
  }

  .home-private-services__inner,
  .home-why-choose__inner,
  .home-testimonials__inner,
  .home-service-range__inner,
  .about-values__inner {
    padding-left: 0;
    padding-right: 0;
  }

  .home-private-services__grid {
    grid-template-columns: 1fr;
  }

  .home-featured-card {
    grid-row: auto;
    grid-column: auto;
  }

  .home-featured-card__inner {
    padding: clamp(24px, 5vw, 56px);
  }

  .home-why-choose__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-progress__steps {
    gap: 20px;
  }

  .services-nhs__grid {
    grid-template-columns: 1fr;
  }

  /* Inner pages — section gutters */
  .about-intro,
  .about-values,
  .about-team,
  .about-trust,
  .contact-info,
  .contact-form,
  .contact-faq,
  .locations-list,
  .locations-cta,
  .services-private,
  .services-nhs,
  .services-cta,
  .booking-form,
  .booking-progress {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }

  .services-cta {
    padding-top: var(--section-y-sm);
    padding-bottom: var(--section-y-sm);
  }

  .about-intro__inner,
  .about-team__inner,
  .about-trust__inner,
  .contact-info__inner,
  .contact-form__inner,
  .contact-faq__inner,
  .locations-list__inner,
  .services-private__inner,
  .services-nhs__inner,
  .services-cta__inner,
  .booking-form__inner,
  .booking-progress__inner {
    padding-left: 0;
    padding-right: 0;
  }

  .services-cta__inner {
    padding-top: clamp(40px, 8vw, 64px);
    padding-bottom: clamp(40px, 8vw, 64px);
  }

  .booking-progress__steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .services-section__title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .service-card__footer--nhs {
    flex-direction: column;
    align-items: stretch;
  }

  .service-card__footer--nhs .service-card__link--secondary {
    width: 100%;
    justify-content: center;
  }

  .location-card__cta {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .home-private-services__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-private-services__intro {
    max-width: none;
    margin-left: 0;
    text-align: left;
  }

  .home-locations__inner,
  .home-cta__inner {
    padding-left: 0;
    padding-right: 0;
  }

  .home-stat-card__value {
    white-space: normal;
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .home-testimonials__glow--green {
    top: 80px;
    left: 40px;
    width: 160px;
    height: 160px;
    filter: blur(20px);
  }

  .home-testimonials__glow--gold {
    right: 80px;
    bottom: 160px;
    left: auto;
    width: 240px;
    height: 240px;
  }

  .home-cta__glow--green {
    top: 80px;
    left: 40px;
    transform: none;
    width: 160px;
    height: 160px;
  }

  .home-cta__glow--gold {
    right: 40px;
    bottom: 80px;
    width: 200px;
    height: 200px;
  }
}

/* =============================================================================
   TABLETS PORTRAIT (640px – 767px)
   ============================================================================= */
@media (max-width: 767px) {
  .home-why-choose__grid,
  .home-cta__stats-grid,
  .booking-progress__steps,
  .about-team__grid {
    grid-template-columns: 1fr;
  }

  .home-stats__inner {
    width: 100%;
    max-width: none;
    padding: var(--section-y-sm) var(--page-gutter);
  }

  .home-stats__grid {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .home-stat-card__value {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.1;
    white-space: normal;
  }

  .contact-form__row,
  .booking-form__row {
    grid-template-columns: 1fr;
  }

  .site-footer__nav {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .site-footer__brand {
    max-width: none;
    align-items: center;
    text-align: center;
  }

  .site-footer__logo-text {
    align-items: center;
    padding-left: 10px;
  }

  .site-footer__about {
    text-align: center;
  }

  .site-footer__contact-item {
    justify-content: center;
  }

  .site-footer__social {
    justify-content: center;
    width: 100%;
  }

  .site-footer__nav-col {
    text-align: center;
  }

  .site-footer__nav-list {
    align-items: center;
  }

  .site-footer__bottom {
    text-align: center;
  }

  .site-footer__copyright {
    width: 100%;
    align-items: center;
  }

  .site-footer__inner {
    padding: 64px var(--page-gutter) 48px;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: center;
  }

  .site-footer__legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .site-footer__badges {
    gap: 16px;
  }

  .site-footer__registration {
    padding: 18px 16px;
    gap: 10px;
  }

  .site-footer__registration-title {
    font-size: 20px;
    line-height: 1.3;
  }

  .site-footer__registration-text {
    font-size: 16px;
    line-height: 1.45;
    letter-spacing: 0;
    color: #b5bdcc;
  }

  .site-footer__registration-text strong {
    display: block;
    margin-bottom: 2px;
  }

  .about-values__grid,
  .services-private__grid {
    grid-template-columns: 1fr;
  }

  .service-card--nhs .service-card__row {
    gap: 12px;
  }

  .service-card--nhs .service-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .service-card--nhs .service-card__icon > i,
  .service-card--nhs .service-card__icon-mark {
    width: 18px;
    height: 18px;
    font-size: 18px;
  }

  .services-private__inner,
  .services-nhs__inner {
    align-items: center;
    text-align: center;
  }

  .services-section__header {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .service-card:not(.service-card--nhs) .service-card__content {
    align-items: center;
    text-align: center;
  }

  .service-card:not(.service-card--nhs) .service-card__icon {
    margin-left: auto;
    margin-right: auto;
  }

  .service-card:not(.service-card--nhs) .service-card__footer {
    align-items: center;
    text-align: center;
  }

  .service-card:not(.service-card--nhs) .service-card__link {
    justify-content: center;
    width: 100%;
    max-width: 100%;
  }

  .about-intro,
  .about-values,
  .about-team,
  .about-trust,
  .contact-info,
  .contact-form,
  .contact-faq,
  .locations-list,
  .locations-cta,
  .services-private,
  .services-nhs,
  .services-cta,
  .booking-form,
  .booking-progress {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }

  .services-cta {
    padding-top: var(--section-y-sm);
    padding-bottom: var(--section-y-sm);
  }

  .services-cta__inner {
    padding-top: clamp(40px, 8vw, 64px);
    padding-bottom: clamp(40px, 8vw, 64px);
  }

  .about-values__inner,
  .locations-cta__inner {
    padding-left: 0;
    padding-right: 0;
  }

  .location-card__map {
    padding: 32px 24px;
  }

  .home-testimonial-card {
    padding: clamp(24px, 6vw, 64px) clamp(20px, 4vw, 64px) clamp(88px, 12vw, 104px);
  }

  .home-testimonial-card__controls {
    left: clamp(20px, 4vw, 41px);
    right: clamp(20px, 4vw, 41px);
    bottom: clamp(20px, 4vw, 41px);
  }

  .home-testimonial-card__quote-icon {
    width: 64px;
    height: 64px;
    top: 16px;
    left: 16px;
  }

  .home-service-panel {
    padding: clamp(20px, 4vw, 40px);
  }

  .home-hero__badges,
  .home-hero__pills {
    flex-wrap: wrap;
  }

  .home-hero__actions,
  .home-cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-btn {
    width: 100%;
    justify-content: center;
  }

  .services-section__title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-content__main {
    gap: 0;
  }

  .site-wrapper--about .page-content__main,
  .site-wrapper--services .page-content__main,
  .site-wrapper--locations .page-content__main,
  .site-wrapper--contact .page-content__main {
    padding-bottom: 48px;
  }

  .page-banner {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }

  .about-trust__registration {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    text-align: center;
  }

  .about-trust__registration-label {
    white-space: normal;
  }

  .home-testimonials__platforms {
    flex-direction: column;
    align-items: center;
  }
}

/* =============================================================================
   SMALL DEVICES (480px – 639px)
   ============================================================================= */
@media (max-width: 639px) {
  .site-header__logo-name {
    font-size: 16px;
  }

  .site-header__logo-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .site-footer__logo-name {
    font-size: 20px;
  }

  .site-footer__logo-icon {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .home-featured-card__title {
    font-size: clamp(1.375rem, 5vw, 1.875rem);
    line-height: 1.25;
  }

  .service-card__title {
    font-size: clamp(1.125rem, 4vw, 1.5rem);
  }

  .booking-form__header,
  .booking-form__body,
  .contact-form__header,
  .contact-form__body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .booking-form__card,
  .contact-form__card,
  .contact-info__card,
  .contact-faq__item,
  .location-card,
  .about-values__card,
  .about-team__card {
    border-radius: 10px;
  }
}

/* =============================================================================
   MOBILE PORTRAIT (≤479px)
   ============================================================================= */
@media (max-width: 479px) {
  :root {
    --page-gutter: 16px;
  }

  .site-header__inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-banner__inner {
    gap: 16px;
  }

  .home-private-services__header-left {
    width: 100%;
  }

  .home-cta__stats-deco,
  .home-cta__stats-deco--inner {
    display: none;
  }

  .home-cta__stats-card {
    padding: 24px;
  }

  .about-trust__inner {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }
}

/* =============================================================================
   MOBILE LANDSCAPE & SHORT VIEWPORTS
   ============================================================================= */
@media (max-width: 767px) and (orientation: landscape) {
  .site-header__nav {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .site-header__menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .site-header__menu-item--cta {
    grid-column: 1 / -1;
    margin-top: 8px;
    padding-top: 8px;
  }

  .home-hero__inner {
    padding-top: calc(var(--header-height-compact) + 16px);
    padding-bottom: 32px;
  }

  .home-hero {
    min-height: auto;
  }

  .page-banner {
    padding-top: calc(var(--header-height-compact) + 16px);
    padding-bottom: 32px;
  }

  .booking-progress {
    padding-bottom: 48px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .site-header__nav {
    overflow-y: auto;
  }
}

/* =============================================================================
   REDUCED MOTION
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-header__nav,
  .site-header__toggle-bar {
    transition: none;
  }
}

/* =============================================================================
   HOME SECTION VISIBILITY (ACF)
   ============================================================================= */
@media (max-width: 767px) {
  .home-section--hidden-mobile {
    display: none !important;
  }
}
