/* =========================================================
   Home page — safabrura.co.il
   ========================================================= */

/* The theme pads every page generously; the home page opens with a card,
   so that padding just reads as a gap at the top and a hole at the bottom. */
body.page-template-homepage-v2 #content {
    padding: 0 1em;
}
body.page-template-homepage-v2 #content-wrap {
    padding-top: 18px;
    padding-bottom: 0;
}

.home {
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding-bottom: 8px;
    font-family: var(--safa-ui);
    color: var(--hd-ink);
}

/* ---------- Rows ---------- */

/* The welcome leads; the broadcast sits beside it in the narrower column */
.home__top {
    display: grid;
    grid-template-columns: 60fr 40fr;
    gap: 20px;
    align-items: stretch;
}

/* The editor's words beside the two standing offers */
.home__split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}
.home__split--wide {
    grid-template-columns: 1fr;
}

/* ---------- Shared bits ---------- */

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 999px;
    font-family: var(--safa-ui);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary {
    color: #fff;
    background: linear-gradient(120deg, var(--hd-accent), var(--hd-accent-2));
    box-shadow: 0 6px 18px rgba(194, 88, 143, .30);
}
.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(194, 88, 143, .40);
    color: #fff;
}
.btn--ghost {
    color: var(--hd-ink);
    background: rgba(255, 255, 255, .85);
    border: 1px solid var(--hd-line);
}
.btn--ghost:hover {
    transform: translateY(-2px);
    color: var(--hd-accent);
    border-color: rgba(194, 88, 143, .35);
}

.section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--hd-line);
}
.section__title {
    margin: 0;
    font-family: var(--safa-display);
    font-size: 27px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--hd-ink);
}
.section__note {
    margin: 4px 0 0;
    font-size: 14.5px;
    color: var(--hd-ink-soft);
}
.section__tools {
    display: flex;
    align-items: center;
    gap: 8px;
}
.section__more {
    font-size: 15px;
    color: var(--hd-accent);
    text-decoration: none;
    white-space: nowrap;
}
.section__more:hover {
    text-decoration: underline;
}

/* One section's link is an invitation rather than a footnote, so it wears the
   site's button. The colour has to be restated: .section__more sits later in
   this file than .btn--primary and would otherwise pull the text back to pink
   on a pink ground. */
.section__more.btn {
    padding: 9px 22px;
    font-size: 15px;
    color: #fff;
}
.section__more.btn:hover {
    color: #fff;
    text-decoration: none;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 52px 40px 56px;
    border: 1px solid rgba(92, 42, 77, .09);
    border-radius: 28px;
    background: linear-gradient(155deg, #fdf5fa 0%, #f7f1fc 48%, #fff6f0 100%);
    text-align: center;
}
.hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .55;
    pointer-events: none;
}
.hero__glow--a {
    width: 420px;
    height: 420px;
    top: -180px;
    inset-inline-start: -120px;
    background: radial-gradient(circle, #ffd6e4 0%, transparent 70%);
}
.hero__glow--b {
    width: 460px;
    height: 460px;
    bottom: -220px;
    inset-inline-end: -140px;
    background: radial-gradient(circle, #e2d1f7 0%, transparent 70%);
}
.hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}
.hero__eyebrow {
    margin: 10px 0 0;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .06em;
    color: var(--hd-accent);
}
.hero__title {
    margin: 0;
    font-family: var(--safa-display);
    font-size: clamp(30px, 3.4vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--hd-ink);
    text-wrap: balance;
}
.hero__lead {
    margin: 18px auto 0;
    max-width: 52ch;
    font-size: 17px;
    line-height: 1.75;
    color: var(--hd-ink-soft);
}
.hero__lead p {
    margin: 0 0 10px;
}
.hero__lead p:last-child {
    margin-bottom: 0;
}
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
}

/* The closing line of the welcome */
.hero__welcome {
    margin-top: 14px !important;
    font-family: var(--safa-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--hd-accent);
}

/* With a portrait the hero becomes two columns and the text goes flush */
.hero__inner--split {
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 40px;
    text-align: right;
}
.hero__inner--split .hero__lead {
    margin-inline: 0;
}
.hero__inner--split .hero__actions {
    justify-content: flex-start;
}
.hero__portrait img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(92, 42, 77, .20);
}

/* ---------- Live ---------- */

