/* Mobile-specific styles for Qurantopia Academy */

/* Base mobile styles */
@media (max-width: 768px) {
  /* General adjustments */
  html {
    font-size: 15px;
  }

  /* Container adjustments */
  .container {
    padding: 0 15px;
  }

  /* Header & Navigation */
  .header {
    position: relative;
    padding: 10px 0;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0 10px;
    gap: 15px;
    position: relative;
  }

  .brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    z-index: 100;
  }

  .brand img {
    height: 40px;
    width: auto;
    margin-right: 10px;
  }

  .brand-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0b2840;
    white-space: nowrap;
  }

  /* Navigation links */
  /* Desktop navigation - shown by default */
  .nav nav {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
  }
  
  /* Mobile navigation styles */
  @media (max-width: 768px) {
    .nav nav {
      order: 3;
      width: 100%;
      margin-top: 10px;
      display: none;
      flex-direction: column;
      background: #f8f9fa;
      border-radius: 8px;
      padding: 10px;
      position: relative;
      z-index: 99;
    }
  }

  .nav nav a {
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    display: block;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
  }

  .nav nav a:last-child {
    border-bottom: none;
  }

  .nav nav a:hover {
    background: #e9ecef;
  }

  /* Mobile menu toggle - hidden by default */
  .menu-toggle {
    display: none; /* Hidden by default */
  }
  
  /* Show menu toggle on mobile */
  @media (max-width: 768px) {
    .menu-toggle {
      display: block;
      background: none;
      border: none;
      font-size: 1.8rem;
      cursor: pointer;
      color: #0b2840;
      padding: 5px 10px;
      margin-left: auto;
      z-index: 100;
    }
    
    /* Hide desktop navigation on mobile */
    .nav nav {
      display: none;
    }
    
    /* Show mobile navigation when active */
    .nav.mobile-menu-active nav {
      display: flex;
    }
  }

  /* Adjust header buttons for mobile */
  .actions.cta {
    display: none;
  }

  /* Hero section adjustments */
  .hero .wrap {
    flex-direction: column;
    padding: 2rem 0;
  }

  .hero .wrap > div:first-child {
    order: 2;
    text-align: center;
  }

  .hero .wrap > div:last-child {
    order: 1;
    margin-bottom: 2rem;
  }

  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  /* Adjust grid layouts for mobile */
  .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Adjust cards */
  .card {
    padding: 1.2rem;
  }

  /* Adjust buttons */
  .btn {
    display: block;
    width: 100%;
    margin-bottom: 0.8rem;
    text-align: center;
    padding: 0.8rem 1rem;
  }

  /* Footer adjustments */
  .footer .cols {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer .btn {
    width: auto;
    display: inline-block;
  }

  /* Topbar and Social Icons on Mobile */
  .topbar {
    position: relative;
    background: #0e1b2a;
    padding: 8px 0;
  }
  
  .topbar-inner {
    flex-direction: column;
    gap: 12px;
    padding: 0 15px;
  }
  
  .topbar .left {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
  }
  
  .topbar .right {
    justify-content: center;
    gap: 16px;
    margin-top: 4px;
  }
  
  .tb-link {
    font-size: 0.85rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
  
  .tb-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: 18px 18px;
    transition: transform 0.2s ease, background-color 0.2s ease;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
  }
  
  .tb-icon:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.15);
  }
  
  /* Adjust header to account for the visible topbar */
  .header {
    top: 0;
  }
  
  /* Testimonials Slider */
  .testimonials-container {
    position: relative;
    margin: 2rem 0;
  }
  
  .testimonial-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(11, 40, 64, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.3s ease;
  }
  
  .testimonial-nav:hover {
    background: rgba(11, 40, 64, 1);
  }
  
  .testimonial-nav.prev {
    left: 0;
  }
  
  .testimonial-nav.next {
    right: 0;
  }
  
  /* Show navigation on mobile */
  @media (max-width: 768px) {
    .testimonial-nav {
      display: flex;
    }
    
    .testimonials-slider {
      overflow-x: auto;
      white-space: nowrap;
      scroll-behavior: smooth;
      -webkit-overflow-scrolling: touch;
      padding: 10px 0;
      scroll-snap-type: x mandatory;
    }
    
    .testimonials-slider .card {
      display: inline-block;
      width: 85%;
      white-space: normal;
      margin: 0 7.5%;
      vertical-align: top;
      scroll-snap-align: center;
    }
    
    /* Hide scrollbar but keep functionality */
    .testimonials-slider::-webkit-scrollbar {
      display: none;
    }
    .testimonials-slider {
      -ms-overflow-style: none;
      scrollbar-width: none;
    }
  }
}
