/* ============================================
   ENGLISH M3AYA — Responsive (Mobile & Tablet)
   Complete mobile-first responsive overrides
   ============================================ */

/* =============================================
   TABLET (max-width: 1024px)
   ============================================= */
@media (max-width: 1024px) {
  /* Layout */
  .app-layout { grid-template-columns: 1fr; }
  .main-content { margin-inline-start: 0 !important; margin-left: 0 !important; margin-right: 0 !important; }

  /* Admin grids */
  .admin-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important; }

  /* Tab filters: horizontal scroll */
  .tab-filter {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap !important;
    gap: 4px;
    padding-bottom: 4px;
  }
  .tab-filter::-webkit-scrollbar { display: none; }
  .tab-filter-item {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 13px;
    padding: 8px 14px;
  }

  /* Cards grid */
  .content-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  }
}


/* =============================================
   MOBILE (max-width: 768px)
   ============================================= */

/* Hide hamburger on desktop */
.mobile-menu-btn { display: none; }

@media (max-width: 768px) {
  /* ----- CORE LAYOUT ----- */
  :root {
    --header-height: 56px;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* ----- SIDEBAR ----- */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 25px rgba(0,0,0,0.3);
  }
  .sidebar.collapsed {
    transform: translateX(-100%);
    width: 280px;
  }
  .sidebar-toggle { display: none !important; }
  .sidebar-brand {
    padding: 16px !important;
  }
  .sidebar-nav {
    padding-bottom: 80px !important;
  }
  .nav-item {
    padding: 12px 16px !important;
    min-height: 44px;
    font-size: 14px !important;
  }
  .nav-section-label {
    font-size: 10px !important;
    padding: 12px 16px 4px !important;
  }

  /* Sidebar overlay */
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
    display: none;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  .sidebar-overlay.show { display: block; }

  /* ----- HEADER ----- */
  .header {
    padding: 0 10px !important;
    height: var(--header-height) !important;
    gap: 6px !important;
  }

  /* Show hamburger menu on mobile */
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    border-radius: 10px !important;
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
    cursor: pointer;
    flex-shrink: 0;
  }
  .mobile-menu-btn svg {
    width: 20px !important;
    height: 20px !important;
  }

  .header-left {
    gap: 8px !important;
    flex: 1;
    min-width: 0; /* Allow shrinking */
  }

  .page-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .header-breadcrumb { display: none !important; }

  .header-right {
    gap: 4px !important;
    flex-shrink: 0;
  }

  /* Language switcher compact */
  .lang-switcher-btn {
    padding: 6px 8px !important;
    gap: 4px !important;
    min-width: auto !important;
  }
  .lang-switcher-btn .nav-label { display: none !important; }
  .lang-switcher-btn .flag-emoji { font-size: 16px; }
  .lang-switcher-btn svg { width: 12px !important; height: 12px !important; }

  /* Theme toggle compact */
  .theme-toggle {
    width: 34px !important;
    height: 34px !important;
    padding: 6px !important;
    border-radius: 10px !important;
  }
  .theme-toggle svg { width: 16px !important; height: 16px !important; }

  /* Notification & action buttons compact */
  .header-action {
    width: 34px !important;
    height: 34px !important;
    padding: 6px !important;
  }
  .header-action svg { width: 16px !important; height: 16px !important; }

  /* Profile button compact */
  .profile-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 11px !important;
    flex-shrink: 0;
  }

  /* Dropdowns — full width on mobile */
  .profile-menu, .notification-panel {
    position: fixed !important;
    top: var(--header-height) !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    border-radius: 0 0 16px 16px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
  }
  .lang-dropdown {
    position: fixed !important;
    top: var(--header-height) !important;
    right: 8px !important;
    min-width: 160px !important;
  }

  /* ----- PAGE CONTENT ----- */
  .page-content {
    padding: 12px !important;
    padding-bottom: 80px !important; /* Space for mobile use */
  }

  /* ----- CARDS & GRIDS ----- */
  .content-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .admin-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .stat-card {
    padding: 14px !important;
  }
  .stat-value { font-size: 22px !important; }
  .stat-label { font-size: 11px !important; }
  .stat-icon {
    width: 36px !important;
    height: 36px !important;
  }
  .stat-icon svg { width: 18px !important; height: 18px !important; }

  /* Card component */
  .card {
    padding: 14px !important;
    border-radius: 12px !important;
  }

  /* ----- WELCOME BANNER ----- */
  .welcome-banner {
    flex-direction: column !important;
    padding: 16px !important;
    gap: 12px !important;
    border-radius: 12px !important;
  }
  .welcome-banner h2 { font-size: 18px !important; }
  .welcome-banner p { font-size: 13px !important; }

  /* ----- BUTTONS ----- */
  .btn {
    min-height: 42px;
    padding: 10px 16px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }
  .btn-sm {
    min-height: 36px;
    padding: 8px 12px !important;
    font-size: 12px !important;
  }
  .btn-lg {
    min-height: 48px;
    padding: 12px 20px !important;
    font-size: 15px !important;
  }

  /* ----- FORMS ----- */
  .form-input, .form-select, textarea.form-input {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
    padding: 12px 14px !important;
    min-height: 44px;
    border-radius: 10px !important;
  }
  .login-input {
    padding-left: 42px !important;
  }
  [dir="rtl"] .login-input {
    padding-left: 14px !important;
    padding-right: 42px !important;
  }
  .form-label {
    font-size: 13px !important;
    margin-bottom: 6px !important;
  }
  .form-group {
    margin-bottom: 14px !important;
  }

  /* ----- TAB FILTERS ----- */
  .tab-filter {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    margin-bottom: 16px !important;
    padding-bottom: 4px;
  }
  .tab-filter::-webkit-scrollbar { display: none; }
  .tab-filter-item {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 14px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
    min-height: 36px;
  }

  /* ----- TABLES ----- */
  .admin-table-wrap, table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }
  table {
    min-width: 600px;
  }
  th, td {
    padding: 10px 12px !important;
    font-size: 12px !important;
    white-space: nowrap;
  }

  /* ----- STUDENT TABLE as CARDS ----- */
  .student-cards-mobile .student-row {
    display: flex;
    flex-direction: column;
    padding: 14px;
    border-bottom: 1px solid var(--color-border);
    gap: 8px;
  }

  /* ----- ADMIN DASHBOARD ----- */
  .admin-section h3 {
    font-size: 18px !important;
  }
  .admin-section h4 {
    font-size: 15px !important;
  }

  /* Admin Course/Content Editor */
  .admin-editor-nav {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .admin-editor-nav select {
    width: 100% !important;
  }

  /* ----- QUIZ / KAHOOT ----- */
  .kahoot-container {
    padding: 16px !important;
  }
  .kahoot-question {
    font-size: 16px !important;
    padding: 16px !important;
  }
  .kahoot-answers-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .kahoot-answer-btn {
    padding: 14px !important;
    font-size: 14px !important;
    min-height: 48px !important;
  }

  /* ----- FLASHCARDS ----- */
  .flashcard-container {
    width: calc(100vw - 40px) !important;
    max-width: 320px !important;
    height: 350px !important;
  }

  /* ----- MODALS ----- */
  .modal-overlay .modal-content,
  .dialog-content {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 85vh !important;
    margin: 16px auto !important;
    border-radius: 16px !important;
    padding: 16px !important;
    overflow-y: auto;
  }

  /* ----- COURSE CARDS ----- */
  .course-card {
    padding: 14px !important;
  }
  .course-card-title { font-size: 15px !important; }
  .course-card-desc { font-size: 12px !important; }

  /* ----- LESSON DETAIL ----- */
  .lesson-content {
    padding: 16px !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
  }
  .lesson-content h1 { font-size: 22px !important; }
  .lesson-content h2 { font-size: 18px !important; }
  .lesson-content h3 { font-size: 16px !important; }
  .lesson-content pre {
    font-size: 12px !important;
    padding: 12px !important;
    overflow-x: auto;
  }

  /* ----- LISTENING/READING PLAYER ----- */
  .audio-player, .video-player-wrap {
    border-radius: 12px !important;
  }
  .audio-player {
    padding: 12px !important;
  }

  /* ----- VOCABULARY ----- */
  .vocab-grid {
    grid-template-columns: 1fr !important;
  }

  /* ----- SPEAKING ----- */
  .speaking-scenario-grid {
    grid-template-columns: 1fr !important;
  }

  /* ----- SETTINGS ----- */
  .settings-grid {
    grid-template-columns: 1fr !important;
  }
  .settings-section {
    padding: 14px !important;
  }

  /* ----- EMPTY STATES ----- */
  .empty-state {
    padding: 40px 16px !important;
  }
  .empty-state h3 { font-size: 16px !important; }
  .empty-state .empty-icon { font-size: 2rem !important; }

  /* ----- PROGRESS BAR ----- */
  .progress-wrap {
    height: 8px !important;
    border-radius: 4px !important;
  }

  /* ----- BADGE ----- */
  .badge {
    font-size: 10px !important;
    padding: 3px 8px !important;
  }

  /* ----- LISTS ----- */
  .list-item {
    padding: 12px !important;
    gap: 10px !important;
  }

  /* ----- TYPOGRAPHY ----- */
  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.25rem !important; }
  h3 { font-size: 1.1rem !important; }

  /* ===== FIX 1: Dashboard Recent Activity + Notifications stack ===== */
  div[style*="grid-template-columns:1fr 1fr"][style*="gap:var(--space-5)"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* ===== FIX 2: Course cards — clean 2-column grid ===== */
  .courses-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .courses-grid .course-card {
    padding: 0 !important;
    overflow: hidden;
  }
  .courses-grid .course-card-body {
    padding: 10px !important;
  }
  .courses-grid .course-card-title {
    font-size: 13px !important;
    line-height: 1.3 !important;
  }

  /* ===== FIX 3: Stepper — all steps in one line ===== */
  .stepper {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    width: 100% !important;
    justify-content: space-between !important;
    overflow: visible !important;
  }
  .stepper-step {
    flex: 1 !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
    align-items: center !important;
  }
  .step-label {
    font-size: 10px !important;
    white-space: normal !important;
    text-align: center;
    line-height: 1.2 !important;
    max-width: 80px;
  }
  .step-circle {
    width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
    flex-shrink: 0 !important;
  }
  .stepper-step:not(:last-child)::after {
    min-width: 12px !important;
    width: 12px !important;
    flex-shrink: 1 !important;
  }

  /* Content detail: prevent horizontal overflow */
  .content-detail {
    overflow-x: hidden !important;
    word-wrap: break-word !important;
  }
  .content-detail h2 {
    font-size: 18px !important;
    word-break: break-word !important;
  }

  /* ===== FIX 4: Reading ebook — bigger page to show all content ===== */
  .ebook-container {
    margin-bottom: 0 !important;
  }
  .ebook-body {
    min-height: 50vh !important;
    max-height: none !important;
    height: auto !important;
    overflow-y: visible !important;
    padding: 20px 16px !important;
    font-size: 15px !important;
  }
  .ebook-footer {
    position: sticky !important;
    bottom: 0 !important;
    background: var(--color-bg, #fff) !important;
    padding: 10px 12px !important;
    border-top: 1px solid var(--color-border) !important;
    z-index: 10;
  }
  .ebook-nav-btn {
    font-size: 12px !important;
    padding: 6px 12px !important;
  }
  .ebook-audio-bar {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 11;
  }

  /* ===== FIX 5: Horizontal Content Cards (Speaking, Reading, Vocab) ===== */
  .speaking-grid, .reading-grid, .vocab-grid-v2 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  
  .reading-card, .vocab-card-v2 {
    display: flex !important;
    flex-direction: row !important;
    height: 140px !important;
    border-radius: 20px !important;
    padding: 0 !important;
    gap: 12px !important;
    overflow: hidden !important;
    position: relative !important;
  }
  
  .reading-card-top, .vc2-top {
    height: 100% !important;
    min-height: auto !important;
    width: 140px !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .reading-card-bottom, .vc2-body {
    padding: 10px 14px 10px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important; /* Prevent top cutoff when content is tall */
    flex: 1 !important;
    min-width: 0 !important;
  }
  
  .reading-card-title, .vc2-title {
    font-size: 15px !important;
    line-height: 1.2 !important;
    margin-bottom: 6px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .reading-card-emoji {
    font-size: 3.5rem !important;
    position: static !important;
    transform: none !important;
  }
  
  .reading-card-btn {
    align-self: flex-start !important;
    margin-top: auto !important;
    position: static !important;
  }

  /* Vocab/Speaking Card Specifics */
  .spk-footer-info {
    display: none !important; /* Match reading card clean look */
  }

  .vc2-subtitle,
  .spk-xp-badge {
    display: inline-flex !important; /* Re-enable content as requested */
  }
  
  .vc2-subtitle {
    margin-bottom: 2px !important;
    font-size: 11px !important;
  }
  
  .spk-xp-badge {
    margin-bottom: 4px !important;
    padding: 2px 6px !important;
    font-size: 10px !important;
  }
  
  .spk-top-badge-right {
    display: none !important; /* Keep top right badge hidden to avoid clutter on image */
  }
  
  .spk-top-badge-left > div {
    font-size: 8px !important;
    padding: 2px 6px !important;
  }
  
  .spk-top-stars {
    font-size: 8px !important;
  }

  .vc2-tags {
    margin-bottom: 2px !important;
    gap: 4px !important;
  }
  
  .vc2-tag {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }

  .vc2-mastery-row {
    margin-bottom: 2px !important;
  }

  .vc2-progress-row {
    width: calc(100% - 75px) !important; /* Leave room for absolute button */
    margin-top: auto !important;
  }

  .vc2-footer {
    position: absolute !important;
    bottom: 13px !important;
    right: 14px !important;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .vc2-footer-count, .vc2-badge-words {
    display: none !important; /* Hide duplicate counts */
  }

  .vc2-btn {
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 6px 14px !important;
  }

  .vc2-badge-level {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
  }

  .vc2-badge-cat {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
  }
}


/* =============================================
   SMALL MOBILE (max-width: 480px)
   ============================================= */
@media (max-width: 480px) {
  /* Even tighter layout */
  .page-content {
    padding: 10px 10px 90px 10px !important;
  }

  /* Admin stat cards: single column */
  .admin-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* Action buttons stack */
  .admin-section > div[style*="display:flex"][style*="gap"] {
    flex-direction: column !important;
  }

  /* Smaller text */
  .page-title { font-size: 14px !important; }
  h1 { font-size: 1.3rem !important; }

  /* Tab filter even more compact */
  .tab-filter-item {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }

  /* Welcome banner */
  .welcome-banner h2 { font-size: 16px !important; }
  .welcome-banner p { font-size: 12px !important; }

  /* Quiz answers */
  .kahoot-question { font-size: 14px !important; }
  .kahoot-answer-btn { font-size: 13px !important; }

  /* Flashcards */
  .flashcard-container {
    width: calc(100vw - 24px) !important;
    height: 300px !important;
  }

  /* Full width buttons */
  .btn-primary, .btn-secondary {
    width: 100%;
  }

  /* Verify digits */
  .verify-digit {
    width: 38px !important;
    height: 46px !important;
    font-size: 18px !important;
  }
}



/* ---- Mobile Inline Flags (hidden on desktop) ---- */
.lp-hero-flags-mobile {
  display: none; /* Hidden on desktop */
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin: 24px 0;
}
.lp-flag-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.lp-flag-inline img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--lp-gold, #C5973A);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 0 0 4px rgba(197,151,58,0.12);
}
.lp-flag-inline span {
  font-size: 11px;
  font-weight: 600;
  color: var(--lp-text-muted, #8A9BBF);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* =============================================
   LANDING PAGE — MOBILE
   ============================================= */
@media (max-width: 900px) {
  /* Reduce gap between nav and hero */
  .lp-hero {
    padding-top: 24px !important;
    padding-bottom: 40px !important;
    min-height: auto !important;
  }
  /* Hero split to column */
  .lp-hero-inner {
    display: flex !important;
    flex-direction: column !important;
    text-align: center;
    gap: 16px !important;
    padding: 16px 16px !important;
  }
  
  .lp-hero-text { 
    display: contents !important; 
  }
  
  .lp-hero-badge { order: 1; margin: 0 auto 12px !important; }
  .lp-hero-text h1 { order: 2; font-size: 40px !important; line-height: 1.2 !important; }
  .lp-hero-sub { order: 3; font-size: 15px !important; }
  
  /* Visual comes right after text, before buttons! */
  .lp-hero-visual { 
    order: 4; 
    height: 380px !important; 
    margin: 0 !important; 
  }
  
  .lp-hero-btns {
    order: 5;
    justify-content: center !important;
    flex-wrap: wrap;
    margin-top: 24px !important;
  }
  
  .lp-hero-stats {
    order: 6;
    justify-content: center !important;
    width: 100%;
  }
  
  .lp-hero-visual-inner { transform: scale(0.8); }

  /* Section spacing */
  .lp-section { padding: 32px 0 !important; }
  .lp-container { padding: 0 16px !important; }
  .lp-section-title { font-size: 24px !important; margin-bottom: 8px !important; }
  .lp-section-sub { font-size: 14px !important; margin-bottom: 24px !important; }

  /* Trusted grid */
  .lp-trusted-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: 24px !important;
  }
  .lp-trust-card {
    padding: 16px 10px !important;
    border-radius: 12px !important;
  }
  .lp-trust-icon { font-size: 22px !important; margin-bottom: 6px !important; }
  .lp-trust-num { font-size: 22px !important; }
  .lp-trust-lbl { font-size: 10px !important; }

  /* Levels grid */
  .lp-levels-grid {
    grid-template-columns: 1fr !important;
  }

  /* Features grid */
  .lp-features-grid {
    grid-template-columns: 1fr !important;
  }

  /* Why */
  .lp-why-inner {
    flex-direction: column !important;
  }

  /* About */
  .lp-about-inner {
    flex-direction: column !important;
  }

  /* Tabs scroll */
  .lp-tabs {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding-bottom: 4px;
  }
  .lp-tabs::-webkit-scrollbar { display: none; }
  .lp-tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px !important;
    padding: 8px 14px !important;
  }

  /* Book cards */
  .lp-book-card {
    flex-direction: column !important;
  }
  .lp-book-thumb {
    width: 100% !important;
    height: 160px !important;
    border-radius: 12px 12px 0 0 !important;
  }

  /* CTA */
  .lp-final-cta { padding: 48px 0 !important; }
  .lp-final-cta h2 { font-size: 24px !important; }

  /* Footer */
  .lp-footer-inner {
    flex-direction: column !important;
    text-align: center;
    gap: 12px !important;
  }
  .lp-footer-links {
    flex-wrap: wrap;
    justify-content: center !important;
    gap: 8px 16px !important;
  }
}

@media (max-width: 768px) {
  /* Landing nav */
  .lp-nav {
    padding: 0 12px !important;
    height: 56px !important;
  }
  .lp-nav-links { display: none !important; }
  .lp-nav-actions { gap: 6px !important; }
  .lp-nav-signin, .lp-nav-cta {
    font-size: 12px !important;
    padding: 8px 12px !important;
  }
  .lp-lang-btn {
    padding: 6px 8px !important;
    font-size: 12px !important;
  }
  .lp-hero-badge { font-size: 11px !important; padding: 6px 12px !important; }
  .lp-hero-text h1 { font-size: 40px !important; line-height: 1.2 !important; }
  .lp-hero-text h1 em { white-space: normal !important; }
  .lp-hero-sub { font-size: 14px !important; }

  /* FAQ */
  .lp-faq-q { font-size: 14px !important; padding: 14px !important; }
  .lp-faq-a { font-size: 13px !important; padding: 0 14px 14px !important; }

  /* Trust cards */
  .lp-trust-card { padding: 16px !important; }
  .lp-trust-num { font-size: 28px !important; }
  .lp-trust-lbl { font-size: 11px !important; }

  /* Level cards */
  .lp-level-card { padding: 20px !important; }
  .lp-level-name { font-size: 18px !important; }
  .lp-level-desc { font-size: 13px !important; }

  /* Feature cards */
  .lp-feature-card { padding: 16px !important; gap: 12px !important; }
  .lp-feat-icon { font-size: 28px !important; }
  .lp-feat-title { font-size: 15px !important; }
  .lp-feat-desc { font-size: 12px !important; }

  /* Why items */
  .lp-why-item { padding: 14px !important; }
  .lp-testimonial { font-size: 13px !important; }
  .lp-why-visual big, .lp-why-visual .big { font-size: 36px !important; }

  /* About */
  .lp-about-inner > div:first-child p { font-size: 14px !important; }
  .lp-about-highlight { padding: 16px !important; }
  .lp-mission-item { padding: 14px !important; gap: 12px !important; }

  /* Coming soon */
  .lp-coming-soon-panel { padding: 40px 16px !important; }
  .lp-coming-icon { font-size: 36px !important; }
  .lp-coming-soon-panel h3 { font-size: 18px !important; }
  .lp-coming-soon-panel p { font-size: 13px !important; }
}

/* ---- Landing Hamburger Button ---- */
.lp-mobile-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  cursor: pointer;
  padding: 10px 8px;
  transition: all 0.3s;
}
.lp-mobile-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.lp-mobile-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.lp-mobile-burger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.lp-mobile-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Landing Mobile Menu Panel ---- */
.lp-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 101;
  background: #fff;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 72px 24px 32px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.lp-mobile-menu.open {
  transform: translateX(0);
}

/* Close button */
.lp-mm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  cursor: pointer;
  color: var(--lp-navy, #0C1B3A);
  transition: all 0.2s;
}
.lp-mm-close:hover {
  background: rgba(0,0,0,0.1);
}

/* Nav links with chevrons */
.lp-mm-links {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.lp-mm-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  color: var(--lp-navy, #0C1B3A);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: color 0.2s;
}
.lp-mm-links a:last-child { border-bottom: none; }
.lp-mm-links a:active {
  color: var(--lp-gold, #C5973A);
}
.lp-mm-chevron {
  font-size: 22px;
  color: rgba(0,0,0,0.25);
  font-weight: 300;
}

/* Divider */
.lp-mm-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--lp-gold, #C5973A), var(--lp-gold-light, #E0B55A), transparent);
  margin: 16px 0;
}

/* Footer: Login + Register + Language */
.lp-mm-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
}
.lp-mm-login {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--lp-navy, #0C1B3A);
  padding: 12px 0;
  transition: color 0.2s;
}
.lp-mm-login:active { color: var(--lp-gold); }
.lp-mm-register {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--lp-gold, #C5973A);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.3px;
}
.lp-mm-register:active {
  background: var(--lp-gold-light, #E0B55A);
  transform: scale(0.98);
}

/* Language switcher in menu */
.lp-mm-lang {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}
.lp-mm-lang-btn {
  flex: 1;
  padding: 10px;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lp-navy, #0C1B3A);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.lp-mm-lang-btn.active {
  background: var(--lp-navy, #0C1B3A);
  color: #fff;
  border-color: transparent;
}

/* Mobile overlay */
.lp-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.lp-mobile-overlay.show { display: block; }

@media (max-width: 768px) {
  /* Show burger, hide desktop nav actions */
  .lp-mobile-burger { display: flex; }
  .lp-mobile-menu { display: flex; }
  .lp-nav-signin { display: none !important; }
  .lp-nav-cta { display: none !important; }
  .lp-desktop-lang { display: none !important; }
  /* Nav is just logo + burger */
  .lp-nav-actions { gap: 0 !important; }
}

@media (max-width: 480px) {
  .lp-hero-text h1 { font-size: 38px !important; line-height: 1.2 !important; margin-bottom: 8px !important; }
  .lp-section-title { font-size: 20px !important; }
  .lp-hero-visual { height: 280px !important; margin: 0 !important; }
  .lp-hero-visual-inner { transform: scale(0.55); }
  .lp-trusted-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .lp-hero-stats { flex-direction: column; gap: 6px !important; margin-top: 4px !important; }
  .lp-hero-btns { flex-direction: column; gap: 8px !important; width: 100%; margin-top: 24px !important; }
  
  /* Mobile CTA Buttons Fix */
  .lp-btn-primary, .lp-btn-secondary {
    width: 100% !important;
    height: 54px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    padding: 0 24px !important;
    border-radius: 12px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  }
  
  .lp-btn-primary:active, .lp-btn-secondary:active {
    transform: scale(0.96) !important;
  }
  
  .lp-cta-btns { flex-direction: column !important; gap: 12px !important; }
}


/* =============================================
   TOUCH OPTIMIZATION
   ============================================= */
@media (hover: none) and (pointer: coarse) {
  /* Touch-friendly tap targets */
  .btn, .nav-item, .tab-filter-item, button,
  .lp-tab-btn, .lp-btn-primary, .lp-btn-secondary,
  .lp-faq-q, .profile-btn, .header-action {
    -webkit-tap-highlight-color: transparent;
  }

  /* Remove hover effects that don't work on touch */
  .hover-lift:hover { transform: none; }
  .card:hover { transform: none; box-shadow: var(--shadow); }

  /* Smoother scrolling */
  * {
    -webkit-overflow-scrolling: touch;
  }

  /* Disable text selection on buttons */
  button, .btn, .nav-item, .tab-filter-item {
    -webkit-user-select: none;
    user-select: none;
  }
}


/* =============================================
   SAFE AREA (iPhone notch/home bar)
   ============================================= */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .page-content {
    padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important;
  }
  @media (max-width: 768px) {
    .page-content {
      padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important;
    }
  }
  .sidebar {
    padding-bottom: env(safe-area-inset-bottom);
  }
  .lp-footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important;
  }
}


/* =============================================
   PRINT — hide unnecessary UI
   ============================================= */
@media print {
  .sidebar, .header, .sidebar-overlay,
  .mobile-menu-btn, .header-right { display: none !important; }
  .main-content { margin: 0 !important; }
  .page-content { padding: 0 !important; }
}
