/* ==========================================================================
   Sridham × OceanWP × Elementor compatibility layer.
   Loaded after OceanWP, Elementor and css/sridham.css.

   css/sridham.css is the original Sridham stylesheet with every selector
   prefixed by .sridham-site (the body class added by the child theme), so it
   out-ranks OceanWP's base styles without changing the design.
   ========================================================================== */

/* OceanWP sets html to 14px; the Sridham design is built on 16px rem units. */
html { font-size: 100%; }
body.sridham-site { overflow-wrap: normal; word-wrap: normal; }
/* The original body uses overflow-x: hidden, which silently stops the header from
   sticking. "clip" hides sideways overflow the same way and lets it stick. */
body.sridham-site { overflow-x: clip; overflow-y: visible; }
body.sridham-site #outer-wrap,
body.sridham-site #wrap { background: var(--bg); box-shadow: none; width: 100%; max-width: none; overflow: visible; }
body.sridham-site #main { overflow: visible; }

/* ---- Header (OceanWP "Custom Header" with an Elementor template) -----------
   OceanWP and Elementor wrappers are flattened so the Sridham header stays
   sticky while scrolling, exactly like the original site. */
body.sridham-site #site-header.custom-header,
body.sridham-site #site-header.custom-header #site-header-inner,
body.sridham-site #site-header .elementor,
body.sridham-site #site-header .elementor-section-wrap,
body.sridham-site #site-header .e-con,
body.sridham-site #site-header .e-con-inner,
body.sridham-site #site-header .elementor-section,
body.sridham-site #site-header .elementor-container,
body.sridham-site #site-header .elementor-column,
body.sridham-site #site-header .elementor-widget-wrap,
body.sridham-site #site-header .elementor-element,
body.sridham-site #site-header .elementor-widget-container { display: contents; }
body.sridham-site #site-header { border: 0; background: transparent; }
body.sridham-site #site-header .oceanwp-mobile-menu-icon,
body.sridham-site #mobile-dropdown,
body.sridham-site #mobile-fullscreen,
body.sridham-site #sidr,
body.sridham-site #top-bar-wrap,
body.sridham-site #scroll-top { display: none !important; }

/* Keep the sticky header below the WordPress admin bar when logged in. */
body.admin-bar.sridham-site .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar.sridham-site .site-header { top: 46px; } }
@media (max-width: 600px) { body.admin-bar.sridham-site .site-header { top: 0; } }

/* Fix from the original template: the dark overlay sat above the mobile menu,
   so the menu could not be tapped. Keep the overlay under the header, and lift
   the header above the top bar while the menu is open. */
.sridham-site .nav-overlay { z-index: 48; }
.sridham-site .site-header:has(.main-nav.is-open) { z-index: 100; }

/* ---- Footer (OceanWP "Footer Widgets" template) ------------------------- */
body.sridham-site #footer.site-footer,
body.sridham-site #footer #footer-inner,
body.sridham-site #footer #footer-widgets,
body.sridham-site #footer .footer-widgets-inner,
body.sridham-site #footer .elementor,
body.sridham-site #footer .elementor-section-wrap,
body.sridham-site #footer .e-con,
body.sridham-site #footer .e-con-inner,
body.sridham-site #footer .elementor-section,
body.sridham-site #footer .elementor-container,
body.sridham-site #footer .elementor-column,
body.sridham-site #footer .elementor-widget-wrap,
body.sridham-site #footer .elementor-element,
body.sridham-site #footer .elementor-widget-container { display: contents; }

/* ---- 404 page (OceanWP "404 Page" template) ---------------------------- */
body.error404.sridham-site #content-wrap,
body.error404.sridham-site #primary,
body.error404.sridham-site #content,
body.error404.sridham-site #content > article.entry { display: contents; }

/* ---- Sridham widgets inside Elementor containers -------------------------
   Each Sridham section is full width; Elementor spacing around it is removed. */
.elementor-widget[class*="elementor-widget-sridham-"] { width: 100%; margin: 0 !important; }
.elementor-widget[class*="elementor-widget-sridham-"] > .elementor-widget-container { margin: 0; padding: 0; }
.e-con.sridham-page { --padding-top: 0px; --padding-bottom: 0px; --padding-left: 0px; --padding-right: 0px; --gap: 0px; --row-gap: 0px; --column-gap: 0px; --width: 100%; }
.elementor-section.sridham-page > .elementor-container > .elementor-column > .elementor-widget-wrap { padding: 0; }

/* Elementor resets figure margins inside widgets; restore the Sridham values. */
.elementor .elementor-widget[class*="elementor-widget-sridham-"] figure.cover-figure { margin: 0 0 clamp(2rem, 5vw, 3rem); }
.elementor .elementor-widget[class*="elementor-widget-sridham-"] figure.banner-figure { margin: 1.5rem 0 0; }
.elementor .elementor-widget[class*="elementor-widget-sridham-"] figure.media { margin: 1em 40px; }
.elementor .elementor-widget[class*="elementor-widget-sridham-"] figure.aerial { margin: 0; }

/* ---- OceanWP styles buttons, form fields, labels and bold text globally.
   Put these elements back to browser defaults (as in the original HTML site);
   every Sridham component rule is more specific and still applies on top. */
html .sridham-site button,
html .sridham-site input,
html .sridham-site select,
html .sridham-site textarea { all: revert; font: inherit; color: inherit; box-sizing: border-box; }
html .sridham-site button { cursor: pointer; }
html .sridham-site label,
html .sridham-site legend { all: revert; box-sizing: border-box; }
html .sridham-site fieldset { all: revert; box-sizing: border-box; border: 0; padding: 0; margin: 0; }
/* OceanWP forces select padding with !important. */
.sridham-site .field select { padding-top: .8rem !important; padding-bottom: .8rem !important; }
html .sridham-site strong,
html .sridham-site b { font-weight: bolder; }

/* ---- Hero slide image fit (chosen per slide in the editor) -------------- */
.sridham-site .hero__frame .hero__slide--contain img { object-fit: contain; background: #1a0f08; }
.sridham-site .hero__frame .hero__slide--cover img { object-fit: cover; object-position: center; }
.sridham-site .hero__frame .hero__slide--top img { object-fit: cover; object-position: 50% 35%; }

/* ---- Elementor editor: show everything without scroll animations -------- */
.elementor-editor-active .reveal, .elementor-editor-preview .reveal { opacity: 1 !important; transform: none !important; }
.elementor-editor-active .preloader { display: none !important; }
.elementor-editor-active .site-header { position: relative; }
