/* ===================================================================
   FREELANCE BD HUB — RESPONSIVE STYLESHEET
   Fully adaptive: phone → tablet → desktop
   Breakpoints: 360px, 480px, 640px, 768px, 1024px, 1280px
   =================================================================== */

/* Prevent any horizontal scroll site-wide */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* ---- Base mobile (default) ---- */
.container {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Minimum tap targets for touch */
@media (max-width: 768px) {
  a, button, input, select, textarea,
  .category-chip, .tag-chip, .nav-link {
    min-height: 44px;
  }

  .nav-desktop {
    display: none !important;
  }

  .mobile-menu-btn {
    display: inline-flex !important;
  }

  .hero-section {
    padding: 2.25rem 0 1.75rem;
  }

  .hero-title {
    font-size: clamp(1.55rem, 6vw, 2.1rem) !important;
    line-height: 1.25;
  }

  .articles-grid,
  .featured-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .category-chip {
    padding: 0.75rem;
  }

  .cat-icon-wrap {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .card-body {
    padding: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .newsletter-card {
    padding: 1.75rem 1.15rem;
    margin: 2rem 0;
  }

  .newsletter-form {
    flex-direction: column;
    width: 100%;
  }

  .newsletter-input {
    width: 100%;
  }

  .comments-section {
    padding: 1.15rem;
  }

  .header-inner {
    gap: 0.5rem;
  }

  .header-actions {
    gap: 0.35rem;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }

  .header-actions {
    gap: 0.2rem;
  }

  .brand-title {
    font-size: 0.95rem;
  }

  .brand-tagline-mini {
    display: none;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}

/* Tablets and up */
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }

  .hero-section {
    padding: 4rem 0 3.25rem;
  }

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

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

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Wide screens */
@media (min-width: 1280px) {
  .container {
    max-width: 1240px;
  }
}

/* Article page adaptive */
@media (max-width: 768px) {
  .article-content {
    font-size: 1.02rem;
    line-height: 1.7;
  }

  .article-hero-img {
    border-radius: 10px;
  }
}
