/* ==========================================================
   3 Pyramids — mobile UX refinements (max 767px)
   ========================================================== */

/* Article table of contents (collapsible) */
.p3j-toc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--p3-bronze); font-family: var(--p3-sans); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; list-style: none; cursor: pointer; }
.p3j-toc summary::-webkit-details-marker { display: none; }
.p3j-toc summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
.p3j-toc[open] summary::after { transform: rotate(-135deg); }
.p3j-toc[open] summary { margin-bottom: 14px; }

@media (max-width: 767px) {

	/* ---------- Swipe rows instead of long stacks ---------- */
	.pyr-experiences__grid, .pyr-curated:not(.p3t-list) .pyr-curated__grid, .p3-cairo-grid, .p3-destination-grid, .p3d-high__grid, .p3j__grid, .p3j-related .p3j-grid, .p3s-section .p3j-grid, .p3b-others__grid {
		display: flex !important;
		grid-template-columns: none !important;
		gap: 14px !important;
		overflow-x: auto !important;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		overscroll-behavior-x: contain;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding: 4px 2px 16px !important;
		transform: none !important;
	}
	.pyr-experiences__grid::-webkit-scrollbar, .pyr-curated:not(.p3t-list) .pyr-curated__grid::-webkit-scrollbar, .p3-cairo-grid::-webkit-scrollbar, .p3-destination-grid::-webkit-scrollbar, .p3d-high__grid::-webkit-scrollbar, .p3j__grid::-webkit-scrollbar, .p3j-related .p3j-grid::-webkit-scrollbar, .p3s-section .p3j-grid::-webkit-scrollbar, .p3b-others__grid::-webkit-scrollbar { display: none; }
	.pyr-experiences__grid > *, .pyr-curated:not(.p3t-list) .pyr-curated__grid > *, .p3-cairo-grid > *, .p3-destination-grid > *, .p3d-high__grid > *, .p3j__grid > *, .p3j-related .p3j-grid > *, .p3s-section .p3j-grid > *, .p3b-others__grid > * {
		flex: 0 0 84% !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: 84% !important;
		margin: 0 !important;
		scroll-snap-align: start;
	}
	.pyr-curated:not(.p3t-list) .pyr-curated__inner { overflow: visible; }

	/* Article cards inside swipe rows */
	.p3j-related .p3j-card__excerpt, .p3s-section .p3j-card__excerpt, .p3j__grid .p3j-card__excerpt { display: none !important; }
	.p3j-related .p3j-card h3, .p3s-section .p3j-card h3, .p3j__grid .p3j-card h3 { font-size: 22px !important; line-height: 1.18 !important; }

	/* ---------- Tour cards: shorter on phones ---------- */
	.pyr-tour__media { height: auto !important; aspect-ratio: 16 / 11; }
	.pyr-tour__media img { width: 100%; height: 100% !important; object-fit: cover; }
	.pyr-tour__title { font-size: 24px !important; line-height: 1.12 !important; }
	.pyr-tour__meta { display: flex !important; flex-wrap: wrap; gap: 6px 16px !important; }
	.pyr-tour__body { padding-top: 18px !important; padding-bottom: 18px !important; }

	/* Destination highlight + discovery cards */
	.p3d-high__grid .p3d-card__media, .p3d-high__grid figure { aspect-ratio: 4 / 3 !important; height: auto !important; }
	.p3d-high__grid .p3d-card__media img, .p3d-high__grid figure img { height: 100% !important; object-fit: cover; }
	.p3-cairo-grid img, .p3-destination-grid img { max-height: 210px; object-fit: cover; }

	/* ---------- Homepage sections ---------- */
	.pyr-philosophy__features { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px !important; }
	.pyr-philosophy__feature, .pyr-philosophy__feature > * { text-align: left !important; align-self: flex-start !important; justify-self: start !important; width: auto !important; }
	.pyr-philosophy__feature { display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; padding: 16px 0 !important; border: 0 !important; }
	.pyr-philosophy__feature > :first-child:not(.pyr-philosophy__feature-title) { width: 44px !important; height: 44px !important; }
	.pyr-philosophy__feature-title { font-size: 17px !important; line-height: 1.15 !important; }
	.pyr-philosophy__feature-text { font-size: 12px !important; line-height: 1.45 !important; }
	.pyr-signature__features { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
	.pyr-signature__feature { display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; min-width: 0; padding: 16px !important; }
	.pyr-signature__feature-title { font-size: 18px !important; line-height: 1.15 !important; }
	.pyr-signature__feature-text { font-size: 12px !important; }

	/* ---------- Footer: about half the height ---------- */
	.p3-footer__plan > .p3-footer__column-title, .p3-footer__plan-copy, .p3-footer__plan-link, .p3-footer__social-title { display: none !important; }
	.p3-footer__socials { margin-top: 0 !important; }
	.p3-footer__logo img { max-width: 150px !important; height: auto !important; }
	.p3-footer__headline { font-size: clamp(30px, 9vw, 38px) !important; }
	.p3-footer__main { gap: 30px !important; }
	.p3-footer__links { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 2px 18px !important; }
	.p3-footer__links a { display: inline-block; padding: 7px 0 !important; }
	.p3-footer__brand-actions { gap: 10px !important; }

	/* ---------- Tap targets ---------- */
	.p3d-crumbs a, .p3j-crumbs a, .p3k-crumbs a, .p3x-crumbs a, .p3tr-crumbs a { display: inline-block; padding: 10px 0; }
	.p3rv__dot { position: relative; }
	.p3rv__dot::after { content: ""; position: absolute; inset: -16px -6px; }
	.p3j-more, .p3d-link { display: inline-flex; align-items: center; min-height: 44px; }

	/* ---------- Spacing ---------- */
	.p3j-hero, .p3s-hero { padding-top: 112px !important; }
	.p3d-faq details summary { padding-top: 16px !important; padding-bottom: 16px !important; }
}
