/*
Theme Name: Bento Quirino (wpdanceestut Child)
Theme URI: https://www.bentoquirino.com.br
Description: Tema filho de wpdanceestut para customizacoes seguras (CSS/PHP) sem alterar o tema pai. Inclui correcoes de responsividade, acessibilidade e UX.
Author: Auditoria Tecnica Bento Quirino
Template: wpdanceestut
Version: 1.1.1
Text Domain: wpdanceestut-child
*/

/* ===========================================================
   RESPONSIVIDADE (mobile-first safe)
   =========================================================== */

/* Imagens e midia nunca estouram o container */
img,
video,
iframe,
embed,
object {
	max-width: 100%;
	height: auto;
}

/* Campos de formulario (CF7) responsivos */
.wpcf7 input:not([type=submit]),
.wpcf7 textarea,
.wpcf7 select {
	max-width: 100%;
	box-sizing: border-box;
}

/* Tabelas com rolagem horizontal em telas pequenas */
.entry-content table,
.content-area table {
	display: block;
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

@media (max-width: 781px) {
	/* Quebra palavras/URLs longas que causam overflow */
	body, p, a, li, h1, h2, h3, .elementor-heading-title {
		overflow-wrap: break-word;
		word-wrap: break-word;
	}

	/* Area de toque adequada em botoes/links */
	.btn, button, input[type=submit], .elementor-button, .menu a {
		min-height: 44px;
	}
}

/* Evita overflow horizontal global em mobile */
@media (max-width: 767px) {
	html,
	body {
		overflow-x: hidden;
	}

	/* Garante que containers fixos nao quebrem o layout */
	.container,
	.container-fluid,
	.row {
		max-width: 100%;
	}

	/* Embeds de video responsivos (YouTube/Vimeo) */
	.wp-video,
	.wp-block-embed__wrapper {
		width: 100% !important;
	}
}

/* ===========================================================
   MENU MOBILE UX
   =========================================================== */

/* Menu mobile - remover area em branco e permitir rolagem */
@media (max-width: 767px) {
	.elementor-nav-menu--dropdown.elementor-nav-menu__container {
		min-height: auto !important;
		padding-top: 0 !important;
	}
	.elementor-nav-menu--toggle .elementor-nav-menu__container {
		overflow-y: auto;
		max-height: calc(100vh - 80px);
	}
}

/* ===========================================================
   FOOTER TABLET
   =========================================================== */

/* Footer - colunas legiveis em tablet (evita largura ~117px) */
@media (min-width: 768px) and (max-width: 1024px) {
	footer .elementor-widget-container {
		width: auto !important;
	}
	footer .elementor-column,
	footer .elementor-top-column {
		min-width: 180px !important;
		flex: 1 1 auto !important;
	}
}

/* ===========================================================
   ACESSIBILIDADE (WCAG 2.1)
   =========================================================== */

/* Skip link acessivel */
.bq-skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	z-index: 100000;
	padding: 12px 20px;
	background: #1a1a1a;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
}
.bq-skip-link:focus,
.bq-skip-link:focus-visible {
	left: 12px;
	top: 12px;
	outline: 3px solid #c00;
	outline-offset: 2px;
}

/* Foco visivel (WCAG 2.1) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.elementor-button:focus-visible,
.elementor-nav-menu a:focus-visible {
	outline: 3px solid #b91c1c;
	outline-offset: 2px;
}

/* Reduzir animacoes para usuarios que preferem */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ===========================================================
   HEADER / LOGO
   =========================================================== */

.site-header img,
.elementor-widget-image img.custom-logo,
header .elementor-widget-image img {
	max-height: 56px;
	width: auto;
	object-fit: contain;
}
@media (max-width: 767px) {
	.site-header img,
	header .elementor-widget-image img {
		max-height: 44px;
	}
}

/* ===========================================================
   HUB MATRICULAS (pagina 75338)
   =========================================================== */

.page-id-75338 .elementor-button,
body.page-template-default .elementor-button-link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
@media (max-width: 781px) {
	.elementor-widget-button .elementor-button {
		width: 100%;
		max-width: 100%;
	}
	.elementor-column .elementor-widget-wrap {
		gap: 0.75rem;
	}
}

/* ===========================================================
   FALLBACK: Ocultar links IP interno legados
   =========================================================== */

a[href*="177.103.219.254"],
a[href*="177.103.15.215"] {
	display: none !important;
	pointer-events: none !important;
}

/* ===========================================================
   CONTACT FORM 7 - Feedback visivel
   =========================================================== */

.wpcf7-response-output {
	border-width: 2px;
	font-weight: 600;
	padding: 12px 16px;
}
.wpcf7-not-valid-tip {
	color: #b91c1c;
	font-weight: 600;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
	border-color: #b91c1c;
	background: #fef2f2;
}
.wpcf7 form.sent .wpcf7-response-output {
	border-color: #15803d;
	background: #f0fdf4;
}

/* ===========================================================
   TABELAS ELEMENTOR
   =========================================================== */

.elementor-widget-table table {
	width: 100%;
	border-collapse: collapse;
}
@media (max-width: 781px) {
	.elementor-widget-table .elementor-table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

/* ===========================================================
   FIX: EAEL wrapper link no header bloqueava cliques no menu
   (elementor-element-700e6bed, z-index 9999)
   =========================================================== */
.elementor-location-header [class*="eael-wrapper-link"] {
	pointer-events: none;
}
.elementor-location-header .elementor-nav-menu,
.elementor-location-header .elementor-nav-menu a,
.elementor-location-header .elementor-menu-toggle,
.elementor-location-header .ubermenu,
.elementor-location-header .ubermenu a {
	position: relative;
	z-index: 10001;
	pointer-events: auto;
}
.elementor-location-header .elementor-widget-image a {
	pointer-events: auto;
}

/* Logo container 700e6bed sobrepunha menu (487px) — desabilitar hitbox exceto logo */
.elementor-element-700e6bed {
	pointer-events: none !important;
}
.elementor-element-700e6bed .elementor-widget-image,
.elementor-element-700e6bed .elementor-widget-image a,
.elementor-element-700e6bed img {
	pointer-events: auto !important;
}
