/*
 * Pandit Shyam Sharma Theme v1.1.83 — edge-to-edge visual continuity.
 * Intent: make the approved sections feel connected without changing their
 * artwork, content, controls, animations, or admin-configured backgrounds.
 * Strictly scoped to homepage for the main section corrections.
 */

/* Stable seam baseline — no anonymous margin or gap between adjacent sections. */
body.home .fx-home,
body.page-template-template-homepage .fx-home{
    --pj-final-wide:min(calc(100% - 40px),1740px);
    --pj-final-content:min(calc(100% - 40px),1540px);
    display:flow-root;
    margin:0;
    padding:0;
    isolation:isolate;
    background:#260811;
}
body.home .fx-home > section,
body.page-template-template-homepage .fx-home > section{
    max-width:none;
    margin-block:0!important;
    background-clip:border-box;
    /* One-pixel optical seam, not a visible extra gold bar. */
    box-shadow:inset 0 1px 0 rgba(255,229,169,.055),inset 0 -1px 0 rgba(35,8,17,.07);
}

/* Keep the developer-approved wide three-card wisdom zone but honor its
 * dedicated layout and width. This prevents mismatched side gutters. */
body.home .fx-home > .fx-bottom-zone > .site-container,
body.page-template-template-homepage .fx-home > .fx-bottom-zone > .site-container{
    width:var(--pj-final-wide)!important;
    max-width:1740px!important;
    margin-inline:auto!important;
}

/* Restore full bleed to the exact artwork sections. v1.1.82's global rail
 * clipped these to 1740px and left a flat bar on larger screens. */
body.home .fx-home > .fx-global-image-exact > .fx-global-image-exact__media,
body.page-template-template-homepage .fx-home > .fx-global-image-exact > .fx-global-image-exact__media{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    border-radius:0!important;
}
body.home .fx-home > .fx-global-image-exact,
body.page-template-template-homepage .fx-home > .fx-global-image-exact{
    padding-block:0!important;
    border:0!important;
}
/* Full bleed Pandit Ji portrait composition from approved About design:
 * protect the v1.1.81 no-crop photo and remove gutters caused by v1.1.82. */
body.home .fx-home > .pj-about > .pj-about__layout,
body.page-template-template-homepage .fx-home > .pj-about > .pj-about__layout{
    width:100%!important;
    max-width:1880px!important;
    margin-inline:auto!important;
}
body.home .pj-about img.pj-about__portrait-photo,
body.page-template-template-homepage .pj-about img.pj-about__portrait-photo{
    object-fit:contain!important;
    object-position:center!important;
    transform:none!important;
}

/* Gallery: re-establish its approved max-width. One global 1740px width
 * made the slider more diffuse than the original Gallery composition. */
body.home .fx-home > .pj-sacred-gallery > .gallery-section,
body.page-template-template-homepage .fx-home > .pj-sacred-gallery > .gallery-section{
    width:min(calc(100% - 24px),1400px)!important;
    max-width:1400px!important;
    margin-inline:auto!important;
}
body.home .pj-sacred-gallery .slider-wrapper,
body.page-template-template-homepage .pj-sacred-gallery .slider-wrapper{
    margin-bottom:0;
}
body.home .pj-sacred-gallery .gallery-header,
body.page-template-template-homepage .pj-sacred-gallery .gallery-header{
    margin-top:0;
    margin-bottom:clamp(20px,2.2vw,29px)!important;
}

/* Shared internal rail for standard content; dedicated section-specific
 * grid and width settings continue to take precedence where present. */
body.home .fx-home > :is(.fx-hero,.sri-guidance,.sri-rituals,.fx-sankalp,.rm-journey,.pj-muhurat-premium,.rm-explainer) > .site-container,
body.page-template-template-homepage .fx-home > :is(.fx-hero,.sri-guidance,.sri-rituals,.fx-sankalp,.rm-journey,.pj-muhurat-premium,.rm-explainer) > .site-container{
    width:min(calc(100% - 48px), var(--section-container,1540px))!important;
    max-width:var(--section-container,1540px)!important;
    margin-inline:auto!important;
}

/* Consistent spacing of full-width images & decorative sections, without
 * adding blank paddings at the beginning or end of images. */
