/* Homepage hero (16 Oct 2026): the welcome on ivory beside the real exterior photograph, which sits behind a
   diagonal with a thin gold edge. No poster carousel: the weekly classes follow straight after, and Coming up
   is in the prayer banner.
   Desktop (1024px+): welcome on the left, vertically centred; the photograph fills the right of the section.
   Below 1024px: the photograph (slanted lower edge), then the welcome.
   Loaded after styles.css; overrides only what the layout needs. */

.hero-two-column {
    --hero-col: min(460px, 44vw);          /* width of the welcome column (title is ~440px) */
    --hero-gap: clamp(28px, 3vw, 48px);    /* column to the top of the diagonal */
    --hero-slant: clamp(80px, 8vw, 130px); /* horizontal run of the diagonal */
    --hero-slant-m: 34px;                  /* vertical run of the mobile slant */
    --hero-edge: 4px;                      /* gold line along the diagonal */
    margin-top: 0; /* always directly under the prayer banner, whatever sits between them in the markup */
    padding: 24px 0 28px;
    background: var(--cream);
}

/* No geometric pattern: the photograph carries the texture. */
.hero-two-column::before {
    display: none;
}

.hero-two-column .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* styles.css centres hero items */
    gap: 20px;
    position: static; /* the photograph positions against the section */
    max-width: var(--hero-col);
}

/* ---------- Welcome ---------- */

.hero-two-column .hero-welcome::before {
    display: none; /* the gold rule moves inline with the eyebrow */
}

.hero-two-column .hero-welcome .welcome-title {
    font-size: clamp(2rem, 2.8vw, 2.5rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--emerald-deep);
    margin-bottom: 6px;
}

.hero-two-column .hero-welcome .welcome-title::after {
    display: none;
}

.hero-two-column .welcome-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--emerald);
}

.hero-two-column .welcome-eyebrow::before {
    content: '';
    width: 32px;
    height: 2px;
    background: var(--gold);
}

.hero-two-column .welcome-name {
    display: block;
}

.hero-two-column .hero-welcome .welcome-mosque-name {
    font-size: clamp(1.25rem, 1.6vw, 1.4rem);
    letter-spacing: 0.01em;
    margin-bottom: 8px;
}

.hero-two-column .hero-welcome .welcome-subtitle {
    font-size: 1rem;
    line-height: 1.5;
    max-width: 44ch;
    margin-bottom: 16px;
}

.hero-two-column .hero-welcome .welcome-buttons {
    gap: 12px;
}

.hero-two-column .welcome-buttons .btn {
    padding: 0.75rem 1.5rem;
}

/* ---------- Photograph ---------- */

.hero-photo {
    margin: 0;
    background: var(--gold); /* shows through as the gold edge */
}

.hero-photo-frame {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Desktop ---------- */

@media (min-width: 1024px) {
    /* A calm block of about 420px: on a 1280x680 laptop the weekly classes start at the fold. */
    .hero-two-column {
        display: flex;
        align-items: center;
        min-height: clamp(380px, 54vh, 500px);
        padding: 40px 0;
    }

    .hero-two-column > .container {
        width: 100%;
    }

    .hero-photo {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        /* container content edge + column + gap */
        left: calc(max(0px, (100% - var(--container-max)) / 2) + var(--space-lg) + var(--hero-col) + var(--hero-gap));
        clip-path: polygon(0 0, 100% 0, 100% 100%, var(--hero-slant) 100%);
    }

    .hero-photo-frame {
        clip-path: polygon(var(--hero-edge) 0, 100% 0, 100% 100%, calc(var(--hero-slant) + var(--hero-edge)) 100%);
    }

    /* Keep the sky so the sign has breathing room; crop from the left, where the gate is. */
    .hero-photo img {
        object-position: 72% 0;
    }
}

/* ---------- Tablet and phone ---------- */

@media (max-width: 1023.98px) {
    /* The photograph, then the welcome. */
    .hero-two-column {
        padding: 0 0 36px;
    }

    .hero-two-column .hero-grid {
        max-width: none;
        gap: 0;
    }

    .hero-two-column .hero-welcome {
        order: 2;
        width: 100%;
        max-width: 480px;
        margin: 4px auto 0;
        text-align: left;
    }

    .hero-photo {
        order: 1;
        position: relative;
        height: clamp(210px, 56vw, 380px);
        margin: 0 calc(-1 * var(--space-lg)) 0;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - var(--hero-slant-m)));
    }

    .hero-photo-frame {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--hero-edge)), 0 calc(100% - var(--hero-slant-m) - var(--hero-edge)));
    }

    .hero-photo img {
        object-position: 62% 30%;
    }

    .hero-two-column .hero-welcome .welcome-subtitle {
        margin-left: 0;
    }

    .hero-two-column .hero-welcome .welcome-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-two-column .hero-welcome .welcome-title {
        font-size: clamp(1.9rem, 8.4vw, 2.3rem);
    }

    .hero-two-column .welcome-buttons .btn {
        flex: 1 1 0;
        padding: 0.8rem 1rem;
    }
}
