/* ═══════════════════════════════════════════════════════════════════════════════
   MOBILE-FIRST RESPONSIVE ENHANCEMENTS FOR SHULAV SCHOOL UNIFORMS
   Created to optimize the website for mobile devices and tablets
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══ BASE MOBILE OPTIMIZATIONS ═══ */
@media (max-width: 480px) {
  /* Root font size adjustment for better readability */
  html {
    font-size: 14px;
  }
  
  /* Topbar Mobile Optimization */
  .topbar {
    padding: 0.6rem 1rem;
    font-size: 0.65rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .topbar-right {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  
  /* Navigation Mobile Optimization */
  nav {
    padding: 0 1rem;
    height: 60px;
  }
  
  .nav-logo-mark {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
  
  .nav-logo-text {
    font-size: 1.1rem;
  }
  
  .nav-logo-text span {
    font-size: 0.55rem;
  }
  
  /* Hero Section Mobile Optimization */
  .hero {
    padding: 2rem 1rem;
    min-height: auto;
  }
  
  .hero-text h1 {
    font-size: 1.8rem;
    line-height: 1.3;
  }
  
  .hero-text p,
  .hero-sub {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  .hero-cta-group {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 0.9rem;
  }
  
  /* Hero Stats Mobile */
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .hero-stat-num {
    font-size: 1.8rem;
  }
  
  .hero-stat-label {
    font-size: 0.75rem;
  }
  
  /* Hero Value Props Mobile */
  .hero-value-props {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .hero-value-item {
    padding: 0.8rem;
    font-size: 0.85rem;
  }
  
  /* Section Spacing Mobile */
  section {
    padding: 3rem 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  .resources-section .section-eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .resources-section .section-title {
    font-size: 1.65rem;
    line-height: 1.22;
  }

  .audience-intro {
    font-size: 0.88rem !important;
    line-height: 1.7 !important;
    margin-top: 0.85rem !important;
  }
  
  .section-subtitle {
    font-size: 0.95rem;
  }
  
  .section-label {
    font-size: 0.7rem;
    padding: 0.4rem 1rem;
  }

  .trust-bar {
    padding: 1.25rem 1rem;
  }

  .trust-bar-label {
    font-size: 0.62rem;
    line-height: 1.5;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
  }

  .trust-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    width: 100%;
  }

  .trust-detail-card {
    width: 100%;
    min-width: 0;
    padding: 0.95rem;
    border-radius: 14px;
  }

  .trust-detail-label {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    line-height: 1.4;
    margin-bottom: 0.35rem;
  }

  .trust-detail-card p {
    font-size: 0.8rem;
    line-height: 1.58;
  }
  
  /* Cards Grid Mobile */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  /* Product Grid Mobile */
  .product-grid,
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Audience Cards Mobile */
  .audience-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
  }

  .audience-card {
    width: 100%;
    min-width: 0;
    padding: 1.25rem;
    border-radius: 16px;
  }

  .audience-label {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    line-height: 1.4;
  }

  .audience-card h3 {
    font-size: 1.15rem;
    line-height: 1.3;
  }

  .audience-card p,
  .audience-points li {
    font-size: 0.84rem;
    line-height: 1.6;
  }

  .audience-link {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.76rem;
    line-height: 1.5;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
  }
  
  /* Pricing Cards Mobile */
  .pricing-grid {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 2rem;
    background: transparent;
    border: none;
  }
  
  .pricing-card {
    padding: 1.5rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
  }

  .pricing-card.featured {
    border: 1px solid rgba(200,147,58,0.25);
  }

  .pricing-tier {
    font-size: 0.66rem;
  }

  .pricing-moq {
    font-size: 2.2rem;
  }

  .pricing-desc {
    font-size: 0.78rem;
    line-height: 1.6;
    margin: 0.9rem 0 1rem;
  }

  .pricing-features li {
    font-size: 0.76rem;
    padding: 0.35rem 0;
  }

  .pricing-cta {
    font-size: 0.74rem;
    padding: 0.85rem 1rem;
  }

  .resources-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .resource-card {
    padding: 1.35rem;
    border-radius: 16px;
  }

  .resource-card h3 {
    font-size: 1.35rem;
  }

  .resource-card p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .resource-link {
    font-size: 0.74rem;
  }
  
  /* Tables Mobile - Responsive Tables */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    font-size: 0.85rem;
  }
  
  th, td {
    padding: 0.75rem 0.5rem;
  }
  
  /* Footer Mobile */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-column {
    text-align: center;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  /* Container Mobile */
  .container {
    padding: 0 1rem;
  }
  
  /* Hide floating badges on very small screens */
  .hero-badge.badge-1,
  .hero-badge.badge-2 {
    display: none;
  }
  
  /* Adjust floating cards */
  .hero-float-card {
    display: none;
  }
  
  /* Mobile Menu Optimization */
  .nav-mobile-menu {
    width: 100%;
    padding: 2rem 1rem;
  }
  
  .nav-mobile-links a {
    padding: 1rem;
    font-size: 1rem;
  }
  
  /* Form Elements Mobile */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 1rem;
  }
  
  /* Modal/Popup Mobile */
  .modal-content,
  .popup-content {
    width: 95%;
    margin: 1rem;
    padding: 1.5rem;
  }
  
  /* Image Optimization */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Touch-friendly spacing */
  a, button {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ═══ TABLET OPTIMIZATION (481px - 768px) ═══ */
@media (min-width: 481px) and (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .topbar {
    padding: 0.7rem 1.5rem;
    font-size: 0.7rem;
  }
  
  nav {
    padding: 0 1.5rem;
    height: 65px;
  }
  
  .hero {
    padding: 2.5rem 1.5rem;
  }

  .trust-bar {
    padding: 1.5rem;
  }

  .trust-bar-label {
    font-size: 0.64rem;
    letter-spacing: 0.11em;
    line-height: 1.5;
  }

  .trust-details {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1.15rem;
    width: 100%;
  }

  .trust-detail-card {
    width: 100%;
    min-width: 0;
    padding: 1rem;
  }

  .trust-detail-label {
    font-size: 0.64rem;
    letter-spacing: 0.11em;
  }

  .trust-detail-card p {
    font-size: 0.82rem;
    line-height: 1.62;
  }

  .audience-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1.75rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    margin-top: 2rem;
  }

  .pricing-card {
    padding: 1.6rem;
  }

  .pricing-moq {
    font-size: 2.4rem;
  }

  .pricing-desc {
    font-size: 0.8rem;
  }

  .pricing-features li {
    font-size: 0.78rem;
  }

  .pricing-cta {
    font-size: 0.75rem;
  }

  .resources-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .resource-card {
    padding: 1.5rem;
  }

  .resource-card h3 {
    font-size: 1.4rem;
  }

  .resource-card p {
    font-size: 0.88rem;
  }

  .audience-card {
    width: 100%;
    min-width: 0;
    padding: 1.35rem;
  }

  .audience-link {
    display: block;
    width: 100%;
    line-height: 1.5;
    letter-spacing: 0.05em;
  }
  
  .hero-text h1 {
    font-size: 2.2rem;
  }
  
  .hero-text p {
    font-size: 1rem;
  }
  
  section {
    padding: 3.5rem 1.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }

  .resources-section .section-title {
    font-size: 1.9rem;
    line-height: 1.24;
  }

  .audience-intro {
    font-size: 0.9rem !important;
    line-height: 1.72 !important;
  }
  
  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  
  .container {
    padding: 0 1.5rem;
  }
}

/* ═══ SMALL TABLET TO DESKTOP (769px - 1024px) ═══ */
@media (min-width: 769px) and (max-width: 1024px) {
  nav {
    padding: 0 2rem;
  }
  
  section {
    padding: 4.5rem 2rem;
  }
  
  .hero {
    padding: 3.5rem 2rem;
  }
  
  .container {
    padding: 0 2rem;
  }
  
  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* ═══ LANDSCAPE MOBILE OPTIMIZATION ═══ */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 1.5rem 1rem;
    min-height: auto;
  }
  
  .hero-text h1 {
    font-size: 1.5rem;
  }
  
  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  
  nav {
    height: 55px;
  }
  
  .topbar {
    padding: 0.5rem 1rem;
  }
}

/* ═══ ADDITIONAL MOBILE ENHANCEMENTS ═══ */

/* Smooth scrolling for all devices */
* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* Better touch scrolling */
.nav-mobile-menu,
.modal,
.overflow-scroll {
  -webkit-overflow-scrolling: touch;
}

/* Prevent text size adjustment on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Enhanced focus states for accessibility */
@media (max-width: 768px) {
  a:focus,
  button:focus,
  input:focus,
  textarea:focus,
  select:focus {
    outline: 3px solid var(--gold, #d4af37);
    outline-offset: 2px;
  }
}

/* Sticky elements optimization for mobile */
@media (max-width: 768px) {
  nav.sticky {
    position: fixed;
    top: 0;
    width: 100%;
  }
  
  /* Add padding to body when nav is fixed */
  body.nav-fixed {
    padding-top: 60px;
  }
}

/* Optimize animations for mobile performance */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Better readability on mobile */
@media (max-width: 768px) {
  p, li, td, th {
    line-height: 1.6;
  }
  
  /* Larger tap targets */
  .nav-hamburger {
    padding: 0.8rem;
    min-width: 44px;
    min-height: 44px;
  }
}

/* WhatsApp button mobile optimization */
@media (max-width: 768px) {
  .whatsapp-float,
  .wa-button,
  .floating-whatsapp {
    bottom: 20px;
    right: 15px;
    width: 56px;
    height: 56px;
  }
}

/* Gallery/Image grids mobile */
@media (max-width: 768px) {
  .gallery-grid,
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid,
  .image-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* Breadcrumbs mobile */
@media (max-width: 768px) {
  .breadcrumbs {
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
  }
}

/* Call-to-action sections mobile */
@media (max-width: 768px) {
  .cta-section,
  .call-to-action {
    padding: 2rem 1rem;
    text-align: center;
  }
  
  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Features/Benefits sections */
@media (max-width: 768px) {
  .features-grid,
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .feature-item,
  .benefit-item {
    text-align: center;
    padding: 1.5rem;
  }
}

/* Stats/Numbers sections */
@media (max-width: 768px) {
  .stats-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 1rem;
  }
  
  .stat-item:last-child {
    border-bottom: none;
  }
}

/* Blog/Article listings mobile */
@media (max-width: 768px) {
  .blog-grid,
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .blog-card,
  .article-card {
    flex-direction: column;
  }
  
  .blog-image,
  .article-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
  }
}

/* Testimonials mobile */
@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonial-card {
    padding: 1.5rem;
  }
}

/* FAQ sections mobile */
@media (max-width: 768px) {
  .faq-item {
    padding: 1rem;
  }
  
  .faq-question {
    font-size: 1rem;
    padding-right: 2rem;
  }
}

/* Contact forms mobile */
@media (max-width: 768px) {
  .contact-form,
  .quote-form {
    padding: 1.5rem;
  }
  
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .form-group {
    width: 100%;
  }
}
