/* 3.17.3.4 — approved HOME refinements. Uses the 3.17.3 source and artwork only. */

/* Put every existing section-level “View all” action into the final content row,
   aligned to the physical left edge while keeping its Persian RTL text. */
:where(body.uirh-home-layout-317) .irhp-widget-scope.irhp-widget-scope[data-uirh-native] section.irhp-section > .see-all-wrap {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: clamp(12px, 1.6vw, 22px) 0 0 !important;
    direction: rtl !important;
    text-align: left !important;
    justify-self: stretch !important;
    align-self: start !important;
    float: none !important;
}

/* Keep the existing hero-art aspect ratio; align its lower edge with the quick routes panel. */
@media (min-width: 900px) {
    :where(body.uirh-home-layout-317) .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero > .hero-art {
        align-self: end !important;
        margin-bottom: 0 !important;
    }
    :where(body.uirh-home-layout-317) .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero > .quick-panel {
        align-self: end !important;
        margin-bottom: 0 !important;
    }
}

/* Use the actual teal lattice from the 3.17.3 backgrounds as a restrained,
   non-repeating accent on light sections; preserve the original cream texture. */
:where(body.uirh-home-layout-317) .irhp-widget-scope.irhp-widget-scope[data-uirh-native] section.irhp-section.section-texture-cream::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: -1 !important;
    pointer-events: none !important;
    background-image: url('../patterns/home-teal-extracted-reference.webp');
    background-size: clamp(260px, 46vw, 660px) auto;
    background-repeat: no-repeat;
    background-position: left top;
    opacity: .14;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.78) 0%, rgba(0,0,0,.34) 38%, transparent 58%);
    mask-image: linear-gradient(to right, rgba(0,0,0,.78) 0%, rgba(0,0,0,.34) 38%, transparent 58%);
}

:where(body.uirh-home-layout-317) .irhp-widget-scope.irhp-widget-scope[data-uirh-native] section.irhp-section.section-texture-cream.ecosystem::after,
:where(body.uirh-home-layout-317) .irhp-widget-scope.irhp-widget-scope[data-uirh-native] section.irhp-section.section-texture-cream.events::after {
    background-position: right top;
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,.78) 0%, rgba(0,0,0,.34) 38%, transparent 58%);
    mask-image: linear-gradient(to left, rgba(0,0,0,.78) 0%, rgba(0,0,0,.34) 38%, transparent 58%);
}

:where(body.uirh-home-layout-317) .irhp-widget-scope.irhp-widget-scope[data-uirh-native] section.irhp-section.section-texture-cream.activity::after,
:where(body.uirh-home-layout-317) .irhp-widget-scope.irhp-widget-scope[data-uirh-native] section.irhp-section.section-texture-cream.interactions::after {
    background-position: left bottom;
}

/* Pixel-extracted layers from the user-supplied reference (405×440 source canvas).
   The plugin's own shrine photo remains the image; only its window mask and frame change.
   The 405:440 layers scale to the established Hero art height without changing the page grid. */
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero-art > .hero-frame-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 1 !important;
    filter: none !important;
    box-shadow: none !important;
    pointer-events: none !important;
}

body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero-art > .hero-photo-window {
    position: absolute !important;
    top: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 114.330144% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 405 / 440 !important;
    transform: translateX(-50%) !important;
    z-index: 0 !important;
    overflow: hidden !important;
    -webkit-mask: url('../reference-crops/home-hero-reference-photo-window-mask.png') center / 100% 100% no-repeat !important;
    mask: url('../reference-crops/home-hero-reference-photo-window-mask.png') center / 100% 100% no-repeat !important;
    -webkit-mask-image: url('../reference-crops/home-hero-reference-photo-window-mask.png') !important;
    mask-image: url('../reference-crops/home-hero-reference-photo-window-mask.png') !important;
    -webkit-mask-size: 100% 100% !important;
    mask-size: 100% 100% !important;
    -webkit-mask-position: center center !important;
    mask-position: center center !important;
    -webkit-mask-repeat: no-repeat !important;
    mask-repeat: no-repeat !important;
    mask-mode: alpha !important;
}

