/* ===================================================
   HealthCare Plus — Premium Design System
   A modern, glassmorphic Bengali healthcare portal
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');

/* ── 1. Design Tokens ── */
:root {
    /* Primary Palette — Deep Medical Blue to Teal */
    --primary: #0066ff;
    --primary-light: #4d94ff;
    --primary-dark: #0044cc;
    --primary-glow: rgba(0, 102, 255, 0.35);
    --primary-gradient: linear-gradient(135deg, #0066ff 0%, #00b4d8 100%);

    /* Accent / Semantic Colors */
    --success: #00c853;
    --success-soft: rgba(0, 200, 83, 0.12);
    --warning: #ffab00;
    --warning-soft: rgba(255, 171, 0, 0.12);
    --danger: #ff3d71;
    --danger-soft: rgba(255, 61, 113, 0.12);
    --info: #00b4d8;
    --info-soft: rgba(0, 180, 216, 0.12);

    /* Neutrals */
    --text-heading: #0a1628;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-on-dark: #e2e8f0;

    /* Surfaces */
    --bg-body: #f0f4f8;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: 20px;

    /* Depth */
    --shadow-sm: 0 2px 8px rgba(10, 22, 40, 0.06);
    --shadow-md: 0 8px 30px rgba(10, 22, 40, 0.10);
    --shadow-lg: 0 20px 60px rgba(10, 22, 40, 0.14);
    --shadow-glow: 0 8px 32px var(--primary-glow);

    /* Border */
    --border-light: rgba(0, 0, 0, 0.06);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transition */
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --duration: 0.35s;
}

/* ── 2. Base Reset ── */
*,
*::before,
*::after { box-sizing: border-box; }

body {
    font-family: 'Hind Siliguri', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-body);
    padding-top: 80px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── 3. Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Hind Siliguri', sans-serif;
    color: var(--text-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-warning { color: var(--warning) !important; }
.text-info    { color: var(--info)    !important; }

a { color: var(--primary); transition: color var(--duration) var(--ease-out); }
a:hover { color: var(--primary-dark); }

/* ── 4. Glassmorphic Navbar ── */
.glass-nav {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border-bottom: 3px solid var(--primary);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: all var(--duration) var(--ease-out);
    z-index: 1050;
}

.glass-nav .navbar-brand {
    font-size: 1.35rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-nav .navbar-brand i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-nav .nav-link {
    font-weight: 600;
    color: var(--text-body) !important;
    position: relative;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease-out);
    font-size: 0.95rem;
}

.glass-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2.5px;
    background: var(--primary-gradient);
    border-radius: 3px;
    transform: translateX(-50%);
    transition: width var(--duration) var(--ease-out);
}

.glass-nav .nav-link:hover {
    color: var(--primary) !important;
    background: rgba(0, 102, 255, 0.05);
}

.glass-nav .nav-link:hover::after,
.glass-nav .nav-link.active::after {
    width: 60%;
}

.glass-nav .nav-link.active {
    color: var(--primary) !important;
}

/* Login button in navbar — override underline */
.glass-nav .nav-link.btn::after {
    display: none;
}

.glass-nav .nav-link.btn.btn-primary {
    background: var(--primary-gradient) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 15px var(--primary-glow);
    padding: 8px 24px;
    font-weight: 600;
}

.glass-nav .nav-link.btn.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    background: linear-gradient(135deg, #0044cc 0%, #0090b8 100%) !important;
}

/* Dropdown */
.glass-dropdown {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 10px 0;
    animation: dropdownReveal 0.3s var(--ease-out);
}

@keyframes dropdownReveal {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.glass-dropdown .dropdown-item {
    padding: 10px 22px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    margin: 2px 8px;
    transition: all 0.25s var(--ease-out);
    color: var(--text-body);
}

.glass-dropdown .dropdown-item:hover,
.glass-dropdown .dropdown-item.active {
    background: rgba(0, 102, 255, 0.08);
    color: var(--primary);
    transform: translateX(4px);
}

/* ── 5. Cards — Premium Glass ── */
.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--duration) var(--ease-out);
    overflow: hidden;
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--duration) var(--ease-out);
}

