/* =============================================================
   HIMS - Hospital Management System | Custom Stylesheet
   Complements TailwindCSS CDN
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ─── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Custom Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #1d4ed8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #1e40af; }

/* ─── Navbar ─────────────────────────────────────────────────── */
#navbar { transition: all 0.35s ease; }
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.08);
}
#navbar.scrolled .nav-link {
    color: #334155;
}
#navbar.scrolled .nav-link:hover {
    color: #1d4ed8;
    background-color: #eff6ff;
}
#navbar.scrolled .logo-text {
    color: #1e3a8a;
}
#navbar.scrolled #menu-btn {
    color: #1e3a8a;
}
#navbar.scrolled #menu-btn:hover {
    background-color: #f1f5f9;
}

/* ─── Hero ───────────────────────────────────────────────────── */
.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(15, 34, 64, 0.93) 0%,
        rgba(15, 34, 64, 0.80) 55%,
        rgba(14, 165, 233, 0.18) 100%
    );
}

/* ─── Gradient Text ──────────────────────────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, #38bdf8, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-blue {
    background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af, #0284c7);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(29, 78, 216, 0.40);
}

.btn-outline-white {
    border: 2px solid rgba(255, 255, 255, 0.75);
    transition: all 0.3s ease;
}
.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    transform: translateY(-2px);
}

.btn-outline-blue {
    border: 2px solid #1d4ed8;
    color: #1d4ed8;
    transition: all 0.3s ease;
}
.btn-outline-blue:hover { background: #eff6ff; transform: translateY(-2px); }

/* ─── Stats Strip ────────────────────────────────────────────── */
.stats-strip {
    background: linear-gradient(135deg, #0f2240 0%, #1e3a8a 100%);
}

/* ─── Feature Cards ──────────────────────────────────────────── */
.feature-card {
    transition: all 0.35s ease;
    will-change: transform, box-shadow;
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(29, 78, 216, 0.12);
}
.feature-card .icon-wrap {
    transition: all 0.35s ease;
}
.feature-card:hover .icon-wrap {
    background: #1d4ed8;
    transform: scale(1.1);
}
.feature-card:hover .icon-wrap svg {
    color: white !important;
}

/* ─── Module Cards ───────────────────────────────────────────── */
.module-card {
    transition: all 0.4s ease;
    overflow: hidden;
}
.module-card:hover { transform: translateY(-6px); box-shadow: 0 30px 70px rgba(0,0,0,0.2); }
.module-card .module-bg { transition: transform 0.6s ease; }
.module-card:hover .module-bg { transform: scale(1.06); }
.module-overlay { transition: opacity 0.4s ease; }
.module-card:hover .module-overlay { opacity: 0.88; }
.module-card .learn-more { transition: all 0.3s ease; transform: translateY(8px); opacity: 0; }
.module-card:hover .learn-more { transform: translateY(0); opacity: 1; }

/* ─── Client Logos ───────────────────────────────────────────── */
.client-logo-card {
    transition: all 0.4s ease;
}
.client-logo-card:hover {
    transform: scale(1.05);
}

/* ─── Video Card ─────────────────────────────────────────────── */
.video-card { cursor: pointer; transition: all 0.35s ease; overflow: hidden; }
.video-card:hover { transform: translateY(-4px); box-shadow: 0 30px 70px rgba(0,0,0,0.3); }
.video-card .play-btn { transition: all 0.35s ease; }
.video-card:hover .play-btn {
    background: rgba(29, 78, 216, 0.95);
    transform: scale(1.12);
}

/* ─── FAQ Accordion ──────────────────────────────────────────── */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.faq-answer.open { max-height: 600px; opacity: 1; padding-top: 0.25rem; }
.faq-icon-plus {
    transition: transform 0.35s ease;
    flex-shrink: 0;
    margin-top: 2px;
}
.faq-item.active .faq-icon-plus { transform: rotate(45deg); }
.faq-btn {
    transition: background 0.25s ease;
    align-items: flex-start;
}
.faq-btn:hover { background: #f8fafc; }

/* ─── Form field error state ─────────────────────────────────── */
.form-field.error {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

/* ─── App Screenshot Shadow ──────────────────────────────────── */
.app-screenshot {
    filter: drop-shadow(0 40px 80px rgba(29, 78, 216, 0.18));
}
@media (max-width: 1024px) {
    .app-screenshot {
        filter: drop-shadow(0 8px 24px rgba(29, 78, 216, 0.12));
    }
}

/* ─── Mobile Menu ────────────────────────────────────────────── */
#mobile-menu { display: none; }
#mobile-menu.open { display: block; }

/* ─── Scroll Animations ──────────────────────────────────────── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }
.animate-on-scroll.delay-5 { transition-delay: 0.5s; }
.animate-on-scroll.delay-6 { transition-delay: 0.6s; }

/* ─── Float Animation ────────────────────────────────────────── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}
.animate-float { animation: float 5s ease-in-out infinite; }

/* ─── Pulse Dot ──────────────────────────────────────────────── */
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}
.pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

/* ─── Modal ──────────────────────────────────────────────────── */
#video-modal { transition: opacity 0.3s ease; }
#video-modal iframe { border-radius: 12px; }

/* ─── Form Inputs ────────────────────────────────────────────── */
.form-field {
    border: 2px solid #e2e8f0;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-field:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.10);
}
.form-field.error { border-color: #ef4444; }

/* ─── Section Badges ─────────────────────────────────────────── */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    letter-spacing: 0.01em;
}

/* ─── CTA Banner ─────────────────────────────────────────────── */
.cta-banner {
    background: linear-gradient(135deg, #0f2240 0%, #1d4ed8 60%, #0ea5e9 100%);
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    border-radius: 50%;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.footer-bg {
    background: linear-gradient(180deg, #0f2240 0%, #091830 100%);
}

/* ─── Dividers / Shapes ──────────────────────────────────────── */
.wave-top {
    margin-bottom: -2px;
    line-height: 0;
}
.wave-top svg {
    display: block;
    width: 100%;
}

/* ─── Tag / Pill ─────────────────────────────────────────────── */
.tag {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 9999px;
    color: rgba(255,255,255,0.9);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.35rem 1rem;
    gap: 0.4rem;
}

/* ─── Alert Messages ─────────────────────────────────────────── */
.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ─── Responsive fixes ───────────────────────────────────────── */
@media (max-width: 640px) {
    .hero-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
