/* LMS Flavita Responsivo 1.1.0 – ajustado ao Flavita 21.4 (filho do Gradiant; menu mobile em 991px) */

/* Base */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.lmsfr-on { max-width: 100%; }
body.lmsfr-overflow { overflow-x: hidden; overflow-x: clip; }

/* Mídia fluida */
body.lmsfr-media img,
body.lmsfr-media video,
body.lmsfr-media embed,
body.lmsfr-media object,
body.lmsfr-media iframe { max-width: 100%; }
body.lmsfr-media img,
body.lmsfr-media video { height: auto; }
body.lmsfr-media iframe[src*="youtube"],
body.lmsfr-media iframe[src*="youtu.be"],
body.lmsfr-media iframe[src*="vimeo"] { width: 100%; aspect-ratio: 16 / 9; height: auto; }
body.lmsfr-media .wp-block-embed__wrapper iframe { width: 100%; }

/* Tabelas */
body.lmsfr-tables .lmsfr-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; margin-bottom: 1em; }

/* Tipografia */
body.lmsfr-typo { word-wrap: break-word; overflow-wrap: break-word; }
body.lmsfr-typo h1, body.lmsfr-typo h2, body.lmsfr-typo h3,
body.lmsfr-typo h4, body.lmsfr-typo h5, body.lmsfr-typo h6 { overflow-wrap: break-word; hyphens: auto; }

/* ---------- Tablet (até 991px, mesmo ponto em que o tema troca para o menu mobile) ---------- */
@media (max-width: 991px) {
	body.lmsfr-stack .wp-block-columns { flex-wrap: wrap !important; }
	body.lmsfr-stack .wp-block-column { flex-basis: calc(50% - 1em) !important; flex-grow: 1; }
	body.lmsfr-typo h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.2; }
	body.lmsfr-typo h2 { font-size: clamp(1.6rem, 4.2vw, 2.2rem); line-height: 1.25; }
}

/* ---------- Smartphone (até 767px) ---------- */
@media (max-width: 767px) {

	body.lmsfr-on .alignwide,
	body.lmsfr-on .alignfull { max-width: 100%; margin-left: auto; margin-right: auto; }

	/* Tipografia */
	body.lmsfr-typo h1 { font-size: clamp(1.6rem, 7vw, 2.1rem); }
	body.lmsfr-typo h2 { font-size: clamp(1.4rem, 5.8vw, 1.8rem); }
	body.lmsfr-typo h3 { font-size: clamp(1.2rem, 4.8vw, 1.5rem); }
	body.lmsfr-typo p, body.lmsfr-typo li { line-height: 1.6; }

	/* Colunas */
	body.lmsfr-stack .wp-block-column { flex-basis: 100% !important; }
	body.lmsfr-stack .wp-block-media-text { grid-template-columns: 100% !important; }
	body.lmsfr-stack .wp-block-media-text__content { padding: 1em 0 !important; }

	/* Formulários */
	body.lmsfr-forms input[type="text"],
	body.lmsfr-forms input[type="email"],
	body.lmsfr-forms input[type="tel"],
	body.lmsfr-forms input[type="url"],
	body.lmsfr-forms input[type="number"],
	body.lmsfr-forms input[type="password"],
	body.lmsfr-forms input[type="search"],
	body.lmsfr-forms input[type="date"],
	body.lmsfr-forms select,
	body.lmsfr-forms textarea {
		font-size: 16px;
		max-width: 100%;
		width: 100%;
		box-sizing: border-box;
	}

	/* Toque */
	body.lmsfr-touch button,
	body.lmsfr-touch .button,
	body.lmsfr-touch .btn,
	body.lmsfr-touch .wp-block-button__link,
	body.lmsfr-touch input[type="submit"],
	body.lmsfr-touch input[type="button"] { min-height: 44px; }
	body.lmsfr-touch .mobile-menu a,
	body.lmsfr-touch .mobile-menu .menu-item > a { padding-top: 12px; padding-bottom: 12px; }
	body.lmsfr-touch .mobile-menu ul.sub-menu { max-width: 100%; }

	/* WooCommerce */
	body.lmsfr-woo.woocommerce ul.products[class*="columns-"] li.product,
	body.lmsfr-woo.woocommerce-page ul.products[class*="columns-"] li.product,
	body.lmsfr-woo .woocommerce ul.products[class*="columns-"] li.product {
		width: 48% !important;
		float: left !important;
		margin-left: 0 !important;
		margin-right: 4% !important;
		clear: none;
	}
	body.lmsfr-woo.woocommerce ul.products[class*="columns-"] li.product:nth-child(2n),
	body.lmsfr-woo.woocommerce-page ul.products[class*="columns-"] li.product:nth-child(2n),
	body.lmsfr-woo .woocommerce ul.products[class*="columns-"] li.product:nth-child(2n) { margin-right: 0 !important; }

	body.lmsfr-woo .woocommerce div.product div.images,
	body.lmsfr-woo .woocommerce div.product div.summary,
	body.lmsfr-woo .woocommerce-page div.product div.images,
	body.lmsfr-woo .woocommerce-page div.product div.summary { float: none !important; width: 100% !important; }

	body.lmsfr-woo .woocommerce form .form-row-first,
	body.lmsfr-woo .woocommerce form .form-row-last,
	body.lmsfr-woo .woocommerce-page form .form-row-first,
	body.lmsfr-woo .woocommerce-page form .form-row-last { float: none !important; width: 100% !important; }

	body.lmsfr-woo .woocommerce .col2-set .col-1,
	body.lmsfr-woo .woocommerce .col2-set .col-2,
	body.lmsfr-woo .woocommerce-page .col2-set .col-1,
	body.lmsfr-woo .woocommerce-page .col2-set .col-2 { float: none !important; width: 100% !important; }

	body.lmsfr-woo .woocommerce .cart-collaterals .cart_totals,
	body.lmsfr-woo .woocommerce-page .cart-collaterals .cart_totals { float: none !important; width: 100% !important; }

	body.lmsfr-woo .woocommerce-tabs ul.tabs li { display: block; }
	body.lmsfr-woo .tutor-container,
	body.lmsfr-woo .tutor-wrap { padding-left: 15px; padding-right: 15px; box-sizing: border-box; }
}

