/* =========================
   HOME — isolated + premium
   requires: <main class="page page--home">
   ========================= */

.page--home{
    --bg: #0b1010;
    --stroke: rgba(255,255,255,.16);
    --glass: rgba(255,255,255,.10);
    --glass2: rgba(255,255,255,.08);

    --text: rgba(255,255,255,.92);
    --muted: rgba(255,255,255,.74);

    --brand: #8fb3a5;
    --sand: #d0c9c0;

    --shadow: 0 20px 65px rgba(0,0,0,.50);
    --shadow2: 0 12px 30px rgba(0,0,0,.30);

    --r-lg: 28px;
    --r-md: 18px;

    background: transparent;
}
/* HOME: force dark canvas so white/glass UI is readable */
main.page--home{
    background: #0b1010 !important;
    position: relative;
    overflow: hidden;
}

/* keep your bg image but darken it (optional) */
main.page--home::before{
    content:"";
    position:absolute;
    inset:0;
    background-image: url("/images/bg_2.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: .22;              /* <= שולט כמה “הדפס” רואים */
    filter: saturate(.9) contrast(1.05);
    pointer-events:none;
    z-index: 0;
}

/* lift content above background layer */
main.page--home > *{
    position: relative;
    z-index: 1;
}

/* make about text definitely visible */
.page--home .wrapper_title{
    color: rgba(255,255,255,.92) !important;
    text-shadow: 0 12px 28px rgba(0,0,0,.45);
}

.page--home .wrapper_text{
    color: rgba(255,255,255,.78) !important;
}

/* ===== HERO WRAP ===== */
.page--home .hero__media{
    position: relative;
    overflow: hidden;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    border-bottom: 1px solid var(--stroke);
    background: var(--bg);
    box-shadow: var(--shadow);
}

/* cinematic overlays */
.page--home .hero__media::after{
    content:"";
    position:absolute;
    inset:0;
    background:
            radial-gradient(900px 620px at 15% 22%, rgba(0,0,0,0), rgba(0,0,0,.42)),
            linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0) 62%);
    pointer-events:none;
    z-index: 2;
}

/* ===== cover aspect ratios ===== */
.page--home .cover_strip{
    position: relative;
    aspect-ratio: 4 / 5;
}

@media (min-width: 600px){
    .page--home .cover_strip{ aspect-ratio: 1; }
}
@media (min-width: 768px){
    .page--home .cover_strip{ aspect-ratio: 16 / 5; }
}

/* ===== SLIDER ===== */
.page--home .cover_slider{
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.page--home .cover_slider__item{
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 700ms ease, transform 900ms cubic-bezier(.2,.8,.2,1);
    will-change: opacity, transform;
}

.page--home .cover_slider__item.is-active{
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.page--home .cover_slider__item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
}

/* Dots */
.page--home .cover_slider__dots{
    display: none;
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    /*display: flex;*/
    gap: 10px;
    z-index: 3;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,.22);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.page--home .cover_slider__dots .dot{
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: rgba(255,255,255,.60);
    transition: transform 160ms ease, background 160ms ease;
}

.page--home .cover_slider__dots .dot:hover{
    transform: scale(1.25);
}

.page--home .cover_slider__dots .dot.is-active{
    background: var(--brand);
    transform: scale(1.35);
}

.page--home .cover_slider__dots .dot:focus-visible{
    outline: 3px solid rgba(143,179,165,.85);
    outline-offset: 3px;
}

/* ===== OVERLAY CONTENT ===== */
.page--home .hero__overlay{
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: flex-end;
    pointer-events: none; /* allow slider hover to work, enable on inner content */
}

.page--home .hero__overlay .hero__content,
.page--home .hero__overlay .hero__brand{
    pointer-events: auto;
}

/* small logo pill (mobile) */
.page--home .hero__brand{
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    padding: 10px 14px;
    box-shadow: var(--shadow2);
}

.page--home .hero__logo{
    display: block;
    height: 44px;
    width: auto;
}

@media (min-width: 768px){
    .page--home .hero__brand{ display:none; }
}

/* content glass card */
.page--home .hero__content{
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto 22px;
    padding: 18px;
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow2);
}

.page--home .hero__title{
    margin: 0 0 8px;
    color: var(--text);
    font-weight: 1000;
    font-size: clamp(28px, 4vw, 54px);
    line-height: 1.1;
    text-shadow: 0 12px 28px rgba(0,0,0,.45);
}

.page--home .hero__subtitle{
    margin: 0 0 16px;
    color: var(--muted);
    font-size: clamp(14px, 1.6vw, 18px);
    line-height: 1.6;
}

/* ===== BUTTONS ===== */
.page--home .hero__actions{
    display:flex;
    justify-content: center;
    gap:12px;
    flex-wrap: wrap;
}