.glass-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 102, 255, 0.15);
}

.glass-card:hover::before {
    opacity: 1;
}

/* ── 6. Hero Section ── */
.hero-section {
    background: linear-gradient(135deg, #0a1628 0%, #0d2847 30%, #0f3460 50%, #0a1628 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
    margin-top: -80px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroOrb1 12s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroOrb2 15s ease-in-out infinite;
}

@keyframes heroOrb1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-60px, 40px) scale(1.1); }
}

@keyframes heroOrb2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.15); }
}

.hero-section h1 {
    color: #ffffff !important;
    font-size: 2.8rem;
    line-height: 1.25;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 1.1rem;
    line-height: 1.8;
}

.hero-section .badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%) !important;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Hero Card (Right Side) */
.hero-section .glass-card {
    background: rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.hero-section .glass-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.hero-section .glass-card h3 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section .glass-card p {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Float animation for hero card */
.animate-float {
    animation: floatUp 4s ease-in-out infinite;
}

@keyframes floatUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

/* ── 7. Search Box ── */
.search-box-glass {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 6px;
    display: flex;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--duration) var(--ease-out);
}

.search-box-glass:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow), var(--shadow-md);
    background: rgba(255, 255, 255, 0.15);
}

.search-box-glass input {
    border: none;
    background: transparent;
    font-size: 1rem;
    padding: 12px 18px;
    flex-grow: 1;
    color: #ffffff;
}

.search-box-glass input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-box-glass input:focus {
    box-shadow: none;
    outline: none;
}

.search-box-glass .btn {
    border-radius: var(--radius-sm);
    padding: 10px 28px;
    font-weight: 600;
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    transition: all 0.25s var(--ease-out);
}

.search-box-glass .btn:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Search box in content pages (non-hero) */
.main-content-wrapper .search-box-glass {
    background: var(--bg-surface);
    border: 2px solid var(--border-light);
    backdrop-filter: none;
}

.main-content-wrapper .search-box-glass input {
    color: var(--text-body);
}

.main-content-wrapper .search-box-glass input::placeholder {
    color: var(--text-muted);
}

.main-content-wrapper .search-box-glass:focus-within {
    background: var(--bg-surface);
}

/* ── 8. Emergency Button ── */
.btn-emergency {
    position: relative;
    overflow: hidden;
    animation: emergencyPulse 2s ease-in-out infinite;
}

@keyframes emergencyPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 61, 113, 0.5); }
    50% { box-shadow: 0 0 0 12px rgba(255, 61, 113, 0); }
}

/* ── 9. Quick Access Cards ── */
.quick-access-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.quick-access-link:hover {
    color: inherit;
}

.quick-access-link .glass-card {
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--primary) !important;
    border-left: 4px solid var(--primary) !important;
}

.quick-access-link .glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(0, 102, 255, 0.04) 50%, transparent 100%);
    transition: left 0.5s var(--ease-out);
}

.quick-access-link:hover .glass-card::after {
    left: 100%;
}

/* ── 10. Icon Circles ── */
.icon-circle {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 18px;
    transition: all var(--duration) var(--ease-out);
    position: relative;
}

.icon-primary {
    color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 180, 216, 0.08) 100%);
}

.icon-success {
    color: var(--success);
    background: var(--success-soft);
}

.icon-danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.icon-warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.icon-info {
    color: var(--info);
    background: var(--info-soft);
}

.quick-access-link:hover .icon-circle {
    transform: scale(1.1) rotate(-3deg);
}

