/* ============================================
   SLIDER CORE - Shared Styles
   Namespace: lwm-hero-
   All selectors scoped under .lwm-hero-slider-root
   ============================================ */

/* ─── Scoped Reset ─────────────────────────── */
.lwm-hero-slider-root,
.lwm-hero-slider-root *,
.lwm-hero-slider-root *::before,
.lwm-hero-slider-root *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ─── WordPress / Theme Override Protection ── *
 * Explicit resets for HTML elements that themes
 * typically restyle (h1-h6, p, a, img, button).
 * This ensures the slider looks identical
 * regardless of active theme or global CSS.    */

.lwm-hero-slider-root h1,
.lwm-hero-slider-root h2,
.lwm-hero-slider-root h3,
.lwm-hero-slider-root h4,
.lwm-hero-slider-root h5,
.lwm-hero-slider-root h6 {
    margin: 0;
    padding: 0;
    border: none;
    color: #fff;
    font-family: 'Arial', sans-serif;
    font-style: normal;
    font-variant: normal;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    word-spacing: normal;
    text-indent: 0;
    text-align: inherit;
    -webkit-text-stroke: 0;
    background: none;
}

.lwm-hero-slider-root p {
    margin: 0;
    padding: 0;
    color: #fff;
    font-family: 'Arial', sans-serif;
    font-style: normal;
    text-indent: 0;
    text-align: inherit;
    background: none;
}

.lwm-hero-slider-root a {
    color: inherit;
    text-decoration: none;
    border: none;
    outline: none;
    background: none;
}

.lwm-hero-slider-root a:hover,
.lwm-hero-slider-root a:focus,
.lwm-hero-slider-root a:active {
    text-decoration: none;
    outline: none;
}

.lwm-hero-slider-root img {
    max-width: none;  /* Override WP theme img { max-width: 100% } */
    border: none;
    box-shadow: none;
    outline: none;
    vertical-align: middle;
    background: none;
}