.page--home .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration:none;
    position: relative;
    transform: translateY(0);
    box-shadow: 0 0 0 rgba(0,0,0,0);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.page--home .btn::after{
    content:"";
    position:absolute;
    inset:-2px;
    border-radius: 999px;
    pointer-events:none;
    opacity:0;
    transition: opacity 220ms ease;
    background: radial-gradient(120px 60px at 30% 20%, rgba(255,255,255,.22), transparent 70%);
}

.page--home .btn:hover{
    transform: translateY(-2px);
    box-shadow: var(--shadow2);
}

.page--home .btn:hover::after{ opacity: 1; }

.page--home .btn:focus-visible{
    outline: 3px solid rgba(143,179,165,.9);
    outline-offset: 3px;
}

.page--home .btn--primary{
    background: linear-gradient(135deg, rgba(208,201,192,.95), rgba(143,179,165,.92));
    color: #10201d;
    border-color: rgba(255,255,255,.18);
}

.page--home .btn--ghost{
    background: rgba(255,255,255,.10);
    color: var(--text);
    border-color: rgba(255,255,255,.18);
}

/* ===== ABOUT SECTION ===== */
.page--home .wrapper_center{
    padding: clamp(64px, 7vw, 110px) 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page--home .wrapper_title{
    font-size: clamp(28px, 4vw, 54px);
    letter-spacing: .2px;
    text-shadow: 0 12px 28px rgba(0,0,0,.45);
    color: #fff;
}

.page--home .wrapper_text{
    max-width: 72ch;
    margin: 0 auto 26px;
    padding: clamp(16px, 2.2vw, 26px);
    line-height: 1.85;
    color: var(--muted);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow2);
}

/* ===== CATEGORIES ===== */
.page--home .about_strip_categories{
    width: 100%;
    max-width: 1100px;
    position: relative;
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

.page--home .categories_logo_bg{
    display:flex;
    justify-content:center;
    align-items:center;
    padding: 20px;
    position: relative;
    z-index: 0;
}

.page--home .categories_logo_bg img{
    opacity: .20;
    max-width: 600px;
    width: min(600px, 90%);
}

.page--home .categories__item{
    position: relative;
    overflow: hidden;
    border-radius: var(--r-md);
    box-shadow: var(--shadow2);
    aspect-ratio: 4 / 3;
    display:flex;
    align-items:flex-end;
    justify-content:center;
    transform: translateY(0);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    z-index: 1;
}

.page--home .categories__img{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
}

.page--home .categories__item::after{
    content:"";
    position:absolute;
    inset:0;
    background: linear-gradient(to top, rgba(0,0,0,.74), rgba(0,0,0,.12));
    pointer-events:none;
    z-index: 2;
}

.page--home .categories__item::before{
    content:"";
    position:absolute;
    inset:-40%;
    transform: rotate(25deg) translateX(-30%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
    opacity:0;
    transition: opacity 260ms ease, transform 700ms cubic-bezier(.2,.8,.2,1);
    pointer-events:none;
    z-index: 3;
}

.page--home .categories__item:hover{
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(143,179,165,.35);
}

.page--home .categories__item:hover::before{
    opacity:1;
    transform: rotate(25deg) translateX(30%);
}

.page--home .categories__item span{
    position: relative;
    z-index: 4;
    width: 100%;
    padding: 18px;
    text-align: center;
    color: #fff;
    font-weight: 1000;
    font-size: clamp(18px, 2vw, 26px);
    text-shadow: 0 10px 24px rgba(0,0,0,.55);
}

/* desktop grid */
@media (min-width: 768px){
    .page--home .about_strip_categories{
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
        align-items: stretch;
    }
    .page--home .categories__item{ aspect-ratio: 4 / 5; }
    .page--home .categories_logo_bg{
        position:absolute;
        inset:0;
        z-index: 0;
        pointer-events:none;
    }
}

/* ===== Reveal animations ===== */
:root{ --reveal-ease: cubic-bezier(.2,.8,.2,1); }

.page--home .reveal{
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
    transition:
            opacity 700ms var(--reveal-ease),
            transform 700ms var(--reveal-ease),
            filter 700ms var(--reveal-ease);
    will-change: opacity, transform, filter;
    transition-delay: var(--d, 0ms);
}

.page--home .reveal.is-in{
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    text-align: center;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
    .page--home .btn,
    .page--home .categories__item,
    .page--home .cover_slider__item,
    .page--home .cover_slider__dots .dot{
        transition: none !important;
    }
    .page--home .reveal{
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }
}
#services { scroll-margin-top: 90px; } /* תתאים לפי גובה ההדר */
