/* --- Modern Premium Medical Design System --- */
:root {
    /* Color Palette - Based on Logo (Teal/Green) */
    --primary-color: #319795;
    /* Teal 500 */
    --primary-dark: #285e61;
    /* Teal 800 */
    --secondary-color: #2f855a;
    /* Green 600 */
    --accent-color: #f6ad55;
    /* Orange 300 */
    --success-color: #38a169;
    /* Green 500 */
    --danger-color: #e53e3e;
    /* Red 500 */

    /* Backgrounds */
    --bg-body: #f8f9fa;
    /* Light Gray */
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.95);

    /* Text */
    --text-main: #333333;
    /* Dark Gray */
    --text-muted: #666666;
    /* Medium Gray */
    --text-light: #f8f9fa;
    /* Light Gray */

    /* Shadows & Borders */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-dark);
    /* Use darker teal for headings */
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    transition: color 0.2s;
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-dark);
}

/* --- Components --- */

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

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

.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

/* Navbar */
.navbar {
    background: #fff !important;
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 0;
}

.nav-link {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    color: var(--text-main) !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s;
}

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

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

/* Hero Section - Side by Side */
.hero-section {
    padding: 5rem 0;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    min-height: 80vh;
    /* Ensure it takes up good space */
}

.hero-content {
    padding-right: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

/* Feature Cards (Sub-Header) */
.hub-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    height: 100%;
}

.hub-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.card-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.card-action {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background-color 0.2s;
    display: inline-block;
    margin-top: auto;
    background-color: #e6fffa;
    color: var(--primary-dark);
}

/* Features Section Grid */
.features-section {
    padding: 5rem 0;
    text-align: center;
}

.feature-card {
    padding: 2rem;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fff;
    transition: transform 0.3s;
}

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

.feature-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background-color: #333;
    color: #fff;
    padding: 3rem 0;
    margin-top: auto;
}

.footer h5 {
    color: #fff;
    margin-bottom: 1.5rem;
}

.footer a {
    color: #ccc;
}

.footer a:hover {
    color: #fff;
}

.footer .bottom-bar {
    border-top: 1px solid #444;
    padding-top: 2rem;
    margin-top: 2rem;
    color: #999;
}

/* Utility */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* ECG Animation */
.ecg-container {
    width: 100px;
    height: 40px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.ecg-line {
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none' stroke='%23319795' fill='none' stroke-width='2'%3E%3Cpath d='M0 20 L30 20 L35 5 L40 35 L45 20 L100 20' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    position: relative;
}

.ecg-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0) 80%, rgba(255, 255, 255, 1) 100%);
    animation: ecg-scan 2s infinite linear;
}

@keyframes ecg-scan {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* =========================================
   AI CHIKITSA HOMEPAGE REDESIGN STYLES
   ========================================= */

/* --- Global Variables & Typography --- */
:root {
    --primary-blue: #003366;
    /* Deep blue from logo */
    --accent-gold: #D4AF37;
    /* Gold from logo */
    --text-dark: #333333;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
}

body {
    /* Ensure a modern font stack is used */
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-blue);
    font-weight: 700;
}

.text-gold {
    color: var(--accent-gold) !important;
}

.bg-light-section {
    background-color: var(--bg-light);
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #002244 !important;
    /* Darker blue on hover */
    border-color: #002244 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 51, 102, 0.2);
}

.btn-outline-gold {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
    padding: 10px 24px;
    font-weight: 600;
    background-color: transparent;
    transition: all 0.3s ease;
}

.btn-outline-gold:hover,
.btn-outline-gold:focus,
.btn-outline-gold:active {
    background-color: var(--accent-gold) !important;
    color: white !important;
    border-color: var(--accent-gold) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.2);
}

/* --- Hero Section --- */
.hero-section {
    padding: 100px 0 140px;
    /* Extra padding at bottom for floating cards space */
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* --- Floating Feature Cards --- */
.floating-cards-container {
    margin-top: -80px;
    /* Negative margin to overlap with hero section */
    position: relative;
    z-index: 10;
}

.floating-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    height: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.floating-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-gold);
}

.floating-card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    padding: 15px;
    background-color: rgba(212, 175, 55, 0.1);
    /* Light gold background */
    border-radius: 50%;
    color: var(--accent-gold);
}

.floating-card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.floating-card-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    /* Ensures action button stays at bottom */
}

.floating-card-action {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.floating-card-action::after {
    content: '→';
    margin-left: 8px;
    transition: margin-left 0.3s ease;
}

.floating-card:hover .floating-card-action::after {
    margin-left: 12px;
}

/* --- Features Section (Why Choose Us) --- */
.features-section {
    padding: 80px 0;
    background-color: #fff;
}

.feature-card {
    text-align: center;
    padding: 30px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    height: 100%;
    border: 1px solid #eee;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary-blue);
}

/* --- Professionals Section --- */
.professional-card {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-top: 5px solid var(--primary-blue);
    height: 100%;
    text-align: center;
    transition: transform 0.3s ease;
}

.professional-card:hover {
    transform: translateY(-5px);
}

/* --- Modals Redesign --- */
.modal-content {
    border: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    /* For border radius */
}

.modal-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-weight: 700;
    margin: 0;
    color: var(--primary-blue);
}

.close-btn {
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--primary-blue);
}

/* Ensure form labels match theme */
.form-label.fw-bold {
    color: var(--primary-blue);
}