/* =========================================================
   REALTOR CENTER
   CORRECCIÓN DEFINITIVA DE NAVEGACIÓN RESPONSIVE
========================================================= */

:root {
	--rc-desktop-nav-breakpoint: 1280px;
}

/* Evita desbordamientos del encabezado */
header,
.site-header,
.rc-header,
.rc-site-header {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

header *,
.site-header *,
.rc-header *,
.rc-site-header * {
	box-sizing: border-box;
}

/* =========================================================
   ESCRITORIO, MONITORES GRANDES Y TELEVISORES
========================================================= */

@media screen and (min-width: 1280px) {

	/* Ocultar cualquier botón de hamburguesa */
	header .menu-toggle,
	header .nav-toggle,
	header .mobile-menu-toggle,
	header .rc-menu-toggle,
	header .rc-nav-toggle,
	header .rc-header__toggle,
	header .rc-site-header__toggle,
	header [data-menu-toggle],
	header button[aria-controls*="menu"],
	header button[aria-label*="menú" i],
	header button[aria-label*="menu" i] {
		display: none !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}

	/* Mostrar la navegación principal */
	header nav,
	header .main-navigation,
	header .primary-navigation,
	header .rc-primary-nav,
	header .rc-header__nav,
	header .rc-site-header__nav,
	header .site-navigation {
		position: static !important;
		inset: auto !important;

		display: flex !important;
		visibility: visible !important;
		opacity: 1 !important;

		width: auto !important;
		height: auto !important;
		max-height: none !important;

		margin: 0 !important;
		padding: 0 !important;

		overflow: visible !important;

		background: transparent !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;

		transform: none !important;
		pointer-events: auto !important;
	}

	header nav ul,
	header .main-navigation ul,
	header .primary-navigation ul,
	header .rc-primary-nav ul,
	header .rc-header__nav ul,
	header .rc-site-header__nav ul,
	header .site-navigation ul {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;

		gap: clamp(17px, 1.45vw, 29px) !important;

		margin: 0 !important;
		padding: 0 !important;

		list-style: none !important;
	}

	header nav li,
	header .main-navigation li,
	header .primary-navigation li,
	header .rc-primary-nav li,
	header .rc-header__nav li,
	header .rc-site-header__nav li {
		display: block !important;
		width: auto !important;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
	}

	header nav a,
	header .main-navigation a,
	header .primary-navigation a,
	header .rc-primary-nav a,
	header .rc-header__nav a,
	header .rc-site-header__nav a {
		display: inline-flex !important;
		align-items: center !important;

		width: auto !important;
		min-height: 44px !important;

		padding: 0 !important;

		border: 0 !important;
		background: transparent !important;

		color: #111111 !important;

		font-size: clamp(12px, 0.82vw, 15px) !important;
		font-weight: 700 !important;
		line-height: 1.2 !important;
		text-decoration: none !important;
		white-space: nowrap !important;
	}

	/* El panel móvil no debe conservar apariencia de tarjeta */
	header .menu-open,
	header .is-open,
	header .is-active,
	header [aria-hidden="false"] {
		max-height: none !important;
	}

	/* Distribución general del encabezado */
	header .rc-container,
	header .site-header__inner,
	header .rc-header__inner,
	header .rc-site-header__inner,
	header > .container,
	header > .wrap {
		width: min(1840px, calc(100% - 48px)) !important;
		max-width: none !important;

		margin-inline: auto !important;

		display: grid !important;
		grid-template-columns:
			minmax(265px, auto)
			minmax(0, 1fr)
			auto !important;

		align-items: center !important;
		column-gap: clamp(24px, 2.5vw, 48px) !important;
	}

	header .rc-brand,
	header .site-branding,
	header .custom-logo-link {
		min-width: 0 !important;
		max-width: 330px !important;
	}

	header .rc-header-cta,
	header .header-whatsapp,
	header .rc-whatsapp-button,
	header a[href*="wa.me"] {
		flex: 0 0 auto !important;
		white-space: nowrap !important;
	}
}

/* =========================================================
   PANTALLAS MUY GRANDES
========================================================= */

@media screen and (min-width: 1700px) {

	header .rc-container,
	header .site-header__inner,
	header .rc-header__inner,
	header .rc-site-header__inner,
	header > .container,
	header > .wrap {
		width: min(1920px, calc(100% - 80px)) !important;
	}

	header nav ul,
	header .main-navigation ul,
	header .primary-navigation ul,
	header .rc-primary-nav ul,
	header .rc-header__nav ul,
	header .rc-site-header__nav ul {
		gap: clamp(22px, 1.55vw, 34px) !important;
	}

	header nav a,
	header .main-navigation a,
	header .primary-navigation a,
	header .rc-primary-nav a,
	header .rc-header__nav a,
	header .rc-site-header__nav a {
		font-size: clamp(14px, 0.78vw, 16px) !important;
	}
}

/* =========================================================
   TABLETAS Y CELULARES
========================================================= */

@media screen and (max-width: 1279px) {

	header .menu-toggle,
	header .nav-toggle,
	header .mobile-menu-toggle,
	header .rc-menu-toggle,
	header .rc-nav-toggle,
	header .rc-header__toggle,
	header .rc-site-header__toggle,
	header [data-menu-toggle],
	header button[aria-controls*="menu"] {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	/*
	 * En móvil la apertura y cierre continúan dependiendo
	 * del JavaScript existente del tema.
	 */
}
