/*
 * Mockito — Home Page 2 Stylesheet (v1.1 — layout fixes)
 * Styles for the new sections used only on template-home-page-2.php.
 * Uses the same CSS custom properties defined in style.css (:root),
 * so it automatically matches the rest of the theme.
 *
 * v1.1 fixes:
 *   - Nav arrows (video + steps carousels) moved into a side "shell"
 *     gutter instead of overlapping slide text.
 *   - Coffee Benefits section now has its own centered header markup,
 *     no longer inherits the left/right .sec-hd layout.
 *   - Reviews cards given explicit sizing so they can't get squeezed
 *     narrow and word-wrap the "Verified Purchase" badge.
 *
 * Sections:
 *   1. Carousel shell (shared shell for side-arrow carousels)
 *   2. Hero — Video
 *   3. Hero — How To Make Coffee Steps
 *   4. Coffee Benefits
 *   5. Instagram Reels
 *   6. Reviews Auto Scroll
 *   7. Swiper overrides shared across sections
 */

/* ============================================================
   1. CAROUSEL SHELL — shared wrapper that keeps nav arrows in
      their own gutter, off the slide content.
   ============================================================ */
.hp2-carousel-shell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 56px;
}
.hp2-carousel-shell > .swiper { width: 100%; overflow: hidden; }
.hp2-carousel-shell .hero-arrow {
    flex: 0 0 auto;
    position: relative;
    z-index: 5;
}
.hp2-carousel-shell .hero-arrow.left  { margin-right: 16px; }
.hp2-carousel-shell .hero-arrow.right { margin-left: 16px; }

@media (max-width: 782px) {
    .hp2-carousel-shell { padding: 0 44px; }
    .hp2-carousel-shell .hero-arrow.left  { margin-right: 8px; }
    .hp2-carousel-shell .hero-arrow.right { margin-left: 8px; }
}

/* ============================================================
   2. HERO — VIDEO CAROUSEL  (v1.3 redesign)
   ============================================================ */
.hp2-hero-video { position: relative; width: 100%; background: var(--mockito-primary); overflow: hidden; }
.hp2-video-swiper { position: relative; width: 100%; height: 640px; overflow: hidden; }
.hp2-video-slide { position: relative; width: 100%; height: 100%; }
.hp2-video-media { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.hp2-video-media::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15,28,46,.08) 0%, rgba(15,28,46,.12) 45%, rgba(15,28,46,.72) 100%),
                linear-gradient(90deg, rgba(15,28,46,.72) 0%, rgba(15,28,46,.32) 45%, transparent 78%);
    pointer-events: none;
}
.hp2-video-el,
.hp2-video-media img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transform: scale(1.02);
    transition: transform 8s cubic-bezier(.16,.6,.4,1);
}
.swiper-slide-active .hp2-video-media .hp2-video-el,
.swiper-slide-active .hp2-video-media img { transform: scale(1.1); }
.hp2-video-embed-wrap { position: relative; width: 100%; height: 100%; }
.hp2-video-embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* -- content overlay ------------------------------------------------- */
.hp2-video-overlay {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    padding: 60px 8% 96px;
    color: #fff;
}
.hp2-video-content { max-width: 600px; }
.hp2-video-content > * { opacity: 0; transform: translateY(26px); }
.swiper-slide-active .hp2-video-content > * {
    animation: hp2VideoIn .75s cubic-bezier(.16,1,.3,1) forwards;
}
.swiper-slide-active .hp2-video-content > *:nth-child(1) { animation-delay: .05s; }
.swiper-slide-active .hp2-video-content > *:nth-child(2) { animation-delay: .16s; }
.swiper-slide-active .hp2-video-content > *:nth-child(3) { animation-delay: .27s; }
.swiper-slide-active .hp2-video-content > *:nth-child(4) { animation-delay: .38s; }
@keyframes hp2VideoIn { to { opacity: 1; transform: translateY(0); } }

