/* ==========================================================================
   KMU Modern Animations & Interactive Effects (JS/CSS)
   Smooth 60FPS Micro-Interactions, Scroll Reveal & Mobile Responsive
   ========================================================================== */

/* 1. Radar Pulse Indicator for Live Doctor Standby */
.kmu-radar-ping {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    position: relative;
    margin-right: 6px;
    vertical-align: middle;
}
.kmu-radar-ping::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid #22c55e;
    animation: kmuPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes kmuPing {
    0% { transform: scale(0.9); opacity: 1; }
    75%, 100% { transform: scale(2.4); opacity: 0; }
}

/* 2. Soft Floating Animation for Hero Card & Visual Badges */
.kmu-float-soft {
    animation: kmuFloatSoft 4.5s ease-in-out infinite;
}
@keyframes kmuFloatSoft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* 3. Hero CTA Glowing Pulse */
.kmu-btn-hero-wa {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.kmu-btn-hero-wa:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.45) !important;
}
.kmu-btn-hero-wa::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-20deg);
    transition: 0.75s;
}
.kmu-btn-hero-wa:hover::before {
    left: 150%;
}

/* 4. Scroll Reveal Animations (Intersection Observer) */
.kmu-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.kmu-reveal.kmu-revealed {
    opacity: 1;
    transform: translateY(0);
}
.kmu-reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.kmu-reveal-left.kmu-revealed {
    opacity: 1;
    transform: translateX(0);
}
.kmu-reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.kmu-reveal-right.kmu-revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger delays for grid items */
.kmu-stagger-1 { transition-delay: 0.08s; }
.kmu-stagger-2 { transition-delay: 0.16s; }
.kmu-stagger-3 { transition-delay: 0.24s; }
.kmu-stagger-4 { transition-delay: 0.32s; }
.kmu-stagger-5 { transition-delay: 0.40s; }
.kmu-stagger-6 { transition-delay: 0.48s; }

/* 5. Animated Rotating Hero Ticker */
.kmu-hero-ticker-wrap {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    overflow: hidden;
}
.kmu-hero-ticker-text {
    display: inline-block;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.kmu-ticker-fade-out {
    opacity: 0;
    transform: translateY(-10px);
}
.kmu-ticker-fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* 6. Sticky Header Enhanced Blur on Scroll */
.kmu-navbar-wrap.kmu-header-scrolled {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 4px 20px rgba(11, 37, 69, 0.08) !important;
    transition: all 0.3s ease;
}

/* 7. WhatsApp Gate Modal Styles (Responsive Mobile Drawer & Desktop Dialog) */
.kmu-wa-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 37, 69, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.kmu-wa-modal-backdrop.kmu-active {
    display: flex;
    opacity: 1;
}
.kmu-wa-modal-dialog {
    background: #ffffff;
    width: 92%;
    max-width: 480px;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: scale(0.92) translateY(20px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(226, 232, 240, 0.8);
}
.kmu-wa-modal-backdrop.kmu-active .kmu-wa-modal-dialog {
    transform: scale(1) translateY(0);
}

.kmu-wa-modal-header {
    background: linear-gradient(135deg, #0b3b60 0%, #00a896 100%);
    color: #ffffff;
    padding: 24px 26px 20px;
    position: relative;
}
.kmu-wa-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}
.kmu-wa-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

.kmu-wa-modal-body {
    padding: 26px 26px 24px;
}
.kmu-wa-field-group {
    margin-bottom: 18px;
    text-align: left;
}
.kmu-wa-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 7px;
}
.kmu-wa-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.kmu-wa-input-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
}
.kmu-wa-input {
    width: 100%;
    height: 46px;
    padding: 10px 14px 10px 42px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}
.kmu-wa-input:focus {
    border-color: #00a896;
    box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.15);
}

.kmu-wa-badge-service {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e0f2fe;
    color: #0369a1;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 16px;
    width: 100%;
}

