/* Southgate Mosque — self-contained cinematic shortcode hero.
   Layer order: image 0, gradient 1, supplied transparent overlay 2,
   content 3, sibling slider controls 4 (isolated under root). */
.sgm-hero {
    --sgm-ink: #073f3f;
    --sgm-gold: #fbbf54;
    --sgm-gold-light: #ffd47d;
    --sgm-white: #fff;
    /* Shared alignment axis for content and desktop pagination. */
    --sgm-hero-content-width: 1140px;
    --sgm-hero-gutter: max(24px, calc((100% - var(--sgm-hero-content-width)) / 2));
    --sgm-hero-height: clamp(590px, 78vh, 795px);
    position: relative;
    isolation: isolate;
    width: 100%;
    overflow: hidden;
    background: #063b3a;
    color: var(--sgm-white);

}
.sgm-hero *, .sgm-hero *::before, .sgm-hero *::after { box-sizing: border-box; }
.sgm-hero__track { position: relative; z-index: 0; }
.sgm-hero__slide {
    position: relative;
    isolation: isolate;
    display: none;
    width: 100%;
    height: var(--sgm-hero-height);
    min-height: 590px;
    overflow: hidden;
    background: #073f3f;
}
.sgm-hero__slide:first-child,
.sgm-hero__track.slick-initialized .sgm-hero__slide { display: block; }
.sgm-hero__media, .sgm-hero__gradient, .sgm-hero__overlay {
    position: absolute;
    inset: 0;
    display: block;
    pointer-events: none;
}
/* Layer 0: dynamic WP featured image */
.sgm-hero__media { z-index: 0; }
.sgm-hero__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: var(--sgm-focal-desktop, 60%) center;
}
/* Layer 1: text-legibility gradient, left -> right */
.sgm-hero__gradient {
    z-index: 1;
    background:
            linear-gradient(0deg, rgba(1, 35, 35, .31), transparent 28%),
            linear-gradient(90deg,
            rgba(2, 44, 44, .96) 0%,
            rgba(3, 56, 55, .88) 27%,
            rgba(4, 62, 59, .62) 45%,
            rgba(4, 53, 51, .25) 69%,
            rgba(3, 40, 39, .07) 100%);
}
/* Layer 2: the EXACT supplied combined teal + gold pattern overlay */
.sgm-hero__overlay {
    z-index: 2;
    opacity: .78;
    background-image: url('teal_islamic_geometric_overlay.png'); /* Fallback for older browsers */
    background-image: image-set(
            url('teal_islamic_geometric_overlay.webp') type('image/webp'),
            url('teal_islamic_geometric_overlay.png') type('image/png')
    );
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;
}
/* Layer 3: readable, clickable content */
.sgm-hero__inner {
    position: relative;
    z-index: 3;
    width: 100%;

    height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;

    max-width: none;
    margin: 0;
    padding-left: var(--sgm-hero-gutter);
    padding-right: var(--sgm-hero-gutter);
}
.sgm-hero__content { width: 100%; max-width: 770px; margin: 0; padding: 0; }
.sgm-hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 24px;
    color: var(--sgm-gold) !important;
    font: 700 14px/1.5 'Rajdhani', 'Nunito Sans', sans-serif;
    letter-spacing: .23em;
    text-transform: uppercase;
}
.sgm-hero__eyebrow::before {
    content: '';
    display: block;
    width: 39px;
    height: 2px;
    flex: 0 0 39px;
    background: currentColor;
}
.sgm-hero .sgm-hero__title {
    margin: 0 0 24px !important;
    padding: 0;
    max-width: 810px;
    color: #fff !important;
    font-size: clamp(45px, 4.15vw, 76px) !important;
    font-weight: 700 !important;
    line-height: 1.02 !important;
    text-align: left !important;
    text-transform: none !important;
    text-shadow: none !important;
}
.sgm-hero__title-main, .sgm-hero__title-highlight { display: block; }
.sgm-hero .sgm-hero__title-highlight { color: var(--sgm-gold-light) !important; }
.sgm-hero__description {
    max-width: 550px;
    margin: 0 0 30px !important;
    color: #f2faf8 !important;

    font-size: clamp(18px, 1.4vw, 23px);
    font-weight: 500;
    line-height: 1.38;
    letter-spacing: .003em;
    text-align: left;
    text-shadow: 0 2px 10px rgba(1, 29, 29, .3);
}
.sgm-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 54px;
    padding: 14px 28px;
    background: var(--sgm-gold);
    border: 1px solid var(--sgm-gold);
    color: #092b2c !important;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2 !important;
    letter-spacing: .055em;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.sgm-hero__cta:hover { background: #ffd477; transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,.18); }
.sgm-hero__cta svg { flex: 0 0 auto; }
.sgm-hero :is(a, button):focus-visible { outline: 3px solid #ffdc92 !important; outline-offset: 5px; }
/* Slider control siblings: visually above every .slick-slide stacking context. */
.sgm-hero__arrows {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}
.sgm-hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    padding: 0!important;
    border: 1px solid rgba(255,255,255,.50);
    border-radius: 50% !important;
    background: rgba(1,38,38,.12);
    color: #fff;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s ease, background .2s ease;
}
.sgm-hero__arrow:hover { border-color: var(--sgm-gold-light); background: rgba(2,44,44,.58); }
.sgm-hero__arrow svg { width: 24px; height: 24px; }
.sgm-hero__arrow--prev { left: clamp(16px, 1.9vw, 38px); }
.sgm-hero__arrow--next { right: clamp(16px, 1.9vw, 38px); }
.sgm-hero__pagination {
    position: absolute;
    left: var(--sgm-hero-gutter);
    bottom: 38px;
    z-index: 4;
    max-width: calc(100% - 2 * var(--sgm-hero-gutter));
}
.sgm-hero__pagination ul.slick-dots {
    position: static !important;
    inset: auto !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap;
    gap: 8px;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    text-align: left;
}
.sgm-hero__pagination .slick-dots li {
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}
.sgm-hero__pagination .slick-dots li::before,
.sgm-hero__pagination .slick-dots li button::before,
.sgm-hero__pagination .slick-dots li button::after { display: none !important; content: none !important; }
.sgm-hero__pagination .slick-dots .sgm-hero__page {
    display: inline-flex !important;
    width: auto !important;
    height: 44px !important;
    padding: 0 !important;
    align-items: center;
    gap: 14px;
    border: 0 !important;
    background: none !important;
    color: rgba(255,255,255,.55) !important;
    box-shadow: none !important;
    cursor: pointer;
    font-weight: 700 !important;
    font-size: 16px !important;
    line-height: 1 !important;

    letter-spacing: .035em;
}
.sgm-hero__page-line {
    display: block;
    width: 0;
    height: 3px;
    overflow: hidden;
    background: var(--sgm-gold-light);
    transition: width .25s ease;
}
.sgm-hero__pagination .slick-dots li.slick-active .sgm-hero__page { color: #fff !important; }
.sgm-hero__pagination .slick-dots li.slick-active .sgm-hero__page-line { width: 58px; }
/* Avoid global theme carousel dots/styles leaking into this specific shortcode. */
.sgm-hero .slick-slider { margin: 0; }
.sgm-hero .slick-list, .sgm-hero .slick-track { height: 100%; }
@media (min-width: 768px) and (max-width: 1199px) {
    .sgm-hero { --sgm-hero-gutter: clamp(65px, 9vw, 110px); --sgm-hero-height: 630px; }
    .sgm-hero .sgm-hero__title { font-size: clamp(43px, 5.5vw, 64px) !important; }
    .sgm-hero__content { max-width: min(670px, 76%); }
}
@media (max-width: 767px) {
    .sgm-hero { --sgm-hero-gutter: 24px; --sgm-hero-height: clamp(560px, 78svh, 720px); }
    .sgm-hero__slide { height: var(--sgm-hero-height); min-height: 560px; }
    .sgm-hero__image { object-position: var(--sgm-focal-mobile, 68%) center; }
    .sgm-hero__gradient {
        background: linear-gradient(0deg,
        rgba(2,44,44,.99) 0%,
        rgba(2,44,44,.94) 25%,
        rgba(3,56,55,.80) 52%,
        rgba(3,40,39,.20) 100%);
    }
    .sgm-hero__overlay {
        opacity: .4;
        background-size: cover;
        background-position: left center;
    }
    .sgm-hero__inner {
        justify-content: flex-end;
        padding: 60px var(--sgm-hero-gutter) 105px;
    }
    .sgm-hero__content { width: 100%; max-width: 100%; }
    .sgm-hero__eyebrow { margin-bottom: 15px; font-size: 12px; gap: 12px; }
    .sgm-hero__eyebrow::before { width: 28px; flex-basis: 28px; }
    .sgm-hero .sgm-hero__title {
        max-width: 540px;
        margin-bottom: 16px !important;
        font-size: clamp(36px, 9vw, 54px) !important;
        line-height: 1.04 !important;
    }
    .sgm-hero__description {
        margin-bottom: 22px !important;
        font-size: clamp(16px, 4vw, 18px);
        line-height: 1.35;
    }
    .sgm-hero__cta { min-height: 50px; padding: 12px 20px; font-size: 14px !important; }
    .sgm-hero__arrows { display: none; }
    .sgm-hero__pagination {
        left: 0;
        right: 0;
        bottom: 21px;
        max-width: 100%;
        display: flex;
        justify-content: center;
        padding: 0 15px;
    }
    .sgm-hero__pagination ul.slick-dots { justify-content: center; }
    .sgm-hero__pagination .slick-dots .sgm-hero__page { gap: 7px; font-size: 14px !important; }
    .sgm-hero__pagination .slick-dots li.slick-active .sgm-hero__page-line { width: 36px; }
}
@media (max-width: 360px) {
    .sgm-hero { --sgm-hero-gutter: 19px; --sgm-hero-height: max(610px, 85svh); }
    .sgm-hero__inner { padding-bottom: 89px; }
    .sgm-hero .sgm-hero__title { font-size: 34px !important; }
    .sgm-hero__description { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .sgm-hero *, .sgm-hero *::before, .sgm-hero *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

