/* =========================================
   HERO SLIDER
   ========================================= */
.hero {
    /* Define variables locally to ensure availability */
    --primary: #2DACC9;
    --primary-hover: #2492AB;
    --secondary: #0F172A;
    --text-heading: #0F172A;
    --text-body: #64748B;
    --white: #FFFFFF;
    --border-light: #E2E8F0;
    --font-sans: 'Manrope', sans-serif;
    --shb-font-display: 'Figtree', sans-serif;

    position: relative;
    height: 100vh;
    /* Fallback */
    height: 100dvh;
    background-color: var(--secondary, #0F172A);
    font-family: var(--font-sans);
    /* Apply base font */
    overflow: hidden;
    color: white;
    /* Force full width breakout */
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    max-width: 100vw;
}

/* Ensure headings use display font */
.hero h1,
.hero h4,
.slide-title,
.action-title,
.emergency-number {
    font-family: var(--shb-font-display);
}

/* Adjust for admin bar if present */
body.admin-bar .hero {
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
}

.shb-slider-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slider-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(15, 23, 42, 0.82) 0%,
        rgba(15, 23, 42, 0.68) 28%,
        rgba(15, 23, 42, 0.32) 58%,
        rgba(15, 23, 42, 0.00) 100%
    );
    z-index: 10;
}

.slide-content {
    position: relative;
    z-index: 20;
    height: 100%;
    display: flex;
    align-items: center;
    /* Removed padding-top as fixed header is gone */
}

.slide-text-wrapper {
    max-width: 700px;
}

