/*
	MOBILE.CSS - Estilos responsive específicos para dispositivos móviles
	Dayloplas-IPM-MZA Website
*/

/* ========================================
   NAVEGACIÓN MÓVIL Y MENÚ HAMBURGUESA
======================================== */

/* Mostrar navegación del header en móvil (solo header, no duplicados) */
@media (max-width: 960px) {
	#nav {
		display: block !important;
		position: sticky !important;
		top: 0;
		z-index: 1000;
	}
}

/* Desactivar completamente el menú móvil clonado */
.mobile-menu-toggle,
.mobile-nav {
	display: none !important;
}

/* MENÚ HAMBURGUESA DESHABILITADO - Se usa solo menú superior en móvil */

/* ========================================
   CAROUSEL OPTIMIZADO PARA MÓVIL
======================================== */

@media screen and (max-width: 768px) {
	.carousel {
		margin: 0 -15px;
		padding: 20px 0;
	}
	
	.carousel .reel {
		padding: 0 15px;
		gap: 15px;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
	}
	
	.carousel .reel article {
		flex: 0 0 280px;
		scroll-snap-align: start;
		margin-right: 0;
	}
	
	/* Indicador de scroll en móvil */
	.carousel::before {
		content: "👈 Desliza para ver más";
		position: absolute;
		top: -10px;
		right: 20px;
		font-size: 12px;
		color: #666;
		background: rgba(255,255,255,0.9);
		padding: 4px 10px;
		border-radius: 15px;
		z-index: 5;
	}
}

/* ========================================
   FORMULARIOS RESPONSIVE
======================================== */

@media screen and (max-width: 768px) {
	#formConsulta {
		padding: 1.5rem !important;
		margin: 0 10px;
	}
	
	#formConsulta .row.gtr-uniform.gtr-50 .col-6 {
		width: 100% !important;
		margin-bottom: 15px;
	}
	
	#formConsulta input,
	#formConsulta textarea {
		font-size: 16px !important; /* Evita zoom en iOS */
		padding: 12px !important;
	}
	
	#formConsulta button {
		width: 100%;
		font-size: 1em !important;
		padding: 15px 20px !important;
	}
}

/* ========================================
   TIPOGRAFÍA RESPONSIVE
======================================== */

@media screen and (max-width: 768px) {
	/* Títulos principales */
	#header .inner header h1 {
		font-size: 1.8em !important;
		line-height: 1.2;
		margin-bottom: 1rem;
	}
	
	#header .inner header p {
		font-size: 1em !important;
		line-height: 1.4;
		padding: 0 15px;
	}
	
	/* Títulos de sección */
	.formacion-header h2 {
		font-size: 2em !important;
		margin-bottom: 1rem;
	}
	
	/* Descripción de cursos */
	.descripcion-cursos {
		font-size: 1em !important;
		padding: 0 15px;
		margin-bottom: 1.5em;
	}
	
	/* Texto del carrusel */
	.carousel .reel article h3 {
		font-size: 1.1em !important;
		margin: 15px 10px 10px;
	}
	
	.carousel .reel article p {
		font-size: 0.9em !important;
		margin: 0 10px 15px;
		line-height: 1.4;
	}
}

/* ========================================
   ESPACIADOS Y LAYOUT MÓVIL
======================================== */

@media screen and (max-width: 768px) {
	/* Header más compacto */
	#header {
		min-height: 60vh !important;
		padding: 20px 0;
	}
	
	#header .inner {
		padding: 20px 15px;
	}
	
	/* Logos más pequeños */
	.logo-container {
		flex-direction: column;
		gap: 10px;
		margin: 1rem auto 0.5rem;
	}
	
	.logo {
		width: 100px !important;
		height: auto;
	}
	
	/* Secciones más compactas */
	.formacion-section {
		padding: 2rem 1rem !important;
	}
	
	.formacion-header {
		padding: 0 1rem;
		margin-bottom: 2rem;
	}
	
	/* Espaciado del wrapper */
	.wrapper.style1 {
		padding: 3rem 0 !important;
	}
	
	#features.container.special {
		padding: 0 15px;
	}
	
	/* Grid responsive para features */
	#features .row .col-4 {
		width: 100% !important;
		margin-bottom: 2rem;
	}
	
	#features .row .col-4:last-child {
		margin-bottom: 0;
	}
}

/* ========================================
   IMÁGENES RESPONSIVE
======================================== */

@media screen and (max-width: 768px) {
	/* Imágenes de cabecera */
	.formacion-header img {
		height: 250px !important;
		margin: 0 auto 1rem auto !important;
	}
	
	/* Imágenes del carousel */
	.carousel .reel article img {
		height: 180px !important;
		min-height: 180px !important;
		max-height: 180px !important;
	}
	
	/* Imágenes de features */
	#img_features {
		height: 200px !important;
		margin-bottom: 1rem;
	}
}

