/* ==========================================================================
   EVELYN SZYSZKA — Versión mobile estilo app
   Se carga solo en pantallas de hasta 768px (ver inc/enqueue.php).
   - Barra de navegación inferior fija + panel "Más".
   - Header compacto, secciones más juntas, tarjetas redondeadas.
   - Carruseles con deslizamiento táctil en las listas del Home.
   ========================================================================== */

@media (max-width: 768px) {

	:root {
		--app-gutter: 1rem;
		--app-nav-h: 62px;
		--app-radius: 1.25rem;
		--safe-bottom: env(safe-area-inset-bottom, 0px);
	}

	html { -webkit-tap-highlight-color: transparent; scroll-padding-top: 64px; }
	body {
		padding-bottom: calc(var(--app-nav-h) + var(--safe-bottom) + 0.5rem);
		overscroll-behavior-y: none;
		font-size: 0.96875rem;
	}
	body.sheet-open { overflow: hidden; }

	/* ---------- Gutters y ritmo vertical ---------- */
	.container,
	.section.container { padding-left: var(--app-gutter); padding-right: var(--app-gutter); }

	.section { padding: 1.75rem 0; }
	.section.container { padding-top: 1.75rem; padding-bottom: 1.75rem; }

	/* Los bloques con fondo pasan a ser "paneles" redondeados, separados por un
	   espacio chico, como las secciones de una app. */
	.section--muted,
	.section--tint {
		margin: 0.5rem 0.5rem;
		border-radius: var(--app-radius);
		padding: 1.75rem 0;
	}

	.section__head { margin-bottom: 1.1rem; text-align: left; max-width: none; }
	.section__head .eyebrow { text-align: left; }
	.section__head p { font-size: 0.9375rem; margin-bottom: 0; }

	h1 { font-size: 2rem; line-height: 1.15; }
	h2 { font-size: 1.5rem; line-height: 1.2; }
	h3 { font-size: 1.125rem; }
	.eyebrow { font-size: 0.75rem; margin-bottom: 0.4rem; }

	/* ---------- Header compacto ---------- */
	.site-header { position: sticky; top: 0; }
	.site-header__inner { padding: 0.65rem var(--app-gutter); min-height: 54px; gap: 0.75rem; }
	.site-header__logo { font-size: 1.125rem; }
	.main-nav,
	.menu-toggle,
	.site-header__actions .btn--primary { display: none !important; }
	.site-header__actions .btn--secondary {
		padding: 0.45em 1em;
		min-height: 0;
		font-size: 0.8125rem;
		border-radius: 999px;
	}

	/* ---------- Hero ---------- */
	.hero { padding: 1.25rem var(--app-gutter) 1.5rem; gap: 1.25rem; text-align: left; }
	.hero__content { max-width: none; margin: 0; width: 100%; }
	.hero h1 { font-size: 2rem; }
	.hero__content p { font-size: 1rem !important; }
	.hero__actions { flex-direction: column; margin-top: 1.1rem; gap: 0.6rem; justify-content: stretch; }
	.hero__actions .btn { width: 100%; }
	.hero__image { border-radius: var(--app-radius); box-shadow: var(--shadow-sm); }

	/* Secciones con texto + imagen: sin huecos enormes, imagen acotada */
	.section.container > .grid--2 { gap: 1.25rem !important; }
	.hero__image img { width: 100%; height: auto; max-height: 440px; object-fit: cover; object-position: 50% 8%; }

	/* ---------- Botones: más cómodos para el pulgar ---------- */
	.btn { min-height: 46px; border-radius: 0.9rem; }
	.btn:active,
	.card:active,
	.app-nav__item:active,
	.app-sheet__tile:active { transform: scale(0.97); }

	/* ---------- Tarjetas compactas ---------- */
	.card { border-radius: 1rem; }
	.card:hover { transform: none; }
	.card__image { aspect-ratio: 16 / 10; }
	.card__body { padding: 1rem; gap: 0.35rem; }
	.card__title { font-size: 1.0625rem; }
	.card__footer { padding-top: 0.6rem; }
	.card--motivo { padding: 1.1rem; border-radius: 1rem; }
	.card--motivo p { font-size: 0.875rem; line-height: 1.6; }

	/* ---------- Carruseles táctiles ----------
	   Las listas de tarjetas del Home se deslizan en horizontal y dejan asomar
	   la siguiente tarjeta, así se entiende que hay más. */
	.cards-center,
	.grid--swipe,
	body.home .section [data-cursos-track] {
		display: flex;
		flex-wrap: nowrap;
		justify-content: flex-start;
		gap: 0.75rem;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		margin: 0 calc(var(--app-gutter) * -1);
		padding: 0.25rem var(--app-gutter) 0.75rem;
		scroll-padding-left: var(--app-gutter);
		scrollbar-width: none;
	}
	.cards-center::-webkit-scrollbar,
	.grid--swipe::-webkit-scrollbar,
	[data-cursos-track]::-webkit-scrollbar { display: none; }

	.cards-center > *,
	.cards-center--4 > *,
	.grid--swipe > * {
		flex: 0 0 82%;
		min-width: 0;
		max-width: 82%;
		scroll-snap-align: start;
	}
	.cursos-controles { display: none !important; }

	/* En páginas internas (listados) las tarjetas van en una columna. */
	body:not(.home) .cards-center {
		display: grid;
		grid-template-columns: 1fr;
		overflow: visible;
		margin: 0;
		padding: 0;
	}
	body:not(.home) .cards-center > * { max-width: none; }

	.grid--2, .grid--3, .grid--4 { gap: 0.75rem; }
	body.home .grid--2 { gap: 1.25rem; }

	/* ---------- Metodología: etapas como filas compactas ---------- */
	.paso {
		display: grid;
		grid-template-columns: 2.2rem 1fr;
		column-gap: 0.85rem;
		background: var(--color-white);
		border: 1px solid var(--color-border);
		border-radius: 1rem;
		padding: 1rem;
	}
	.paso__numero { width: 2.2rem; height: 2.2rem; font-size: 1rem; margin: 0; grid-row: 1 / span 2; }
	.paso h3 { font-size: 1rem; margin: 0.1rem 0 0.25rem; }
	.paso p { font-size: 0.875rem; margin: 0; grid-column: 2; }

	/* ---------- Trayectoria ---------- */
	.trayectoria-lista { grid-template-columns: 1fr; gap: 0.5rem; }
	.trayectoria-lista li { padding: 0.75rem 1rem 0.75rem calc(1rem + 22px); font-size: 0.9375rem; }

	/* ---------- Presentación (imagen + texto) ---------- */
	body.home #sobre-mi .grid--2 { gap: 1.1rem; }
	/* La foto del Home se repite con la del Hero: en celular no se muestra. */
	body.home #sobre-mi .foto-sobre-mi { display: none; }

	/* ---------- CTA final ---------- */
	.section.container.text-center { padding-top: 0.5rem; }
	.section.container.text-center > div { padding: 1.75rem 1.25rem !important; border-radius: var(--app-radius) !important; }
	.section.container.text-center .hero__actions { flex-direction: column; }

	/* ---------- Contenido de páginas / entradas ---------- */
	.entry-content p { font-size: 1rem; line-height: 1.7; }
	.entry-content h2 { font-size: 1.35rem; margin-top: 1.75rem; }
	.entry-content h3 { margin-top: 1.25rem; }
	.entry-content .evelyn-datos { gap: 0.6rem; }

	/* ---------- Footer compacto ---------- */
	.site-footer { padding: 1.75rem 0 1rem; margin-top: 0.5rem; border-radius: var(--app-radius) var(--app-radius) 0 0; }
	.footer__grid { grid-template-columns: 1fr; gap: 1.25rem; margin-bottom: 1rem; }
	.footer__nav { display: none; } /* la navegación está en la barra inferior */
	.footer__legal ul { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
	.footer__legal ul li { margin: 0; }
	.footer__bottom { flex-direction: column; gap: 0.25rem; font-size: 0.75rem; }

	/* ---------- Breadcrumbs: más discretos ---------- */
	.breadcrumbs { padding: 0.6rem var(--app-gutter); }

	/* ---------- El botón flotante de WhatsApp lo reemplaza la barra ---------- */
	.whatsapp-float { display: none; }

	/* ==========================================================================
	   BARRA DE NAVEGACIÓN INFERIOR
	   ========================================================================== */
	.app-nav {
		display: grid;
		grid-template-columns: repeat(5, 1fr);
		align-items: end;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 80;
		height: calc(var(--app-nav-h) + var(--safe-bottom));
		padding: 0 0.35rem var(--safe-bottom);
		background: rgba(255, 255, 255, 0.96);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
		border-top: 1px solid var(--color-border);
		border-radius: 1.25rem 1.25rem 0 0;
		box-shadow: 0 -6px 24px rgba(74, 53, 46, 0.08);
	}

	.app-nav__item {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 0.2rem;
		height: var(--app-nav-h);
		padding: 0.35rem 0 0.3rem;
		color: var(--color-ink-muted);
		font-size: 0.6875rem;
		font-weight: 500;
		line-height: 1;
		background: none;
		border: 0;
		cursor: pointer;
		position: relative;
		transition: color var(--transition), transform var(--transition);
	}
	.app-nav__item .icon { width: 23px; height: 23px; }
	.app-nav__item.is-active { color: var(--color-azul-700); font-weight: 600; }
	.app-nav__item.is-active::before {
		content: "";
		position: absolute;
		top: 0;
		width: 22px;
		height: 3px;
		border-radius: 0 0 3px 3px;
		background: var(--color-terracota);
	}

	/* WhatsApp: botón central elevado */
	.app-nav__item--wa { color: var(--color-ink-muted); }
	.app-nav__wa {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 54px;
		height: 54px;
		margin-top: -26px;
		border-radius: 50%;
		background: #25d366;
		color: var(--color-white);
		border: 4px solid var(--color-paper);
		box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
	}
	.app-nav__wa .icon { width: 26px; height: 26px; }
	.app-nav__item--wa { gap: 0.15rem; justify-content: flex-start; padding-top: 0; }
	.app-nav__item--wa > span:last-child { margin-top: 0.1rem; }

	/* ==========================================================================
	   PANEL "MÁS"
	   ========================================================================== */
	.app-sheet { display: block; position: fixed; inset: 0; z-index: 90; }
	.app-sheet[hidden] { display: none; }
	.app-sheet__overlay {
		position: absolute;
		inset: 0;
		background: rgba(51, 39, 34, 0.45);
		opacity: 0;
		transition: opacity 0.25s ease;
	}
	.app-sheet__panel {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		max-height: 80vh;
		overflow-y: auto;
		padding: 0.6rem var(--app-gutter) calc(1.25rem + var(--safe-bottom));
		background: var(--color-paper);
		border-radius: 1.5rem 1.5rem 0 0;
		transform: translateY(100%);
		transition: transform 0.25s ease;
	}
	.app-sheet.is-open .app-sheet__overlay { opacity: 1; }
	.app-sheet.is-open .app-sheet__panel { transform: translateY(0); }

	.app-sheet__handle { width: 40px; height: 4px; margin: 0 auto 0.5rem; border-radius: 4px; background: var(--color-border); }
	.app-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.85rem; font-family: var(--font-heading); font-size: 1.125rem; color: var(--color-azul-700); }
	.app-sheet__close { display: flex; padding: 0.4rem; color: var(--color-ink-muted); background: var(--color-white); border: 1px solid var(--color-border); border-radius: 50%; }
	.app-sheet__close .icon { width: 18px; height: 18px; }

	.app-sheet__tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
	.app-sheet__tile {
		display: flex;
		align-items: center;
		gap: 0.7rem;
		padding: 0.95rem 0.9rem;
		background: var(--color-white);
		border: 1px solid var(--color-border);
		border-radius: 1rem;
		color: var(--color-marron);
		font-weight: 500;
		font-size: 0.9375rem;
		transition: transform var(--transition);
	}
	.app-sheet__tile .icon { color: var(--color-terracota); flex-shrink: 0; }

	.app-sheet__legal { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--color-border); }
	.app-sheet__legal a { font-size: 0.8125rem; color: var(--color-ink-muted); }
}