body.home .fx-home > .pj-sacred-gallery,
body.page-template-template-homepage .fx-home > .pj-sacred-gallery{
    padding-block:clamp(30px,3.5vw,46px)!important;
}
body.home .fx-home > .fx-bottom-zone,
body.page-template-template-homepage .fx-home > .fx-bottom-zone{
    padding-block:clamp(30px,3.6vw,50px)!important;
}
body.home .fx-home > .pj-about,
body.page-template-template-homepage .fx-home > .pj-about{
    padding:0!important;
}

/* Header & footer rails align with the premium layout instead of appearing
 * narrower or displaced; these rules do not resize their actual cards. */
@media(min-width:1281px){
    body.home .pj-top-info__inner,
    body.home .site-header.pj-header-premium .pj-header-premium__inner,
    body.page-template-template-homepage .pj-top-info__inner,
    body.page-template-template-homepage .site-header.pj-header-premium .pj-header-premium__inner{
        width:min(calc(100% - 64px),1560px)!important;
        max-width:1560px!important;
        margin-inline:auto!important;
    }
}

/* The bottom join is dark-to-dark: only a quiet hairline, no extra section. */
body.home .fx-home + footer.fx-footer-exact,
body.page-template-template-homepage .fx-home + footer.fx-footer-exact,
body.home .site-footer.fx-footer-exact,
body.page-template-template-homepage .site-footer.fx-footer-exact{
    margin-top:0!important;
    border-top:1px solid rgba(218,170,78,.22)!important;
}
body.home .fx-footer-exact .fx-footer-main,
body.page-template-template-homepage .fx-footer-exact .fx-footer-main{
    margin-top:0;
}

/* Prefer a balanced tablet rail. Do not override mobile navigation grids. */
@media(max-width:1280px){
    body.home .fx-home,
    body.page-template-template-homepage .fx-home{
        --pj-final-wide:min(calc(100% - 36px),1040px);
        --pj-final-content:min(calc(100% - 36px),1040px);
    }
    body.home .fx-home > :is(.fx-hero,.sri-guidance,.sri-rituals,.fx-sankalp,.rm-journey,.pj-muhurat-premium,.rm-explainer) > .site-container,
    body.page-template-template-homepage .fx-home > :is(.fx-hero,.sri-guidance,.sri-rituals,.fx-sankalp,.rm-journey,.pj-muhurat-premium,.rm-explainer) > .site-container{
        width:min(calc(100% - 36px),var(--section-container,1040px))!important;
    }
}
@media(max-width:760px){
    body.home .fx-home,
    body.page-template-template-homepage .fx-home{
        --pj-final-wide:min(calc(100% - 28px),680px);
        --pj-final-content:min(calc(100% - 28px),680px);
    }
    body.home .fx-home > .pj-sacred-gallery,
    body.page-template-template-homepage .fx-home > .pj-sacred-gallery{
        padding-block:clamp(26px,6vw,36px)!important;
    }
    body.home .fx-home > .fx-bottom-zone,
    body.page-template-template-homepage .fx-home > .fx-bottom-zone{
        padding-block:clamp(26px,6vw,36px)!important;
    }
    body.home .fx-home > :is(.fx-hero,.sri-guidance,.sri-rituals,.fx-sankalp,.rm-journey,.pj-muhurat-premium,.rm-explainer) > .site-container,
    body.page-template-template-homepage .fx-home > :is(.fx-hero,.sri-guidance,.sri-rituals,.fx-sankalp,.rm-journey,.pj-muhurat-premium,.rm-explainer) > .site-container{
        width:min(calc(100% - 28px),var(--section-container,680px))!important;
    }
    /* Global Seva artwork is full bleed even on phone, preserving the
       approved center-only picture source and live CTA geometry. */
    body.home .fx-home > .fx-global-image-exact,
    body.page-template-template-homepage .fx-home > .fx-global-image-exact{
        padding-block:0!important;
    }
    body.home .fx-home > .pj-about > .pj-about__layout,
    body.page-template-template-homepage .fx-home > .pj-about > .pj-about__layout{
        width:100%!important;
        max-width:100%!important;
    }
}

@media(prefers-reduced-motion:reduce){
    body.home .fx-home > section,
    body.page-template-template-homepage .fx-home > section{
        scroll-behavior:auto;
    }
}
