/* Mobile-only stylesheet (<=768px). Consolidates overrides to avoid conflicts. */

@media (max-width: 768px) {
  /* Ensure header is above page content and clickable */
  header { z-index: 3000; position: fixed; top: 0; left: 0; right: 0; }
  /* Header layout */
  header { padding: 1.2rem 0; }
  nav { justify-content: center; position: relative; padding: 0 0.5rem; }
  .logo { position: absolute; left: 0.5rem; font-size: 1.8rem; }
  .language-switcher { position: absolute; right: 0.25rem; z-index: 1000; }
  .language-switcher select { max-width: 92px; font-size: 0.8rem; padding: 0.35rem 1rem 0.35rem 0.5rem; }
  header .cta-btn { display: none; }
  /* Larger tap target for hamburger */
  /* Force hamburger positioning after logo */
  .hamburger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    position: absolute !important;
    left: auto !important;
    right: 4rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 3100;
    cursor: pointer;
    pointer-events: auto;
    width: 44px; height: 44px;
    border-radius: 10px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-size: 1.8rem;
    color: var(--text-light);
    background: transparent;
    border: none;
    transition: all 0.3s ease;
  }
  
  .hamburger:hover {
    background: var(--glass);
    color: var(--soft-blue);
  }
  
  .hamburger.active {
    color: var(--soft-purple);
    background: var(--glass);
  }
  .hamburger:active { transform: scale(0.98); }
  /* Full-screen overlay menu */
  .nav-menu { 
    display: none !important; 
    position: fixed; 
    top: 0; left: 0; right: 0; bottom: 0; 
    width: 100%; height: 100vh; 
    max-width: none; 
    transform: none; 
    background: rgba(10, 10, 10, 0.96); 
    backdrop-filter: var(--blur); 
    border: none; 
    border-radius: 0; 
    padding: 4.25rem 1rem 1rem 1rem; /* leave space for header/hamburger */
    flex-direction: column; 
    gap: 1rem; 
    z-index: 3050; 
    pointer-events: auto; 
    overflow-y: auto;
  }
  .nav-menu.active { display: flex !important; }
  /* Larger tappable items inside overlay */
  .nav-menu li a { display: block; padding: 0.9rem 0.25rem; font-size: 1.1rem; }
  .nav-menu .dropdown .dropdown-item a { padding: 0.75rem 0; }
  .dropdown .dropdown-menu { display: none; opacity: 1; visibility: visible; transform: none; position: static; box-shadow: none; background: transparent; border: none; padding: 0; }
  .dropdown .dropdown-menu.open { display: block; margin-top: 0.5rem; }
  /* Language switcher moved into burger */
  .nav-menu .language-switcher { display: block; }
  .nav-menu .language-switcher select { width: 100%; }

  /* Hero */
  .hero { align-items: center; text-align: center; padding: 6rem 1rem 0 1rem; }
  .hero .hero-content { display: none !important; }
  .mobile-hero-text { display: block !important; width: 100%; margin: 0 auto; padding: 1rem 1rem 0; text-align: center; }
  /* NeoGlass 2025 styling for mobile headline card */
  .mobile-hero-text .glass-card-hero,
  .mobile-hero-text { 
    background: linear-gradient( to bottom, rgba(15,18,28,0.65), rgba(15,18,28,0.55) );
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.04);
    padding: 1rem 1.25rem;
    width: calc(100% - 2rem);
    max-width: 720px;
  }
  .mobile-hero-text h1 { 
    font-family: 'Orbitron', sans-serif;
    font-size: 1.75rem;
    line-height: 1.15;
    letter-spacing: 0.5px;
    margin: 0.25rem 0 0.75rem;
    text-shadow: 0 0 18px rgba(102,178,255,0.25);
  }
  .mobile-hero-text p { 
    margin: 0.25rem auto 0.75rem;
    color: rgba(230,237,255,0.9);
    max-width: 28rem;
  }
  .mobile-hero-text .cta-btn { 
    display: inline-block;
    margin: 0.25rem 0 0.75rem;
    background: linear-gradient(135deg, #66B2FF 0%, #A78BFA 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    box-shadow: 0 8px 22px rgba(102,178,255,0.25);
  }
  .mobile-hero-text .cta-btn:active { transform: translateY(1px); }
  .mobile-hero-text .disclaimer { font-size: 0.85rem; color: rgba(220,225,240,0.75); margin-bottom: 0.25rem; }

  /* Fullscreen robots showcase */
  .mobile-robots-full { display: block; }
  .robot-full { position: relative; width: 100%; height: 100vh; overflow: hidden; }
  .robot-full img { width: 100%; height: 100%; object-fit: cover; }
  .robot-full .overlay { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: flex-end; padding: 0.75rem; }
  .robot-full .overlay-inner { background: rgba(0,0,0,0.35); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.2); border-radius: 10px; padding: 0.5rem 0.75rem; text-align: right; }

  /* Sections & cards */
  .section { padding: 2.5rem 1rem; }
  .section h2 { text-align: center; margin: 0 0 1rem; }
  .glass-card { margin: 1rem auto; }
  .spec-table-wrapper, .section .glass-card { width: 100%; max-width: 340px; box-sizing: border-box; }
  .spec-table-wrapper { overflow: hidden; }
  /* Ensure R1/G1 spec cards look identical and centered */
  .section .glass-card { margin-left: auto; margin-right: auto; padding: 1.25rem; }
  .section .glass-card table { width: 100%; table-layout: fixed; }
  .spec-table th, .spec-table td { padding: 0.5rem; line-height: 1.25; }
  .spec-table td { word-break: break-word; }

  /* Store & varieties */
  #store form { display: none; }
  #varieties { display: none; }

  /* R1/G1 robot pages: center content on mobile */
  .robot-hero { padding: 6rem 1rem 1.5rem 1rem; }
  .robot-showcase { 
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  .robot-image-container { order: 1; }
  .robot-details { order: 2; }
  .robot-main-image { max-width: 380px; height: auto; }
  .robot-details h1 { font-size: 2rem; }
  .robot-details .robot-tagline { font-size: 1rem; }
  .robot-details .price-section .price { margin-bottom: 0.5rem; }

  /* R1 Videos mobile styles */
  .videos-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .video-card {
    padding: 1rem;
  }
  .video-card h3 {
    font-size: 1.1rem;
  }
  .video-card p {
    font-size: 0.85rem;
  }

  /* Additional mobile styles from styles.css */
  .dropdown .dropdown-item a { padding: 0.75rem 0; }

  /* UNITREE Mobile Responsive */
  .hero-main-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
    min-height: auto;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.4rem;
  }
  
  .price-text {
    font-size: 1.5rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .main-robot-image {
    max-height: 50vh;
  }
  
  .hero-text-section {
    padding-left: 0;
  }
  
  .feature-item {
    padding: 2rem;
    margin-bottom: 2rem;
  }

  /* Robots list: vertical, centered, consistent width */
  .carousel {
    overflow-x: visible;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 0;
  }
  .carousel .glass-card { width: 100%; max-width: 360px; text-align: left; }
  .glass-card h3 { margin-bottom: 0.5rem; }
  .glass-card img { width: 100%; height: auto; }
  .glass-card .cta-btn { align-self: flex-start; }
  
  .feature-content h3 {
    font-size: 1.5rem;
  }
  
  .feature-content h4 {
    font-size: 1.2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .spec-category h3 {
    font-size: 1.5rem;
  }
  
  .spec-table th,
  .spec-table td {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
  
  .contact-content {
    padding: 2rem;
  }
  
  .contact-content h2 {
    font-size: 2rem;
  }
  
  .contact-buttons {
    flex-direction: column;
  }

  /* Hide original robots carousel to keep page clean */
  #robots .carousel { display: none; }
  
  /* Hide hero text overlay on mobile for index.html */
  .index-hero-content { display: none; }
}