body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero-art > .hero-photo-window > .hero-photo {
    position: absolute !important;
    left: 8.148148% !important;
    top: 8.409091% !important;
    width: 83.456790% !important;
    height: 86.590909% !important;
    display: block !important;
    object-fit: cover !important;
    object-position: var(--hero-focus-x, 50%) var(--hero-focus-y, 50%) !important;
    border: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    transform: none !important;
}

body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero-art > .hero-arch-frame {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 114.330144% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 405 / 440 !important;
    transform: translateX(-50%) !important;
    z-index: 2 !important;
    margin: 0 !important;
    padding: 0 !important;
    background-image: url('../reference-crops/home-hero-reference-frame-inner.png'), url('../reference-crops/home-hero-reference-frame-outer.png') !important;
    background-size: 100% 100%, 100% 100% !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position: center center, center center !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    filter: none !important;
    box-shadow: none !important;
    pointer-events: none !important;
    user-select: none !important;
}

body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero-art > .hero-play-badge {
    z-index: 3 !important;
}

/* Pixel-extracted side ornaments from the supplied reference, kept as two independent layers.
   They sit outside the current photo arch; the native video button remains on top with its hover. */
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero-art > .hero-frame-ornament {
    display: block !important;
    position: absolute !important;
    top: auto !important;
    bottom: 2.8% !important;
    width: clamp(34px, 4.8vw, 70px) !important;
    height: auto !important;
    aspect-ratio: 70 / 161 !important;
    margin: 0 !important;
    padding: 0 !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 100% 100% !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    filter: none !important;
    box-shadow: none !important;
    transition: none !important;
    pointer-events: none !important;
    user-select: none !important;
    z-index: 1 !important;
}

body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero-art > .hero-frame-ornament-left {
    left: auto !important;
    right: calc(100% + 3px) !important;
    background-image: url('../reference-crops/home-hero-reference-ornament-left.png') !important;
}

body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero-art > .hero-frame-ornament-right {
    left: calc(100% + 2px) !important;
    right: auto !important;
    aspect-ratio: 70 / 160 !important;
    background-image: url('../reference-crops/home-hero-reference-ornament-right.png') !important;
}

@media (max-width: 1179px) {
    body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero-art > .hero-frame-ornament {
        width: clamp(32px, 3.4vw, 40px) !important;
    }
}

@media (max-width: 899px) {
    body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero-art > .hero-frame-ornament {
        width: clamp(24px, 3vw, 28px) !important;
    }
}

@media (max-width: 699px) {
    body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero-art > .hero-frame-ornament {
        width: clamp(22px, 7.7vw, 30px) !important;
    }
}


/* ============================================================================
   3.18.0 — frame, corners and centre mark
   ----------------------------------------------------------------------------
   1. The hero mihrab now fills the headline-to-quick-panel column instead of
      floating in the middle of it, so the empty band above the arch is gone.
   2. One corner language for every boxed card: the approved gold arabesque that
      the two project panels already carry, cropped from that same approved file.
   3. The ecosystem medallion carries the centre mark re-inked in cream on the
      disc itself — no white plate, no gold hairline box.
   ========================================================================= */

/* -- 1. Hero frame: same lower edge as the quick routes panel, top edge level
      with the headline block. The frame grows instead of merely sliding up, so
      no dead band is left above or below it. ------------------------------- */
@media (min-width: 900px) {
    body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero > .hero-art {
        /* Fill the full headline-to-quick-panel span: the frame's height follows
           the column, its width follows the approved 475:590 silhouette. Its top
           edge lands level with the headline and its bottom edge with the quick
           routes panel, at every viewport width, with no empty band above. */
        align-self: stretch !important;
        justify-self: center !important;
        height: 100% !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 auto !important;
    }
}

