/* ========================================
   RoseRoom Salon - Responsive Styles
   Breakpoints: 1024px (tablet), 768px (mobile), 480px (small mobile)
   ======================================== */

/* ----------------------------------------
   TABLET: max-width 1024px
   ---------------------------------------- */
@media (max-width: 1024px) {
  /* Services Grid: 4 columns maintained on tablet, smaller gap */
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
  }

  /* Team Grid: 3 columns maintained, smaller gap */
  .team-grid {
    gap: var(--space-xl);
  }

  .team-photo {
    width: 220px;
    height: 220px;
  }

  /* Contact Section */
  .contact-content {
    gap: var(--space-2xl);
  }

  /* About Section - Nav Cards */
  .nav-card img {
    height: 220px;
  }
}

/* ----------------------------------------
   MOBILE: max-width 768px
   ---------------------------------------- */
@media (max-width: 768px) {
  /* Root adjustments */
  :root {
    --section-padding-y: 3.5rem;
    --header-height: 70px;
  }

  /* Typography scaling */
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 2.25rem;
    margin-bottom: var(--space-xl);
  }

  h3 {
    font-size: 1.5rem;
  }

  /* Navigation: Mobile menu */
  .main-nav {
    justify-content: space-between;
  }

  .mobile-menu-toggle {
    display: flex;
    order: 3;
  }

  .logo {
    order: 1;
    margin: 0;
  }

  .logo-img {
    height: 40px;
  }

  .site-header.scrolled .logo-img {
    height: 35px;
  }

  /* Hide desktop nav on mobile */
  .nav-left,
  .nav-right {
    display: none;
  }

  /* Mobile navigation */
  .nav-mobile {
    display: flex;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--color-dark);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-2xl);
    transition: right var(--transition-slow);
    z-index: var(--z-modal);
    list-style: none;
  }

  .nav-mobile.active {
    right: 0;
  }

  .nav-mobile a {
    color: var(--color-white);
    font-size: var(--text-md);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-nav);
    padding: var(--space-sm) 0;
  }

  .nav-mobile a:hover {
    color: var(--color-gold);
  }

  .nav-mobile .nav-home {
    color: var(--color-gold);
  }

  .nav-mobile .nav-cta {
    margin-top: var(--space-md);
    border: var(--border-width) solid var(--color-gold);
    color: var(--color-gold);
    padding: 10px 20px;
    border-radius: var(--border-radius-md);
  }

  /* Hero Section */
  .hero-section {
    min-height: 500px;
  }

  .hero-content {
    margin-bottom: 20vh;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  /* About Section */
  .about-content {
    margin-bottom: var(--space-2xl);
  }

  .nav-cards {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .nav-card img {
    height: 200px;
  }

  .nav-card-title {
    font-size: 1.5rem;
  }

  /* Services Grid: 2 columns on mobile */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  /* Gallery Carousel */
  .carousel-slide {
    min-width: 50%;
  }

  .carousel-slide img {
    height: 300px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .carousel-prev {
    left: 10px;
  }

  .carousel-next {
    right: 10px;
  }

  /* Team Grid: 2 columns */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  .team-photo {
    width: 180px;
    height: 180px;
  }

  .team-name {
    font-size: var(--text-lg);
  }

  .team-title {
    font-size: var(--text-sm);
  }

  /* Contact Section */
  .contact-content {
    flex-direction: column;
    gap: var(--space-xl);
    text-align: center;
  }

  .contact-map iframe {
    height: 280px;
  }

  /* Footer: Stack layout */
  .footer-content {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
  }

  /* Buttons: Full width on mobile */
  .button-primary {
    padding: 16px 28px;
  }
}

/* ----------------------------------------
   SMALL MOBILE: max-width 480px
   ---------------------------------------- */
@media (max-width: 480px) {
  /* Root adjustments */
  :root {
    --section-padding-y: 3rem;
    --container-padding: 1rem;
  }

  /* Typography */
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  /* Hero */
  .hero-section {
    min-height: 450px;
  }

  .hero-content {
    margin-bottom: 10vh;
  }

  .hero-content h1 {
    font-size: 2.25rem;
    padding: 0 var(--space-sm);
  }

  .hero-content .button-primary {
    margin-top: 28vh;
  }

  /* About nav cards: Single column */
  .nav-card img {
    height: 180px;
  }

  .nav-card-title {
    font-size: 1.25rem;
    bottom: var(--space-md);
  }

  /* Services: Single column */
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  /* Gallery Carousel: Single slide */
  .carousel-slide {
    min-width: 100%;
  }

  .carousel-slide img {
    height: 250px;
  }

  /* Team: Single column */
  .team-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .team-photo {
    width: 220px;
    height: 220px;
  }

  /* Buttons */
  .button-primary {
    width: 100%;
    text-align: center;
    padding: 16px 24px;
  }

  .services-section .button-primary,
  .book-now-section .button-primary {
    max-width: 280px;
  }
}

/* ----------------------------------------
   HOVER STATES: Disable on touch devices
   ---------------------------------------- */
@media (hover: none) {
  .gallery-grid img:hover {
    transform: none;
    opacity: 1;
  }

  .team-member:hover .team-photo img {
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ----------------------------------------
   HIGH CONTRAST MODE
   ---------------------------------------- */
@media (prefers-contrast: high) {
  .button-primary {
    border-width: 3px;
  }

  .nav-links a:focus,
  .button-primary:focus {
    outline: 3px solid var(--color-gold);
    outline-offset: 2px;
  }
}

/* ----------------------------------------
   PRINT STYLES
   ---------------------------------------- */
@media print {
  .site-header,
  .mobile-menu-toggle,
  .hero-section,
  .instagram-section,
  .book-now-section,
  .footer-social {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  h2 {
    page-break-after: avoid;
  }

  .team-grid,
  .gallery-grid {
    page-break-inside: avoid;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  /* Don't show URL for internal links */
  a[href^="#"]::after {
    content: "";
  }
}
