/* E-Atria HMS Website & CMS Design System - Premium Refined Edition */

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

:root {
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;

    --bg-primary: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: rgba(255, 255, 255, 0.95);
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #64748b;
    --border-color: #cbd5e1;

    --brand-primary: #0284c7;
    --brand-primary-hover: #0369a1;
    --brand-dark: #0f172a;
    --brand-gradient: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
    --brand-gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #0f172a 100%);
    --accent-green: #059669;
    --accent-amber: #d97706;
    --accent-purple: #7c3aed;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
}

[data-theme="dark"] {
    --bg-primary: #090d16;
    --bg-surface: #0f172a;
    --bg-surface-elevated: rgba(15, 23, 42, 0.92);
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-light: #94a3b8;
    --border-color: #334155;
    --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 20px 40px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
}

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

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

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-surface-elevated);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
    transition: background 0.3s ease;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    white-space: nowrap;
}

.brand-logo img {
    height: 38px;
    width: auto;
}

.brand-tag {
    background: var(--brand-gradient);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.nav-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Button Component - Single Line Guarantee */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: var(--brand-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-main);
}

.btn-github {
    background: #181717;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn-github:hover {
    background: #000000;
    color: #ffffff;
    transform: translateY(-2px);
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: var(--brand-gradient-hero);
    color: #ffffff;
    padding: 80px 0 100px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
}

.hero-content h1 {
    font-size: 46px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-content h1 span {
    background: var(--brand-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 18px;
    color: #cbd5e1;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 36px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-item h3 {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
}

.stat-item p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

.hero-preview-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.code-box {
    background: #090d16;
    border-radius: var(--radius-md);
    padding: 18px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 13px;
    color: #38bdf8;
    overflow-x: auto;
    line-height: 1.7;
}

/* Feature Grid */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 50px;
}

.section-tag {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 14px;
}

.section-header p {
    font-size: 16px;
    color: var(--text-muted);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: rgba(2, 132, 199, 0.1);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.65;
}

/* Pricing & Interactive Calculator */
.pricing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    position: relative;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border: 2px solid var(--brand-primary);
    box-shadow: var(--shadow-lg);
}

.badge-popular {
    position: absolute;
    top: -14px;
    right: 32px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    white-space: nowrap;
}

.price-title {
    font-size: 22px;
    margin-bottom: 8px;
}

.price-amount {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-main);
    margin: 16px 0;
    white-space: nowrap;
}

.price-amount span {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
}

.price-features {
    list-style: none;
    margin: 24px 0 32px;
    flex: 1;
}

.price-features li {
    font-size: 14px;
    color: var(--text-muted);
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-features li i {
    color: var(--accent-green);
}

/* Calculator & Form Container */
.calc-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 44px 40px;
    box-shadow: var(--shadow-md);
}

/* Form Controls & Inputs Styling - Complete Fix */
.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.form-group label {
    display: block;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    text-align: left;
}

.form-control {
    width: 100%;
    display: block;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-main);
    background-color: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230284c7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 44px;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
    background-color: var(--bg-surface);
}

.form-control::placeholder {
    color: #94a3b8;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    border-left: 4px solid;
}
.alert-info { background: #e0f2fe; border-color: #0284c7; color: #0369a1; }
.alert-success { background: #d1fae5; border-color: #10b981; color: #065f46; }
.alert-danger { background: #fee2e2; border-color: #ef4444; color: #991b1b; }

.calc-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.calc-label h4 {
    font-size: 16px;
    margin-bottom: 2px;
}

.calc-label p {
    font-size: 13px;
    color: var(--text-muted);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--brand-primary);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.calc-total {
    background: var(--brand-gradient-hero);
    color: #fff;
    padding: 24px 32px;
    border-radius: var(--radius-md);
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.calc-total h3 {
    color: #fff;
    font-size: 18px;
}

.total-price {
    font-size: 32px;
    font-weight: 800;
    color: #38bdf8;
    white-space: nowrap;
}

/* ABDM Gateway Banner */
.abdm-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 50px;
    box-shadow: var(--shadow-lg);
}

.abdm-banner h2 {
    color: #fff;
    font-size: 32px;
    margin-bottom: 14px;
}

.abdm-banner p {
    color: #c7d2fe;
    font-size: 16px;
    max-width: 600px;
    margin-bottom: 24px;
}

/* Code Preview Box */
.api-endpoint-card {
    background: #090d16;
    border: 1px solid #1e293b;
    border-radius: var(--radius-md);
    padding: 20px;
    font-family: monospace;
    font-size: 13px;
    color: #e2e8f0;
    margin-bottom: 16px;
}

.badge-method {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    white-space: nowrap;
}
.badge-post { background: #0284c7; color: #fff; }
.badge-get  { background: #059669; color: #fff; }

/* Help Docs & Article Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

.sidebar-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.sidebar-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 12px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background: rgba(2, 132, 199, 0.1);
    color: var(--brand-primary);
}

.article-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s;
}

.article-card:hover {
    border-color: var(--brand-primary);
}

/* Video Player Modal & Container */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #000;
}

.video-wrapper iframe, .video-wrapper video {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: 0;
}

/* Footer */
.site-footer {
    background: var(--brand-dark);
    color: #94a3b8;
    padding: 70px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.footer-brand h3 {
    color: #ffffff;
    font-size: 22px;
    margin-bottom: 12px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 18px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #94a3b8;
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

/* Responsive Media Queries */
@media (max-width: 1100px) {
    .nav-menu { gap: 16px; }
    .nav-link { font-size: 13.5px; }
    .hero-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .docs-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        padding: 20px;
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-menu.open { display: flex; }
    .mobile-toggle { display: block; }
    .hero-content h1 { font-size: 34px; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
}