.live {
    position: relative;
    /* so the photo below can sit above the box's own gradient, under the text */
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(92, 42, 77, .09);
    border-radius: 24px;
    background: linear-gradient(150deg, #fdf6fa 0%, #f8f4fd 60%, #fff7f2 100%);
    box-shadow: 0 2px 12px rgba(92, 42, 77, .05);
}
/* The room a broadcast comes from, behind the box that announces one. The
   file is already mirrored, so the fade here reads the way it looks: full
   strength at the left edge, gone by the right, where the Hebrew text starts
   and needs a clean ground. */
.live::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url("../images/live-background.jpg") center / cover no-repeat;
    opacity: .4;
    -webkit-mask-image: linear-gradient(to right, #000 0%, rgba(0, 0, 0, .45) 48%, transparent 82%);
            mask-image: linear-gradient(to right, #000 0%, rgba(0, 0, 0, .45) 48%, transparent 82%);
    pointer-events: none;
}

.live--live {
    border-color: rgba(194, 88, 143, .35);
    background: linear-gradient(150deg, #fff1f6 0%, #fbeaf6 55%, #fff3ec 100%);
    box-shadow: 0 14px 40px rgba(194, 88, 143, .16);
}
.live__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    padding: 32px 30px;
}

/* A ribbon across the top edge of the box, naming what the box is */
.live__ribbon {
    display: block;
    flex: none;
    padding: 12px 30px 14px;
    /* the one label on the page that should sound like a hand wrote it */
    font-family: var(--safa-marker);
    /* an outline face, so it carries more size than a solid one would */
    font-size: clamp(25px, 2.5vw, 31px);
    font-weight: 400;
    line-height: 1.15;
    /* the hatch already leaves air between letters; more would loosen it */
    letter-spacing: 0;
    color: #fff;
    text-align: center;
    background: linear-gradient(100deg, var(--hd-accent) 0%, var(--hd-accent-2) 55%, #e08a5a 100%);
    box-shadow: 0 4px 14px rgba(146, 60, 120, .22);
}
.live--live .live__ribbon {
    background: linear-gradient(100deg, #d6396b 0%, #c2588f 60%, #e08a5a 100%);
}

.live__flag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 15px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .02em;
    color: #fff;
    background: linear-gradient(120deg, #d6396b, #c2588f);
    box-shadow: 0 6px 16px rgba(214, 57, 107, .28);
}
.live__flag--soon {
    color: var(--hd-accent);
    background: rgba(194, 88, 143, .10);
    box-shadow: none;
}
.live__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: safa-pulse 1.6s ease-in-out infinite;
}
@keyframes safa-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .45; transform: scale(.8); }
}
.live__title {
    margin: 0;
    font-family: var(--safa-display);
    font-size: 25px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--hd-ink);
    text-wrap: balance;
}
.live__note,
.live__when {
    margin: 0;
    font-size: 16px;
    color: var(--hd-ink-soft);
}
.live__when {
    font-weight: 500;
    color: var(--hd-ink);
}
.live__sep {
    padding: 0 6px;
    opacity: .5;
}
.live__countdown {
    margin: 0;
    font-size: 14.5px;
    color: var(--hd-accent);
    font-variant-numeric: tabular-nums;
    min-height: 1.5em;
}
.live__body .btn {
    margin-top: 8px;
}

.live__media {
    position: relative;
    flex: none;
    aspect-ratio: 16 / 10;
    max-height: 260px;
}
.live__media img,
.live__media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.live__badge {
    position: absolute;
    top: 16px;
    inset-inline-start: 16px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #fff;
    background: rgba(214, 57, 107, .92);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

/* ---------- Carousel ---------- */

.carousel {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    /* a carousel, not a scrolling strip — the scrollbar stays out of it */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.carousel::-webkit-scrollbar {
    display: none;
}
.carousel.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
}
.carousel__track {
    display: flex;
    gap: 16px;
}
.carousel .short {
    scroll-snap-align: start;
}
.carousel.is-dragging .short {
    /* keep the drag from turning into a drag-the-image gesture */
    pointer-events: none;
}

.carousel__nav {
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--hd-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease, opacity .2s ease;
}
/* Chevrons are drawn, not typed: the angle-quote characters mirror
   themselves in an RTL paragraph and end up pointing the wrong way. */
.carousel__nav::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    border-top: 1.6px solid currentColor;
    border-right: 1.6px solid currentColor;
    transform: translate(-50%, -50%) rotate(45deg);
    margin-left: -2px;
}
.carousel__nav--next::before {
    transform: translate(-50%, -50%) rotate(-135deg);
    margin-left: 2px;
}
.carousel__nav:hover:not([disabled]) {
    color: var(--hd-accent);
    border-color: rgba(194, 88, 143, .35);
    background: rgba(194, 88, 143, .06);
}
.carousel__nav[disabled] {
    opacity: .3;
    cursor: default;
}

.carousel__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}
.carousel__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(92, 42, 77, .18);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: width .2s ease, background-color .2s ease;
}
.carousel__dot.is-current {
    width: 22px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--hd-accent), var(--hd-accent-2));
}

/* ---------- Rails (the editor's slider) ---------- */