/* ── 11. Custom Buttons ── */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all var(--duration) var(--ease-out);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0044cc 0%, #0090b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-outline-primary {
    color: var(--primary);
    border: 2px solid var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease-out);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-danger {
    background: linear-gradient(135deg, #ff3d71 0%, #ff1744 100%);
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 61, 113, 0.35);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff1744 0%, #d50000 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 61, 113, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #00c853 0%, #00e676 100%);
    border: none;
    font-weight: 600;
}

.btn-info {
    background: linear-gradient(135deg, #00b4d8 0%, #48cae4 100%);
    border: none;
    font-weight: 600;
}

.btn-warning {
    background: linear-gradient(135deg, #ffab00 0%, #ffc107 100%);
    border: none;
    font-weight: 600;
}

/* ── 12. Widgets Section ── */
.widget-bar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

/* ── 13. Disclaimer / Alert ── */
.glass-disclaimer {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    border: 1px solid rgba(255, 171, 0, 0.2) !important;
    border-radius: var(--radius-md) !important;
    border-left: 4px solid var(--warning) !important;
}

/* ── 14. Form Controls ── */
.form-control,
.form-select {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all var(--duration) var(--ease-out);
    background: var(--bg-surface);
    color: var(--text-body);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: var(--bg-surface);
}

.form-label {
    font-weight: 600;
    color: var(--text-body);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

/* ── 15. Badges ── */
.badge {
    padding: 6px 12px;
    font-weight: 600;
    border-radius: var(--radius-sm) !important;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
}

/* ── 16. Tables ── */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid var(--border-light);
    font-weight: 700;
    color: var(--text-heading);
    padding: 14px 16px;
    font-size: 0.9rem;
}

.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: rgba(0, 102, 255, 0.04);
}

/* ── 17. Footer ── */
.footer {
    background: linear-gradient(180deg, #0a1628 0%, #060e1a 100%) !important;
    border-top: 3px solid var(--primary);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.footer h5,
.footer h6 {
    color: #ffffff !important;
}

.footer .text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

.footer a.text-muted:hover,
.footer .hover-white:hover {
    color: #ffffff !important;
    transition: color 0.25s var(--ease-out);
}

.footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s var(--ease-out);
    text-decoration: none;
    margin-right: 8px;
}

.footer .social-links a:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

/* ── 18. Layout Utilities ── */
.main-content-wrapper {
    min-height: calc(100vh - 200px);
}

/* ── 19. Section Headings ── */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 4px;
    margin: 12px auto 0;
}

/* ── 20. Scroll-to-Top (Optional) ── */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    box-shadow: var(--shadow-glow);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.scroll-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--primary-glow);
}

.scroll-top.visible {
    display: flex;
}

/* ── 21. Custom Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--info) 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ── 22. Selection ── */
::selection {
    background: var(--primary);
    color: #ffffff;
}

/* ── 23. Loading / Skeleton ── */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ── 24. SweetAlert Premium Glass ── */
.swal2-popup.glass-popup-swal {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.2) inset !important;
    font-family: 'Hind Siliguri', sans-serif !important;
}

.swal2-title {
    color: var(--text-heading) !important;
    font-weight: 700 !important;
}

.swal2-html-container {
    color: var(--text-body) !important;
    font-weight: 500 !important;
}

