/**
 * Imóveis Aurum Blog - Responsive Stylesheet
 * Strict breakpoints: 320px, 375px, 425px, 768px, 1024px, 1280px, 1440px, 1920px
 * Ensures zero horizontal overflow and comfortable touch targets
 */

/* Desktops and Wide Screens (1440px - 1920px+) */
@media (min-width: 1440px) {
  .container {
    max-width: 1360px;
  }
}

/* Laptops & Standard Desktops (1025px - 1280px) */
@media (max-width: 1280px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 2rem;
  }
}

/* Tablets (769px - 1024px) */
@media (max-width: 1024px) {
  .nav-zone {
    gap: 1.25rem;
  }

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

  .featured-editorial-highlight {
    flex-direction: column;
    align-items: stretch;
    padding: 2rem;
    gap: 2rem;
  }

  .featured-hero-image-wrap {
    flex: none;
    width: 100%;
    height: 340px;
  }

  .featured-highlight-right {
    flex: none;
  }

  .property-cta-inner {
    grid-template-columns: 1fr;
  }

  .property-cta-body {
    padding: 2.5rem;
  }

  .property-cta-visual {
    display: none;
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

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

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

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

/* Mobile Devices & Small Tablets (768px and below) */
@media (max-width: 768px) {
  :root {
    --header-height: 68px;
  }

  .container,
  .container-narrow,
  .container-reading {
    padding-left: 1rem;
    padding-right: 1rem;
  }

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

  .regions-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

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

  .explore-prudente-section {
    padding: 2rem 1.25rem;
  }

  /* Header adjustments */
  .nav-zone,
  .action-zone .btn-header-cta {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .aurum-official-symbol {
    width: 56px;
    height: 56px;
  }

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

  /* Articles Grid single column */
  .articles-grid,
  .articles-grid.two-cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .category-card {
    padding: 1.25rem 0.75rem;
  }

  .featured-editorial-highlight {
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 1.25rem;
    margin-bottom: var(--space-10);
    gap: 1.5rem;
  }

  .featured-highlight-right {
    flex: none;
  }

  .featured-highlight-top {
    margin-bottom: 1rem;
  }

  .featured-hero-title {
    font-size: 1.65rem;
    line-height: 1.22;
  }

  .featured-hero-image-wrap {
    flex: none;
    width: 100%;
    height: 240px;
  }

  .featured-highlight-bottom {
    margin-top: 1.25rem;
  }

  .featured-hero-summary {
    font-size: 0.95rem;
  }

  .featured-hero-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .featured-hero-bottom-bar .btn {
    width: 100%;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Individual Article Typography */
  .article-main-title {
    font-size: 1.85rem;
  }

  .article-lead-subtitle {
    font-size: 1.05rem;
  }

  .article-prose {
    font-size: 1rem;
    line-height: 1.7;
  }

  .article-inline-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }

  .article-share-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* Keep compact interface groups usable when their content wraps. */
  .category-toolbar,
  .search-results-info {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-sort-select {
    max-width: 100%;
  }

  .about-ecosystem-box,
  .article-highlight-box {
    padding: 1.5rem;
  }

  .article-pull-quote {
    padding: 1rem 0 1rem 1.25rem;
    margin: 2rem 0;
  }

  .article-header-meta,
  .news-modal-meta {
    flex-wrap: wrap;
  }

  .share-buttons-group,
  .footer-bottom-links {
    flex-wrap: wrap;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .back-to-top {
    right: 1rem;
    bottom: 1rem;
  }

  .aurum-toast {
    right: 1rem;
    bottom: 1rem;
    max-width: calc(100% - 2rem);
  }
}

/* Extra Small Phones (320px - 425px) */
@media (max-width: 425px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }

  .brand-sub {
    display: none;
  }

  .search-input-field {
    padding: 0.9rem 2.8rem 0.9rem 1rem;
    font-size: 0.95rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .btn-link {
    width: auto;
  }

  .article-byline {
    flex-direction: column;
    text-align: center;
  }

  .author-info {
    text-align: center;
  }

  .featured-editorial-highlight {
    padding: 1.25rem 1rem;
  }

  .featured-hero-image-wrap {
    height: 200px;
  }

  .article-page-header {
    padding-top: var(--space-6);
    padding-bottom: var(--space-8);
  }

  .article-header-meta {
    justify-content: center;
    gap: 0.35rem;
  }

  .article-highlight-box,
  .article-inline-cta,
  .about-ecosystem-box,
  .news-section-wrapper {
    padding: 1.25rem 1rem;
  }

  .article-share-section {
    align-items: stretch;
  }

  .share-buttons-group {
    width: 100%;
  }

  .share-btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .footer-bottom-links {
    gap: 0.75rem 1rem;
  }

  .not-found-wrapper {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
}

/* Narrow phones: preserve the brand mark and leave enough room for controls. */
@media (max-width: 375px) {
  .container,
  .container-narrow,
  .container-reading {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .header-container {
    gap: 0.5rem;
  }

  .brand-logo-lockup {
    gap: 0;
  }

  .brand-text-block {
    display: none;
  }

  .aurum-official-symbol {
    width: 50px;
    height: 50px;
  }

  .action-zone {
    gap: 0.5rem;
  }

  .search-trigger-btn,
  .mobile-toggle {
    width: 38px;
    height: 38px;
  }

  .moments-grid {
    grid-template-columns: 1fr;
  }

  .mobile-drawer-content {
    width: min(92vw, 360px);
    padding: 1.5rem 1rem;
  }
}

/* Shared safeguards for long titles, controls and fluid grid children. */
@media (max-width: 768px) {
  .articles-grid > *,
  .categories-grid > *,
  .intent-grid > *,
  .regions-grid > *,
  .moments-grid > *,
  .news-grid > *,
  .footer-top > *,
  .property-cta-inner > * {
    min-width: 0;
  }

  .article-card-title,
  .featured-hero-title,
  .article-main-title,
  .category-hero-title,
  .about-title,
  .news-card-title,
  .news-modal-title,
  .footer-brand-desc,
  .article-prose,
  .article-prose p,
  .article-prose li {
    overflow-wrap: anywhere;
  }

  .breadcrumb-current {
    max-width: min(60vw, 320px);
  }
}

/* Strict Anti-Overflow Safety */
body, main, header, footer, section, article {
  max-width: 100%;
  overflow-x: clip;
}
