/*
Theme Name:   Dayal Eye Centre
Theme URI:    https://dayaleyecentre.in
Description:  Custom child theme for Dayal Eye Centre. Phase 1 of the custom-theme migration — renders designed pages full-bleed, loads the design token CSS and the interaction shim, and carries the sitewide header/footer spacing fix. Page-group templates arrive in Phase 2.
Author:       Search Engineers
Template:     hello-elementor
Version:      1.0.0
Requires PHP: 8.1
*/

/* ----------------------------------------------------------------------
 * Full-bleed rendering for designed pages (body.dyl-fullpage).
 * The captured design HTML supplies its own layout; the theme container
 * must not constrain or pad it, and the theme's own page title header
 * must never show (the design HTML carries the page H1).
 * -------------------------------------------------------------------- */
body.dyl-fullpage .site-main,
body.dyl-fullpage main.site-main,
body.dyl-fullpage .page-content {
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.dyl-fullpage .entry-header,
body.dyl-fullpage .page-header,
body.dyl-fullpage header.entry-header {
	display: none !important;
}

body.dyl-fullpage .entry-content {
	margin: 0 !important;
	padding: 0 !important;
	max-width: none !important;
}

/* ----------------------------------------------------------------------
 * Sitewide header/footer spacing fix.
 * Elementor applies `.elementor-widget:not(:last-child){margin-bottom:20px}`.
 * The header template (#18) holds TWO widgets — the visible header plus one
 * that renders nothing — so the first carried a 20px bottom margin, showing
 * as a white strip under the header on every page. Same guard for the footer.
 * -------------------------------------------------------------------- */
.elementor-location-header .elementor-widget,
.elementor-location-footer .elementor-widget {
	margin-bottom: 0 !important;
}

.elementor-location-header .elementor-widget-wrap.elementor-element-populated,
.elementor-location-footer .elementor-widget-wrap.elementor-element-populated {
	padding: 0 !important;
}

/* Mega-menu footer pill button: the generic `.dyl-mega a{display:block;padding:5px 0}` rule
 * clobbers `.dyl-btn`, stacking the icon above the label and dropping the pill padding.
 * Restore the button's own layout (higher specificity wins). Added 2026-08-24. */
.dyl-mega a.dyl-btn { display: inline-flex; padding: 0 18px; font-size: 14px; }

/* Mega-menu "Show more" toggle (pure CSS, no JS) for the long Paediatric & Speciality column. Added 2026-08-24. */
.dyl-mega .dyl-more-cb { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.dyl-mega .dyl-mega-rest { display:none; }
.dyl-mega .dyl-more-cb:checked ~ .dyl-mega-rest { display:block; }
.dyl-mega .dyl-mega-morelbl { display:inline-block; margin-top:7px; font-size:13px; font-weight:600; color:var(--teal-700); cursor:pointer; user-select:none; }
.dyl-mega .dyl-mega-morelbl:hover { color:var(--teal-800); }
.dyl-mega .dyl-mega-morelbl .ltxt { display:none; }
.dyl-mega .dyl-more-cb:checked ~ .dyl-mega-morelbl .mtxt { display:none; }
.dyl-mega .dyl-more-cb:checked ~ .dyl-mega-morelbl .ltxt { display:inline; }

/* DAYAL_EQUIP_SINGLECOL_725: equipment hub cards one per row on every breakpoint. */
body.page-id-725 .rq-3{grid-template-columns:1fr !important;}

/* DAYAL_FARIDABAD_FIX: services cards 2 per row on mobile (page 98). */
@media (max-width: 760px){
  body.page-id-98 .rq-3[style*="repeat(6, 1fr)"]{grid-template-columns:repeat(2,1fr) !important;gap:10px !important;}
}

/* Speciality Care + Why Make the Journey: single column on mobile (2026-08-29) */
@media (max-width: 768px){ .rq-3.dyl-stack-m{ grid-template-columns:1fr !important; } }

/* Experience You Can Trust (EEAT): 4-col desktop, single column on mobile (2026-08-29) */
@media (max-width: 768px){ .rs-eeat.rs-eeat, .gs-eeat.gs-eeat{ grid-template-columns:1fr !important; } }

/* Book Appointment (87): multi-col desktop, single column on mobile (2026-08-29) */
@media (max-width: 768px){ body.page-id-87 .rq-3, body.page-id-87 .rq-2s{ grid-template-columns:1fr !important; } }

/* blog-mobile-overflow: article images/media must not force horizontal scroll (2026-08-29) */
.dylb-body, .dylb-article, .dylb-aside{ min-width:0; }
.dylb-article img, .dylb-article figure, .dylb-article .wp-block-image, .dylb-article .wp-block-image img{ max-width:100% !important; height:auto; }
.dylb-article pre, .dylb-article table{ max-width:100%; overflow-x:auto; display:block; }

/* blog-fixed-overflow: bottom nav + progress bar must fit viewport on mobile (2026-08-29) */
@media (max-width: 900px){
  .dyl-bn, .dylb-progress{ left:0 !important; right:0 !important; width:auto !important; max-width:100vw !important; box-sizing:border-box; }
  .dyl-bn-grid{ grid-template-columns:repeat(5, minmax(0,1fr)) !important; max-width:100% !important; }
}

/* blog-wordwrap: long words/URLs must wrap, not force horizontal scroll (2026-08-29) */
.dylb-article, .dylb-article p, .dylb-article li, .dylb-article h1, .dylb-article h2, .dylb-article h3, .dylb-article h4, .dylb-article a, .dylb-article span{ overflow-wrap:break-word; word-break:break-word; }

/* DAYAL_COST_MOBILE_SINGLECOL (2026-08-30): on cost pages, card grids (technology, surgeons, patient stories, etc.) go one-per-row on mobile. Tripled class beats the parts' inline <style> !important rules that load after this sheet. */
@media (max-width: 768px) {
	body.dyl-cost .rq-3.rq-3.rq-3,
	body.dyl-cost .rq-2s.rq-2s.rq-2s,
	body.dyl-cost .cc-cards3.cc-cards3.cc-cards3,
	body.dyl-cost .cc-cards4.cc-cards4.cc-cards4,
	body.dyl-cost .cc-inex.cc-inex.cc-inex,
	body.dyl-cost .cc-factors.cc-factors.cc-factors,
	body.dyl-cost .cc-check.cc-check.cc-check,
	body.dyl-cost .sc-factors.sc-factors.sc-factors,
	body.dyl-cost .sc-docs.sc-docs.sc-docs,
	body.dyl-cost .sc-diag.sc-diag.sc-diag,
	body.dyl-cost .sc-tech.sc-tech.sc-tech,
	body.dyl-cost .sc-check.sc-check.sc-check,
	body.dyl-cost .svc-factors.svc-factors.svc-factors,
	body.dyl-cost .svc-specialists.svc-specialists.svc-specialists,
	body.dyl-cost .svc-quotes.svc-quotes.svc-quotes,
	body.dyl-cost .svc-related.svc-related.svc-related,
	body.dyl-cost .svc-rel.svc-rel.svc-rel,
	body.dyl-cost .cvc-tech.cvc-tech.cvc-tech,
	body.dyl-cost .cvc-factors.cvc-factors.cvc-factors,
	body.dyl-cost .cvc-check.cvc-check.cvc-check,
	body.dyl-cost .oc-factors.oc-factors.oc-factors,
	body.dyl-cost .oc-related.oc-related.oc-related,
	body.dyl-cost .ct-grid.ct-grid.ct-grid,
	body.dyl-cost .ct-three.ct-three.ct-three {
		grid-template-columns: 1fr !important;
	}
}

/* DAYAL_DOCVIDEOS_MOBILE (2026-08-30): /doctor-instructions/ — full-length video cards 1-per-row, Shorts 2-per-row on mobile. */
@media (max-width: 768px) {
	body.page-id-94 .rq-3[style*="repeat(3"] {
		grid-template-columns: 1fr !important;
	}
	body.page-id-94 .rq-3[style*="repeat(5"] {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}
