/*
 * EmpleosCusco — ajustes para celulares (Android / iPhone, Chrome y Safari).
 * Se carga al final, después de todos los estilos.
 */

/* 1) La página debe desplazarse con la ventana, no con <body>.
      El template fija html/body al alto de la pantalla y hace que <body> sea el que se desplaza:
      en iPhone eso rompe el menú fijo, la barra de direcciones de Safari y los saltos a #secciones. */
html, body { height: auto !important; min-height: 100%; }
html { overflow-x: hidden; }
body { overflow: visible !important; }

/* 2) Sin zoom automático de iPhone al tocar un campo (Safari agranda si la letra es < 16px)
      y sin ajustes de tamaño de texto al girar el teléfono. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 991.98px) {
	input:not([type="checkbox"]):not([type="radio"]), select, textarea,
	.form-control, .form-select { font-size: 16px !important; }
}

/* 3) Toques: sin el resaltado azul de Android y con áreas táctiles cómodas */
a, button, label, summary { -webkit-tap-highlight-color: rgba(255, 170, 23, .15); }
img { max-width: 100%; height: auto; }

/* ======================================================================
 * TABLETS Y CELULARES (< 992 px)
 * ==================================================================== */
@media (max-width: 991.98px) {
	/* Cabeceras de página más bajas */
	.section-top.page-hero { padding-top: 104px !important; padding-bottom: 34px !important; }
	.page-hero--compact { padding-top: 84px !important; padding-bottom: 18px !important; }
	.section-padding { padding: 48px 0; }

	/* Formularios: la vista previa queda al final y no aporta en celular */
	.preview-sticky .eyebrow, .preview-sticky > .product-card { display: none; }

	/* Detalle: se oculta lo que ya está en el resumen y en la barra inferior */
	.buy-box .buy-box__title, .buy-box .buy-box__price, .buy-box .buy-box__facts,
	.buy-box .btn-whatsapp, .buy-box .buy-box__hint, .buy-box > .product-card__cat { display: none; }
	.buy-box .seller { margin-top: 0; padding-top: 0; border-top: 0; }
	.mobile-summary { background: #fff; border-radius: var(--qc-radius); box-shadow: var(--qc-shadow); padding: 18px 18px 8px; margin-bottom: 18px; }
	.mobile-summary .buy-box__title { font-size: 22px; }
	.mobile-summary .buy-box__price { font-size: 28px; margin-bottom: 10px; }

	/* Barra fija inferior (precio + WhatsApp / Postular) */
	.mobile-cta {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500;
		display: flex; align-items: center; gap: 12px;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px);
		box-shadow: 0 -8px 24px -10px rgba(0, 0, 0, .25);
	}
	.mobile-cta__info { flex: 1; min-width: 0; line-height: 1.2; }
	.mobile-cta__info strong { display: block; font-family: 'Oswald', sans-serif; font-size: 19px; color: var(--qc-dark); font-weight: 500; }
	.mobile-cta__info span { font-size: 12px; color: var(--qc-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.mobile-cta .btn-whatsapp { width: auto; height: 46px; padding: 0 20px; flex: 0 0 auto; border-radius: 30px; }
	.mobile-cta .btn_accent { flex: 0 0 auto; padding: 10px 24px; }
	.has-mobile-cta { padding-bottom: 76px; }
	.has-mobile-cta .topcontrol { bottom: 90px !important; }

	/* Moderación: indicadores de 2 en 2 */
	.mod-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
	.mod-stat { padding: 14px; gap: 10px; }
	.mod-stat i { font-size: 20px; }
	.mod-stat strong { font-size: 22px; }
	.mod-card__media { max-width: 420px; }

	/* Pie de página: menos espacio vacío */
	.footer_logo { padding-top: 120px; }
	.single_footer { padding-top: 28px; }
	.single_footer h4 { text-transform: none; }
	.footer_copyright { margin-top: 30px; }

	/* Menú lateral del celular: botones grandes y "Publicar" destacado */
	.site-mobile-menu { width: min(320px, 86vw); }
	.site-mobile-menu .site-nav-wrap > li > a { padding: 12px 20px; font-size: 17px; }
	.site-mobile-menu .site-nav-wrap > li.nav-publicar > a {
		display: inline-flex; align-items: center; gap: 6px; margin: 10px 20px; padding: 10px 22px;
		background: var(--qc-accent); color: #fff !important; border-radius: 30px; }
	.site-mobile-menu .nav-avatar { width: 28px; height: 28px; }
	.site-mobile-menu .nav-logout-form { padding-left: 20px; }
}

/* ======================================================================
 * CELULARES (< 768 px)
 * ==================================================================== */
@media (max-width: 767.98px) {
	.container { padding-left: 16px; padding-right: 16px; }
	.site-navbar .site-logo .brand-logo { font-size: 24px; }

	/* Buscador del inicio */
	.hero-search .hero-text { padding-top: 112px; }
	.hero-search .hero-text h2 { font-size: 30px; }
	.hero-search .hero-text p { font-size: 15px; margin-bottom: 0; }
	.search-box { margin-top: 22px; border-radius: 16px; }
	.search-switch { display: flex; width: 100%; }
	.search-switch label { flex: 1; text-align: center; padding: 8px 6px; font-size: 13px; white-space: nowrap; }
	.search-switch label i { margin-right: 4px; }
	.home_bg.hero-search { min-height: 0; padding-bottom: 70px; }
	.hero-tags { font-size: 13px; }
	.hero-tags a { padding: 4px 12px; }

	/* Títulos de sección */
	.section-head { margin-bottom: 22px; }
	.section-head h2 { font-size: 28px; }
	.section-head__actions { width: 100%; }
	.section-head__actions a { flex: 1; text-align: center; }

	/* Categorías / áreas: una sola fila que se desliza con el dedo */
	.cat-chips {
		flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 22px; padding: 2px 16px 8px;
		scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none;
	}
	.cat-chips::-webkit-scrollbar { display: none; }
	.cat-chip { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }

	/* Tarjetas de anuncio compactas (2 columnas) */
	.product-card { border-radius: 10px; }
	.product-card:hover { transform: none; }
	.product-card__media { aspect-ratio: 1 / 1; }
	.product-card__badge { top: 8px; left: 8px; font-size: 10px; padding: 4px 8px; }
	.product-card__count { right: 8px; bottom: 8px; font-size: 10px; padding: 2px 7px; }
	.product-card__body { padding: 10px 11px 12px; }
	.product-card__cat { font-size: 10px; letter-spacing: .5px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
	.product-card__title { font-size: 15px; line-height: 1.3; margin: 4px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.product-card__meta { font-size: 11px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.product-card__footer { padding-top: 8px; }
	.product-card__price { font-size: 17px; }
	.product-card__price small { display: none; }
	.product-card__link { display: none; }

	/* Tarjetas de empleo compactas */
	.job-card { padding: 16px; gap: 12px; align-items: flex-start; }
	.job-card__logo { flex-basis: 44px; height: 44px; font-size: 16px; border-radius: 10px; }
	.job-card__info { flex-basis: calc(100% - 60px); }
	.job-card__title { font-size: 17px; line-height: 1.3; }
	.job-card__company { font-size: 14px; margin-bottom: 6px; }
	.job-card__tags { gap: 4px 10px; font-size: 12px; }
	.job-card__side { padding-top: 10px; }
	.job-card__salary small { text-align: left; }

	/* Barra de resultados */
	.results-bar { padding: 10px 14px; }

	/* Detalle de empleo */
	.job-header .job-card__logo { flex-basis: 52px; height: 52px; font-size: 18px; }
	.job-header__info h1 { font-size: 24px; }
	.job-header__salary { text-align: left; }
	.detail-card { padding: 20px 18px; }
	.spec-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
	.spec-grid > div { padding: 8px 10px; }
	.benefits { grid-template-columns: 1fr 1fr; }
	.benefits li { font-size: 13px; padding: 7px 10px; }

	/* Formularios de publicación */
	.form-section__head { gap: 12px; margin-bottom: 16px; }
	.form-section__head h2 { font-size: 19px; }
	.benefit-picker { grid-template-columns: 1fr 1fr; }
	.benefit-picker__item { padding: 9px 10px; font-size: 13px; }
	.salary-block .row, .form-section .row { align-items: flex-end; }

	/* Panel del empleador */
	.panel-head { padding: 16px; }
	.panel-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
	.panel-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
	.panel-tabs::-webkit-scrollbar { display: none; }
	.panel-tabs a { white-space: nowrap; }
	.applicant { padding: 14px; }
	.applicant__contact { width: 100%; }
	.applicant__contact > * { flex: 1; text-align: center; justify-content: center; }

	/* Avisos flotantes dentro de la pantalla */
	.qc-toasts { left: 12px; right: 12px; top: 76px; max-width: none; }
}

/* Celulares pequeños (Android 360 px, iPhone SE) */
@media (max-width: 380px) {
	.hero-search .hero-text h2 { font-size: 26px; }
	.search-switch label { font-size: 12px; padding: 8px 4px; }
	.product-card__title { font-size: 14px; }
	.product-card__price { font-size: 16px; }
	.mobile-cta .btn-whatsapp, .mobile-cta .btn_accent { padding: 0 14px; }
}