.kmu-wa-submit-btn {
    width: 100%;
    height: 48px;
    background: #25d366;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
    transition: all 0.25s ease;
    font-family: inherit;
}
.kmu-wa-submit-btn:hover {
    background: #1eb956;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}
.kmu-wa-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Mobile Drawer Adaptation for Screens <= 767px */
@media (max-width: 767px) {
    .kmu-wa-modal-backdrop {
        align-items: flex-end;
    }
    .kmu-wa-modal-dialog {
        width: 100%;
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        max-height: 85vh;
        overflow-y: auto;
    }
    .kmu-wa-modal-backdrop.kmu-active .kmu-wa-modal-dialog {
        transform: translateY(0);
    }
    .kmu-wa-modal-header {
        padding: 20px 20px 16px;
    }
    .kmu-wa-modal-body {
        padding: 20px 20px 28px;
    }
}

/* ==========================================================================
   KMU Parallax & Ambient Supporting Graphics (Requirement 3)
   ========================================================================== */
.kmu-parallax-hero {
    position: relative;
    overflow: hidden;
}
.kmu-hero-parallax-layer {
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    bottom: -40px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.18;
    pointer-events: none;
    z-index: 1;
    transform: translateZ(0);
    will-change: transform;
    transition: transform 0.15s ease-out;
}
.kmu-hero .container {
    position: relative;
    z-index: 3;
}

/* Floating Ambient Orbs */
.kmu-floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(55px);
    pointer-events: none;
    z-index: 2;
    opacity: 0.32;
    animation: kmuOrbFloat 9s ease-in-out infinite alternate;
}
.kmu-orb-1 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, #5eead4 0%, rgba(94, 234, 212, 0) 70%);
    top: -50px;
    right: 5%;
    animation-duration: 8s;
}
.kmu-orb-2 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, #38bdf8 0%, rgba(56, 189, 248, 0) 70%);
    bottom: 20px;
    left: -40px;
    animation-duration: 11s;
    animation-delay: -3s;
}
.kmu-orb-3 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, #22c55e 0%, rgba(34, 197, 94, 0) 70%);
    top: 40%;
    left: 45%;
    animation-duration: 10s;
    animation-delay: -5s;
    opacity: 0.22;
}
@keyframes kmuOrbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(25px, -20px) scale(1.08); }
    100% { transform: translate(-20px, 18px) scale(0.95); }
}

/* Animated ECG Wave Divider */
.kmu-hero-ecg-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 38px;
    overflow: hidden;
    line-height: 0;
    z-index: 3;
    pointer-events: none;
}
.kmu-ecg-svg {
    width: 100%;
    height: 100%;
    display: block;
}
.kmu-ecg-line {
    stroke: rgba(94, 234, 212, 0.45);
    stroke-width: 2.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: kmuEcgWaveAnim 4s linear infinite;
}
@keyframes kmuEcgWaveAnim {
    0% { stroke-dashoffset: 600; }
    100% { stroke-dashoffset: -600; }
}

/* CTA Parallax Section */
.kmu-parallax-cta-section {
    position: relative;
    overflow: hidden;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 75px 0;
}
@media (max-width: 991px) {
    .kmu-parallax-cta-section {
        background-attachment: scroll;
    }
}
.kmu-parallax-cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(7, 30, 51, 0.92) 0%, rgba(0, 168, 150, 0.88) 100%);
    z-index: 1;
}
.kmu-parallax-cta-section .container {
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   Column Enhancements: Ultra Eye-Catching Cards & Micro-Interactions
   ========================================================================== */

/* 1. Quick Action 4 Cards: Glow Borders, Micro-Bounce, Soft Lift */
.quick-action-card {
    border-radius: 18px !important;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.38s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.38s ease !important;
    border: 1.5px solid rgba(226, 232, 240, 0.8) !important;
}
.quick-action-card:hover {
    transform: translateY(-8px) scale(1.012) !important;
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.12), 0 0 0 2px rgba(0, 168, 150, 0.25) !important;
}
.quick-action-card.card-red:hover {
    border-color: rgba(239, 68, 68, 0.5) !important;
    box-shadow: 0 20px 38px rgba(239, 68, 68, 0.16), 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}