.hp2-video-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.38);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    padding: 8px 18px; border-radius: 40px;
    margin: 0 0 20px;
}
.hp2-video-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--mockito-accent); flex: 0 0 auto; }

.hp2-video-h {
    font-family: var(--mockito-font-heading);
    font-size: clamp(30px, 4.4vw, 50px);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 16px;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0,0,0,.35);
}
.hp2-video-p {
    font-size: 1.08rem; line-height: 1.65; margin: 0 0 30px;
    color: rgba(255,255,255,.88);
    text-shadow: 0 2px 10px rgba(0,0,0,.3);
    max-width: 480px;
}
.hp2-video-cta {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--mockito-accent); color: var(--mockito-primary);
    padding: 16px 30px; border-radius: 40px;
    font-weight: 900; font-size: .92rem; letter-spacing: .01em;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(200,168,75,.4);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.hp2-video-cta svg { transition: transform .25s ease; }
.hp2-video-cta:hover { background: #d9bc63; transform: translateY(-3px); box-shadow: 0 16px 38px rgba(200,168,75,.5); color: var(--mockito-primary); }
.hp2-video-cta:hover svg { transform: translateX(4px); }

/* -- glass arrow buttons (dedicated, not shared with legacy .hero-arrow) */
.hp2-video-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 5;
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15,28,46,.32);
    border: 1px solid rgba(255,255,255,.4);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: background .25s ease, border-color .25s ease, transform .25s ease, color .25s ease;
}
.hp2-video-arrow svg { display: block; pointer-events: none; }
.hp2-video-arrow:hover {
    background: var(--mockito-accent);
    border-color: var(--mockito-accent);
    color: var(--mockito-primary);
    transform: translateY(-50%) scale(1.08);
}
.hp2-video-arrow:focus-visible { outline: 2px solid var(--mockito-accent); outline-offset: 3px; }
.hp2-video-arrow.is-prev { left: 28px; }
.hp2-video-arrow.is-next { right: 28px; }

/* -- pagination with autoplay progress fill -------------------------- */
.hp2-video-footer {
    position: absolute; left: 0; right: 0; bottom: 30px; z-index: 3;
    display: flex; justify-content: center; pointer-events: none;
}
.hp2-video-pagination.swiper-pagination {
    position: static;
    display: flex; align-items: center; gap: 10px;
    pointer-events: auto;
        justify-content: center;
}
.hp2-video-pagination .swiper-pagination-bullet {
    width: 30px; height: 5px; border-radius: 3px;
    background: rgba(255,255,255,.32);
    opacity: 1; margin: 0; cursor: pointer;
    position: relative; overflow: hidden;
    transition: background .3s ease;
}
.hp2-video-pagination .swiper-pagination-bullet:hover { background: rgba(255,255,255,.5); }
.hp2-video-pagination .swiper-pagination-bullet-active::after {
    content: ''; position: absolute; inset: 0; width: 0%;
    background: var(--mockito-accent);
    /* duration mirrors the 6000ms autoplay delay set in mockito-home2.js */
    animation: hp2VideoFill 6s linear forwards;
}
@keyframes hp2VideoFill { from { width: 0%; } to { width: 100%; } }

/* ============================================================
   2b. HERO — IMAGE SLIDER (full image, no text overlay)
   Desktop/mobile images are swapped via <picture><source media>
   inside the PHP template — this CSS only handles layout/sizing.
   ============================================================ */
.hp2-hero-image { position: relative; width: 100%; background: var(--mockito-primary); overflow: hidden; }
.hp2-image-swiper { position: relative; width: 100%; overflow: hidden; }
.hp2-image-slide { position: relative; width: 100%; }
.hp2-image-slide-inner { display: block; width: 100%; line-height: 0; }
.hp2-image-slide-img {
    display: block;
    width: 100%;
    height: auto; /* show the full image — no cropping */
}

