/* ==========================================================================
   GLOBAL DESIGN SYSTEM: AYUSHMAN MANGLAM MULTI-SPECIALITY HOSPITAL
   ========================================================================== */

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

:root {
    /* Color Palette */
    --primary-h: 190;
    --primary-s: 85%;
    --primary-l: 26%;
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-light: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) + 12%));
    --primary-dark: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) - 8%));
    --primary-glow: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.15);
    
    --accent-h: 38;
    --accent-s: 95%;
    --accent-l: 55%;
    --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
    --accent-hover: hsl(var(--accent-h), var(--accent-s), calc(var(--accent-l) - 7%));
    --accent-glow: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.2);
    
    --danger: hsl(0, 85%, 60%);
    --success: hsl(140, 75%, 45%);
    --info: hsl(210, 80%, 55%);
    
    /* Neutral Theme Defaults (Light Mode) */
    --bg-body: hsl(210, 40%, 98%);
    --bg-card: hsl(0, 0%, 100%);
    --bg-navbar: hsl(0, 0%, 100%);
    --bg-footer: hsl(210, 30%, 12%);
    --text-main: hsl(210, 30%, 12%);
    --text-muted: hsl(210, 12%, 46%);
    --text-on-footer: hsl(210, 15%, 85%);
    --border-color: hsl(210, 20%, 90%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(18, 54, 74, 0.08);
    --shadow-lg: 0 16px 48px rgba(18, 54, 74, 0.12);
    
    /* Layout & Scaling */
    --max-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Accessibility scale multiplier */
    --text-scale: 1;
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-body: hsl(210, 35%, 8%);
    --bg-card: hsl(210, 30%, 12%);
    --bg-navbar: hsl(210, 30%, 11%);
    --text-main: hsl(210, 20%, 95%);
    --text-muted: hsl(210, 10%, 75%);
    --border-color: hsl(210, 20%, 20%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
}

/* High Contrast Mode Variables */
body.high-contrast {
    --primary: #000;
    --primary-light: #222;
    --primary-dark: #000;
    --accent: #ffea00;
    --accent-hover: #ffd600;
    --bg-body: #000000;
    --bg-card: #000000;
    --bg-navbar: #000000;
    --bg-footer: #000000;
    --text-main: #ffffff;
    --text-muted: #e0e0e0;
    --text-on-footer: #ffffff;
    --border-color: #ffffff;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
}

/* Dyslexia Friendly Font Override */
body.dyslexia-font {
    font-family: 'Comic Sans MS', 'Courier New', sans-serif !important;
    word-spacing: 0.15em !important;
    letter-spacing: 0.05em !important;
    line-height: 1.8 !important;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: calc(16px * var(--text-scale));
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header & Navigation */
header {
    background-color: var(--bg-navbar);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s, border-color 0.3s;
}

.top-bar {
    background-color: var(--primary);
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
}

.top-bar-links {
    display: flex;
    gap: 1.5rem;
}

.top-bar-links a {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.top-bar-links a:hover {
    color: var(--accent);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
}

body.dark-mode .logo {
    color: #fff;
}

.logo img {
    height: 48px;
    object-fit: contain;
}

.logo span {
    display: flex;
    flex-direction: column;
}

.logo span small {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
}

nav ul li {
    position: relative;
}

nav ul li a {
    padding: 0.5rem 0.8rem;
    font-weight: 500;
    color: var(--text-main);
    border-radius: var(--radius-sm);
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary);
    background-color: var(--primary-glow);
}

body.dark-mode nav ul li a:hover, body.dark-mode nav ul li a.active {
    color: var(--accent);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Nav Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    min-width: 200px;
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
    z-index: 10;
}

.dropdown:hover .dropdown-menu {
    display: flex;
}

.dropdown-menu a {
    padding: 0.6rem 1rem;
    border-radius: 0;
}

.dropdown-menu a:hover {
    background-color: var(--primary-glow);
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Button UI Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-accent {
    background-color: var(--accent);
    color: hsl(210, 30%, 12%);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: #fff;
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
    background-color: var(--border-color);
    color: var(--text-main);
}

.btn-icon:hover {
    background-color: var(--primary-glow);
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

body.dark-mode .section-title h2 {
    color: #fff;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Section */
.hero-banner {
    position: relative;
    padding: 8rem 0;
    background: linear-gradient(135deg, hsla(var(--primary-h), 90%, 15%, 0.9) 0%, hsla(var(--primary-h), 80%, 25%, 0.8) 100%),
                url('assets/img (19).png') no-repeat center center/cover;
    color: #fff;
    overflow: hidden;
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4rem;
    background: linear-gradient(to top, var(--bg-body), transparent);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-content h1 span {
    color: var(--accent);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-side-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    color: #fff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.emergency-notice {
    text-align: center;
}

.emergency-notice h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.emergency-notice .phone-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    display: block;
    margin: 1rem 0;
    animation: pulse-danger 2s infinite;
}

/* Quick Search Widget */
.search-widget {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: -3rem;
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow-lg);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

.search-form input, .search-form select {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-body);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
}

.search-form input:focus, .search-form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Stats Section */
.stats-section {
    background-color: var(--primary);
    color: #fff;
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-card h3 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* Grid & Cards Systems */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.card-body {
    padding: 1.8rem;
}

.card-body h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.card-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
}

/* Specialty Highlights */
.specialty-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Features Block */
.features-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.features-list {
    list-style: none;
    display: grid;
    gap: 1.5rem;
}

.features-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.features-list li .icon-wrapper {
    background-color: var(--primary-glow);
    color: var(--primary);
    padding: 0.5rem;
    border-radius: 50%;
}

/* Interactive Room Map / Panoramic Virtual Tour */
.virtual-tour-box {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    height: 450px;
}

.tour-frame {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: var(--transition);
}

.tour-overlay {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    background: rgba(18, 54, 74, 0.85);
    backdrop-filter: blur(8px);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-controls {
    display: flex;
    gap: 0.5rem;
}

/* Doctor Search / Directory Filters */
.directory-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
}

.sidebar-filters {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    height: fit-content;
}

.filter-group {
    margin-bottom: 1.8rem;
}

.filter-group h4 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.4rem;
}

.filter-group select, .filter-group input {
    width: 100%;
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-body);
    color: var(--text-main);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Doctor Profiles & Reviews */
.doctor-card {
    display: flex;
    flex-direction: column;
}

.doc-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.doc-info img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.doc-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--primary-glow);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.rating-stars {
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.9rem;
    margin: 0.4rem 0;
}

/* Interactive Tabs for Departments */
.department-tabs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
}

.dept-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dept-tab-btn {
    padding: 1rem 1.5rem;
    text-align: left;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.dept-tab-btn.active, .dept-tab-btn:hover {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.dept-content-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3rem;
    box-shadow: var(--shadow-sm);
}

/* Appointment Step Wizard */
.appointment-wizard {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.wizard-header {
    background-color: var(--primary);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.wizard-steps-indicator {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.5;
}

.step-indicator.active {
    opacity: 1;
    font-weight: 700;
}

.step-indicator.active .circle {
    background-color: var(--accent);
    color: var(--primary-dark);
}

.step-indicator .circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #fff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.wizard-body {
    padding: 3rem;
}

.wizard-step-content {
    display: none;
}

.wizard-step-content.active {
    display: block;
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    padding: 2rem 3rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-body);
}

/* Slots Grid */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    margin-top: 1rem;
}

.slot-btn {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.slot-btn:hover, .slot-btn.selected {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Interactive Calculators */
.calc-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.calc-result {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-align: center;
    font-size: 1.1rem;
    display: none;
}

.calc-result.success {
    background-color: hsla(140, 75%, 45%, 0.1);
    color: var(--success);
    display: block;
}

.calc-result.info {
    background-color: hsla(210, 80%, 55%, 0.1);
    color: var(--info);
    display: block;
}


/* Health Blog & Grid */
.blog-card {
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

/* Ambulance Tracker Visualisation */
.tracker-container {
    height: 400px;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    overflow: hidden;
}

.tracker-svg {
    width: 100%;
    height: 100%;
    background-color: #f0f4f8;
}

body.dark-mode .tracker-svg {
    background-color: #1a2430;
}

.tracker-eta-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--primary);
    color: #fff;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    font-weight: 700;
}

/* Dynamic Live Wait-time Board */
.queue-board {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.queue-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.queue-row:last-child {
    border-bottom: none;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--success);
    font-weight: 700;
    font-size: 0.85rem;
}

.live-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    animation: flash 1.5s infinite;
}

/* Floating AI Chatbot Widget */
.chatbot-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    background-color: var(--primary-light);
}

