/* ==========================================
   PBC THEME (extracted from old header include)
   Keeps existing look while fixing template structure.
   =========================================== */

/* Viewport safety (kept minimal; viewport-fix.css is primary) */
html,
body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* DO NOT override Tailwind's .hidden class - it breaks responsive utilities like md:flex */

:root {
  --color-primary: #02a9ca;
  --color-secondary: #e8de21;
  --color-bg-light: #ffffff;
  --color-bg-subtle: #f7f7f7;
  --color-card-light: #ffffff;
  --color-text-dark: #222222;
  --color-text-subtle: #6b7280;
  --color-white: #ffffff;
  /* Fixed header height for main padding (nav min-height + padding) */
  --header-height: 5.5rem;
  /* Consistent section spacing across all pages */
  --section-spacing-y: 2rem;
}
@media (min-width: 768px) {
  :root {
    --section-spacing-y: 3rem;
  }
}
@media (min-width: 1024px) {
  :root {
    --section-spacing-y: 4rem;
  }
}

.primary-text {
  color: var(--color-primary);
}
.secondary-text {
  color: var(--color-secondary);
}
.bg-primary {
  background-color: var(--color-primary);
}
.border-primary {
  border-color: var(--color-primary);
}

/* Utility classes for footer and other components */
.bg-bg-subtle {
  background-color: var(--color-bg-subtle);
}

.text-text-dark {
  color: var(--color-text-dark);
}

.text-text-subtle {
  color: var(--color-text-subtle);
}

.footer {
  background-color: var(--color-bg-subtle);
  border-top: 1px solid #e5e7eb;
}

/* Consistent section spacing (all pages) */
section {
  padding-top: var(--section-spacing-y) !important;
  padding-bottom: var(--section-spacing-y) !important;
}