.hp2-image-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 5;
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15,28,46,.32);
    border: 1px solid rgba(255,255,255,.4);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: background .25s ease, border-color .25s ease, transform .25s ease, color .25s ease;
}
.hp2-image-arrow svg { display: block; pointer-events: none; }
.hp2-image-arrow:hover {
    background: var(--mockito-accent);
    border-color: var(--mockito-accent);
    color: var(--mockito-primary);
    transform: translateY(-50%) scale(1.08);
}
.hp2-image-arrow:focus-visible { outline: 2px solid var(--mockito-accent); outline-offset: 3px; }
.hp2-image-arrow.is-prev { left: 28px; }
.hp2-image-arrow.is-next { right: 28px; }

.hp2-image-footer {
    position: absolute; left: 0; right: 0; bottom: 20px; z-index: 3;
    display: flex; justify-content: center; pointer-events: none;
}
.hp2-image-pagination.swiper-pagination {
    position: static;
    display: flex; align-items: center; gap: 10px;
    pointer-events: auto;
    justify-content: center;
}
.hp2-image-pagination .swiper-pagination-bullet {
    width: 30px; height: 5px; border-radius: 3px;
    background: rgba(255,255,255,.55);
    opacity: 1; margin: 0; cursor: pointer;
    position: relative; overflow: hidden;
    transition: background .3s ease;
    box-shadow: 0 0 0 1px rgba(15,28,46,.25);
}
.hp2-image-pagination .swiper-pagination-bullet:hover { background: rgba(255,255,255,.8); }
.hp2-image-pagination .swiper-pagination-bullet-active { background: var(--mockito-accent); }

@media (max-width: 782px) {
    .hp2-image-arrow { width: 40px; height: 40px; }
    .hp2-image-arrow svg { width: 16px; height: 16px; }
    .hp2-image-arrow.is-prev { left: 12px; }
    .hp2-image-arrow.is-next { right: 12px; }
    .hp2-image-footer { bottom: 14px; }
}

/* ============================================================
   3. HERO — HOW TO MAKE COFFEE STEPS
   ============================================================ */
.hp2-hero-steps { background: var(--mockito-cream); padding: 60px 6%; }
.hp2-steps-hd { text-align: center; margin-bottom: 32px; }
.hp2-steps-hd h2 { font-family: var(--mockito-font-heading); font-size: clamp(24px, 3vw, 34px); color: var(--mockito-primary); }
.hp2-steps-swiper { position: relative; padding-bottom: 10px; overflow: hidden; }
.hp2-step-slide {
    box-sizing: border-box;
    background: var(--mockito-bg);
    border: 1px solid var(--mockito-silver-mid);
    border-radius: var(--mockito-radius);
    padding: 28px 22px;
    text-align: center;
    height: auto;
}
.hp2-step-img { width: 88px; height: 88px; margin: 0 auto 16px; }
.hp2-step-img img { width: 100%; height: 100%; object-fit: contain; }
.hp2-step-num {
    width: 32px; height: 32px; line-height: 32px;
    border-radius: 50%; background: var(--mockito-accent); color: #fff;
    font-weight: 800; margin: 0 auto 12px;
}
.hp2-step-slide h3 { font-size: 1.1rem; color: var(--mockito-primary); margin: 0 0 8px; }
.hp2-step-slide p { font-size: .92rem; color: var(--mockito-muted); line-height: 1.55; margin: 0; }

/* ============================================================
   4. COFFEE BENEFITS / ABOUT STRIP
   ============================================================ */
