/* ==========================================================================
   CHARIS MUSIC COLLECTIVE - Responsive Stylesheet & Mobile Navigation
   ========================================================================== */

/* Prevent horizontal overflow on mobile */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden !important;
}

/* Hide mobile navigation drawer elements by default on desktop screens */
.mobile-user-badge,
.mobile-nav-cta,
.mobile-logout-btn {
  display: none !important;
}

/* Touch input optimization */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important; /* Prevents auto-zoom on iOS/Android Chrome */
  }
}

/* Data Table Responsive Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
}

.table-responsive table {
  min-width: 600px;
}

/* Medium Desktop & Tablets (max-width: 1024px) */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-image-wrapper img {
    height: 420px;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .instructor-profile {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
  }

  .instructor-img img {
    height: 380px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* Tablet & Mobile Screens (max-width: 768px) */
@media (max-width: 768px) {
  :root {
    --nav-height: 65px;
  }

  .header {
    height: 65px;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .brand-logo img {
    height: 38px;
  }

  .brand-title {
    font-size: 0.95rem;
  }

  .brand-title span {
    font-size: 0.58rem;
    letter-spacing: 1.5px;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  /* Hide header bar buttons AND user-badge-nav on mobile bar */
  .nav-actions .btn,
  .user-badge-nav {
    display: none !important;
  }

  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-size: 1.3rem;
    cursor: pointer;
  }

  .nav-menu {
    position: fixed;
    top: 65px;
    right: -100%;
    width: 290px;
    max-width: 85vw;
    height: calc(100vh - 65px);
    background: rgba(12, 12, 12, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--orange-border);
    flex-direction: column;
    align-items: stretch;
    padding: 1.8rem 1.2rem;
    gap: 0.8rem;
    overflow-y: auto;
    transition: right var(--transition-normal);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.9);
    z-index: 1001;
  }

  .nav-menu.open {
    right: 0;
  }

  .nav-menu .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.98rem;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .mobile-user-badge,
  .mobile-nav-cta {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.8rem;
    padding: 0.85rem 1.2rem;
    background: rgba(244, 123, 32, 0.18) !important;
    border: 1px solid var(--orange-border) !important;
    color: var(--bright-orange) !important;
    font-weight: 700 !important;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 15px rgba(244, 123, 32, 0.2);
  }

  .mobile-logout-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(235, 87, 87, 0.15) !important;
    border: 1px solid rgba(235, 87, 87, 0.35) !important;
    color: #eb5757 !important;
    font-weight: 700 !important;
    font-family: inherit;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
  }

  .mobile-logout-btn:hover {
    background: rgba(235, 87, 87, 0.25) !important;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .step-indicator {
    overflow-x: auto;
    padding-bottom: 0.8rem;
    justify-content: flex-start;
    gap: 0.6rem;
  }

  .step-item {
    flex-shrink: 0;
  }

  .step-label {
    display: none;
  }

  .registration-container {
    padding: 1.5rem 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }

  .hero-image-wrapper img {
    height: 320px;
  }

  .hero-badge-floating {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    padding: 0.8rem 1rem;
    background: rgba(17, 17, 17, 0.9);
    backdrop-filter: blur(10px);
  }

  .section-padding {
    padding: 3.5rem 0;
  }
}

/* Extra Small Phones (max-width: 480px) */
@media (max-width: 480px) {
  .brand-title span {
    display: none;
  }

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

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .floating-widgets {
    bottom: 1rem;
    right: 1rem;
  }

  .float-btn {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}