/* Footer: same container as site, responsive on all devices */
.footer-container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px) {
  .footer-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
.footer-spacing {
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .footer-spacing {
    padding-top: 3rem;
    padding-bottom: 2rem;
  }
}
@media (min-width: 1024px) {
  .footer-spacing {
    padding-top: 4rem;
    padding-bottom: 2.5rem;
  }
}
/* Footer mobile/tablet: readable text and touch targets */
@media (max-width: 1023px) {
  .footer-mobile .text-xl {
    font-size: 1.125rem;
  }
  .footer-mobile a[href] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .footer-mobile .space-y-6 > * + * {
    margin-top: 1.5rem;
  }
}
/* Footer: 2 columns at tablet (768px–1023px); Support + CTA below logo on left */
@media (min-width: 768px) and (max-width: 1023px) {
  .footer-mobile-grid {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto;
  }
  .footer-mobile-col-1,
  .footer-mobile-col-2,
  .footer-mobile-col-3 {
    min-width: 0;
  }
  .footer-mobile-col-1 {
    grid-column: 1;
    grid-row: 1;
  }
  .footer-mobile-col-2 {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: start;
  }
  .footer-mobile-col-3 {
    grid-column: 1;
    grid-row: 2;
  }
  /* Force all footer text and content left-aligned (override inline center) */
  .footer-mobile,
  .footer-mobile p,
  .footer-mobile h4,
  .footer-mobile ul,
  .footer-mobile li {
    text-align: left !important;
  }
  .footer-mobile a[href]:not(.btn-hero),
  .footer-mobile .inline-flex,
  .footer-mobile .flex {
    justify-content: flex-start !important;
  }
  /* Logo block in left corner */
  .footer-mobile-col-1 {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    text-align: left !important;
  }
  .footer-mobile-col-1 > a:first-of-type,
  .footer-mobile-col-1 > .flex {
    justify-content: flex-start !important;
    margin-right: auto;
  }
  .footer-mobile-col-1 > p {
    padding-left: 0 !important;
    padding-right: 1rem !important;
  }
  /* Button centered in column; text centered inside button */
  .footer-mobile a.btn-hero {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .footer-copyright {
    text-align: center !important;
  }
}
/* Footer: 3 columns per row on tablet only (1024px–1279px); 5 columns on desktop (1280px+) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .footer-desktop {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: auto auto;
    gap: 1.5rem;
  }
  .footer-desktop-col-1 {
    grid-column: 1 !important;
    grid-row: 1 / -1 !important;
    align-self: start;
  }
  .footer-desktop-col-2 {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
  .footer-desktop-col-3 {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }
  .footer-desktop-col-4 {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }
  .footer-desktop-col-5 {
    grid-column: 3 !important;
    grid-row: 2 !important;
    align-self: start;
  }
  .footer-desktop .text-lg {
    font-size: 1rem;
  }
  .footer-desktop .text-sm {
    font-size: 0.8125rem;
  }
}
@media (min-width: 1280px) {
  .footer-desktop {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto;
  }
  .footer-desktop-col-1,
  .footer-desktop-col-2,
  .footer-desktop-col-3,
  .footer-desktop-col-4,
  .footer-desktop-col-5 {
    grid-column: auto !important;
    grid-row: auto !important;
    align-self: auto;
  }
}
/* Footer desktop: prevent cramping on medium screens */
@media (min-width: 1024px) and (max-width: 1200px) {
  .footer-desktop .text-lg {
    font-size: 1rem;
  }
  .footer-desktop .text-sm {
    font-size: 0.8125rem;
  }
}

body {
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
  font-family: "Poppins", sans-serif;
}

/* Header - Fixed on scroll (must override main.css .nav) */
.nav,
nav.nav {
  background-color: var(--color-primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1024 !important;
  padding-top: 0.75rem;
  padding-bottom: 0;
  overflow: visible !important;
  width: 100%;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
/* Desktop: restore bottom padding when dropdown is hidden */
@media (min-width: 1024px) {
  .nav,
  nav.nav {
    padding-bottom: 0.75rem;
  }
}

/* Global header logo size */
.nav .site-logo {
  max-width: 96px !important;
  max-height: 96px !important;
  width: auto !important;
  height: auto !important;
}

/* Smaller logo at lg breakpoint to save space */
@media (min-width: 1024px) and (max-width: 1279px) {
  .nav .site-logo {
    max-width: 64px !important;
    max-height: 64px !important;
  }
}

/* Header uses same .container as site (aligns with main content) */
.nav .container {
  overflow: visible !important;
  flex-shrink: 0;
  max-width: 100% !important;
}
.nav > * {
  overflow: visible !important;
}
/* Mobile/tablet menu panel: full width below header, no overlap/offset */
#mobile-menu-content.mobile-menu-dropdown {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100vw !important;
  margin: 0 !important;
  left: 0 !important;
  right: 0 !important;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Main content: offset below fixed header */
main {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-height) + 0.5rem) !important;
}

.nav .nav-link,
.nav .text-text-dark,
.nav .text-text-subtle {
  color: var(--color-white);
}

/* Desktop nav links: comfortable spacing on tablet (lg) and desktop (xl) */
@media (min-width: 1024px) {
  .nav .nav-link {
    padding: 0.5rem 0.375rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .nav .btn-outline,
  .nav .btn-hero {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }
}
@media (min-width: 1280px) {
  .nav .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
  }

  .nav .btn-outline,
  .nav .btn-hero {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
}

.nav .active {
  font-weight: 600;
  border-bottom: 2px solid var(--color-secondary);
  padding-bottom: 2px;
}

/* Alpine.js - Hide elements before initialization */
[x-cloak] {
  display: none !important;
}

/* ==========================================
   DROPDOWN FINAL FIX - Aggressive Visibility
   =========================================== */

/* Force all parent containers to allow overflow */
.nav, .nav *, .container, .flex, #profile-dropdown-container, .profile-dropdown-wrapper, .language-dropdown-wrapper {
    overflow: visible !important;
}

/* Base Dropdown Menu styling */
.user-menu-dropdown, .language-menu-dropdown {
    display: none; /* Controlled by Alpine x-show */
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    margin-top: 10px !important;
    min-width: 220px !important;
    width: auto !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1px solid rgba(0,0,0,0.15) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
    z-index: 999999 !important;
    padding: 8px !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force show when Alpine sets display to block */
[x-show="open"][style*="display: block"], 
[x-show="open"]:not([style*="display: none"]) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure menu items are visible and clickable */
.dropdown-menu-item {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 10px 15px !important;
    color: #333333 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    background: transparent !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.dropdown-menu-item:hover {
    background-color: #f5f5f5 !important;
    color: #02a9ca !important;
}

/* Hide scrollers everywhere */
* {
    scrollbar-width: none !important;
}
::-webkit-scrollbar {
    display: none !important;
}


/* Profile dropdown wrapper */
.profile-dropdown-wrapper,
.language-dropdown-wrapper {
  position: relative !important;
  display: inline-block;
}

/* Profile dropdown button */
.profile-dropdown-button,
.language-dropdown-button {
  display: flex !important;
  align-items: center !important;
  gap: 0.375rem !important;
  padding: 0.375rem 0.75rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: white !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0.375rem !important;
  cursor: pointer !important;
  transition: background-color 0.15s ease !important;
  white-space: nowrap !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  outline: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.profile-dropdown-button:hover,
.language-dropdown-button:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
}

.profile-dropdown-button:focus,
.language-dropdown-button:focus {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3) !important;
}

/* Dropdown arrow */
.dropdown-arrow {
  width: 1rem !important;
  height: 1rem !important;
  color: white !important;
  transition: transform 0.2s ease !important;
  flex-shrink: 0 !important;
  opacity: 0.8 !important;
}

.dropdown-arrow.rotate-180 {
  transform: rotate(180deg) !important;
}

/* User menu dropdown container - Aggressive Override */
.user-menu-dropdown,
.language-menu-dropdown {
  position: absolute !important;
  right: 0 !important;
  top: 100% !important;
  margin-top: 10px !important;
  min-width: 14rem !important;
  width: max-content !important;
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  z-index: 10000 !important;
  padding: 8px !important;
  /* CRITICAL: No scrolling - show all items */
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  pointer-events: auto !important;
}

/* Ensure parents don't clip */
.profile-dropdown-wrapper,
.language-dropdown-wrapper {
  position: relative !important;
  overflow: visible !important;
}

/* Specific item styles to ensure visibility */
.dropdown-menu-item {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 44px !important;
}

.language-menu-dropdown {
  min-width: 10rem !important;
}

/* Dropdown menu items - Clean GitHub style */
.dropdown-menu-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  width: 100% !important;
  min-height: 2.25rem !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  color: #1f2937 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0.375rem !important;
  cursor: pointer !important;
  text-decoration: none !important;
  text-align: left !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  line-height: 1.5 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.dropdown-menu-item:hover {
  background-color: #f3f4f6 !important;
  color: #02a9ca !important;
}

.dropdown-menu-item:active {
  background-color: #e5e7eb !important;
}

/* Dropdown icons */
.dropdown-icon {
  width: 1.125rem !important;
  height: 1.125rem !important;
  flex-shrink: 0 !important;
  stroke-width: 2 !important;
  pointer-events: none !important;
  opacity: 0.7 !important;
}

.dropdown-menu-item:hover .dropdown-icon {
  opacity: 1 !important;
}

/* Dropdown divider - subtle like GitHub */
.dropdown-divider {
  height: 0 !important;
  margin: 0.5rem 0 !important;
  border: none !important;
  border-top: 1px solid #e5e7eb !important;
}

/* Danger item (Sign out) */
.dropdown-menu-item-danger {
  color: #dc2626 !important;
}

.dropdown-menu-item-danger:hover {
  background-color: #fee2e2 !important;
  color: #dc2626 !important;
}

.dropdown-menu-item-danger .dropdown-icon {
  color: #dc2626 !important;
}

/* Text content inside dropdown items */
.dropdown-menu-item span {
  pointer-events: none !important;
  flex: 1 !important;
}

/* Language dropdown form styling */
.language-menu-dropdown form {
  display: block !important;
  width: 100% !important;
}

.language-menu-dropdown button {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  text-align: left !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.875rem !important;
  color: #1f2937 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0.375rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.language-menu-dropdown button:hover {
  background-color: #f3f4f6 !important;
  color: #02a9ca !important;
}

/* All children inherit pointer cursor */
.user-menu-dropdown *,
.language-menu-dropdown * {
  cursor: pointer !important;
}

/* CRITICAL: Prevent Bootstrap carousel interference */
.profile-dropdown-wrapper,
.profile-dropdown-wrapper *,
.language-dropdown-wrapper,
.language-dropdown-wrapper *,
.user-menu-dropdown,
.user-menu-dropdown *,
.language-menu-dropdown,
.language-menu-dropdown *,
[x-data],
[x-data] * {
  --bs-carousel-controls-display: none !important;
}

/* Prevent any carousel controls */
.carousel-control-prev,
.carousel-control-next,
.carousel-indicators {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Cards & Testimonials */
.card,
.testimonial-card {
  background-color: var(--color-card-light);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
}

.card:hover,
.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Buttons */
.btn-hero {
  background: var(--color-secondary);
  color: var(--color-text-dark);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(232, 222, 33, 0.3);
}

.btn-hero:hover {
  background: #ffef5c;
  box-shadow: 0 6px 20px rgba(232, 222, 33, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(2, 169, 202, 0.3);
}

/* ==========================================
   HEALTHY DIMENSIONS - Boxes/cards not full screen width
   Override viewport-fix * rule so content has a sensible max-width site-wide
   ========================================== */
.container,
main .container {
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

/* Desktop/tablet: cap content width so boxes aren't full viewport */
@media (min-width: 769px) {
  .container,
  main .container {
    max-width: 1280px !important;
  }
}

@media (min-width: 768px) {
  .container,
  main .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Nested containers (e.g. dashboard) fill parent but don't exceed it */
main .container .container {
  max-width: 100% !important;
}

/* ==========================================
   BOOKING MODAL - Brand colors, modern design, no broken text
   ========================================== */
.enroll-modal-overlay {
  z-index: 1050 !important;
  padding-top: var(--header-height);
  align-items: flex-start;
  -webkit-overflow-scrolling: touch;
}
.enroll-modal-dialog {
  max-height: calc(100vh - var(--header-height) - 2rem) !important;
}
/* Session type radio: show dot and ring when checked */
#enrollModal #groupSession:checked + label .session-type-ring,
#enrollModal #privateSession:checked + label .session-type-ring {
  border-color: var(--color-primary);
}
#enrollModal #groupSession:checked + label .session-type-dot,
#enrollModal #privateSession:checked + label .session-type-dot {
  display: block !important;
}
/* Modal content: prevent broken text on all devices */
#enrollModal .enroll-modal-dialog,
#enrollModal .enroll-modal-dialog * {
  word-break: normal;
  overflow-wrap: break-word;
}
/* 1rem padding on all boxes inside the booking popup */
#enrollModal .enroll-modal-box {
  padding: 1rem !important;
}
/* Align Class Title / Class Description value with labels (same left edge as TEACHER, LANGUAGE, etc.) */
#enrollModal .enroll-spec-value-below {
  margin-left: 1.75rem; /* icon width 1rem + gap 0.75rem */
}
#enrollModal .topic-type-btn {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}
/* Desktop: keep topic type on one line when space allows */
@media (min-width: 1280px) {
  #enrollModal .topic-type-btn {
    white-space: nowrap !important;
  }
}
/* Tablet and mobile: allow topic type button text to wrap to prevent breaking/overlap */
@media (max-width: 1279px) {
  #enrollModal .topic-type-btn {
    white-space: normal !important;
    font-size: 0.875rem;
    line-height: 1.35;
    text-align: center;
    padding: 0.75rem 0.5rem;
  }
  #enrollModal .topic-type-grid {
    min-width: 0;
  }
}
/* Session type labels: subtext can wrap */
#enrollModal .session-type-label .text-xs {
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: normal;
}
/* Desktop: keep session type title on one line when space allows */
@media (min-width: 1280px) {
  #enrollModal .session-type-label .font-medium {
    white-space: nowrap !important;
  }
}
/* Tablet: allow session type card text to wrap so it stays in the box */
@media (max-width: 1279px) {
  #enrollModal .session-type-grid {
    min-width: 0;
  }
  #enrollModal .session-type-label {
    min-width: 0 !important;
    overflow-wrap: break-word;
    word-break: normal;
  }
  #enrollModal .session-type-label .font-medium {
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.35;
  }
  #enrollModal .session-type-label .text-xs {
    overflow-wrap: break-word;
    word-break: normal;
  }
}
#enrollModal .step-tab {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}
#enrollModal .step-tab > div {
  min-width: 0;
  overflow-wrap: break-word;
}
#enrollModal h3, #enrollModal h4, #enrollModal h5,
#enrollModal .font-semibold, #enrollModal .font-medium {
  word-break: normal;
  overflow-wrap: break-word;
}
#enrollModal #seatsLeft,
#enrollModal .text-yellow-700 {
  white-space: nowrap !important;
}
/* Desktop/tablet: keep tab labels on one line where space allows */
@media (min-width: 641px) {
  #enrollModal .step-tab {
    white-space: nowrap !important;
  }
}
/* Mobile: hide <br> so tabs stay one line on desktop */
#enrollModal .tab-br-mobile {
  display: none;
}
@media (max-width: 640px) {
  .enroll-modal-overlay {
    padding-top: var(--header-height);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  #enrollModal .topic-type-btn {
    white-space: normal !important;
    font-size: 0.875rem;
    line-height: 1.3;
  }
  #enrollModal #seatsLeft,
  #enrollModal .text-yellow-700 {
    white-space: normal !important;
  }
  /* Tabs: one line on mobile - hide line break and prevent wrap */
  #enrollModal .tab-br-mobile {
    display: none !important;
  }
  #enrollModal .step-tab {
    white-space: nowrap !important;
    text-align: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  #enrollModal .step-tab > div {
    flex-wrap: nowrap;
    justify-content: center;
  }
  #enrollModal .step-tab-label {
    line-height: 1.3;
    white-space: nowrap;
  }
  /* Footer: one button per row, full width (aligned left and right with modal content) */
  #enrollModal .enroll-modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  #enrollModal .enroll-modal-footer-actions {
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0;
    gap: 0.5rem;
  }
  #enrollModal .enroll-modal-footer-actions button,
  #enrollModal #prevStep {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    white-space: nowrap !important;
    justify-content: center;
    display: flex;
    align-items: center;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ==========================================
   GOOGLE CALENDAR STYLE IMPROVEMENTS
   ========================================== */

