/* MaxiCare UAE — Facility Management */

body {
    font-family: 'Montserrat', sans-serif;
    scroll-behavior: smooth;
}

:root {
    --primary: #1a3c5e;
    --accent: #d97706;
}

/* ── Scroll progress bar ─────────────────────────────────────────────────── */
#scroll-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(to right, #d97706, #1a3c5e);
    z-index: 9999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ── Sticky nav ──────────────────────────────────────────────────────────── */
#site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    transition: background 0.35s ease, box-shadow 0.35s ease;
}
#site-nav.scrolled {
    background: rgba(10, 20, 40, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 24px rgba(0,0,0,0.22);
}
#site-nav.scrolled .nav-link { color: rgba(255,255,255,0.88) !important; }
#site-nav.scrolled .nav-link:hover { color: #fbbf24 !important; }
#site-nav.scrolled .brand-name { color: white !important; }
#site-nav.scrolled #nav-toggle { color: white !important; }
#site-nav.scrolled #mobile-menu {
    background: rgba(10, 20, 40, 0.95);
    border-color: rgba(255,255,255,0.08);
}
#site-nav.scrolled #mobile-menu a { color: rgba(255,255,255,0.85) !important; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero-container {
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
    max-height: 840px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hero-pill {
    border-radius: 500px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    flex: 1;
    min-height: 140px;
    max-height: 420px;
}

@media (max-height: 700px) {
    .hero-pill { min-height: 110px; max-height: 260px; }
    .hero-heading { font-size: clamp(1.5rem, 5vh, 3.75rem); }
}

/* Ken Burns */
@keyframes kenburns {
    from { transform: scale(1); }
    to   { transform: scale(1.06); }
}
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kenburns 12s ease-out forwards;
    transform-origin: center center;
}

/* Hero text reveal */
.hero-line-wrap {
    display: block;
    overflow: hidden;
    line-height: 1.05;
}
.hero-word { display: block; }

/* ── Floating badge ─────────────────────────────────────────────────────── */
.floating-badge { animation: rotate 20s linear infinite; }

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── CTA shimmer sweep ───────────────────────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.shimmer-btn {
    position: relative;
    overflow: hidden;
}
.shimmer-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.28) 50%, transparent 65%);
    background-size: 250% 100%;
    background-position: -200% center;
    animation: shimmer 3.8s ease-in-out infinite;
    pointer-events: none;
    border-radius: inherit;
}

/* ── Section heading underline draw ─────────────────────────────────────── */
.draw-underline {
    position: relative;
    display: inline-block;
}
.draw-underline::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    height: 3px;
    width: 0;
    background: #d97706;
    border-radius: 2px;
    transition: width 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.draw-underline.visible::after { width: 56px; }

/* ── WhatsApp sonar pulse ────────────────────────────────────────────────── */
@keyframes sonar {
    0%   { transform: scale(1); opacity: 0.55; }
    100% { transform: scale(1.9); opacity: 0; }
}
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.whatsapp-float::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25d366;
    animation: sonar 2.5s ease-out infinite;
    z-index: -1;
}
.whatsapp-float:hover { transform: scale(1.1) rotate(5deg); }
.whatsapp-float:focus-visible { outline: 3px solid #25d366; outline-offset: 4px; }

/* ── Mobile nav ─────────────────────────────────────────────────────────── */
.mobile-menu { display: none; }
.mobile-menu.open { display: flex; }

/* ── Service cards — 3D tilt hover ─────────────────────────────────────── */
.service-card {
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    will-change: transform;
}
.service-card:hover .service-icon { background-color: #1a3c5e; }
.service-card:hover .service-icon i { color: white; }

.card-sheen {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.25s ease;
}
.service-card > *:not(.card-sheen) { position: relative; z-index: 2; }

/* ── Why Us cards — animated gradient border on hover ───────────────────── */
.why-card {
    position: relative;
    border-radius: 20px;
    background: #f9fafb; /* matches bg-gray-50 parent */
    z-index: 0;
    transition: transform 0.25s ease;
}
.why-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: linear-gradient(135deg, #d97706, #1a3c5e, #d97706, #1a3c5e);
    background-size: 300% 300%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    animation: grad-border 3s ease infinite;
}
.why-card:hover::before { opacity: 1; }
.why-card:hover { transform: translateY(-4px); }
@keyframes grad-border {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

/* ── FAQ smooth height transition ───────────────────────────────────────── */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}
.faq-answer.open {
    max-height: 400px;
    opacity: 1;
}

/* ── Sectors marquee ─────────────────────────────────────────────────────── */
.sectors-wrap {
    overflow: hidden;
    width: 100%;
    padding: 4px 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.sectors-track {
    display: inline-flex;
    animation: marquee 22s linear infinite;
    white-space: nowrap;
}
.sectors-track:hover { animation-play-state: paused; }
.sector-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    color: rgba(255,255,255,0.82);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.1);
    transition: color 0.2s ease;
}
.sector-item:hover { color: #fbbf24; }
.sector-item i { color: #fbbf24; font-size: 15px; flex-shrink: 0; }
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── Category badge ─────────────────────────────────────────────────────── */
.cat-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    background: #eff6ff;
    color: #1a3c5e;
    margin-bottom: 8px;
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .floating-badge, .hero-img, .sectors-track,
    .shimmer-btn::after, .whatsapp-float::before { animation: none; }
    .draw-underline::after { transition: none; }
    * { transition-duration: 0.01ms !important; }
}