.lwm-hero-slider-root button {
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    font-family: 'Arial', sans-serif;
    color: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.lwm-hero-slider-root button:focus {
    outline: none;
}

.lwm-hero-slider-root svg {
    overflow: visible;
}

.lwm-hero-slider-root video {
    display: block;
}

.lwm-hero-slider-root div {
    background: transparent;
}

/* ─── Root Container ───────────────────────── */
.lwm-hero-slider-root {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;    /* Modern browsers: excludes mobile address bar */
    overflow: hidden;
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #fff;
    background: #000;
    --lwm-hero-header-offset: 0px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Header offset (desktop only) ─────────── *
 * --lwm-hero-header-offset is set by JS (auto-detect
 * or forced via shortcode attribute).
 * Pulls the slider up behind the site header
 * so it acts as a full-bleed hero.              */

@media (min-width: 1025px) {
    .lwm-hero-slider-root {
        margin-top: calc(-1 * var(--lwm-hero-header-offset));
    }
}

/* ─── Slide Base ───────────────────────────── */
.lwm-hero-slider-root .lwm-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.lwm-hero-slider-root .lwm-hero-slide.lwm-hero-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* ─── Loader ───────────────────────────────── *
 * Main styles are in the inline critical CSS.
 * This block adds the smooth removal transition
 * that can safely live in the external sheet.   */

.lwm-hero-slider-root .lwm-hero-loader {
    position: absolute;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    transition: opacity 0.5s ease;
}

.lwm-hero-slider-root.lwm-hero-ready .lwm-hero-loader {
    opacity: 0;
    pointer-events: none;
}

/* ─── CTA Button (shared across slides) ───── */
.lwm-hero-slider-root .lwm-hero-cta-button {
    display: inline-block;
    padding: 20px 50px;
    background: linear-gradient(135deg, #ca9c57 0%, #dab578 100%);
    color: #1a1a2e;
    font-family: 'Arial', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(202, 156, 87, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
    border: none;
}

.lwm-hero-slider-root .lwm-hero-cta-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.lwm-hero-slider-root .lwm-hero-cta-button:hover::after {
    opacity: 1;
}

.lwm-hero-slider-root .lwm-hero-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(202, 156, 87, 0.5);
    color: #1a1a2e;
}

.lwm-hero-slider-root .lwm-hero-cta-button:active {
    transform: translateY(0);
    box-shadow: 0 8px 25px rgba(202, 156, 87, 0.4);
}

/* ─── Highlight Text (shared) ──────────────── */
.lwm-hero-slider-root .lwm-hero-highlight {
    color: #ca9c57;
}

/* ─── Navigation: Dot Indicators ───────────── */
.lwm-hero-slider-root .lwm-hero-slider-nav {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 100;
}

.lwm-hero-slider-root .lwm-hero-slider-nav button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    font-size: 0;
    line-height: 0;
}

.lwm-hero-slider-root .lwm-hero-slider-nav button.lwm-hero-active {
    background: #fff;
    width: 40px;
    border-radius: 10px;
}

/* ─── Navigation: Arrows ──────────────────── */
.lwm-hero-slider-root .lwm-hero-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.lwm-hero-slider-root .lwm-hero-slider-arrow.lwm-hero-prev {
    left: 40px;
}

.lwm-hero-slider-root .lwm-hero-slider-arrow.lwm-hero-next {
    right: 40px;
}

.lwm-hero-slider-root .lwm-hero-slider-arrow::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 3px solid #fff;
    border-right: 3px solid #fff;
    transform: rotate(45deg);
}

.lwm-hero-slider-root .lwm-hero-slider-arrow.lwm-hero-prev::before {
    transform: rotate(-135deg);
}

/* ============================================
   Shared Keyframes
   ============================================ */

@keyframes lwm-hero-slideInFromLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes lwm-hero-slideUpFadeIn {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes lwm-hero-letterFocusIn {
    0%   { opacity: 0; filter: blur(20px); }
    100% { opacity: 1; filter: blur(0px); }
}

/* ============================================
   Responsive: Navigation & CTA
   ============================================ */

@media (max-width: 768px) {
    .lwm-hero-slider-root .lwm-hero-cta-button {
        padding: 16px 40px;
        font-size: 16px;
    }
    .lwm-hero-slider-root .lwm-hero-slider-arrow { width: 50px; height: 50px; }
    .lwm-hero-slider-root .lwm-hero-slider-arrow.lwm-hero-prev { left: 20px; }
    .lwm-hero-slider-root .lwm-hero-slider-arrow.lwm-hero-next { right: 20px; }
    .lwm-hero-slider-root .lwm-hero-slider-nav { bottom: 30px; }
    .lwm-hero-slider-root .lwm-hero-slider-nav button { width: 10px; height: 10px; }
    .lwm-hero-slider-root .lwm-hero-slider-nav button.lwm-hero-active { width: 30px; }
}

@media (max-width: 480px) {
    .lwm-hero-slider-root .lwm-hero-cta-button {
        padding: 14px 35px;
        font-size: 14px;
    }
    .lwm-hero-slider-root .lwm-hero-slider-arrow { width: 45px; height: 45px; }
    .lwm-hero-slider-root .lwm-hero-slider-arrow::before { width: 10px; height: 10px; border-width: 2px; }
    .lwm-hero-slider-root .lwm-hero-slider-arrow.lwm-hero-prev { left: 15px; }
    .lwm-hero-slider-root .lwm-hero-slider-arrow.lwm-hero-next { right: 15px; }
    .lwm-hero-slider-root .lwm-hero-slider-nav { bottom: 20px; gap: 10px; }
    .lwm-hero-slider-root .lwm-hero-slider-nav button { width: 8px; height: 8px; }
    .lwm-hero-slider-root .lwm-hero-slider-nav button.lwm-hero-active { width: 25px; }
}
