/* ==========================================================================
   UNIVERSAL RESPONSIVE STYLESHEET - ALL SCREEN SIZES
   Joe's Nails Bar & Legend K Beauty Academy & Admin Dashboard
   ========================================================================== */

/* Universal Box Sizing & Overflow Prevention */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100% !important;
  overflow-x: hidden !important;
  -webkit-text-size-adjust: 100%;
}

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

/* ==========================================================================
   BREAKPOINT: LAPTOPS & TABLETS LANDSCAPE (max-width: 1199px)
   ========================================================================== */
@media (max-width: 1199px) {
  .nav-container {
    padding: 8px 4%;
  }

  .hero-title {
    font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  }

  .loyal-club-grid,
  .booking-grid,
  .contact-grid {
    gap: 35px;
  }

  .rates-grid {
    gap: 20px;
    padding: 0 10px;
  }
}

/* ==========================================================================
   BREAKPOINT: TABLETS PORTRAIT & MEDIUM SCREENS (max-width: 991px)
   ========================================================================== */
@media (max-width: 991px) {
  /* Navigation */
  .nav-links {
    display: none !important;
    position: fixed !important;
    top: 55px;
    left: 0;
    width: 100%;
    height: calc(100vh - 55px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column !important;
    align-items: center;
    justify-content: flex-start;
    padding-top: 35px;
    gap: 20px;
    z-index: 9999;
    border-top: 1px solid var(--border-color);
    overflow-y: auto;
  }

  .nav-links.active {
    display: flex !important;
  }

  .hamburger {
    display: flex !important;
  }

  /* Section Padding */
  section {
    padding: 60px 5% !important;
  }

  /* Two Column to Single Column Stacks */
  .loyal-club-grid,
  .contact-grid,
  .booking-grid,
  .academy-hero-grid,
  .overview-layout-grid,
  .broadcast-grid,
  .settings-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  .loyal-club-info {
    text-align: center;
  }

  .loyal-club-perks {
    justify-content: center;
  }

  /* Services Grid */
  .services-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  /* Pricelist Rates Grid */
  .rates-grid {
    grid-template-columns: 1fr !important;
  }

  /* Footer Columns */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 30px !important;
  }
}

/* ==========================================================================
   BREAKPOINT: LARGE PHONES & SMALL TABLETS (max-width: 767px)
   ========================================================================== */
@media (max-width: 767px) {
  /* Announcement Bar */
  .academy-top-announcement {
    flex-direction: column;
    padding: 8px 12px;
    gap: 6px;
    font-size: 0.75rem;
    text-align: center;
  }

  /* Header & Logo */
  .header {
    padding: 0;
  }

  .nav-container {
    padding: 8px 4%;
  }

  .logo-text {
    font-size: 1.05rem !important;
    letter-spacing: 0.3px;
  }

  /* Hero Section */
  .hero {
    padding: 90px 4% 40px 4% !important;
    min-height: auto !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .hero-content {
    max-width: 100% !important;
  }

  .hero-tagline {
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 12px;
  }

  .hero-title {
    font-size: clamp(1.85rem, 8vw, 2.6rem) !important;
    line-height: 1.25;
    margin-bottom: 16px;
  }

  .hero-services-list {
    font-size: 0.92rem;
    margin-bottom: 25px;
  }

  .hero-actions {
    flex-direction: column !important;
    width: 100%;
    align-items: center;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100% !important;
    max-width: 100% !important;
    padding: 13px 20px;
    font-size: 0.85rem;
  }

  .hero-stats {
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: space-around !important;
    gap: 20px;
    margin-top: 30px;
    width: 100%;
  }

  .stat-item {
    align-items: center !important;
  }

  .stat-number {
    font-size: 1.6rem !important;
  }

  .stat-label {
    font-size: 0.7rem !important;
  }

  /* Services Grid */
  .services-grid {
    grid-template-columns: 1fr !important;
  }

  .service-image-wrapper {
    height: 180px !important;
  }

  /* Client Gallery Grid */
  .gallery-grid {
    grid-template-columns: 1fr !important;
  }

  .gallery-filters,
  .acad-carousel-controls-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 15px;
  }

  .filter-btn-group,
  .acad-filter-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .filter-btn,
  .acad-filter-chip {
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
    flex: 1 1 auto;
    text-align: center;
  }

  .carousel-arrows-wrap,
  .acad-nav-arrows {
    justify-content: center !important;
    margin: 0 auto;
  }

  /* Academy Carousel Slide Fluid Width */
  .acad-carousel-slide {
    flex: 0 0 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .acad-slide-img-box {
    height: 320px !important;
  }

  /* Pricelist Menu Items */
  .menu-card {
    padding: 20px 16px !important;
  }

  .menu-item {
    align-items: flex-start !important;
    gap: 8px;
  }

  .menu-item-name {
    white-space: normal !important;
    font-size: 0.88rem !important;
    line-height: 1.4;
  }

  .menu-item-dots {
    display: none !important;
  }

  .menu-item-price {
    font-size: 0.95rem !important;
    white-space: nowrap !important;
    flex-shrink: 0;
    margin-left: auto;
  }

  /* Flyer Banner */
  .flyer-footer-banner {
    padding: 24px 15px !important;
  }

  .flyer-tagline {
    font-size: 1.15rem !important;
  }

  .flyer-details-bar {
    flex-direction: column;
    gap: 12px;
  }

  /* Form & Card Padding */
  .contact-card,
  .contact-form,
  .loyal-club-card,
  .enroll-box-card,
  .booking-card-form {
    padding: 22px 16px !important;
  }

  .form-row {
    flex-direction: column !important;
    gap: 15px !important;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
  }

  .footer-col ul {
    align-items: center;
  }

  /* Modals */
  .modal-overlay {
    padding: 12px !important;
  }

  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 12px !important;
  }

  .modal-header {
    padding: 12px 16px !important;
  }

  .modal-title {
    font-size: 1.1rem !important;
  }

  .modal-body {
    padding: 18px 14px !important;
    max-height: 80vh !important;
  }

  .modal-footer {
    padding: 12px 16px !important;
    flex-direction: column;
    gap: 10px;
  }

  .modal-footer .btn {
    width: 100% !important;
  }

  /* Admin Table Responsive Wrapper */
  .table-responsive,
  .admin-table-wrapper {
    width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
  }

  .admin-table {
    min-width: 580px;
  }

  /* Admin Header */
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
  }

  .admin-user {
    width: 100%;
    justify-content: space-between;
  }
}

/* ============================================================
   BREAKPOINT: ULTRA-COMPACT MOBILE PHONES (max-width: 375px)
   ============================================================ */
@media (max-width: 375px) {
  .logo-text {
    font-size: 0.95rem !important;
  }

  .hero-title {
    font-size: 1.7rem !important;
  }

  .hero-stats {
    flex-direction: column !important;
    gap: 15px;
  }

  .stat-number {
    font-size: 1.45rem !important;
  }

  .section-title {
    font-size: 1.6rem !important;
  }

  .acad-slide-img-box {
    height: 270px !important;
  }

  .btn {
    padding: 11px 16px !important;
    font-size: 0.78rem !important;
  }

  .floating-whatsapp-widget {
    bottom: 18px !important;
    right: 18px !important;
  }

  .floating-whatsapp-widget button {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.3rem !important;
  }
}
