/* ==========================================================================
   ASToolHub - Responsive Media Queries
   ========================================================================== */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
  :root {
    --max-width: 1380px;
  }
}

/* Medium Desktop & Tablet Landscape (1024px to 1279px) */
@media (max-width: 1279px) {
  .mega-menu {
    width: 820px;
    gap: 16px;
    padding: 20px;
  }
}

/* Tablet Portrait & Small Desktop (768px to 1023px) */
@media (max-width: 1023px) {
  .nav-menu {
    display: none;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .hero-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    line-height: 1.2;
  }

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

/* Mobile Devices (max-width: 767px) */
@media (max-width: 767px) {
  :root {
    --header-height: 64px;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-section {
    padding: 44px 0 40px;
  }

  .hero-title {
    font-size: clamp(1.22rem, 4.4vw, 1.75rem);
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .hero-pills {
    gap: 10px;
    font-size: 0.8rem;
  }

  .section {
    padding: 44px 0;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tool-card {
    padding: 20px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .cta-banner {
    padding: 36px 20px;
  }

  .cta-title {
    font-size: 1.6rem;
  }

  .cta-desc {
    font-size: 0.95rem;
  }

  .tool-header h1 {
    font-size: clamp(1.35rem, 5.2vw, 1.75rem);
    line-height: 1.25;
    overflow-wrap: break-word;
  }

  .tool-header p {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .how-to-steps {
    grid-template-columns: 1fr;
  }

  .tool-box .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

/* Small Mobile (320px to 380px) */
@media (max-width: 380px) {
  .hero-title {
    font-size: clamp(1.02rem, 5.1vw, 1.18rem);
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    max-width: 100%;
  }

  .brand-logo {
    gap: 8px;
  }

  .brand-name {
    font-size: 1.18rem;
  }

  .brand-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 7px;
  }

  .tool-header h1 {
    font-size: clamp(1.2rem, 5.2vw, 1.45rem);
  }

  .btn {
    padding: 10px 18px;
    font-size: 0.88rem;
  }
}

@media (max-width: 340px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .hero-title {
    font-size: clamp(0.85rem, 4.4vw, 0.96rem);
  }

  .tool-header h1 {
    font-size: clamp(1.1rem, 5vw, 1.25rem);
  }

  .hero-badge {
    font-size: 0.68rem;
    padding: 3px 8px;
  }

  .tool-box .stats-grid {
    grid-template-columns: 1fr;
  }
}