.quick-action-card.card-teal:hover {
    border-color: rgba(0, 168, 150, 0.5) !important;
    box-shadow: 0 20px 38px rgba(0, 168, 150, 0.18), 0 0 0 2px rgba(0, 168, 150, 0.28) !important;
}
.quick-action-card.card-green:hover {
    border-color: rgba(34, 197, 94, 0.5) !important;
    box-shadow: 0 20px 38px rgba(34, 197, 94, 0.16), 0 0 0 2px rgba(34, 197, 94, 0.25) !important;
}
.quick-action-card.card-blue:hover {
    border-color: rgba(2, 132, 199, 0.5) !important;
    box-shadow: 0 20px 38px rgba(2, 132, 199, 0.16), 0 0 0 2px rgba(2, 132, 199, 0.25) !important;
}
.quick-action-card .kmu-card-icon-box {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.quick-action-card:hover .kmu-card-icon-box {
    transform: scale(1.14) rotate(-6deg) !important;
}

/* 2. Doctor On Call 6 Services Cards: Top Trim Accent & Feature Check Glow */
.kmu-oncall-card {
    position: relative;
    border-radius: 18px !important;
    transition: all 0.38s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06) !important;
}
.kmu-oncall-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 3.5px;
    background: linear-gradient(90deg, transparent, #00a896, transparent);
    border-radius: 3px 3px 0 0;
    transition: left 0.35s ease, right 0.35s ease, height 0.35s ease;
    opacity: 0.8;
}
.kmu-oncall-card:hover::before {
    left: 0;
    right: 0;
    height: 4.5px;
    background: linear-gradient(90deg, #00a896, #0284c7);
}
.kmu-oncall-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 22px 42px rgba(0, 168, 150, 0.16) !important;
    border-color: rgba(0, 168, 150, 0.45) !important;
}
.kmu-oncall-features li {
    transition: transform 0.2s ease;
}
.kmu-oncall-card:hover .kmu-oncall-features li {
    transform: translateX(4px);
}
.kmu-oncall-features li i.fa-check-circle {
    color: #10b981 !important;
    filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.3));
}

/* 3. Doctor Profile Card: Glowing Ring & Elevation */
.kmu-doctor-card {
    border-radius: 18px !important;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
}
.kmu-doctor-card:hover {
    transform: translateY(-7px) !important;
    box-shadow: 0 20px 38px rgba(11, 59, 96, 0.14) !important;
    border-color: #00a896 !important;
}
.kmu-doctor-photo {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 0 0 2.5px rgba(0, 168, 150, 0.35) !important;
}
.kmu-doctor-card:hover .kmu-doctor-photo {
    transform: scale(1.06);
    box-shadow: 0 0 0 4px rgba(0, 168, 150, 0.7), 0 8px 18px rgba(0, 168, 150, 0.25) !important;
}

/* 4. Patient Flow Steps (Alur Pelayanan 4 Columns) */
.flow-step-box {
    border-radius: 18px !important;
    position: relative;
    border: 1.5px solid #e2e8f0 !important;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
}
.flow-step-box:hover {
    transform: translateY(-8px) !important;
    border-color: #00a896 !important;
    box-shadow: 0 18px 36px rgba(0, 168, 150, 0.13) !important;
}
.flow-step-box .flow-number {
    background: linear-gradient(135deg, #00a896 0%, #0284c7 100%) !important;
    box-shadow: 0 6px 14px rgba(0, 168, 150, 0.38) !important;
    transition: transform 0.3s ease;
}
.flow-step-box:hover .flow-number {
    transform: scale(1.15) rotate(5deg);
}

/* 5. Modern Facilities & Article Card Zooms */
.kmu-facility-card, .kmu-article-card {
    border-radius: 18px !important;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
}
.kmu-facility-card:hover, .kmu-article-card:hover {
    transform: translateY(-7px) !important;
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.13) !important;
}
.kmu-facility-img-wrap img, .kmu-article-img-wrap img {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.kmu-facility-card:hover .kmu-facility-img-wrap img,
.kmu-article-card:hover .kmu-article-img-wrap img {
    transform: scale(1.08);
}