.glass-popup-swal .swal2-confirm {
    background: linear-gradient(135deg, #ff3d71 0%, #ff1744 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 61, 113, 0.35) !important;
    border-radius: 50px !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
}

.glass-popup-swal .swal2-cancel {
    background: var(--bg-body) !important;
    color: var(--text-body) !important;
    border-radius: 50px !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

/* ── 24. Counter / Stats Animations ── */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-number {
    animation: countUp 0.6s var(--ease-out) both;
}

/* ── 25. Page Header (for sub-pages) ── */
.page-header {
    background: linear-gradient(135deg, #0a1628 0%, #0f3460 100%);
    padding: 120px 0 20px;
    position: relative;
    overflow: hidden;
    margin-top: -80px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.page-header h2 {
    color: #ffffff !important;
}

.page-header p {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ── 26. Card Variants for Directory Pages ── */
.directory-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--duration) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.directory-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--duration) var(--ease-out);
}

.directory-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.directory-card:hover::before {
    opacity: 1;
}

/* ── 27. Emergency Page Specific ── */
.emergency-main-card {
    background: linear-gradient(135deg, #1a0a1e 0%, #2d0a0a 50%, #1a0a1e 100%);
    border: 1px solid rgba(255, 61, 113, 0.2);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.emergency-main-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 61, 113, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

/* ── 28. Responsive Adjustments (Mobile-First) ── */

/* ── Extra Large (≤1200px) ── */
@media (max-width: 1200px) {
    .hero-section h1 {
        font-size: 2.4rem;
    }

    .container {
        max-width: 95%;
    }
}

/* ── Large / Tablet Landscape (≤992px) ── */
@media (max-width: 992px) {
    .hero-section {
        min-height: auto;
        padding: 80px 0 60px;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .d-flex.gap-3,
    .hero-section .d-flex.flex-wrap {
        justify-content: center;
    }

    .glass-nav {
        padding: 8px 0;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
    }

    .glass-nav .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 15px;
        left: auto;
        width: 260px;
        min-width: unset;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 20px;
        padding: 15px;
        padding-bottom: 25px;
        margin-top: 15px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.6);
        max-height: 70vh;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        z-index: 1050;
    }

    .navbar-dark.glass-nav .navbar-collapse {
        background: rgba(15, 23, 42, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    }

    .glass-nav .nav-link {
        padding: 12px 16px;
        border-radius: var(--radius-sm);
        margin: 4px 0;
        font-size: 0.95rem;
    }

    .glass-nav .nav-link:hover {
        background: rgba(0, 102, 255, 0.08);
    }

    .navbar-dark.glass-nav .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .glass-nav .nav-link::after {
        display: none;
    }

    .glass-nav .nav-link.btn.btn-primary {
        margin-top: 12px;
        text-align: center;
        display: block;
    }

    .glass-dropdown {
        border: none;
        box-shadow: none;
        background: rgba(0, 102, 255, 0.04);
        border-radius: 12px;
        margin-top: 5px;
        padding: 10px;
    }
    
    .navbar-dark .glass-dropdown {
        background: rgba(255, 255, 255, 0.05);
    }
    }

    .page-header {
        padding-top: 120px;
        padding-bottom: 10px;
    }

    .page-header h2 {
        font-size: 1.5rem;
    }

    /* Footer responsive */
    .footer .row > div {
        text-align: center;
    }

    .footer .social-links {
        justify-content: center;
        display: flex;
    }

    .footer ul {
        padding: 0;
    }
}

/* ── Tablet Portrait (≤768px) ── */
@media (max-width: 768px) {
    body {
        padding-top: 68px;
        line-height: 1.6;
    }

    /* Hero */
    .hero-section {
        padding: 50px 0 40px;
    }

    .hero-section h1 {
        font-size: 1.55rem;
        line-height: 1.35;
    }

    .hero-section .lead {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .hero-section .badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    /* Hero right-side card hide on mobile for cleaner look */
    .hero-section .col-lg-6.text-center .glass-card {
        padding: 2rem !important;
    }

    .hero-section .col-lg-6.text-center .glass-card i {
        font-size: 80px !important;
    }

    /* Search */
    .search-box-glass {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }

    .search-box-glass input {
        padding: 12px 14px;
        font-size: 0.9rem;
        text-align: center;
    }

    .search-box-glass .btn {
        width: 100%;
        padding: 12px;
        font-size: 0.9rem;
    }

    /* Cards */
    .glass-card {
        border-radius: var(--radius-md);
    }

    .glass-card:hover {
        transform: translateY(-3px);
    }

    /* Icon circles */
    .icon-circle {
        width: 56px;
        height: 56px;
        font-size: 22px;
        border-radius: 14px;
        margin-bottom: 14px;
    }

    /* Section titles */
    h2.fw-bold, .section-title {
        font-size: 1.35rem;
    }

    /* Buttons */
    .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .btn-lg {
        font-size: 1rem;
        padding: 12px 28px;
    }

    /* Widget bar */
    .widget-bar .row > div {
        border: none !important;
    }

    /* Form controls */
    .form-control,
    .form-select {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .form-control-lg,
    .form-select-lg {
        font-size: 0.95rem;
        padding: 10px 14px;
    }

    /* Tables */
    .table thead th,
    .table tbody td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    /* Page header */
    .page-header {
        padding-top: 110px;
        padding-bottom: 10px;
    }

    .page-header h2 {
        font-size: 1.3rem;
    }

    .page-header p {
        font-size: 0.85rem;
    }

    /* Footer */
    .footer {
        text-align: center;
    }

    .footer .col-md-4,
    .footer .col-md-2,
    .footer .col-md-3 {
        text-align: center;
        margin-bottom: 20px;
    }

    .footer .social-links {
        justify-content: center;
        display: flex;
    }

    /* Scroll to top */
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    /* Counter / stats */
    .counter-animate {
        font-size: 1.8rem !important;
    }
}

/* ── Mobile Small (≤576px) ── */
@media (max-width: 576px) {
    body {
        padding-top: 64px;
        font-size: 0.92rem;
    }

    /* Hero */
    .hero-section {
        padding: 40px 0 35px;
    }

    .hero-section h1 {
        font-size: 1.3rem;
    }

    .hero-section .lead {
        font-size: 0.85rem;
    }

    .hero-section .d-flex.flex-wrap {
        flex-direction: column;
        gap: 10px !important;
    }

    .hero-section .d-flex.flex-wrap .btn {
        width: 100%;
    }

    /* Cards */
    .glass-card {
        border-radius: 12px;
    }

    .quick-access-link .card.glass-card {
        padding: 20px 16px !important;
    }

    .quick-access-link .card.glass-card h5 {
        font-size: 1rem;
    }

    .quick-access-link .card.glass-card p {
        font-size: 0.8rem;
    }

    /* Navbar brand */
    .glass-nav .navbar-brand {
        font-size: 1.1rem;
    }

    /* Widget bar */
    .widget-bar .d-flex {
        padding: 6px !important;
    }

    .widget-bar h6 {
        font-size: 0.8rem;
    }

    /* Page header */
    .page-header {
        padding-top: 100px;
        padding-bottom: 10px;
    }

    .page-header h2 {
        font-size: 1.15rem;
    }

    /* Form */
    .form-label {
        font-size: 0.85rem;
    }

    /* Emergency page 999 */
    .emergency-main-card h1,
    [style*="font-size: 5rem"] {
        font-size: 3.5rem !important;
    }

    /* Stats section */
    .counter-animate {
        font-size: 1.4rem !important;
    }

    /* Dropdown */
    .glass-dropdown .dropdown-item {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    /* Search box */
    .search-box-glass input {
        font-size: 0.85rem;
    }

    /* Footer */
    .footer h5 {
        font-size: 1.1rem;
    }

    .footer h6 {
        font-size: 0.9rem;
    }

    .footer p,
    .footer li {
        font-size: 0.85rem;
    }

    .footer .social-links a {
        width: 36px;
        height: 36px;
    }
}

/* ── Very Small Phones (≤400px) ── */
@media (max-width: 400px) {
    .hero-section h1 {
        font-size: 1.15rem;
    }

    .hero-section .lead {
        font-size: 0.8rem;
    }

    .btn {
        font-size: 0.82rem;
        padding: 8px 16px;
    }

    .icon-circle {
        width: 48px;
        height: 48px;
        font-size: 18px;
        border-radius: 12px;
    }

    .glass-nav .navbar-brand {
        font-size: 1rem;
    }
}

/* ── Landscape phones ── */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 30px 0;
    }

    body {
        padding-top: 60px;
    }
}

/* ── Touch-friendly targets ── */
@media (hover: none) and (pointer: coarse) {
    .glass-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }

    .glass-card:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }

    .btn:hover {
        transform: none;
    }

    .btn:active {
        transform: scale(0.96);
    }

    .quick-access-link:hover .icon-circle {
        transform: none;
    }

    .glass-nav .nav-link:hover::after {
        width: 0;
    }
}

/* ── 29. Utility Animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.fade-in-up {
    animation: fadeInUp 0.6s var(--ease-out) both;
}

.scale-in {
    animation: scaleIn 0.5s var(--ease-out) both;
}

/* ── 30. Particles / Decorative Elements ── */
.hero-section .decorative-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

/* ── 31. Login/Register Card Enhancements ── */
.auth-card {
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.auth-card::before {
    content: '';
    display: block;
    height: 4px;
    background: var(--primary-gradient);
}

/* ── 32. Dashboard Enhancements ── */
.dashboard-stat {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
    transition: all var(--duration) var(--ease-out);
}

.dashboard-stat:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ── 33. Ripple Effect ── */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s, opacity 0.6s;
    opacity: 0;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

/* ── 34. Tooltip Style Override ── */
.tooltip-inner {
    background: var(--text-heading);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.85rem;
}

/* -- Mobile Optimization -- */
@media (max-width: 767.98px) {
    .footer {
        display: none !important;
    }
}

/* -- Hero Custom Buttons -- */
.hero-btn {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}
.hero-btn:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.5) !important;
}
.hero-btn:hover::before {
    left: 100%;
}
.btn-chatbot {
    background: linear-gradient(135deg, rgba(255, 171, 0, 0.9), rgba(255, 193, 7, 0.8));
    color: #1a1a1a !important;
    box-shadow: 0 4px 15px rgba(255, 171, 0, 0.4);
}
.btn-chatbot:hover {
    box-shadow: 0 8px 25px rgba(255, 171, 0, 0.6);
}
.btn-scanner {
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.9), rgba(0, 230, 118, 0.8));
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.4);
}
.btn-scanner:hover {
    box-shadow: 0 8px 25px rgba(0, 200, 83, 0.6);
}
.btn-emergency {
    background: linear-gradient(135deg, rgba(255, 61, 113, 0.9), rgba(255, 23, 68, 0.8));
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(255, 61, 113, 0.4);
    animation: emergencyPulse 2s infinite;
}
.btn-emergency:hover {
    box-shadow: 0 8px 25px rgba(255, 61, 113, 0.6);
}
.btn-calculator {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.btn-calculator:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}