/* ---------- Smartphone pequeno (até 480px) ---------- */
@media (max-width: 480px) {
	body.lmsfr-typo { font-size: 16px; }
	/* O tema usa 25px de padding lateral; em telas de 320-360px sobra pouco espaço útil */
	body.lmsfr-on .av-container,
	body.lmsfr-on .av-container-fluid { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Flavita: cabeçalho mobile ---------- */
@media (max-width: 991px) {
	body.lmsfr-header .theme-mobile-menu { max-width: 100%; }
	body.lmsfr-header .mobile-logo img,
	body.lmsfr-header .mobile-logo .custom-logo { max-width: 100%; height: auto; max-height: 56px; width: auto; }
	body.lmsfr-header .menu-toggle,
	body.lmsfr-header .header-close-menu { min-width: 44px; min-height: 44px; }
	body.lmsfr-header .mobile-menu { max-width: 100vw; box-sizing: border-box; }
	body.lmsfr-header .mobile-menu li a { overflow-wrap: anywhere; }
}
@media (max-width: 767px) {
	body.lmsfr-header .shopping-cart { max-width: 90vw; }
	body.lmsfr-header .site-title,
	body.lmsfr-header .site-description { overflow-wrap: anywhere; }
}

/* ---------- Flavita: breadcrumb / título interno ---------- */
@media (max-width: 767px) {
	/* o tema define width:max-content, que estoura a tela com títulos longos */
	body.lmsfr-breadcrumb .breadcrumb-content .breadcrumb-list { width: auto; max-width: 100%; box-sizing: border-box; }
	body.lmsfr-breadcrumb .breadcrumb-content .breadcrumb-list ul,
	body.lmsfr-breadcrumb .breadcrumb-content .breadcrumb-list ol { flex-wrap: wrap; justify-content: center; }
	body.lmsfr-breadcrumb .breadcrumb-heading h2,
	body.lmsfr-breadcrumb .breadcrumb-content h2 { font-size: clamp(1.4rem, 6.5vw, 1.9rem); overflow-wrap: anywhere; line-height: 1.25; }
	body.lmsfr-breadcrumb .gradiant-content .breadcrumb-area { padding-left: 0; padding-right: 0; }
}

/* ---------- Flavita: rodapé (footer-two) ---------- */
/* responsive.css do tema só trata .footer-one; o Flavita usa .footer-two */
@media (max-width: 991px) {
	body.lmsfr-footer .footer-two .footer-main .footer-info-overwrap { display: none; }
	body.lmsfr-footer .footer-two .footer-main [class*="av-column-"] { margin-bottom: 24px; padding-left: 0; padding-right: 0; }
}
@media (max-width: 767px) {
	body.lmsfr-footer .footer-two .footer-main [class*="av-column-"],
	body.lmsfr-footer .footer-two .footer-copyright [class*="av-column-"],
	body.lmsfr-footer .footer-two .footer-above [class*="av-column-"] { flex: 0 0 100%; max-width: 100%; width: 100%; }
	body.lmsfr-footer .footer-two .footer-copyright .widget-left,
	body.lmsfr-footer .footer-two .footer-copyright .widget-center,
	body.lmsfr-footer .footer-two .footer-copyright .widget-right { justify-content: center; text-align: center; min-height: 60px; }
	body.lmsfr-footer .footer-two .footer-copyright img { max-width: 100%; height: auto; }
	body.lmsfr-footer .footer-two { overflow-wrap: anywhere; }
	body.lmsfr-footer .footer-two .footer-above [class*="av-column-"] { border-left: 0; margin-bottom: 0; border-bottom: 1px solid rgb(189 189 189 / 0.45); }
	body.lmsfr-footer .footer-two .footer-above [class*="av-column-"]:last-child { border-bottom: 0; }
	/* menu rodapé efeito parallax só existe no desktop; no celular o conteúdo volta ao fluxo normal */
	body.lmsfr-footer.footer-parallax #content.gradiant-content { margin-bottom: 0 !important; }
}

/* ---------- Flavita: seções da home ---------- */
@media (max-width: 767px) {
	body.lmsfr-stack .info-section [class*="av-column-"] .widget-contact { border-left: 0 !important; }
	body.lmsfr-typo .heading-title h3 { font-size: clamp(1.5rem, 6.5vw, 1.9rem); }
	body.lmsfr-media .partner-carousel img { max-width: 100%; height: auto; }
}

/* Modo diagnóstico */
.lmsfr-offender { outline: 2px solid #e11d48 !important; outline-offset: -2px; }
#lmsfr-diag-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483647; max-height: 40vh; overflow: auto; background: #111; color: #fff; font: 12px/1.4 monospace; padding: 10px 12px; box-sizing: border-box; }
#lmsfr-diag-panel strong { color: #fca5a5; }
#lmsfr-diag-panel button { float: right; min-height: 0; font-size: 12px; }