/* -- 2. Approved corner engraving on every card and box. ------------------- */
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .works-reference .project-panel::before {
    content: '' !important;
    display: block !important;
    visibility: visible !important;
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: -1 !important;
    width: auto !important;
    height: auto !important;
    border: 43px solid transparent !important;
    border-image-source: url('../reference-crops/home-works-panel-frame-hq.png') !important;
    border-image-slice: 232 !important;
    border-image-width: 43px !important;
    border-image-outset: 0 !important;
    border-image-repeat: stretch !important;
    border-radius: inherit !important;
    background: none !important;
    opacity: 1 !important;
    filter: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
    pointer-events: none !important;
}

/* The crop is the panel frame's own corner, so the engraving matches exactly:
   four quadrants, one per physical corner, at a size that stays legible on the
   smallest card and never scales with the card's height. */
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] :is(.eco-arc .eco-card, .activity .news-card, .events .news-card, .event-card, .interactions .interaction-card)::before {
    content: '' !important;
    display: block !important;
    visibility: visible !important;
    position: absolute !important;
    inset: 4px !important;
    top: 4px !important;
    right: 4px !important;
    bottom: 4px !important;
    left: 4px !important;
    z-index: 2 !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: inherit !important;
    background-color: transparent !important;
    background-image: url('../reference-crops/card-corner-1.png'), url('../reference-crops/card-corner-2.png'), url('../reference-crops/card-corner-3.png'), url('../reference-crops/card-corner-4.png') !important;
    background-position: left top, right top, left bottom, right bottom !important;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat !important;
    background-size: clamp(20px, 2.05vw, 30px) auto !important;
    opacity: 1 !important;
    filter: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
    pointer-events: none !important;
}

/* The interaction card was the only card family without a positioning context,
   which let its engraving escape to the section box. */
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .interactions .interaction-card {
    position: relative !important;
}

/* Taller boxes get a slightly larger engraving so the line weight reads the same. */
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] :is(.eco-arc .eco-card, .event-card)::before {
    background-size: clamp(22px, 2.3vw, 34px) auto !important;
}

@media (max-width: 699px) {
    body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] :is(.eco-arc .eco-card, .activity .news-card, .events .news-card, .event-card, .interactions .interaction-card)::before {
        background-size: 18px auto !important;
    }
}