.chatbot-box {
    width: 380px;
    height: 500px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 1rem;
    animation: slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-box.active {
    display: flex;
}

.chatbot-header {
    background-color: var(--primary);
    color: #fff;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background-color: var(--bg-body);
}

.chat-message {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    max-width: 80%;
    font-size: 0.9rem;
}

.chat-message.bot {
    background-color: var(--bg-card);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 0;
    border: 1px solid var(--border-color);
}

.chat-message.user {
    background-color: var(--primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.3rem;
}

.chat-option-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.chat-option-btn:hover {
    background-color: var(--primary);
    color: #fff;
}

.chatbot-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.chatbot-footer input {
    flex: 1;
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-body);
    color: var(--text-main);
    outline: none;
}


/* WCAG Accessibility floating menu toggler */
.accessibility-floater {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1002;
    overflow: hidden;
}

.access-trigger {
    padding: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    color: #fff;
}

.access-panel {
    display: none;
    flex-direction: column;
    padding: 1rem;
    gap: 0.8rem;
    background-color: var(--bg-card);
}

.accessibility-floater.active .access-panel {
    display: flex;
}

.access-btn {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-body);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.access-btn:hover {
    background-color: var(--primary-glow);
}

/* Footer Section */
footer {
    background-color: var(--bg-footer);
    color: var(--text-on-footer);
    padding: 5rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-column h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-column ul {
    list-style: none;
    display: grid;
    gap: 0.8rem;
}

.footer-column ul a {
    color: var(--text-on-footer);
    font-size: 0.95rem;
}

.footer-column ul a:hover {
    color: var(--accent);
    padding-left: 0.3rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes pulse-danger {
    0% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
    50% {
        transform: scale(1.02);
        color: var(--accent);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 12px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

@keyframes flash {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* EMR Dashboard Charts and Grid metrics */
.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.metric-box h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.metric-box p {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    .nav-buttons {
        display: none !important;
    }
    .grid-2, .grid-3, .grid-4, .footer-grid, .icu-grid, .slots-grid, .features-split, .hero-grid {
        grid-template-columns: 1fr !important;
    }
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-navbar);
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem;
        box-shadow: var(--shadow-md);
    }
    nav.active {
        display: block;
    }
    nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    nav ul li {
        width: 100%;
    }
    .dropdown-menu {
        position: static;
        width: 100%;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        background-color: transparent;
    }
    .dropdown.open .dropdown-menu {
        display: flex;
    }
    /* Prevent mobile browser zoom issues */
    input, select, textarea {
        font-size: 16px !important;
    }
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .search-form {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .features-split {
        grid-template-columns: 1fr;
    }
    .department-tabs-layout, .directory-layout, .portal-layout {
        grid-template-columns: 1fr;
    }
    .slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .slots-grid {
        grid-template-columns: 1fr;
    }
    .top-bar {
        display: none;
    }
}

/* ==========================================================================
   FACILITIES MODAL & ICU EXTENSION STYLES
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 54, 74, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 650px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modal-slide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
    background: var(--primary);
    color: #fff;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-body {
    padding: 2rem;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-close {
    cursor: pointer;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent);
}

.icu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin-top: 1rem;
}

.icu-wing-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.2rem;
    transition: var(--transition);
}

.icu-wing-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.icu-wing-card h4 {
    color: var(--primary);
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

body.dark-mode .icu-wing-card h4 {
    color: var(--accent);
}

@keyframes modal-slide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .icu-grid {
        grid-template-columns: 1fr;
    }
    .modal-body {
        padding: 1.5rem;
    }
}
