/* ==========================================================================
   Javid LSF — PHONE LAYER (≤ 767px). Every phone-only rule lives here.
   Loaded after javid.css.
   ========================================================================== */
.jv-mbar { display: none; }

@media (max-width: 767px) {
	:root { --section-custom-padding: 3rem; }
	body.jv { --font-size: 14.5px; }
	.jv h2 { font-size: 1.32rem !important; line-height: 1.6 !important; }
	.jv-lead, .jv-lead .w-text-value { font-size: .95rem; line-height: 1.95; }
	.jv-kicker .w-text-value, .jv-kicker.w-text { font-size: 12px; }
	.l-section.jv-dim::before { top: 14px; }

	/* Header */
	.jv-account { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; }
	.jv-account__sub { display: none; }
	.jv .w-nav.type_mobile .w-nav-anchor.level_1 { padding-block: .7rem !important; }

	/* Hero */
	.l-section.jv-hero > .l-section-h { padding-bottom: 2.4rem; }
	.jv-stage-wrap { height: 46vh; min-height: 300px; max-height: 420px; margin: 0 -1rem -1.2rem; }
	.jv-replay { top: 10px; left: 12px; padding: 5px 10px; font-size: 11.5px; }
	.jv3d-meter { right: 12px; bottom: 8px; gap: 8px; font-size: 11.5px; }
	.jv3d-meter__bar { width: 80px; }
	.jv-hero h1, .jv-hero .jv-h1 { font-size: 1.62rem !important; line-height: 1.6 !important; }
	.jv-hero h1 .jv-under { background: none; color: var(--jv-orange-2); }
	.jv-btns, .jv-hero .jv-btns { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px !important; width: 100%; }
	.jv-btns .w-btn { width: 100%; justify-content: center; padding-inline: .6em !important; font-size: 13.5px !important; }
	.jv-chip { width: 100%; border-radius: 16px; padding: 10px 12px; }
	.jv-chip .jv-chip__tel { display: inline-flex; margin-inline-start: auto; padding: 7px 10px; font-size: 12px; }
	.jv-hero-meta { gap: 6px 14px; font-size: 12px; }

	/* Facts */
	.jv-fact__l .w-text-value, .jv-fact-rich .jv-l { font-size: 12px; }
	.jv-fact__code .w-text-value, .jv-fact-rich .jv-c { font-size: 11.5px; }

	/* Course sheets (swipe row set in javid.css) */
	.jv-sheet__block dt { font-size: 11.5px; }
	.jv-sheet__block dd { font-size: 13px; }
	.jv-sheets__note { font-size: 12.5px; padding-inline: 8px; }

	/* Learning path */
	.jv-path .jv-path-card { padding: 14px 16px; }
	.jv-path .jv-step-tagline { display: none; }

	/* Story: stage pinned under the header, steps scroll beneath it */
	.l-section.jv-story-head > .l-section-h { padding-bottom: 1.2rem; }
	.l-section.jv-story > .l-section-h { padding-top: 0; }
	.jv-story-stagecol { top: calc(var(--header-sticky-height, 56px) - 1px) !important; margin-inline: -1rem; padding: 8px 1rem 10px; }
	.jv-story-stage { height: 38vh; min-height: 250px; border-radius: 14px; }
	.jv-story .jv-step { margin-bottom: 18vh !important; opacity: .7; padding: 16px; }
	.jv-story .jv-step.is-active { opacity: 1; }
	.jv-step h3 { font-size: 1.02rem !important; }
	.jv-step p { font-size: 13.5px; }
	.jv-step .jv-step-tags span { font-size: 11.5px; }

	/* Instructor */
	.jv-portrait { max-width: 260px; padding: 12px; }
	.jv-portrait-tag { right: 16px; font-size: 12px; padding: 6px 12px; }
	.jv-name .w-text-value { font-size: 1.45rem; }
	.jv-principles { grid-template-columns: repeat(3, 1fr); gap: 8px; }
	.jv-principles li { padding: 10px 8px; font-size: 11.5px; line-height: 1.7; text-align: center; }
	.jv-principles li b { font-size: 12.5px; }

	/* Quake */
	.jv-quake-stage { padding-top: 300px; border-radius: 14px; }
	.jv-quake-stage .jv3d-canvas { height: 300px !important; }
	.jv-quake-ui { padding: 10px 12px; gap: 10px; }
	.jv-quake-ui__row { flex-basis: 100%; }
	.jv-quake-ui__btns { width: 100%; }
	.jv-quake-ui button { flex: 1; padding: 10px; }

	/* Services 2×2, compact */
	.jv-svc .w-iconbox { padding: 14px 12px; }
	.jv-svc .w-iconbox-icon { font-size: 1.3rem !important; margin-bottom: .4rem !important; }
	.jv-svc .w-iconbox-title { font-size: .92rem !important; line-height: 1.6 !important; }
	.jv-svc .w-iconbox-text { font-size: 12.5px; line-height: 1.85; }
	.jv-chips ul { gap: 6px; }
	.jv-chips li { font-size: 12px; padding: 6px 10px 6px 9px; }

	/* Project gallery: 2-column square grid, first 6 photos */
	.jv-gallery .w-gallery-list { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; height: auto !important; }
	.jv-gallery .w-gallery-item { position: static !important; width: auto !important; height: auto !important; transform: none !important; margin: 0 !important; padding: 0 !important; }
	.jv-gallery .w-gallery-item:nth-child(n+7) { display: none !important; }
	.jv-gallery .w-gallery-item img { aspect-ratio: 1; width: 100%; height: 100% !important; object-fit: cover; }

	/* Reasons (about): the four rows of three merge into one 2-column grid */
	.jv-reasons-col > .vc_column-inner { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; }
	.jv-reasons-col > .vc_column-inner > *:not(.jv-reasons) { grid-column: 1 / -1; }
	.jv-reasons-col .jv-reasons, .jv-reasons-col .jv-reasons > .wpb_column, .jv-reasons-col .jv-reasons > .wpb_column > .vc_column-inner { display: contents !important; }
	/* Reasons (about): icon on top */
	.jv-reasons .w-iconbox { padding: 12px; }
	.jv-reasons .w-iconbox.iconpos_left { flex-direction: column; }
	.jv-reasons .w-iconbox-title { font-size: .9rem !important; }
	.jv-reasons .w-iconbox-text { font-size: 12px; line-height: 1.8; }

	/* Post cards: swipe rows on landing sections, compact list on archives */
	.jv-posts-swipe .w-grid-list { display: flex !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px !important; padding: 2px 2px 12px; scrollbar-width: none; }
	.jv-posts-swipe .w-grid-list::-webkit-scrollbar { display: none; }
	.jv-posts-swipe .w-grid-item { flex: 0 0 82% !important; width: auto !important; scroll-snap-align: center; margin: 0 !important; }
	.jv-card .w-grid-item-h { height: auto; }
	.jv-posts-list .w-grid-list { gap: 10px !important; }
	.jv-posts-list .w-grid-item-h { display: flex !important; flex-direction: row; align-items: stretch; min-height: 112px; }
	.jv-posts-list .jv-card__img { flex: 0 0 112px; width: 112px !important; position: relative !important; margin: 0 !important; aspect-ratio: auto !important; overflow: hidden; }
	.jv-posts-list .jv-card__img > *, .jv-posts-list .jv-card__img a { position: absolute !important; inset: 0; height: 100% !important; padding: 0 !important; }
	.jv-posts-list .jv-card__img img { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; aspect-ratio: auto !important; }
	.jv-posts-list .jv-card__body { flex: 1; min-width: 0; }
	.jv-posts-list .jv-card__body { padding: 12px 14px !important; }
	.jv-posts-list .jv-card__ex { display: none; }
	.jv-posts-list .jv-card__title, .jv-posts-list .jv-card__title a { font-size: .92rem !important; line-height: 1.75 !important; }
	.jv-cats ul { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
	.jv-cats li { flex: none; }

	/* FAQ */
	.jv-faq .w-tabs-section-header { padding: 14px 16px !important; }
	.jv-faq .w-tabs-section-title { font-size: .92rem !important; line-height: 1.7 !important; }
	.jv-faq .w-tabs-section-content-h { padding: 0 16px 14px !important; font-size: 13.5px; }

	/* Consult: the footer right below lists the same contacts */
	.jv-consult-card { display: none; }
	.jv .w-form input:not([type=submit]), .jv .w-form select { min-height: 46px; font-size: 15px !important; }
	.jv .w-form textarea { font-size: 15px !important; }

	/* Article */
	.jv-pagehero h1, .jv-pagehero .jv-h1 .w-text-value { font-size: 1.4rem !important; }
	.jv-meta { font-size: 12px; gap: 4px 12px; }
	.jv-post-content h2 { font-size: 1.15rem !important; }
	.jv-post-content h3 { font-size: 1.02rem !important; }
	.jv-toc-col { order: -1; }
	.jv-toc { padding: 12px 14px; }
	.jv-toc ol { max-height: 0; overflow: hidden; transition: max-height .4s; }
	.jv-toc.is-open ol { max-height: 60vh; overflow: auto; }
	.jv-toc__title { cursor: pointer; margin: 0; justify-content: space-between; }
	.jv-toc__title::after { content: "+"; font-weight: 400; color: var(--jv-orange); font-size: 18px; line-height: 1; }
	.jv-toc.is-open .jv-toc__title::after { content: "\2212"; }
	.jv-toc.is-open .jv-toc__title { margin-bottom: 8px; }
	.jv-author-box { flex-direction: column; text-align: center; }

	/* Footer */
	.jv-footer .wpb_column { margin-bottom: 1.4rem; }
	.jv-foot-links ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
	.jv-foot-posts, .jv-foot-posts-h { display: none !important; }
	.jv-footbar .wpb_column, .jv-footbar p { text-align: center !important; }
	.jv-footbar.l-section { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

	/* Back to top: small, above the action bar */
	.jv .w-toplink { width: 40px !important; height: 40px !important; line-height: 40px !important; bottom: calc(74px + env(safe-area-inset-bottom)) !important; left: 12px !important; right: auto !important; margin: 0 !important; background: rgba(20, 25, 32, .92) !important; color: var(--jv-orange) !important; border: 1px solid var(--jv-line-dark); }

	/* Sticky action bar */
	.jv-mbar {
		display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 6px; position: fixed; z-index: 99; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom));
		padding: 6px; border-radius: 16px; background: rgba(13, 16, 21, .94); border: 1px solid var(--jv-line-dark);
		-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .6);
		transition: transform .35s var(--jv-ease);
	}
	.jv-mbar.is-hidden { transform: translateY(140%); }
	.jv-mbar a { display: flex; align-items: center; justify-content: center; gap: 6px; height: 46px; border-radius: 11px; color: #e9edf1 !important; font-size: 13px; font-weight: 800; text-decoration: none !important; }
	.jv-mbar a svg { width: 17px; height: 17px; flex: none; }
	.jv-mbar a.is-main { background: var(--jv-orange); color: var(--jv-ink) !important; }
	.jv-mbar a:not(.is-main) { background: rgba(255, 255, 255, .05); }
}