/* ========================================
   NAVEGACIÓN ADAPTADA PARA MÓVIL
======================================== */

@media screen and (max-width: 960px) {
	/* El menú superior permanece visible y adaptado en la regla anterior */
}

/* ========================================
   BOTONES RESPONSIVE
======================================== */

@media screen and (max-width: 768px) {
	.boton-principal {
		font-size: 1em !important;
		padding: 12px 25px !important;
		margin: 10px 0;
	}
	
	.carousel .reel article .button {
		font-size: 0.9em !important;
		padding: 8px 20px !important;
		margin: 10px auto 15px !important;
		display: block;
		width: fit-content;
	}
}

/* ========================================
   SCROLL SUAVE Y OPTIMIZACIONES
======================================== */

@media screen and (max-width: 768px) {
	html {
		scroll-behavior: smooth;
	}
	
	body {
		font-size: 14pt !important;
		line-height: 1.6;
	}
	
	/* Mejorar el toque en elementos interactivos */
	a, button, .button {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
	
	/* Prevenir zoom en inputs en iOS */
	input[type="text"],
	input[type="tel"],
	input[type="email"],
	textarea,
	select {
		font-size: 16px !important;
	}
}

/* ========================================
   CONTACTO Y FOOTER RESPONSIVE
======================================== */

@media screen and (max-width: 768px) {
	#contacto {
		padding: 30px 15px !important;
		min-height: auto !important;
	}
	
	#contacto h2 {
		font-size: 1.5em !important;
		margin-bottom: 15px;
	}
	
	#contacto iframe {
		height: 200px !important;
		margin: 15px auto !important;
	}
	
	#footer {
		padding: 30px 15px !important;
	}
	
	#footer .container {
		padding: 0;
	}
}

/* ========================================
   MENÚ MÓVIL FIJO Y OCULTO POR DEFECTO
======================================== */

/* Estructura base: oculto y fijo ocupando la pantalla */
.mobile-nav {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 100vh;
	overflow-y: auto;
	background: rgba(43, 37, 44, 0.96);
	padding: 72px 24px 32px;
	z-index: 10000;
}

.mobile-nav.active {
	display: block;
}

.mobile-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-nav li {
	margin: 0 0 12px 0;
}

.mobile-nav a {
	display: block;
	color: #fff;
	text-decoration: none;
	font-size: 1.05em;
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.05);
}

.mobile-nav .search-container {
	margin-top: 10px;
}

.mobile-nav .search-input {
	width: 100%;
	box-sizing: border-box;
}

.mobile-nav .search-button {
	width: 100%;
	margin-top: 6px;
}

/* Botón hamburguesa siempre visible en móvil */
.mobile-menu-toggle {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 10001;
	background: rgba(43, 37, 44, 0.9);
	border: none;
	border-radius: 12px;
	padding: 10px 12px;
	cursor: pointer;
	color: #fff;
}

.mobile-menu-toggle .hamburger span {
	display: block;
	width: 22px;
	height: 2px;
	margin: 4px 0;
	background: #fff;
}

/* Ocultar el menú móvil en desktop */
@media screen and (min-width: 961px) {
	.mobile-menu-toggle,
	.mobile-nav {
		display: none !important;
	}
}

/* Reducir animaciones en dispositivos móviles */
@media screen and (max-width: 768px) {
	*, *::before, *::after {
		animation-duration: 0.3s !important;
		transition-duration: 0.3s !important;
	}
}

/* ========================================
   UTILIDADES MÓVILES
======================================== */

@media screen and (max-width: 768px) {
	.mobile-hidden {
		display: none !important;
	}
	
	.mobile-only {
		display: block !important;
	}
	
	.mobile-center {
		text-align: center !important;
	}
	
	.mobile-full-width {
		width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
}

@media screen and (min-width: 769px) {
	.mobile-only {
		display: none !important;
	}
}

/* ========================================
   MEJORAS DE RENDIMIENTO MÓVIL
======================================== */

@media screen and (max-width: 768px) {
	/* Optimizar scroll del carousel */
	.carousel .reel {
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
	}
	
	/* Reducir efectos pesados en móvil */
	.carousel .reel article:hover {
		transform: none !important;
		transition: none !important;
	}
	
	/* Simplificar sombras en móvil */
	.carousel .reel article {
		box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
	}
	
	/* Optimizar backdrop-filter para mejor rendimiento */
	.mobile-menu-toggle,
	.mobile-nav {
		-webkit-backdrop-filter: blur(10px);
		backdrop-filter: blur(10px);
		will-change: transform;
	}
}