.hp2-benefits { padding: 70px 6%; background: var(--mockito-bg); }
.hp2-benefits-hd {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hp2-benefits-hd .sec-eyebrow { justify-content: center; }
.hp2-benefits-hd h2 { font-family: var(--mockito-font-heading); font-size: clamp(24px, 3vw, 36px); color: var(--mockito-primary); margin: 6px 0 0; }
.hp2-benefits-intro { max-width: 720px; margin: 14px auto 0; color: var(--mockito-muted); font-size: 1rem; line-height: 1.7; text-align: center; }
.hp2-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 26px;
    max-width: 1200px;
    margin: 40px auto 0;
}
.hp2-benefit-card {
    background: var(--mockito-silver-light);
    border-radius: var(--mockito-radius);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    transition: transform .25s ease;
}
.hp2-benefit-card:hover { transform: translateY(-4px); }
.hp2-benefit-img { width: 100%; aspect-ratio: 4/3; overflow: hidden; }
.hp2-benefit-img img { width: 100%; height: 100%; object-fit: cover; }
.hp2-benefit-card h3 { margin: 18px 16px 8px; font-size: 1.05rem; color: var(--mockito-primary); }
.hp2-benefit-card p { margin: 0 16px; font-size: .9rem; color: var(--mockito-muted); line-height: 1.55; }
/* Cards with no image still need top spacing for the title */
.hp2-benefit-card:not(:has(.hp2-benefit-img)) h3 { margin-top: 26px; }

/* ============================================================
   5. INSTAGRAM REELS
   ============================================================ */
.hp2-instagram { padding: 60px 6%; background: var(--mockito-cream); }
.hp2-ig-swiper { padding-bottom: 36px; }
.hp2-ig-slide { width: 220px; }
.hp2-ig-card {
    position: relative;
    display: block;
    border-radius: var(--mockito-radius);
    overflow: hidden;
    aspect-ratio: 9/16;
    background: #000;
}
.hp2-ig-media { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp2-ig-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 46px; height: 46px; border-radius: 50%;
    background: rgba(255,255,255,.85); color: var(--mockito-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem; pointer-events: none;
}
.hp2-ig-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 10px 12px;
    background: linear-gradient(0deg, rgba(0,0,0,.75), transparent);
    color: #fff; font-size: .8rem;
}

/* ============================================================
   6. REVIEWS — AUTO SCROLL
   ============================================================ */
.hp2-reviews-swiper { padding-bottom: 8px; overflow: hidden; }
.hp2-reviews-swiper .swiper-slide {
    height: auto;
    display: flex;
}
.hp2-reviews-swiper .rv {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--mockito-bg);
    border: 1px solid var(--mockito-silver-mid);
    border-radius: var(--mockito-radius);
    padding: 26px 24px;
}
.hp2-reviews-swiper .rv-author {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
}
.hp2-reviews-swiper .rv-name,
.hp2-reviews-swiper .rv-loc,
.hp2-reviews-swiper .rv-badge {
    white-space: nowrap;
}
.hp2-reviews-swiper .rv-av {
    flex: 0 0 auto;
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700;
    object-fit: cover;
}

/* ============================================================
   7. SWIPER SHARED OVERRIDES
   ============================================================ */
.hp2-steps-swiper .swiper-pagination-bullet,
.hp2-ig-swiper .swiper-pagination-bullet {
    background: var(--mockito-accent);
    opacity: .5;
}
.hp2-steps-swiper .swiper-pagination-bullet-active,
.hp2-ig-swiper .swiper-pagination-bullet-active {
    opacity: 1;
}

@media (max-width: 782px) {
    .hp2-video-swiper { height: 460px; }
    .hp2-video-overlay { padding: 26px 6% 76px; }
    .hp2-video-content { max-width: 100%; }
    .hp2-video-h { font-size: clamp(24px, 7vw, 34px); }
    .hp2-video-p { max-width: 100%; margin-bottom: 22px; }
    .hp2-video-arrow { width: 40px; height: 40px; }
    .hp2-video-arrow svg { width: 16px; height: 16px; }
    .hp2-video-arrow.is-prev { left: 12px; }
    .hp2-video-arrow.is-next { right: 12px; }
    .hp2-video-footer { bottom: 18px; }
    .hp2-ig-slide { width: 160px; }
}
