/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE SUPREMACY 2026 - Service Detail Styles
   Scope: .service-detail-wrapper (Isolated - Does NOT affect header/footer)
   Author: Gemini AI - Zero Error Policy Enforced
═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   1. CSS CUSTOM PROPERTIES (Scoped to prevent conflicts)
───────────────────────────────────────────────────────────────────────────── */
.service-detail-wrapper {
    /* Premium Palette */
    --ms-navy: #0A2342;
    --ms-gold: #C9A961;
    --ms-white: #FFFFFF;
    --ms-bg-light: #F8FAFC;
    --ms-text-primary: #1E293B;
    --ms-text-secondary: #64748B;
    --ms-border: #E2E8F0;

    /* Thumb Zone & Safe Areas */
    --ms-header-h: 72px;
    --ms-bottom-bar-h: 72px;
    --ms-sab: env(safe-area-inset-bottom, 0px);
    /* iOS notch safe area */

    /* Transitions */
    --ms-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --ms-transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ms-transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Shadows */
    --ms-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --ms-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --ms-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --ms-shadow-glow: 0 0 20px rgba(201, 169, 97, 0.3);

    /* Typography */
    --ms-font-display: 'Playfair Display', Georgia, serif;
    --ms-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Z-Index Stack (Documented for sanity) */
    --z-content: 1;
    --z-sticky-nav: 100;
    --z-bottom-bar: 200;
    --z-bottom-sheet: 300;
    --z-overlay: 400;
    --z-lightbox: 500;
}

/* ─────────────────────────────────────────────────────────────────────────────
   2. RESET & BASE (Scoped)
───────────────────────────────────────────────────────────────────────────── */
.service-detail-wrapper {
    font-family: var(--ms-font-body);
    color: var(--ms-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.service-detail-wrapper *,
.service-detail-wrapper *::before,
.service-detail-wrapper *::after {
    box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────────────────────────────
   3. STORY-STYLE HERO (Full Viewport, Mobile-First)
───────────────────────────────────────────────────────────────────────────── */
.ms-hero {
    position: relative;
    min-height: 55vh;
    /* Reduced height for mobile - easier to scan */
    max-height: 500px;
    /* Cap max height */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 0 calc(var(--ms-bottom-bar-h) + 16px + var(--ms-sab)) 0;
    background: var(--ms-navy);
    overflow: hidden;
}

.ms-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ms-hero__media img,
.ms-hero__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ms-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(10, 35, 66, 0.98) 0%,
            rgba(10, 35, 66, 0.85) 35%,
            rgba(10, 35, 66, 0.5) 70%,
            rgba(10, 35, 66, 0.3) 100%);
    z-index: 1;
}

.ms-hero__content {
    position: relative;
    z-index: 2;
    padding: 24px;
    color: var(--ms-white);
}

.ms-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 16px;
}

.ms-hero__breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.ms-hero__breadcrumb span {
    opacity: 0.5;
}

.ms-hero__title {
    font-family: var(--ms-font-display);
    font-size: clamp(1.75rem, 7vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 12px;
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 4px 24px rgba(0, 0, 0, 0.4);
    /* Strong contrast */
}

.ms-hero__subtitle {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 540px;
    margin-bottom: 24px;
}

/* Trust Badges (Glassmorphism) */
.ms-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ms-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ms-white);
}

.ms-badge svg {
    width: 14px;
    height: 14px;
    color: var(--ms-gold);
}

/* ─────────────────────────────────────────────────────────────────────────────
   4. STICKY BOTTOM ACTION BAR (Thumb Zone)
───────────────────────────────────────────────────────────────────────────── */
.ms-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-bottom-bar);
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 12px;
    height: var(--ms-bottom-bar-h);
    padding: 12px 16px calc(12px + var(--ms-sab));
    background: var(--ms-white);
    border-top: 1px solid var(--ms-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.ms-bottom-bar__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 16px;
    border: none;
    border-radius: 12px;
    font-family: var(--ms-font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--ms-transition-fast), box-shadow var(--ms-transition-fast);
    text-decoration: none;
}

.ms-bottom-bar__btn--primary {
    background: var(--ms-gold);
    color: var(--ms-navy);
}