@media (max-width: 380px) {
	.jv-hero h1, .jv-hero .jv-h1 { font-size: 1.45rem !important; }
	.jv-btns .w-btn { font-size: 12.5px !important; }
	.jv-principles li { font-size: 11.5px; padding-inline: 6px; }
	.jv-mbar a { font-size: 12px; }
}

/* Article cards on phones: one height per row, same line counts, date at the foot */
@media (max-width: 767px) {
	.jv-posts-swipe .w-grid-list { align-items: stretch !important; }
	.jv-posts-swipe .w-grid-item { display: flex !important; }
	.jv-posts-swipe .w-grid-item-h { height: auto !important; width: 100%; display: flex !important; flex-direction: column; }
	.jv-posts-swipe .jv-card__img { flex: none; }
	.jv-posts-swipe .jv-card__body { flex: 1; display: flex !important; flex-direction: column; }
	.jv-posts-swipe .jv-card__date { margin-top: auto !important; padding-top: 4px; }
	.jv-posts-swipe .jv-card__title, .jv-posts-swipe .jv-card__title a,
	.jv-posts-list .jv-card__title, .jv-posts-list .jv-card__title a {
		display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
	}
	.jv-posts-swipe .jv-card__title { min-height: calc(2 * 1.8em); }
	.jv-posts-swipe .jv-card__ex { display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; min-height: calc(3 * 1.95em); }
	.jv-posts-swipe .jv-card__cat, .jv-posts-list .jv-card__cat { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.jv-posts-list .w-grid-item-h { height: 124px !important; min-height: 0 !important; }
	.jv-posts-list .jv-card__body { display: flex !important; flex-direction: column; justify-content: center; }
	.jv-posts-list .jv-card__title { min-height: calc(2 * 1.75em); }
}