.rail {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(194, 88, 143, .35) transparent;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar {
    height: 6px;
}
.rail::-webkit-scrollbar-thumb {
    background: rgba(194, 88, 143, .3);
    border-radius: 999px;
}
.rail::-webkit-scrollbar-track {
    background: transparent;
}

/* Shorts are shot vertically, so the cards are too */
.short {
    flex: 0 0 auto;
    width: 285px;
    scroll-snap-align: start;
    text-decoration: none;
    color: var(--hd-ink);
}
.short__media {
    position: relative;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border: 1px solid rgba(92, 42, 77, .09);
    border-radius: 18px;
    background: linear-gradient(160deg, #f6eef6 0%, #efe9f8 100%);
    box-shadow: 0 2px 10px rgba(92, 42, 77, .06);
    transition: transform .22s ease, box-shadow .22s ease;
}
.short:hover .short__media {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(92, 42, 77, .18);
}
.short__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.short__play {
    position: absolute;
    inset-block-end: 12px;
    inset-inline-end: 12px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.short__play svg {
    width: 13px;
    height: 13px;
    fill: var(--hd-accent);
    transform: scaleX(-1);
}
.short__title {
    margin: 10px 2px 0;
    font-family: var(--safa-ui);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--hd-ink);
}
.short:hover .short__title {
    color: var(--hd-accent);
}

.rail--wide .rail__item {
    flex: 0 0 auto;
    width: min(100%, 760px);
    scroll-snap-align: center;
}
.rail--wide img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
}

/* ---------- Weekly + subscribe ---------- */

.duo {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
}
/* With no text beside them the two offers sit side by side instead */
.home__split--wide .duo {
    grid-template-rows: none;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.duo__card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 26px 30px;
    border: 1px solid rgba(92, 42, 77, .09);
    border-radius: 22px;
    background: linear-gradient(160deg, #fdf6fa 0%, #f8f4fd 58%, #fff7f2 100%);
    box-shadow: 0 2px 12px rgba(92, 42, 77, .05);
    text-decoration: none;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.duo__card:hover {
    transform: translateY(-3px);
    border-color: rgba(194, 88, 143, .3);
    box-shadow: 0 16px 36px rgba(92, 42, 77, .13);
}
.duo__card--accent {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--hd-accent) 0%, var(--hd-accent-2) 100%);
    box-shadow: 0 10px 28px rgba(194, 88, 143, .28);
}
.duo__title {
    margin: 0;
    font-family: var(--safa-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--hd-ink);
}
.duo__card--accent .duo__title {
    color: #fff;
}
.duo__note {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--hd-ink-soft);
}
.duo__card--accent .duo__note {
    color: rgba(255, 255, 255, .9);
}
.duo__cta {
    margin-top: 10px;
    font-size: 15.5px;
    font-weight: 500;
    color: var(--hd-accent);
}
.duo__card--accent .duo__cta {
    color: #fff;
}
.duo__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.duo__cta::after {
    content: "";
    width: 7px;
    height: 7px;
    border-top: 1.6px solid currentColor;
    border-left: 1.6px solid currentColor;
    transform: rotate(-45deg);
    /* points the way the language reads */
}

/* ---------- Video ---------- */

.videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.video {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(92, 42, 77, .09);
    border-radius: 18px;
    background: #000;
    box-shadow: 0 2px 12px rgba(92, 42, 77, .06);
}
.video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- The editor's own words ---------- */

.words {
    display: flex;
    align-items: center;
    padding: 34px 38px;
    border: 1px solid rgba(92, 42, 77, .09);
    border-radius: 22px;
    background: linear-gradient(160deg, #fdf7fa 0%, #f9f5fd 100%);
}
.words__inner {
    max-width: 52ch;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.9;
    color: var(--hd-ink-soft);
    text-align: center;
}
.words__inner p {
    margin: 0 0 14px;
}
.words__inner p:last-child {
    margin-bottom: 0;
}

/* ---------- Editor banners ---------- */

.banners {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.banner img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 20px;
    transition: transform .22s ease, box-shadow .22s ease;
}
.banner:hover img {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(92, 42, 77, .16);
}

.home__button {
    text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
    .home__top,
    .home__split {
        grid-template-columns: 1fr;
    }
    .hero {
        padding: 48px 32px 52px;
    }
    .live__media {
        aspect-ratio: 21 / 9;
    }
}

@media (max-width: 780px) {
    .hero__inner--split {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 28px;
    }
    .hero__inner--split .hero__lead {
        margin-inline: auto;
    }
    .hero__inner--split .hero__actions {
        justify-content: center;
    }
    .hero__portrait {
        order: -1;
    }
    .hero__portrait img {
        max-height: 280px;
    }
}

@media (max-width: 600px) {
    .home {
        gap: 40px;
    }
    .words {
        padding: 24px 20px;
    }
    .hero__welcome {
        font-size: 18px;
    }
    .hero {
        padding: 44px 22px 48px;
        border-radius: 22px;
    }
    .hero__lead {
        font-size: 16.5px;
    }
    .hero__actions .btn {
        flex: 1 1 100%;
        text-align: center;
    }
    .live__body {
        padding: 26px 22px;
    }
    .live__title {
        font-size: 23px;
    }
    .section__title {
        font-size: 23px;
    }
    .duo__card {
        padding: 24px 22px;
    }
    .short {
        width: 234px;
    }
    /* swiped on a phone, so the arrows are dead weight */
    .carousel__nav {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .duo__card,
    .short__media,
    .banner img,
    .carousel__nav,
    .carousel__dot {
        transition: none !important;
    }
    .carousel {
        scroll-behavior: auto;
    }
    .live__dot {
        animation: none;
    }
    .rail {
        scroll-behavior: auto;
    }
}