/* Hero Animations */
.anim-badge,
.anim-title,
.anim-text,
.anim-btn {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide.active .anim-badge {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.slide.active .anim-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.slide.active .anim-text {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.7s;
}

.slide.active .anim-btn {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.9s;
}

.slide-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--white, #FFFFFF);
    /* Added explicitly to override global h1 color */
}

.slide-desc {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: #E2E8F0;
    margin-bottom: 2rem;
    font-weight: 300;
    max-width: 90%;
}

@media (min-width: 768px) {
    /* Kept for overrides if needed, but clamp handles most */
}

/* Hero Bottom Actions */
.hero-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 30;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.action-item {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s;
}

.action-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.action-title {
    color: var(--white, #FFFFFF);
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    /* Increased from 0.9-1.1 */
    line-height: 1.2;
}

.action-desc {
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    /* Increased from 0.7-0.75 */
    color: #94A3B8;
    line-height: 1.4;
}

.action-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    flex-shrink: 0;
}

.emergency-box {
    background-color: var(--primary, #2DACC9);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.emergency-label {
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    /* Increased from 0.7-0.75 */
    opacity: 0.8;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.emergency-number {
    color: var(--white, #FFFFFF);
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    /* Increased from 1.2-1.5 */
    font-weight: 700;
}

/* Slider Controls */
.slider-nav {
    position: absolute;
    bottom: 140px;
    right: 2rem;
    z-index: 30;
    display: flex;
    gap: 0.5rem;
}

.nav-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.nav-circle:hover {
    background-color: var(--primary, #2DACC9);
    border-color: var(--primary, #2DACC9);
}

@media (min-width: 768px) {
    .action-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Fix for full width slider inside container */
.shb-slider {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    position: relative;
    left: auto;
    right: auto;
    transform: none;
}

/* =========================================
   ALPINE-BASED SLIDER SHORTCODE STYLES
   (Moved from inline <style> in render_slider_shortcode())
   ========================================= */

.shb-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}

.shb-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Foreground hero image (replaces CSS background-image so it can be a
   responsive, preloadable LCP element). Sits behind overlay + content. */
.shb-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.shb-slide-content {
    position: relative;
    z-index: 20;
}

.shb-slider-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: linear-gradient(
        105deg,
        rgba(15, 23, 42, 0.82) 0%,
        rgba(15, 23, 42, 0.68) 28%,
        rgba(15, 23, 42, 0.32) 58%,
        rgba(15, 23, 42, 0.00) 100%
    );
}

/* Staggered Text Animations */
.shb-slide .anim-badge,
.shb-slide .anim-title,
.shb-slide .anim-text,
.shb-slide .anim-btn {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.shb-slide.active .anim-badge {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.shb-slide.active .anim-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.shb-slide.active .anim-text {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.7s;
}

.shb-slide.active .anim-btn {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.9s;
}

/* Button Styles */
.shb-btn-primary {
    background: linear-gradient(135deg, #2DACC9 0%, #2492AB 100%);
    color: white;
    border-radius: 100px;
    padding: 14px 36px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px -5px rgba(45, 172, 201, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.shb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(45, 172, 201, 0.5);
    color: white;
}

/* Base wrapper styles */
.shb-screen-wrapper {
    width: 100%;
    position: relative;
    height: 90vh;
    min-height: 600px;
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .shb-screen-wrapper {
        height: 100dvh;
        min-height: auto;
    }
}

/* Action bar wrapper for nav arrow positioning */
.shb-action-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
}

.shb-slider-nav {
    position: absolute;
    bottom: 100%;
    right: 1rem;
    z-index: 50;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .shb-slider-nav {
        right: 2.5rem;
        margin-bottom: 1.5rem;
    }
}

/* Slider Action Bar grid */
.shb-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shb-action-item {
    border-color: rgba(255, 255, 255, 0.1);
    border-style: solid;
    border-width: 0;
}

.shb-action-item-0 {
    border-right-width: 1px;
    border-bottom-width: 1px;
}

.shb-action-item-1 {
    border-bottom-width: 1px;
}

.shb-action-item-2 {
    border-right-width: 1px;
}

@media (min-width: 1024px) {
    .shb-action-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .shb-action-item-0 {
        border-bottom-width: 0;
        border-right-width: 1px;
    }

    .shb-action-item-1 {
        border-bottom-width: 0;
        border-right-width: 1px;
    }

    .shb-action-item-2 {
        border-right-width: 1px;
    }
}

/* Responsive Tailwind utility fallbacks for slider context */
@media (min-width: 1024px) {
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:border-none { border-style: none; }
    .lg\:text-base { font-size: 16px; }
    .lg\:text-lg { font-size: 18px; }
    .lg\:text-xs { font-size: 12px; }
    .lg\:mb-6 { margin-bottom: 24px; }
    .lg\:mb-8 { margin-bottom: 32px; }
    .lg\:px-8 { padding-left: 32px; padding-right: 32px; }
    .lg\:py-4 { padding-top: 16px; padding-bottom: 16px; }
    .lg\:mt-0 { margin-top: 0; }
    .lg\:pb-0 { padding-bottom: 0; }
}

@media (min-width: 768px) {
    .md\:p-6 { padding: 24px; }
    .md\:text-lg { font-size: 18px; }
    .md\:text-2xl { font-size: 24px; }
    .md\:mb-1 { margin-bottom: 4px; }
}

@media (min-width: 640px) {
    .sm\:text-3xl { font-size: 30px; }
    .sm\:text-sm { font-size: 14px; }
    .sm\:px-6 { padding-left: 24px; padding-right: 24px; }
    .sm\:py-3 { padding-top: 12px; padding-bottom: 12px; }
    .sm\:mb-4 { margin-bottom: 16px; }
    .sm\:mb-6 { margin-bottom: 24px; }
}

/* Slide content vertical offset — desktop only, overrides compiled Tailwind .mt-12 */
@media (min-width: 1024px) {
    .shb-slide-content {
        margin-top: -100px !important;
    }
}

/* =========================================
   TITLE BLOCK-REVEAL HIGHLIGHT ANIMATION
   Injected by slider-highlight.js on .anim-title first two words
   ========================================= */

.shb-title-highlight {
    display: inline;
    padding: 2px 7px 4px 5px;
    border-radius: 4px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    background: linear-gradient(
        to right,
        rgba(45, 172, 201, 0.85) 50%,
        transparent 50%
    );
    background-size: 200% 100%;
    background-position: right center;
}

/* Expo-out sweep — energetic start, silky finish */
.shb-slide.active .shb-title-highlight,
.slide.active .shb-title-highlight {
    animation: shbTitleHighlight 0.85s cubic-bezier(0.16, 1, 0.3, 1) 1.2s both;
}

/* Instant reset when slide is no longer active */
.shb-slide:not(.active) .shb-title-highlight,
.slide:not(.active) .shb-title-highlight {
    background-position: right center;
    animation: none;
}

@keyframes shbTitleHighlight {
    from { background-position: right center; }
    to   { background-position: left center; }
}