/* Pantallas muy angostas */
@media (max-width: 360px) {
	.app-nav__item { font-size: 0.625rem; }
	.app-sheet__tiles { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
	.site-logo-img { height: 42px; }
	.site-header__logo--footer .site-logo-img { height: 44px; }
}

@media (max-width: 768px) {
	.sobre-mi--con-foto { gap: 1.25rem; }
	.sobre-mi__foto { max-width: none; aspect-ratio: 1 / 1; border-radius: var(--app-radius); box-shadow: var(--shadow-sm); }
}

/* "Cómo puedo acompañarte": lista compacta con "Leer más" */
@media (max-width: 768px) {
	.acompanar::before { display: none; }
	.acompanar__lead { font-size: 1.05rem; padding-left: 0.9rem; margin-bottom: 1rem; }
	.acompanar__cta { width: 100%; }
	.acompanar__lista { gap: 0.6rem; }
	.motivo { grid-template-columns: 44px minmax(0, 1fr); gap: 0.85rem; padding: 0.95rem; border-radius: var(--app-radius); }
	.motivo:hover { transform: none; }
	.motivo__icono { width: 44px; height: 44px; }
	.motivo__icono svg { width: 22px; height: 22px; }
	.motivo__numero { font-size: 1.35rem; }
	.motivo h3 { font-size: 1.05rem; margin-right: 2rem; }
	.motivo p {
		display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
		font-size: 0.9rem; line-height: 1.6;
	}
	.motivo.is-open p { display: block; -webkit-line-clamp: unset; overflow: visible; }
	.motivo__mas {
		display: inline-block; margin-top: 0.4rem; padding: 0; background: none; border: 0;
		color: var(--color-azul-700); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
	}
}
