/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'General Sans', sans-serif;
    background-color: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    /* Prevent scroll-bar pop-in during loading */
    overflow-y: hidden; 
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #050505;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-in-out;
}

.loader-content {
    text-align: center;
    width: 300px;
}

.loader-logo {
    height: 60px;
    margin-bottom: 20px;
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff7a18, #af002d);
    transition: width 0.3s ease;
}

#loading-text {
    font-size: 0.9rem;
    color: #888;
    letter-spacing: 1px;
}

/* Main Container & Canvas */
#main-container {
    position: relative;
    width: 100%;
}

.canvas-container {
    position: fixed; /* Sticky effect */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 56.25vw; /* 16:9 Aspect Ratio */
    min-height: 100vh;
    min-width: 177.78vh; /* 16:9 Aspect Ratio */
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    overflow: hidden;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    object-fit: fill;
    opacity: 0; /* Fade in after load */
    transition: opacity 1s ease;
}

/* Scroll Spacer */
#scroll-spacer {
    /* Height will be set dynamically via JS based on total frames */
    height: 500vh; 
    position: relative;
    z-index: 0;
}

/* Section 2 Interactive Layer */
#section-2-hitboxes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.hitbox {
    position: absolute;
    cursor: pointer;
    /* Uncomment for debugging hitboxes */
    /* background: rgba(255, 0, 0, 0.2); border: 1px solid red; */
}

/* Approximate building positions relative to 16:9 canvas */
.building-left {
    top: 30%;
    left: 0%;
    width: 32%;
    height: 60%;
}

.building-center {
    top: 5%;
    left: 35%;
    width: 30%;
    height: 85%;
}

.building-right {
    top: 20%;
    left: 68%;
    width: 32%;
    height: 70%;
}

/* Building Labels */
.building-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 15;
}

.hitbox:hover .building-label {
    opacity: 1;
}

/* Section 4 Services UI */
#section-4-services {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
}

.service-card {
    position: absolute;
    cursor: pointer;
    height: 35%;
    width: 8%;
    top: 45%;
    /* Uncomment for debugging */
    /* border: 1px solid blue; background: rgba(0,0,255,0.1); */
}
.service-card[data-index="1"] { left: 10%; }
.service-card[data-index="2"] { left: 19%; top: 43%; } /* Slight arc */
.service-card[data-index="3"] { left: 28%; top: 42%; }
.service-card[data-index="4"] { left: 37%; top: 41%; }
.service-card[data-index="5"] { left: 46%; top: 41%; }
.service-card[data-index="6"] { left: 55%; top: 41%; }
.service-card[data-index="7"] { left: 64%; top: 42%; }
.service-card[data-index="8"] { left: 73%; top: 43%; }
.service-card[data-index="9"] { left: 82%; }

/* --- Healthcare UI Sections (Premium Modern UI) --- */
#healthcare-ui-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    background: radial-gradient(circle at 50% 0%, #1a1a2e 0%, #000000 70%);
    color: #fff;
    overflow: hidden;
}

#screen-landing, #screen-clinical, #screen-deep-dive {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow-y: auto;
    padding-bottom: 80px;
}