.ms-bottom-bar__btn--primary:active {
    transform: scale(0.96);
}

.ms-bottom-bar__btn--secondary {
    background: var(--ms-navy);
    color: var(--ms-white);
}

.ms-bottom-bar__btn--whatsapp {
    background: #25D366;
    color: var(--ms-white);
    flex: 0 0 48px;
    padding: 0;
}

.ms-bottom-bar__btn--ai {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--ms-white);
    flex: 1;
}

.ms-bottom-bar__btn--ai:active {
    transform: scale(0.96);
}

.ms-bottom-bar__btn svg {
    width: 20px;
    height: 20px;
}

/* Hide on Desktop (show sidebar instead) */
@media (min-width: 992px) {
    .ms-bottom-bar {
        display: none;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   5. SMART STICKY TOP NAV (Hide on scroll down, show on scroll up)
───────────────────────────────────────────────────────────────────────────── */
.ms-sticky-nav {
    position: sticky;
    top: var(--ms-header-h);
    z-index: var(--z-sticky-nav);
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ms-border);
    transform: translateY(0);
    transition: transform var(--ms-transition-smooth);
}

.ms-sticky-nav.is-hidden {
    transform: translateY(-100%);
}

.ms-sticky-nav__list {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ms-sticky-nav__list::-webkit-scrollbar {
    display: none;
}

.ms-sticky-nav__item {
    scroll-snap-align: start;
}

.ms-sticky-nav__link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ms-text-secondary);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color var(--ms-transition-fast), border-color var(--ms-transition-fast);
}

.ms-sticky-nav__link.is-active,
.ms-sticky-nav__link:hover {
    color: var(--ms-navy);
    border-color: var(--ms-gold);
}

.ms-sticky-nav__link svg {
    width: 16px;
    height: 16px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   6. CONTENT SECTIONS (Snap Scroll on Mobile)
───────────────────────────────────────────────────────────────────────────── */
.ms-content {
    padding-bottom: calc(var(--ms-bottom-bar-h) + var(--ms-sab) + 24px);
}

.ms-section {
    padding: 48px 20px;
    scroll-margin-top: calc(var(--ms-header-h) + 60px);
}

.ms-section--alt {
    background: var(--ms-bg-light);
}

.ms-section__header {
    margin-bottom: 32px;
}

.ms-section__title {
    font-family: var(--ms-font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ms-navy);
    margin: 0 0 8px;
}

.ms-section__subtitle {
    font-size: 1rem;
    color: var(--ms-text-secondary);
    margin: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   7. BENTO GRID (Asymmetric Mobile Layout)
───────────────────────────────────────────────────────────────────────────── */
.ms-bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.ms-bento__item {
    position: relative;
    padding: 20px;
    background: var(--ms-white);
    border: 1px solid var(--ms-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform var(--ms-transition-smooth), box-shadow var(--ms-transition-smooth);
}

.ms-bento__item:active {
    transform: scale(0.98);
}

/* Large item spans 2 columns */
.ms-bento__item--lg {
    grid-column: span 2;
}

/* Featured item with gold accent */
.ms-bento__item--featured {
    background: linear-gradient(135deg, var(--ms-navy) 0%, #0d3659 100%);
    color: var(--ms-white);
    border: none;
}

.ms-bento__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 169, 97, 0.1);
    border-radius: 10px;
    margin-bottom: 12px;
    color: var(--ms-gold);
}

.ms-bento__icon svg {
    width: 20px;
    height: 20px;
}

.ms-bento__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ms-navy);
    margin: 0 0 6px;
}

.ms-bento__item--featured .ms-bento__title {
    color: var(--ms-white);
}

.ms-bento__desc {
    font-size: 0.85rem;
    color: var(--ms-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.ms-bento__item--featured .ms-bento__desc {
    color: rgba(255, 255, 255, 0.7);
}

/* Number highlight for stats */
.ms-bento__stat {
    font-family: var(--ms-font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ms-gold);
    line-height: 1;
    margin-bottom: 4px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   8. SWIPER GALLERY (Instagram Story Mode)
───────────────────────────────────────────────────────────────────────────── */
.ms-gallery-swiper {
    margin: 0 -20px;
    padding: 0 20px;
}

.ms-gallery-swiper .swiper-slide {
    width: 85%;
    max-width: 320px;
}

.ms-gallery-card {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 16px;
    overflow: hidden;
    background: var(--ms-navy);
}

.ms-gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ms-transition-smooth);
}

.ms-gallery-card:active img {
    transform: scale(1.05);
}

.ms-gallery-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    color: var(--ms-white);
}