/* Miniature route tiles keep the simpler static brackets: a full engraving at
   that size turns into noise. */
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero .quick-item::after {
    content: '' !important;
    display: block !important;
    visibility: visible !important;
    position: absolute !important;
    inset: 5px !important;
    top: 5px !important;
    right: 5px !important;
    bottom: 5px !important;
    left: 5px !important;
    z-index: 3 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: inherit !important;
    background:
        linear-gradient(#d8c28f, #d8c28f) left top / 12px 1px no-repeat,
        linear-gradient(#d8c28f, #d8c28f) left top / 1px 12px no-repeat,
        linear-gradient(#d8c28f, #d8c28f) right top / 12px 1px no-repeat,
        linear-gradient(#d8c28f, #d8c28f) right top / 1px 12px no-repeat,
        linear-gradient(#d8c28f, #d8c28f) left bottom / 12px 1px no-repeat,
        linear-gradient(#d8c28f, #d8c28f) left bottom / 1px 12px no-repeat,
        linear-gradient(#d8c28f, #d8c28f) right bottom / 12px 1px no-repeat,
        linear-gradient(#d8c28f, #d8c28f) right bottom / 1px 12px no-repeat !important;
    opacity: 1 !important;
    filter: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
    pointer-events: none !important;
}

/* The older pair of SVG flourishes is superseded by the engraving above. */
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native][data-uirh-native] :is(.activity, .events) .news-body,
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native][data-uirh-native] .interaction-card {
    background-image: none !important;
    background-size: auto !important;
    background-repeat: repeat !important;
    background-position: 0 0 !important;
}

body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native][data-uirh-native] .hero .quick-item {
    background-image: none !important;
    background-size: auto !important;
    background-repeat: repeat !important;
    background-position: 0 0 !important;
}

body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native][data-uirh-native] .hero .quick-item.is-selected {
    background-image: url('../patterns/home-teal-extracted-reference.webp') !important;
    background-size: 1220px 204px !important;
    background-repeat: repeat !important;
    background-position: center center !important;
}

/* -- 3. Ecosystem centre: the supplied mark, re-inked in the section's own
      cream and knocked out of the disc — the ground behind the letters is the
      medallion's own gradient, so the logo and its background are one colour
      system instead of a white sticker. ----------------------------------- */
/* A custom image chosen in Elementor keeps its light plate so any artwork stays
   legible; only the default centre mark melts into the medallion. */
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .eco-medallion-logo:not(.is-brand-lockup) {
    position: absolute !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    display: block !important;
    width: auto !important;
    height: 82% !important;
    max-width: 70% !important;
    max-height: 82% !important;
    margin: 0 !important;
    border: 1px solid #c6b078 !important;
    border-radius: 6px !important;
    background: #fff !important;
    box-shadow: 0 4px 10px rgba(3, 30, 36, .20) !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: translate(-50%, -50%) !important;
}

body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .eco-medallion-logo.is-brand-lockup {
    position: absolute !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    display: block !important;
    width: auto !important;
    height: 76% !important;
    max-width: 78% !important;
    max-height: 76% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    filter: drop-shadow(0 2px 7px rgba(3, 30, 36, .28)) !important;
    transform: translate(-50%, -50%) !important;
}

/* 3.29.1 — user-requested HOME shrine size/alignment only.
   Keep the original image, 475:590 art ratio and coincident photo/frame layers.
   Desktop lower edge stays aligned with the quick routes panel. */
@media(min-width:900px){
 body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero>.hero-art{
  align-self:end!important;justify-self:center!important;height:86%!important;
  width:auto!important;max-width:none!important;margin:0 auto!important;
 }
}
@media(min-width:700px) and (max-width:899px){
 body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero>.hero-art{
  width:86%!important;height:auto!important;justify-self:center!important;align-self:center!important;
 }
}
@media(max-width:699px){
 body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] .hero>.hero-art{
  width:86%!important;max-width:284px!important;height:auto!important;justify-self:center!important;margin-inline:auto!important;
 }
}

/* 3.29.2 — leave a real paper margin for both upper corner engravings.
   Resize the photo window, not the ornament, and retain its 16:9 crop. */
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] :is(.activity,.events) :is(.news-card,.event-card){
 --card-corner-clear:clamp(20px,2.05vw,30px);
}
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] :is(.activity,.events) :is(.news-card,.event-card)>.card-image-link{
 display:block!important;position:relative!important;flex:none!important;
 width:calc(100% - 36px)!important;height:auto!important;min-height:0!important;
 margin:calc(var(--card-corner-clear) + 10px) 18px 0!important;
}
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] :is(.activity,.events) :is(.news-card,.event-card)>.card-image-link .card-media{
 display:block!important;width:100%!important;height:auto!important;aspect-ratio:16/9!important;overflow:hidden!important;
}
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] :is(.activity,.events) :is(.news-card,.event-card)>.card-image-link .card-media img{
 display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;
}
@media(max-width:699px){
 body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] :is(.activity,.events) :is(.news-card,.event-card){--card-corner-clear:18px}
}

/* 3.33.2 — restore the ORIGINAL dark pattern above the existing teal ground.
   The old artwork-008 override selected only the ground and omitted the lattice. */
body.uirh-home-layout-317 .irhp-widget-scope.irhp-widget-scope[data-uirh-native] :is(.hero,.works.works-reference,.site-footer.section-texture-dark){
    background-color:#003c45!important;
    background-image:url('../patterns/dark-web-tile.webp'),url('../patterns/home-works-reference-background.webp')!important;
    background-size:1038px 117px,1022px 596px!important;
    background-repeat:repeat,repeat!important;
    background-position:left top,left top!important;
}
