/*
 * Home page (templates/home.php): hero slider, shortcut bar, models section, recent news.
 * Loaded after main.css by jac_page_style() in inc/enqueue.php.
 */

/* =========================================================
   HERO SLIDER (1:1 multisite Carousel)
   ========================================================= */
.hero {
    position: relative;
    overflow: hidden;
    background: #0a2233;
    aspect-ratio: 4095 / 1440;
    min-height: 420px;
    width: 100%;
}

/* Slajdy — leżą jeden na drugim, przełączane klasami */
.hero__track { position: relative; width: 100%; height: 100%; }

.hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0s, visibility 0s;
    z-index: 1;
}
.hero__slide.is-active { opacity: 1; visibility: visible; z-index: 2; }

/* Animacja slide-in/out */
.hero__slide--enter-right {
    animation: heroEnterRight var(--hero-anim, 450ms) ease both;
    z-index: 3;
}
.hero__slide--enter-left {
    animation: heroEnterLeft var(--hero-anim, 450ms) ease both;
    z-index: 3;
}
.hero__slide--exit-left {
    animation: heroExitLeft var(--hero-anim, 450ms) ease both;
    z-index: 2;
}
.hero__slide--exit-right {
    animation: heroExitRight var(--hero-anim, 450ms) ease both;
    z-index: 2;
}
@keyframes heroEnterRight  { from { transform: translateX(6%);  opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes heroEnterLeft   { from { transform: translateX(-6%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes heroExitLeft    { from { transform: none; opacity: 1; } to { transform: translateX(-6%); opacity: 0; } }
@keyframes heroExitRight   { from { transform: none; opacity: 1; } to { transform: translateX(6%);  opacity: 0; } }

/* Zdjęcie */
.hero__picture {
    position: absolute;
    inset: 0;
    display: block;
}
.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* Treść — bottom-left, max 480px, nad zdjęciem */
.hero__content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: var(--max-w);
    margin: 0 auto;
    left: 0; right: 0;
    padding: 0 var(--section-px) 48px;
}
.hero__text { max-width: 480px; }

.hero__headline {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 700;
    color: #fff;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin-bottom: 4px;
}
.hero__title-low {
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 400;
    color: #fff;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin-bottom: 4px;
}
.hero__subtitle {
    font-size: clamp(15px, 1.5vw, 18px);
    color: rgba(255,255,255,.85);
    line-height: 1.6;
    margin-bottom: 24px;
}
.hero__buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.hero__btn {
    display: inline-flex;
    align-items: center;
    padding: 11px 24px;
    border: 1.5px solid rgba(255,255,255,.7);
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: .9375rem;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: background .2s, border-color .2s;
}
.hero__btn:hover { background: rgba(255,255,255,.22); border-color: #fff; }

/* Link całego slajdu */
.hero__slide-link { position: absolute; inset: 0; z-index: 2; }

/* Strzałki */
.hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.hero__arrow svg { width: 22px; height: 22px; }
.hero__arrow:hover { background: rgba(255,255,255,.22); }
.hero__arrow--prev { left: 24px; }
.hero__arrow--next { right: 24px; }

/* Dots — linie postępu */
.hero__dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.hero__dot {
    width: 40px;
    height: 3px;
    border-radius: 2px;
    border: none;
    padding: 0;
    background: rgba(255,255,255,.3);
    cursor: pointer;
    transition: background .25s;
}
.hero__dot.is-active { background: #fff; }

/* Mobile */
@media (max-width: 640px) {
    .hero { aspect-ratio: auto; height: 520px; }
    .hero__content { padding: 0 20px 32px; }
    .hero__arrow { display: none; }
    .hero__btn { padding: 8px 14px; font-size: .875rem; }
    .hero__buttons { flex-wrap: nowrap; }
}

/* === Shortcut bar === */
.jac-shortcut-bar {
    padding-block: 16px 64px;
}

.jac-shortcut-bar__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.jac-shortcut-bar__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 40px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgb(0 0 0 / .08);
    color: #212121;
    transition: box-shadow .2s;
}

.jac-shortcut-bar__card:hover {
    box-shadow: 0 6px 32px rgb(0 0 0 / .13);
}

.jac-shortcut-bar__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.jac-shortcut-bar__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.jac-shortcut-bar__label {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .jac-shortcut-bar { padding-block: 16px; }
    .jac-shortcut-bar__grid { grid-template-columns: 1fr; gap: 8px; }
    .jac-shortcut-bar__card {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        border-radius: 10px;
    }
    .jac-shortcut-bar__icon { width: 26px; height: 26px; }
    .jac-shortcut-bar__label { font-size: .8125rem; line-height: 1.3; }
}

/* === Models section === */
.jac-models {
    padding-block: var(--section-py);
}

/* === Blog recent === */
.jac-blog-recent {
    padding-block: var(--section-py);
    background: #f6f6f6;
}

.jac-blog-recent .jac-section-header { margin-bottom: 40px; }

.jac-blog-recent__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.jac-blog-recent__bottom {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.jac-blog-recent__see-all {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 500;
    color: #212121;
    background: var(--white);
    transition: border-color .2s, color .2s;
}

.jac-blog-recent__see-all:hover {
    border-color: var(--brand);
    color: var(--brand);
}

@media (max-width: 900px) {
    .jac-blog-recent__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
    .jac-blog-recent__grid { grid-template-columns: 1fr; }
}