/* Google Calendar inspired grid layout */
.schedule-calendar-grid-header {
  background: #f8f9fa;
  border-bottom: 2px solid #dadce0;
}

.schedule-calendar-grid-body {
  background: #ffffff;
}

/* Calendar container with fixed height and scroll */
.schedule-calendar-container {
  position: relative;
  border: 1px solid #dadce0;
  border-radius: 8px;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

#scheduleScrollContainer {
  overflow-y: auto;
  overflow-x: auto;
}

/* Time column styling in header */
.schedule-time-column {
  background: #f8f9fa;
  border-right: 1px solid #dadce0;
  font-size: 12px;
  font-weight: 500;
  color: #5f6368;
  padding: 12px 8px;
  text-align: right;
  min-width: 60px;
}

/* Time column styling in body - with sticky left */
.schedule-time-column-body {
  background: #f8f9fa;
  border-right: 1px solid #dadce0;
  font-size: 12px;
  font-weight: 500;
  color: #5f6368;
  padding: 12px 8px;
  text-align: right;
  min-width: 60px;
  position: sticky;
  left: 0;
  z-index: 20;
}

/* Day column headers */
.schedule-day-header {
  background: #f8f9fa;
  text-align: center;
  padding: 12px 8px;
  font-size: 14px;
  font-weight: 500;
  color: #202124;
  min-height: 85px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Calendar slots - Google Calendar style with dynamic height */
.schedule-slot {
  border-bottom: 1px solid #dadce0;
  border-right: 1px solid #dadce0;
  min-height: 60px;
  padding: 4px;
  background: #ffffff;
  transition: background-color 0.2s ease;
  /* Allow dynamic height based on content */
  height: auto;
  display: flex;
  flex-direction: column;
}

.schedule-slot:hover {
  background-color: #f8f9fa;
}

/* Dynamic height adjustment for slots with multiple teachers */
.schedule-slot .space-y-1\.5 {
  gap: 3px;
}

/* Adjust book-slot for dynamic content */
.book-slot {
  border-radius: 4px !important;
  font-size: 12px !important;
  padding: 6px 8px !important;
  margin: 1px 0;
  border: none !important;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  /* Allow flexible height */
  min-height: auto;
  height: auto;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Google Calendar color palette for events */
.book-slot:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Available slots (green) */
.book-slot:not(.bg-blue-100):not(.bg-yellow-50):not(.bg-green-50):not(.bg-purple-50) {
  background-color: #e6f4ea !important;
  color: #137333 !important;
  border-left: 4px solid #34a853 !important;
}

/* Booked slots (blue) */
.book-slot.bg-blue-100 {
  background-color: #e8f0fe !important;
  color: #185abc !important;
  border-left: 4px solid #4285f4 !important;
}

/* Low availability slots (yellow) */
.book-slot.bg-yellow-50 {
  background-color: #fef7e0 !important;
  color: #b06000 !important;
  border-left: 4px solid #fbbc04 !important;
}

/* Medium availability slots (green) */
.book-slot.bg-green-50 {
  background-color: #e6f4ea !important;
  color: #137333 !important;
  border-left: 4px solid #34a853 !important;
}

/* High availability slots (purple) */
.book-slot.bg-purple-50 {
  background-color: #f3e8fd !important;
  color: #9333ea !important;
  border-left: 4px solid #a855f7 !important;
}

/* Calendar container width - Google Calendar style */
.schedule-calendar-container {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .schedule-slot {
    min-height: 80px;
    /* Maintain dynamic height */
    height: auto;
  }
  
  .book-slot {
    font-size: 11px !important;
    padding: 4px 6px !important;
    /* Maintain dynamic height */
    min-height: auto;
    height: auto;
  }
  
  .schedule-time-column {
    font-size: 10px;
    padding: 8px 4px;
    min-width: 40px;
  }
}

/* ==========================================
   SCHEDULE / BOOKING PAGE - Prevent broken text (Day/Week/Month, Language)
   ========================================== */
.schedule-filters-form {
  flex-wrap: wrap;
  min-width: 0;
}
.schedule-language-wrap {
  min-width: 8rem;
  flex-shrink: 0;
}
.schedule-language-select {
  min-width: 8rem !important;
  white-space: nowrap;
}
.schedule-view-switcher {
  flex-shrink: 0 !important;
  min-width: 0;
}
.schedule-view-btn {
  white-space: nowrap !important;
  word-break: keep-all;
  overflow-wrap: normal;
  min-width: 4.5rem;
}
/* Schedule date nav: arrows in corners, text centered (mobile-friendly) */
.schedule-date-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}
.schedule-date-nav-arrow {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0.5rem;
  color: #4b5563;
  cursor: pointer;
  transition: background-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.schedule-date-nav-arrow:hover {
  background-color: #f3f4f6;
}
.schedule-date-nav-arrow-icon {
  width: 1.25rem;
  height: 1.25rem;
  pointer-events: none;
}
@media (min-width: 640px) {
  .schedule-date-nav {
    gap: 0.75rem;
  }
  .schedule-date-nav-arrow {
    width: 2.5rem;
    height: 2.5rem;
  }
  .schedule-date-nav-arrow-icon {
    width: 1.25rem;
    height: 1.25rem;
  }
}
.schedule-date-range {
  word-break: keep-all;
  overflow-wrap: normal;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  margin: 0;
  padding: 0 0.25rem;
  min-width: 0;
  overflow: visible;
}
@media (min-width: 640px) {
  .schedule-date-range {
    font-size: 1.25rem;
  }
}

/* Booking Details modal: explicit button widths */
.booking-details-modal-close-icon {
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 0.5rem;
}
.booking-details-modal-close-icon:hover {
  background-color: rgba(0, 0, 0, 0.05);
}
.booking-details-modal-close-btn {
  min-width: 6rem;
  width: auto;
}

/* Teacher Availability: prevent broken text on tablet/mobile */
.availability-toolbar {
  word-break: keep-all;
}
.availability-date-display,
.availability-today-btn,
.availability-view-btn,
.availability-bulk-delete {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}
.availability-date-nav {
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .availability-date-nav {
    gap: 0;
  }
}

/* Mobile: date row = arrows at corners, text centered (one row) */
.availability-date-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}
.availability-date-row .availability-date-display {
  text-align: center;
  margin-left: 0.25rem;
  margin-right: 0.25rem;
}
.availability-date-arrow {
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .availability-date-row {
    display: flex;
  }
  .availability-date-row .availability-date-display {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .availability-date-arrow {
    width: auto;
    min-width: auto;
    height: auto;
  }
}
.availability-view-btn {
  min-width: 3.5rem;
}
.availability-actions {
  gap: 0.5rem;
}

/* Teacher Availability: smaller checkboxes on mobile (Select All + slot checkboxes) */
@media (max-width: 639px) {
  .availability-select-all-checkbox,
  .availability-checkbox {
    width: 0.875rem !important;
    height: 0.875rem !important;
    min-width: 0.875rem !important;
    min-height: 0.875rem !important;
  }
  .availability-select-all-label {
    font-size: 0.75rem;
    margin-left: 0.375rem;
  }
}

/* Teacher Availability: 3 per row on mobile (weekday headers + month grid) */
@media (max-width: 639px) {
  .availability-weekday-headers {
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: auto;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    text-align: center;
    padding-left: 0;
  }
  .availability-weekday {
    padding: 0.25rem;
  }
  #monthGrid {
    grid-template-columns: 1fr !important;
  }
}

/* Availability page: form inputs full width and aligned on mobile */
@media (max-width: 639px) {
  .availability-details-grid,
  .availability-schedule-grid {
    width: 100%;
    min-width: 0;
  }
  .availability-details-grid > *,
  .availability-schedule-grid > *,
  .availability-form-field {
    min-width: 0;
    width: 100%;
  }
  /* Force single column so Description and Meeting Link match Class Title width */
  .availability-details-grid {
    grid-template-columns: 1fr !important;
  }
  .availability-details-grid > * {
    grid-column: 1 !important;
  }
  /* Remove extra horizontal padding from Description and Meeting Link so they align with Class Title */
  .availability-details-grid #classDescription,
  .availability-details-grid #meetingLink {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  .availability-details-grid .availability-form-field:nth-child(2),
  .availability-details-grid .availability-form-field:nth-child(3) {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .availability-details-grid input,
  .availability-details-grid textarea,
  .availability-details-grid select,
  .availability-schedule-grid input,
  .availability-schedule-grid textarea,
  .availability-schedule-grid select {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Dashboard: Mark Attendance / Attendance buttons – no text wrap on mobile */
@media (max-width: 639px) {
  .attendance-btn-pending,
  .attendance-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* Dashboard: Schedule Details modal close button – w-auto on mobile only */
@media (max-width: 639px) {
  #scheduleDetailsModal .schedule-details-modal-close {
    width: auto;
  }
}

/* Edit Availability modal: close button right, buttons in two rows on mobile */
@media (max-width: 639px) {
  #editAvailabilityModal .edit-availability-modal-content {
    position: relative;
    direction: ltr;
  }
  #editAvailabilityModal .edit-availability-modal-close {
    position: absolute !important;
    left: auto !important;
    right: 1rem !important;
    top: 1rem !important;
    margin-left: 0;
    width: auto;
  }
  #editAvailabilityModal .edit-availability-modal-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  #editAvailabilityModal .edit-availability-btn {
    width: 100%;
    white-space: nowrap;
    font-size: 0.875rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Dashboard: card sizes match "Available Credits" proportion (compact, not full width) */
.dashboard-welcome-card {
  max-width: 22rem;
  width: 100%;
}
.dashboard-stats-row {
  width: 100%;
  max-width: 22rem;
}
.dashboard-credits-card {
  max-width: 20rem;
  width: 100%;
}
.dashboard-upcoming-card {
  max-width: 22rem;
  width: 100%;
}
.dashboard-class-card {
  max-width: 22rem;
  width: 100%;
}
.dashboard-card-blank {
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  min-height: 10rem;
  box-shadow: none;
}
/* Upcoming Classes: 1 card per row below 1025px, 3 cards per row from 1025px */
.upcoming-classes-grid {
  grid-template-columns: 1fr;
}
@media (min-width: 1025px) {
  .upcoming-classes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .upcoming-blank-visible {
    display: block;
  }
}
.dashboard-stat-card {
  width: 100%;
}
/* Tablet: slightly wider but still compact */
@media (min-width: 640px) {
  .dashboard-welcome-card {
    max-width: 26rem;
  }
  .dashboard-stats-row {
    max-width: 26rem;
  }
  .dashboard-upcoming-card {
    max-width: 26rem;
  }
  .dashboard-class-card {
    max-width: 26rem;
  }
}
/* Desktop: same proportion as marked card, comfortable read */
@media (min-width: 768px) {
  .dashboard-stats-row {
    max-width: 28rem;
  }
  .dashboard-welcome-card {
    max-width: 28rem;
  }
  .dashboard-upcoming-card {
    max-width: 28rem;
  }
  .dashboard-class-card {
    max-width: 28rem;
  }
}
@media (min-width: 1024px) {
  .dashboard-stats-row {
    max-width: 32rem;
  }
  .dashboard-welcome-card {
    max-width: 32rem;
  }
  .dashboard-upcoming-card {
    max-width: 32rem;
  }
  .dashboard-class-card {
    max-width: 32rem;
  }
}

.hero-title {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 700;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
  }
}

.steps-title {
  color: var(--color-primary);
  font-size: 1.75rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .steps-title {
    font-size: 2.5rem;
  }
}

.stat-value {
  color: var(--color-secondary);
  font-size: 2rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .stat-value {
    font-size: 3rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-in {
  opacity: 0;
  animation: scaleIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: 0.2s;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-enter {
  opacity: 0;
  animation: enter 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-blob {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(
    circle,
    rgba(2, 169, 202, 0.05) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  border-radius: 50%;
  animation: pulse 10s infinite alternate;
  z-index: 0;
  filter: blur(50px);
}

@keyframes pulse {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.1) translate(20px, 20px);
  }
}

/* Mobile & tablet header (hamburger layout: below lg = 1024px) */
@media (max-width: 1023px) {
  .nav .container {
    margin: 0 auto !important;
    max-width: 100% !important;
    /* padding matches .container (1rem / 1.25rem) - no override, aligns with site */
  }

  .nav img.site-logo,
  .nav .site-logo {
    max-width: 56px !important;
    max-height: 56px !important;
    border: none !important;
  }

  .nav .flex {
    gap: 0 !important;
  }

  .mobile-menu-button,
  .mobile-menu-button:hover,
  .mobile-menu-button:focus,
  .mobile-menu-button:active {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
  }
}

/* Small mobile: slightly tighter header padding */
@media (max-width: 767px) {
  .nav {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}

/* ==========================================
   FULL-SITE RESPONSIVE: TABLET & MOBILE
   Applied across all pages
   ========================================== */

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    max-width: 100%;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .steps-title {
    font-size: 2rem;
  }

  .card,
  .testimonial-card {
    padding: 1.25rem;
  }

  .hero-content {
    gap: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }

  .steps-grid,
  .stats-grid {
    gap: 1.25rem;
  }

  .grid.grid-cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile (below 768px) */
@media (max-width: 767px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
  }

  main.min-h-screen {
    min-height: 100vh;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.25;
  }

  .steps-title {
    font-size: 1.5rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .card,
  .testimonial-card {
    padding: 1rem;
    border-radius: 0.75rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
  }

  .steps-grid,
  .stats-grid {
    gap: 1rem;
  }

  .grid.grid-cols-2,
  .grid.grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .btn-hero,
  .btn-outline {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
  }
}

/* Slightly smaller header offset on small mobile (reduced nav padding) */
@media (max-width: 767px) {
  :root {
    --header-height: 5rem;
  }
}

/* ==========================================
   GLOBAL RESPONSIVE FIXES (all pages)
   Prevent overflow and improve layout on tablet/mobile
   ========================================== */

/* Allow flex/grid children to shrink (prevents horizontal scroll) */
@media (max-width: 1023px) {
  .flex,
  .grid,
  [class*="grid"],
  [class*="flex"] {
    min-width: 0;
  }
  .container .flex,
  .container .grid,
  main .container {
    min-width: 0;
  }
}

/* Ensure content doesn't overflow viewport on mobile */
@media (max-width: 767px) {
  .container,
  main .container {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  /* Flex/grid direct children can shrink */
  .container > .flex > *,
  .container > .grid > *,
  .container > [class*="grid"] > *,
  main .container > .flex > *,
  main .container > .grid > * {
    min-width: 0;
  }
}

/* ==========================================
   CIRCLE AVATARS (tablet & mobile only)
   Override responsive image rules so avatars stay round.
   ========================================== */
@media (max-width: 1023px) {
  /* Home: testimonial avatars */
  .testimonials-section .testimonial-header img.avatar,
  .testimonials-section .testimonial-card img.avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
  }

  /* About: team avatars (override mobile-responsive [class*="avatar"] ) */
  .team-avatar {
    width: 150px !important;
    height: 150px !important;
    min-width: 150px;
    min-height: 150px;
    aspect-ratio: 1;
    flex-shrink: 0;
  }
  .team-avatar img {
    width: 100% !important;
    height: 100% !important;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

@media (max-width: 480px) {
  .team-avatar {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px;
    min-height: 120px;
  }
}