/* Header */
.hc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: rgba(20, 20, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}
.logo .delphi { color: #fff; }
.logo .x { color: #ff5e3a; margin: 0 5px; font-weight: 300; }
.logo .ai { color: #fff; }

.nav-controls {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}
.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.breadcrumbs {
    font-size: 0.9rem;
    color: #888;
}
.breadcrumbs .bc-link {
    cursor: pointer;
    transition: color 0.3s ease;
}
.breadcrumbs .bc-link:hover {
    color: #fff;
    text-decoration: underline;
}
.breadcrumbs .current { color: #ff5e3a; font-weight: 600; }

.search-bar input {
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    outline: none;
    width: 250px;
    transition: width 0.3s ease, border-color 0.3s ease;
}
.search-bar input:focus {
    width: 280px;
    border-color: #ff5e3a;
}
.search-bar input::placeholder { color: #666; }

.back-btn {
    background: rgba(255, 94, 58, 0.1);
    border: 1px solid rgba(255, 94, 58, 0.3);
    color: #ff5e3a;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.back-btn:hover {
    background: #ff5e3a;
    color: #fff;
}

/* Hero Section */
.hc-hero {
    padding: 60px 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.hc-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.hc-hero .badge {
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(90deg, rgba(255, 122, 24, 0.2), rgba(175, 0, 45, 0.2));
    color: #ff7a18;
    padding: 6px 12px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 10px;
    border: 1px solid rgba(255, 122, 24, 0.3);
}
.hc-hero p {
    font-size: 1.2rem;
    color: #aaa;
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* Tabs */
.hc-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}
.hc-tabs .tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.hc-tabs .tab:hover {
    background: rgba(255, 255, 255, 0.1);
}
.hc-tabs .tab.active {
    background: linear-gradient(90deg, #ff7a18, #af002d);
    border: none;
    box-shadow: 0 10px 20px rgba(255, 122, 24, 0.3);
}

/* Content Area */
.hc-content-area {
    padding: 0 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.capabilities-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
}

.cap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.cap-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cap-header .dot {
    width: 10px;
    height: 10px;
    background: #ff5e3a;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff5e3a;
}
.view-all {
    background: none;
    border: none;
    color: #ff5e3a;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
}

.cap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.cap-card {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}
.cap-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 122, 24, 0.3);
}

.cap-card .card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.5s ease;
}
.cap-card:hover .card-img {
    transform: scale(1.05);
}

.cap-card .card-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0,0,0,0.4);
    position: relative;
    z-index: 1;
}
.cap-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.cap-card p {
    color: #999;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}
.explore-link {
    color: #ff7a18;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}
.explore-link .arrow {
    transition: transform 0.3s ease;
}
.cap-card:hover .explore-link .arrow {
    transform: translateX(5px);
}

/* Clinical Screen Specifics */
.clinical-content {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 80px;
    gap: 40px;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.side-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #ccc;
    padding: 15px 20px;
    border-radius: 12px;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}
.side-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.side-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
    border-color: rgba(255, 255, 255, 0.2);
}
.side-btn.highlight {
    background: linear-gradient(90deg, rgba(255, 122, 24, 0.1), rgba(175, 0, 45, 0.1));
    border-color: rgba(255, 122, 24, 0.3);
    color: #ff7a18;
}

.main-panel {
    flex-grow: 1;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
}
.filters input, .filters select {
    padding: 12px 20px;
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    outline: none;
    font-family: 'Inter', sans-serif;
}
.filters input.search-use-case {
    flex-grow: 1;
}
.filters select {
    cursor: pointer;
}
.filters select option {
    background: #1a1a2e;
    color: #fff;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.use-case-card {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 25px;
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.use-case-card:hover {
    background: rgba(30, 30, 40, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}
.use-case-card.highlight-card {
    border-color: rgba(255, 122, 24, 0.4);
    background: linear-gradient(135deg, rgba(255, 122, 24, 0.05), rgba(175, 0, 45, 0.05));
}
.use-case-card h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.use-case-card p {
    color: #999;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 20px;
}
.use-case-card .arrow-up {
    align-self: flex-end;
    font-size: 1.2rem;
    color: #666;
    transition: color 0.3s ease, transform 0.3s ease;
}
.use-case-card:hover .arrow-up {
    color: #ff5e3a;
    transform: translate(2px, -2px);
}

/* Hide helper class */
/* Deep Dive Specifics */
.top-action-bar {
    display: flex;
    gap: 10px;
    margin-right: 20px;
}
.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}
.action-btn:hover {
    background: rgba(255, 122, 24, 0.1);
    border-color: rgba(255, 122, 24, 0.3);
    color: #ff7a18;
}

.deep-dive-hero {
    text-align: center;
    padding: 40px 20px 20px;
}
.deep-dive-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
}
.deep-dive-hero p {
    color: #aaa;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.deep-dive-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}
.dd-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.dd-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}
.dd-tab.active {
    background: #ff7a18;
    color: #fff;
    border: none;
    box-shadow: 0 5px 15px rgba(255, 122, 24, 0.4);
}

.deep-dive-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}
.tab-pane {
    animation: fadeIn 0.4s ease forwards;
}
.placeholder-box {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #666;
    backdrop-filter: blur(10px);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hide helper class */
.hidden {
    display: none !important;
    pointer-events: none;
}

/* AI Generated Flow Content Styles */
.ai-mock-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; text-align: left; }
.ai-stat-card { background: rgba(255,255,255,0.05); padding: 25px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); }
.ai-stat-card h3 { font-size: 1.1rem; color: #fff; }
.ai-stat-card .stat { font-size: 2.8rem; color: #ff7a18; font-weight: 700; margin: 10px 0; }
.ai-stat-card p { color: #aaa; font-size: 0.9rem; line-height: 1.4; }

.ai-main-card { grid-column: 1 / -1; background: rgba(255,255,255,0.05); padding: 30px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; text-align: left; }
.ai-main-card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.ai-main-card p { color: #aaa; font-size: 1rem; line-height: 1.6; }
.mock-chart { height: 180px; background: linear-gradient(90deg, rgba(255,122,24,0.15), rgba(175,0,45,0.15)); border-radius: 12px; margin-top: 20px; border: 1px solid rgba(255,122,24,0.3); }

.ai-process-flow { display: flex; justify-content: space-between; gap: 20px; margin-top: 10px; text-align: left; }
.ai-process-flow .step { flex: 1; background: rgba(255,255,255,0.05); padding: 30px 20px 20px; border-radius: 16px; position: relative; border: 1px solid rgba(255,255,255,0.1); }
.ai-process-flow .step span { position: absolute; top: -15px; left: 20px; width: 32px; height: 32px; background: linear-gradient(135deg, #ff7a18, #af002d); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.1rem; box-shadow: 0 4px 10px rgba(255,122,24,0.4); }
.ai-process-flow .step h4 { margin-bottom: 10px; font-size: 1.1rem; }
.ai-process-flow .step p { color: #aaa; font-size: 0.9rem; line-height: 1.5; }

.ai-tech-arch, .ai-engine-map { background: rgba(255,255,255,0.05); padding: 40px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); text-align: left; }
.ai-tech-arch h3, .ai-engine-map h3 { font-size: 1.5rem; margin-bottom: 15px; }
.ai-engine-map p { color: #aaa; }
.mermaid-mock { background: #0c0c14; padding: 30px; border-radius: 12px; color: #4ade80; font-family: monospace; margin-top: 20px; white-space: pre-wrap; font-size: 1rem; line-height: 1.6; border: 1px solid rgba(74,222,128,0.3); box-shadow: inset 0 0 20px rgba(0,0,0,0.5); }
.mock-network { height: 300px; background: radial-gradient(circle at center, rgba(255,122,24,0.2) 0%, transparent 70%); margin-top: 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); display:flex; align-items:center; justify-content:center; }

/* Admin UI Controls */
.floating-admin {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}
.admin-btn {
    background: linear-gradient(135deg, #ff7a18, #af002d);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 122, 24, 0.4);
    transition: transform 0.2s;
}
.admin-btn:hover {
    transform: scale(1.05);
}

.admin-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}
.admin-actions button {
    background: rgba(0,0,0,0.7);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    padding: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.admin-actions button:hover {
    background: #ff7a18;
}

.create-btn-container {
    margin-bottom: 20px;
    text-align: right;
}
.create-btn {
    background: rgba(255,255,255,0.1);
    border: 1px dashed rgba(255,255,255,0.3);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.create-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: #ff7a18;
}

/* CMS Modal */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.modal-content {
    background: #151515;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 16px;
    width: 400px;
    max-width: 90%;
    color: white;
}
.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}
.form-group label {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #aaa;
}
.form-group input, .form-group textarea, .form-group select {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-family: inherit;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.cancel-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}
.save-btn {
    background: #ff7a18;
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}
