/* ══════════════════════════════════════════
   Smart Zugdidi — Landing Mobile CSS
   /landing/xelovneba/assets/css/mobile.css
   ══════════════════════════════════════════ */

/* ── HEADER RESPONSIVE ── */
@media (max-width: 1084px) {

  /* Hide desktop nav items */
  .xl-nav {
    display: none;
    flex-direction: column;
    gap: 4px;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(10, 3, 24, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 80px 20px 24px;
    border-left: 1px solid rgba(196, 181, 253, 0.15);
    z-index: 300;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .xl-nav.open {
    display: flex;
    transform: translateX(0);
  }

  .xl-nav a {
    width: 100%;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    justify-content: flex-start !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .xl-nav a:hover {
    background: rgba(124, 58, 237, 0.18) !important;
  }

  .xl-nav a.active {
    background: rgba(196, 181, 253, 0.12) !important;
  }

  .xl-nav .n-cta {
    margin-top: 8px;
    text-align: center;
    justify-content: center !important;
  }

  /* Show burger */
  .xl-burger {
    display: flex !important;
  }

  /* Header inner — space-between */
  .xl-hi {
    justify-content: space-between;
    padding: 11px 18px;
  }

  /* Hide service label */
  .xl-svc,
  .xl-div {
    display: none !important;
  }

  /* Back button stays visible */
  .xl-back {
    display: flex;
    margin-left: 0;
  }

  /* Overlay when menu open */
  .xl-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 299;
    backdrop-filter: blur(2px);
  }

  .xl-overlay.active {
    display: block;
  }

  /* Close X inside open menu */
  .xl-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
  }

  .xl-nav-close:hover {
    background: rgba(196, 181, 253, 0.2);
    color: #fff;
  }
}

/* ── GALLERY CAROUSEL (mobile) ── */
@media (max-width: 768px) {

  .gallery-grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px !important;
    padding: 8px 4px 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Pull out of .wrap padding to give edge-to-edge feel */
    margin-left: -18px;
    margin-right: -18px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .gallery-grid::-webkit-scrollbar {
    display: none;
  }

  .gal-item {
    flex: 0 0 58vw;
    max-width: 240px;
    min-width: 160px;
    aspect-ratio: 3/4 !important;
    scroll-snap-align: start;
    border-radius: 16px;
  }

  /* Scroll indicator dots */
  .gal-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
  }

  .gal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.25);
    transition: all 0.25s;
  }

  .gal-dot.active {
    width: 18px;
    border-radius: 3px;
    background: #7c3aed;
  }
}

/* ── GENERAL MOBILE FIXES ── */
@media (max-width: 768px) {

  /* Hero */
  .hero {
    min-height: 480px;
    border-radius: 0 0 24px 24px;
    margin-bottom: 40px;
  }

  .hero-video {
    width: 100%;
    right: 0;
    opacity: 0.45;
  }

  .hero::after {
    background: linear-gradient(
      180deg,
      rgba(10, 3, 24, 0.85) 0%,
      rgba(10, 3, 24, 0.72) 60%,
      rgba(10, 3, 24, 0.55) 100%
    );
  }

  .hero-inner {
    padding: 48px 20px 40px;
  }

  .stats-bar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .stat {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .stat:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .stat:nth-last-child(-n+2) {
    border-bottom: none;
  }

  /* Sections */
  .sec {
    margin-bottom: 48px;
  }

  .wrap {
    padding: 0 18px;
  }

  /* Schools */
  .schools-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .school-img {
    display: none;
  }

  /* Programs */
  .prog-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }

  .prog-card {
    padding: 18px 14px;
  }

  .prog-icon {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }

  /* Events */
  .events-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Director */
  .director-card {
    flex-direction: column;
    border-radius: 20px;
  }

  .director-stripe {
    width: 100%;
    height: 5px;
  }

  .director-body {
    padding: 24px 20px;
    flex-direction: column;
    gap: 16px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .map-wrap {
    height: 260px !important;
    border-radius: 14px;
  }

  /* News */
  .news-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .about-img {
    order: -1;
  }

  .about-img img {
    height: 220px;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  /* Footer */
  .xlft-i {
    grid-template-columns: 1fr !important;
    gap: 24px;
    padding: 24px 18px !important;
  }

  .xlft-bot-i {
    flex-direction: column;
    text-align: center;
    padding: 12px 18px;
    gap: 6px;
  }
}

/* ── SMALL PHONES ── */
@media (max-width: 400px) {

  .hero h1 {
    font-size: 1.7rem;
  }

  .prog-grid {
    grid-template-columns: 1fr !important;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .gal-item {
    flex: 0 0 72vw;
  }
}