/* ── Hero Heart & ECG Line ── */
.hero-heart-icon {
    font-size: 120px;
    background: linear-gradient(135deg, #ff3d71, #ff6b9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

@media (max-width: 768px) {
    .hero-heart-icon {
        font-size: 70px;
    }
    .ecg-line {
        width: 80px;
    }
}

.ecg-line {
    display: block;
    margin: 0 auto;
}

.ecg-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: dash 2.5s linear infinite;
}

@keyframes dash {
    0% { stroke-dashoffset: 200; }
    40% { stroke-dashoffset: 0; }
    60% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -200; }
}

/* Active Menu Highlight */
.nav-link.active-menu, .dropdown-item.active-menu {
    color: var(--primary) !important;
    font-weight: 700 !important;
    position: relative;
}
.nav-link.active-menu::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 60%;
    height: 2.5px;
    background: var(--primary-gradient);
    border-radius: 3px;
    transform: translateX(-50%);
}
.dropdown-item.active-menu {
    background-color: rgba(0, 102, 255, 0.08) !important;
}

/* Force Navbar Height on Desktop */
@media (min-width: 1200px) {
    .glass-nav {
        height: 70px !important;
        min-height: 70px !important;
        max-height: 70px !important;
    }
    .glass-nav .navbar-collapse {
        height: 100%;
    }
    .glass-nav .nav-link {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        display: flex;
        align-items: center;
    }
}
