
/* ==========================================
   GLAMSPACE - MOBILE RESPONSIVE IMPROVEMENTS
   ========================================== */

/* Prevent content from overflowing */
.hero-grid > *,
.intro-grid > *,
.routine-grid > *,
.services-grid > *,
.contact-grid > *,
.booking-layout > *,
.form-grid > *,
.footer-content > * {
  min-width: 0;
}

/* Improve footer layout */
.footer-content {
  grid-template-columns:
    minmax(0, 1.45fr) minmax(0, 1fr);
}

/* Prevent long email addresses overflowing */
.site-footer a,
.contact-detail-card a,
.contact-details p {
  overflow-wrap: anywhere;
}

/* Improve accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #9b6aba;
  outline-offset: 3px;
}

/* ==========================================
   TABLETS AND MOBILE NAVIGATION
   ========================================== */

@media (max-width: 767px) {

  .site-header .navbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 74px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .site-header .navbar .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .site-header .navbar .brand-text {
    min-width: 0;
  }

  /* Hamburger menu button */
  .site-header .navbar > .nav-toggle {
    display: flex;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    margin-left: auto;
    border: none;
    border-radius: 12px;
    background: #4b246b;
    cursor: pointer;
  }

  /* Remove extra lines from older CSS */
  .site-header .navbar > .nav-toggle span::before,
  .site-header .navbar > .nav-toggle span::after {
    display: none;
    content: none;
  }

  /* Three hamburger lines */
  .site-header .navbar > .nav-toggle span {
    position: static;
    display: block;
    width: 22px;
    height: 2px;
    margin: 0;
    border-radius: 2px;
    background: #ffffff;
  }

  /* Hide the mobile menu by default */
  .site-header .navbar > .nav-toggle + .nav-links {
    display: none;
    order: 3;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 4px;
    padding: 12px 0 4px;
    margin: 0;
  }

  /* Display menu when hamburger is clicked */
  .site-header .navbar > .nav-toggle + .nav-links.is-open {
    display: flex;
  }

  /* Mobile navigation links */
  .site-header .navbar > .nav-toggle + .nav-links > a {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 16px !important;
    line-height: 1.4;
    text-align: left;
    color: #281334;
  }

  /* Active navigation link */
  .site-header .navbar > .nav-toggle + .nav-links > a.active {
    background: #efe3f7;
    color: #4b246b;
  }

  /* Mobile booking button */
  .site-header .navbar > .nav-toggle + .nav-links > .nav-button {
    margin-top: 6px;
    background: #4b246b;
    color: #ffffff !important;
    text-align: center;
    border-radius: 12px;
  }

  /* Single-column mobile layout */
  .hero-grid,
  .intro-grid,
  .routine-grid,
  .story-grid,
  .page-hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Homepage */
  .hero {
    padding: 56px 0 62px;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 10vw, 4.25rem);
    line-height: 1.12;
  }

  .hero-description {
    font-size: 16px;
    line-height: 1.8;
  }

  /* Hero image */
  .hero-visual .hero-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  /* Service and gallery grids */
  .services-grid,
  .values-grid,
  .process-grid,
  .home-photo-gallery,
  .glam-gallery {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  /* Booking and contact forms */
  .contact-form-card,
  .booking-form-card {
    padding: 24px;
  }

}

/* ==========================================
   SMALL MOBILE SCREENS
   ========================================== */

@media (max-width: 650px) {

  /* Footer */
  .footer-content,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  /* Page headings */
  .info-hero h1 {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }

  .info-hero p:not(.eyebrow),
  .page-hero__copy {
    font-size: 16px;
    line-height: 1.75;
  }

  /* Contact page */
  .contact-form-card h2 {
    font-size: clamp(1.7rem, 7vw, 2.15rem);
  }

  /* Prevent iPhone zoom when selecting inputs */
  .contact-form-card input:not([type="checkbox"]),
  .contact-form-card select,
  .contact-form-card textarea,
  .field input,
  .field select,
  .field textarea {
    max-width: 100%;
    min-height: 44px;
    font-size: 16px;
  }

  /* Booking form */
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-actions .btn,
  .form-actions .button,
  .contact-form-card button[type="submit"] {
    min-height: 46px;
  }

}

/* ==========================================
   PHONES UNDER 520PX
   ========================================== */

@media (max-width: 520px) {

  /* Images and galleries */
  .home-photo-gallery,
  .glam-gallery,
  .gallery-grid,
  .photo-grid,
  .image-grid,
  .routine-options {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Full-width mobile buttons */
  .hero-buttons .btn,
  .gallery-action .btn {
    width: 100%;
    min-height: 48px;
  }

  /* Better card spacing */
  .service-card,
  .contact-detail-card,
  .comparison-card,
  .service-detail {
    padding: 20px;
  }

  /* CTA buttons */
  .cta-content .btn,
  .cta-band__inner .btn {
    width: 100%;
    text-align: center;
  }

}

/* ==========================================
   VERY SMALL PHONES
   ========================================== */

@media (max-width: 380px) {

  .container {
    width: calc(100% - 28px);
  }

  .site-header .brand strong {
    font-size: 19px;
  }

  .site-header .brand small {
    font-size: 9px;
    letter-spacing: 0.07em;
  }

  .hero h1 {
    font-size: 2.65rem;
  }

  .contact-form-card {
    padding: 18px;
  }

}

/* Accessibility - reduced motion */
@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .nav-toggle span,
  .btn,
  .button,
  .nav-button {
    transition: none;
  }

}