.ms-gallery-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px;
}

.ms-gallery-card__location {
    font-size: 0.8rem;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   9. BOTTOM SHEET (Technical Specs Panel)
───────────────────────────────────────────────────────────────────────────── */
.ms-bottom-sheet {
    position: fixed;
    inset: 0;
    z-index: var(--z-bottom-sheet);
    display: flex;
    align-items: flex-end;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity var(--ms-transition-smooth);
}

.ms-bottom-sheet.is-open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.ms-bottom-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.ms-bottom-sheet__panel {
    position: relative;
    width: 100%;
    max-height: 85vh;
    background: var(--ms-white);
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform var(--ms-transition-smooth);
}

.ms-bottom-sheet.is-open .ms-bottom-sheet__panel {
    transform: translateY(0);
}

.ms-bottom-sheet__handle {
    width: 40px;
    height: 4px;
    background: var(--ms-border);
    border-radius: 2px;
    margin: 12px auto;
}

.ms-bottom-sheet__header {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--ms-border);
}

.ms-bottom-sheet__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ms-navy);
    margin: 0;
}

.ms-bottom-sheet__body {
    padding: 20px;
    overflow-y: auto;
    max-height: 60vh;
    -webkit-overflow-scrolling: touch;
}

/* ─────────────────────────────────────────────────────────────────────────────
   10. SKELETON LOADING (Ghost Elements)
───────────────────────────────────────────────────────────────────────────── */
.ms-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.ms-skeleton--text {
    height: 1em;
    margin-bottom: 0.5em;
}

.ms-skeleton--title {
    height: 2em;
    width: 70%;
    margin-bottom: 1em;
}

.ms-skeleton--image {
    width: 100%;
    aspect-ratio: 16 / 9;
}

/* ─────────────────────────────────────────────────────────────────────────────
   11. RIPPLE EFFECT (Haptic Visual Feedback)
───────────────────────────────────────────────────────────────────────────── */
.ms-ripple {
    position: relative;
    overflow: hidden;
}

.ms-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(201, 169, 97, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

.ms-ripple:active::after {
    width: 200%;
    padding-bottom: 200%;
    opacity: 1;
    transition: width 0.4s, padding-bottom 0.4s, opacity 0.4s;
}

/* ─────────────────────────────────────────────────────────────────────────────
   12. DESKTOP ADAPTATIONS (min-width: 992px)
───────────────────────────────────────────────────────────────────────────── */
@media (min-width: 992px) {
    .ms-hero {
        min-height: 70vh;
        padding: 80px 0;
        justify-content: center;
    }

    .ms-hero__content {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 40px;
    }

    .ms-content {
        max-width: 1200px;
        margin: 0 auto;
        padding: 60px 40px;
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 60px;
    }

    .ms-section {
        padding: 0 0 60px;
    }

    .ms-bento {
        grid-template-columns: repeat(3, 1fr);
    }

    .ms-bento__item:hover {
        transform: translateY(-4px);
        box-shadow: var(--ms-shadow-lg);
    }

    .ms-gallery-swiper {
        margin: 0;
        padding: 0;
    }

    .ms-gallery-swiper .swiper-slide {
        width: 100%;
        max-width: none;
    }

    /* Desktop Sidebar (replaces bottom bar) */
    .ms-sidebar {
        position: sticky;
        top: calc(var(--ms-header-h) + 24px);
        align-self: start;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   13. UTILITY CLASSES
───────────────────────────────────────────────────────────────────────────── */
.ms-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.ms-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ms-text-gold {
    color: var(--ms-gold);
}

.ms-text-navy {
    color: var(--ms-navy);
}

.ms-bg-gold {
    background-color: var(--ms-gold);
}

.ms-bg-navy {
    background-color: var(--ms-navy);
}