/* =====================================================================
   DigitalRadar — Mobile-first refinements
   Camada final: blinda telas pequenas (Orbitron largo, overflow,
   alvos de toque). Carregada por último. Ver CLAUDE.md (mobile-first).
   ===================================================================== */

/* ---- Segurança contra overflow horizontal global ----
   overflow-x: clip (não 'hidden') para NÃO quebrar position: sticky
   dos descendentes (ex.: sidebar do post que acompanha o scroll). */
html, body { max-width: 100%; overflow-x: clip; }
img, video, table, pre, iframe { max-width: 100%; }

/* ---- Orbitron é largo: evita que títulos estourem a viewport ---- */
h1, h2, h3,
.dr-hero__title,
.dr-section__title,
.dr-single__title,
.dr-page__title,
.dr-feature__title,
.dr-index__name {
	overflow-wrap: anywhere;
	word-break: break-word;
	hyphens: auto;
}

/* ===== Telas até 600px (mobile-first: o padrão é o pequeno) ===== */
@media (max-width: 600px) {

	/* Tipografia do hero respira melhor no celular */
	.dr-hero { min-height: auto; padding-block: var(--dr-sp-8) var(--dr-sp-7); }
	.dr-hero__title { font-size: clamp(2rem, 8vw, 2.6rem); }
	.dr-hero__lead { font-size: var(--dr-fs-base); }
	.dr-hero__cta { width: 100%; }
	.dr-hero__cta .dr-btn { flex: 1 1 auto; justify-content: center; }

	/* Botões e campos com alvo de toque confortável (>=44px) */
	.dr-btn { min-height: 44px; }
	.dr-search-toggle, .dr-burger { width: 44px; height: 44px; }
	.dr-lang__btn { min-height: 32px; display: inline-flex; align-items: center; }

	/* Seções com cabeçalho empilhado */
	.dr-section__head { flex-direction: column; align-items: flex-start; gap: .5rem; }

	/* Índice de categorias: fonte e padding controlados */
	.dr-index__row a { font-size: clamp(1.15rem, 6vw, 1.6rem); gap: .8rem; padding-block: .9rem; }
	.dr-index__row:hover a { padding-left: .6rem; }

	/* Faixa de números: 2 colunas já cabe; reduz a fonte gigante */
	.dr-stat__num { font-size: clamp(2rem, 11vw, 2.8rem); }

	/* CTA band e formulários empilham */
	.dr-cta-band__form { flex-direction: column; }
	.dr-cta-band__form .dr-btn { width: 100%; }
	.dr-newsletter-form { flex-direction: column; }
	.dr-newsletter-form .dr-btn { width: 100%; }

	/* Single: meta e share confortáveis */
	.dr-single__featured { padding-inline: var(--dr-gutter); }
	.dr-prose { font-size: 1.02rem; }

	/* Footer: tudo alinhado à esquerda, sem apertar */
	.dr-footer__bottom { flex-direction: column; align-items: flex-start; }
	.dr-footer__legal { flex-wrap: wrap; }

	/* Tabela do prose: rola horizontal em vez de espremer */
	.dr-prose table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ===== Telas muito pequenas (<=380px) ===== */
@media (max-width: 380px) {
	.dr-hero__title { font-size: clamp(1.8rem, 9vw, 2.2rem); }
	.dr-stats__grid { grid-template-columns: 1fr 1fr; }
	.dr-lang { padding: 2px; }
	.dr-logo__img { height: 36px; }
}

/* ---- Tap targets: links de lista no rodapé/menu com área decente ---- */
@media (hover: none) {
	.dr-footer__list a,
	.dr-footer__legal-list a,
	.dr-nav__list a { padding-block: .5rem; }
}
