/* Case Study Styles */

:root {
    --primary-color: #14b8a6;
    --secondary-color: #d2b48c;
    --accent-color: #0d9488;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --border-color: #e5e7eb;
    --gradient-1: linear-gradient(135deg, #14b8a6 0%, #d2b48c 100%);
    --gradient-2: linear-gradient(135deg, #0d9488 0%, #d2b48c 100%);
}

body.dark-mode {
    --primary-color: #a78bfa;
    --secondary-color: #8b5cf6;
    --accent-color: #c4b5fd;
    --bg-light: #1a1625;
    --bg-white: #251e35;
    --text-dark: #e0e0e0;
    --text-gray: #b0b0b0;
    --border-color: #3d3450;
    --gradient-1: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    --gradient-2: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 100%);
}

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

html {
    scroll-behavior: smooth;
}

/* Smooth scroll to anchor links with offset for sticky header */
h2[id], h3[id], section[id] {
    scroll-margin-top: 80px;
}

/* ============================================
   Sticky Header for Case Studies
   ============================================ */

.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-white);
    border-bottom: 2px solid var(--border-color);
    z-index: 2000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sticky-header .header-content {
    max-width: 100%;
    height: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.header-theme-toggle {
    width: 40px;
    height: 40px;
    background: var(--bg-white);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.header-theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.header-theme-toggle .sun-icon,
.header-theme-toggle .moon-icon {
    position: absolute;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.header-theme-toggle .sun-icon {
    color: #fbbf24;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.header-theme-toggle .moon-icon {
    color: #60a5fa;
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

body.dark-mode .header-theme-toggle {
    border-color: #ff8c00;
}

body.dark-mode .header-theme-toggle:hover {
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

body.dark-mode .header-theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

body.dark-mode .header-theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.header-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.header-nav-link {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
}

.header-nav-link:hover {
    background: var(--primary-color);
    color: white;
}

.header-social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-social-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-gray);
    transition: all 0.2s ease;
    font-size: 1.1rem;
    text-decoration: none;
}

.header-social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Adjust body for sticky header */
body {
    padding-top: 60px;
}

/* Custom Scrollbar - Teal Theme */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

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

body.dark-mode ::-webkit-scrollbar-track {
    background: #2a2a2a;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    border: 2px solid #f1f1f1;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    border-color: #2a2a2a;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

body.dark-mode * {
    scrollbar-color: var(--primary-color) #2a2a2a;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navigation */
.case-nav {
    background: var(--bg-white);
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

body.dark-mode .case-nav {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.back-link:hover {
    gap: 15px;
    color: var(--secondary-color);
}

/* Container */
.case-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Hero */
.case-hero {
    text-align: center;
    padding: 60px 20px;
    background: var(--gradient-1);
    color: white;
    border-radius: 20px;
    margin-bottom: 60px;
}

.case-label {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.case-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.case-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 25px;
    font-size: 1rem;
}

.case-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sections */
.case-section {
    background: var(--bg-white);
    padding: 50px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .case-section {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.case-section h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
}

.case-section h2 i {
    color: var(--primary-color);
}

.case-section h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 30px 0 20px 0;
}

.case-section h4 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.case-section p {
    margin-bottom: 20px;
    color: var(--text-gray);
    line-height: 1.8;
}

/* Summary Box */
.summary-box {
    background: var(--bg-light);
    border-left: 5px solid var(--primary-color);
    padding: 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    line-height: 1.9;
}

.summary-box p {
    margin: 0;
    color: var(--text-dark);
}

/* Challenge Grid */
.challenge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.challenge-card {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

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

.challenge-card h3 {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin: 0 0 10px 0;
}

.challenge-card p {
    margin: 0;
    font-size: 0.95rem;
}

/* Solution Overview */
.solution-overview {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    border: 2px solid rgba(99, 102, 241, 0.2);
}

.solution-overview p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* Architecture Diagram */
.architecture-diagram {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    overflow-x: auto;
    padding: 15px 12px;
    background: var(--bg-light);
    border-radius: 10px;
}

.arch-layer {
    background: var(--bg-white);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 10px 8px;
    min-width: 150px;
    flex: 1;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.arch-layer h4 {
    color: var(--primary-color);
    margin-bottom: 6px;
    font-size: 0.85rem;
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 4px;
    font-weight: 700;
}

.arch-layer ul {
    list-style: none;
}

.arch-layer li {
    padding: 6px 0;
    color: var(--text-gray);
    font-size: 0.9rem;
    position: relative;
    padding-left: 20px;
}

.arch-layer li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.arch-arrow {
    font-size: 1.2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* Implementation Steps */
.implementation-steps {
    margin-top: 30px;
}

.step {
    display: flex;
    gap: 25px;
    margin-bottom: 35px;
    align-items: flex-start;
}

.step-number {
    min-width: 50px;
    height: 50px;
    background: var(--gradient-1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin-top: 5px;
    margin-bottom: 10px;
}

.tech-used,
.code-example {
    background: var(--bg-light);
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 15px;
    font-size: 0.9rem;
}

.tech-used strong,
.code-example strong {
    color: var(--primary-color);
}

.code-example ul {
    margin-top: 10px;
    margin-left: 20px;
}

.code-example li {
    margin-bottom: 5px;
}

/* Code Blocks */
.code-block {
    background: #1e293b;
    color: #cbd5e1;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    overflow-x: auto;
}

.code-block h4 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1rem;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

.code-block ul {
    margin: 0;
    padding-left: 20px;
}

.code-block li {
    margin-bottom: 8px;
    color: #cbd5e1;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.result-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.result-card.highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border: 2px solid var(--primary-color);
}

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

.result-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.result-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.result-card p {
    margin: 0;
    font-size: 0.9rem;
}

/* Impact List */
.impact-list {
    list-style: none;
    margin-top: 30px;
}

.impact-list li {
    padding: 15px 20px;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.impact-list li:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    transform: translateX(10px);
}

.impact-list strong {
    color: var(--primary-color);
}

/* Challenges & Solutions */
.challenges-list {
    margin-top: 30px;
}

.challenge-solution {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--bg-light);
    border-radius: 15px;
}

.challenge-item,
.solution-item {
    padding: 20px;
    border-radius: 10px;
}

.challenge-item {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--accent-color);
}

.solution-item {
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary-color);
}

.challenge-item h4 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

.solution-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.challenge-item p,
.solution-item p {
    margin: 0;
    font-size: 0.95rem;
}

/* Technologies */
.tech-category {
    margin-bottom: 30px;
}

.tech-category h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-badge {
    padding: 8px 18px;
    background: var(--gradient-1);
    color: white;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

/* Learnings List */
.learnings-list {
    list-style: none;
    margin-top: 30px;
}

.learnings-list li {
    padding: 20px 25px;
    background: var(--bg-light);
    border-left: 5px solid var(--primary-color);
    border-radius: 10px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.learnings-list strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

/* Dashboard Section */
.dashboard-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(236, 72, 153, 0.03) 100%);
    border: 2px solid var(--primary-color);
}

.dashboard-intro {
    background: var(--bg-white);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 5px solid var(--primary-color);
    transition: background-color 0.3s ease;
}

.dashboard-intro p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.tableau-container {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .tableau-container {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dashboard-mockup {
    width: 100%;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.dashboard-header h3 {
    margin: 0 0 15px 0;
    color: var(--text-dark);
    font-size: 1.5rem;
}

.dashboard-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 6px 15px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* Metrics Row */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.metric-box {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.metric-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.metric-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.metric-icon i {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.metric-change {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 15px;
    display: inline-block;
}

.metric-change.positive {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.chart-card {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.chart-card h4 {
    margin: 0 0 20px 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    text-align: center;
}

/* Bar Chart */
.bar-chart {
    margin: 20px 0;
}

.bar-group {
    margin-bottom: 20px;
}

.bar-label {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 8px;
    font-weight: 600;
}

.bar-container {
    margin-bottom: 8px;
}

.bar {
    height: 30px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    transition: all 0.5s ease;
    position: relative;
}

.bar-before {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.3) 0%, rgba(99, 102, 241, 0.6) 100%);
    width: 85%;
}

.bar-after {
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.3) 0%, rgba(236, 72, 153, 0.6) 100%);
    width: 70%;
}

.bar-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.chart-legend.vertical {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
}

.legend-color.before {
    background: rgba(99, 102, 241, 0.6);
}

.legend-color.after {
    background: rgba(236, 72, 153, 0.6);
}

/* Donut Chart */
.donut-chart {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-total {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.donut-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* Line Chart */
.line-chart {
    margin: 20px 0;
}

.chart-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-gray);
}

.quality-score {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
}

.score-label {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-right: 10px;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Performance Stats */
.performance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-white); transition: background-color 0.3s ease;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stat-item i {
    font-size: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.dashboard-features {
    margin-top: 40px;
}

.dashboard-features h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.feature-card {
    background: var(--bg-white); transition: background-color 0.3s ease;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

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

.feature-card i {
    font-size: 2.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.feature-card h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.feature-card p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.dashboard-note {
    background: rgba(99, 102, 241, 0.1);
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    border-left: 5px solid var(--primary-color);
}

.dashboard-note p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.dashboard-note strong {
    color: var(--primary-color);
}

/* Conclusion */
.conclusion {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    border: 2px solid var(--primary-color);
}

.cta-box {
    text-align: center;
    margin-top: 40px;
    padding: 40px;
    background: var(--bg-white); transition: background-color 0.3s ease;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.cta-box h3 {
    margin: 0 0 25px 0;
    color: var(--text-dark);
}

.btn-cta {
    display: inline-block;
    padding: 15px 40px;
    background: var(--gradient-1);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Footer */
.case-footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #94a3b8;
    text-align: center;
    padding: 2rem 2rem 1.5rem;
    margin-top: 60px;
}

.case-footer .disclaimer {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.case-footer .disclaimer p {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #94a3b8;
    margin: 0;
}

.case-footer .disclaimer p i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.case-footer p {
    margin: 0 0 10px 0;
}

.case-footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.case-footer a:hover {
    color: var(--primary-color);
}

body.dark-mode .case-footer {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    border-top: 1px solid rgba(255, 140, 0, 0.2);
}

body.dark-mode .case-footer .disclaimer {
    background: rgba(255, 140, 0, 0.05);
    border-color: rgba(255, 140, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .case-hero h1 {
        font-size: 2rem;
    }

    .case-meta {
        flex-direction: column;
        gap: 15px;
    }

    .case-section {
        padding: 30px 20px;
    }

    .architecture-diagram {
        flex-direction: column;
    }

    .arch-arrow {
        transform: rotate(90deg);
        justify-content: center;
    }

    .challenge-solution {
        grid-template-columns: 1fr;
    }

    .challenge-grid {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
    }
}

/* AT&T Case Study Specific Styles */
.case-study-header {
    background: var(--gradient-1);
    color: white;
    padding: 60px 40px;
    text-align: center;
}

.case-study-header h1 {
    font-family: 'Lora', serif;
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.case-study-header .subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 30px;
}

.case-study-header .meta-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    font-size: 1rem;
}

.case-study-header .meta-info span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.case-study-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.case-study-content .section {
    background: var(--bg-white); transition: background-color 0.3s ease;
    padding: 50px 40px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.case-study-content h2 {
    font-family: 'Lora', serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
}

.case-study-content h3 {
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-top: 30px;
    margin-bottom: 15px;
}

.case-study-content h4 {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.summary-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.summary-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.summary-card h3 {
    font-size: 1.3rem;
    margin: 15px 0 10px 0;
    color: var(--text-dark);
}

.summary-card p {
    color: var(--text-gray);
    line-height: 1.7;
}

/* Challenge List */
.challenge-list {
    list-style: none;
    padding: 0;
}

.challenge-list li {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.challenge-list li:last-child {
    border-bottom: none;
}

.challenge-list strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
}

.stat-highlight {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(210, 180, 140, 0.1));
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    border-left: 4px solid var(--accent-color);
}

.stat-highlight p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Dashboard Section */
.dashboard-section {
    background: var(--bg-light) !important;
}

.dashboard-description {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    text-align: center;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-left: 70px;
    padding-bottom: 40px;
}

.timeline-marker {
    position: absolute;
    left: 16px;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 1;
}

.timeline-content h3 {
    color: var(--accent-color);
    margin: 0 0 15px 0;
    font-size: 1.3rem;
}

.timeline-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.timeline-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

/* Architecture Diagram */
.architecture-diagram {
    background: var(--bg-white); transition: background-color 0.3s ease;
    padding: 25px 5px;
    border-radius: 12px;
    margin-top: 30px;
    max-width: 100%;
    overflow-x: hidden;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.arch-layer {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    overflow-x: hidden;
    padding: 0 3px;
}

.arch-label {
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding: 0 3px;
}

.arch-layer h4 {
    text-align: center;
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.arch-boxes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 100%;
}

.arch-box {
    padding: 6px 4px;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 0.7rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.15;
    width: 100%;
}

.arch-box small {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    margin-top: 1px;
    opacity: 0.85;
    line-height: 1.1;
}

.arch-box.source {
    background: #e0f2fe;
    border: 2px solid #0284c7;
    color: #0c4a6e;
}

.arch-box.processing {
    background: #e0f2fe;
    border: 2px solid #0284c7;
    color: #0c4a6e;
}

.arch-box.storage {
    background: #e0f2fe;
    border: 2px solid #0284c7;
    color: #0c4a6e;
}

.arch-box.analytics {
    background: #e0f2fe;
    border: 2px solid #0284c7;
    color: #0c4a6e;
}

.arch-box.integration {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    color: #92400e;
}

.arch-box.warehouse {
    background: #ddd6fe;
    border: 2px solid #7c3aed;
    color: #5b21b6;
}

.arch-box.ml {
    background: #d1fae5;
    border: 2px solid #10b981;
    color: #065f46;
}

.arch-box.viz {
    background: #fce7f3;
    border: 2px solid #ec4899;
    color: #831843;
}

.arch-arrow {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin: 10px 0;
}

/* Code Blocks */
.code-block {
    background: #1e293b;
    border-radius: 8px;
    padding: 25px;
    margin: 25px 0;
    overflow-x: auto;
}

.code-block h4 {
    color: #14b8a6;
    margin: 0 0 15px 0;
    font-size: 1rem;
}

.code-block pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-block code {
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.result-card {
    background: var(--bg-white); transition: background-color 0.3s ease;
    padding: 30px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.result-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(20, 184, 166, 0.1);
}

.result-card.highlight {
    background: var(--gradient-1);
    color: white;
    border: none;
}

.result-card h3 {
    font-size: 1.3rem;
    margin: 0 0 15px 0;
}

.result-card.highlight h3 {
    color: white;
}

.result-card p {
    margin: 0;
    line-height: 1.7;
}

/* Challenges Section */
.challenges {
    display: grid;
    gap: 25px;
    margin-top: 30px;
}

.challenge-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid #ef4444;
}

.challenge-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #dc2626;
    font-size: 1.2rem;
    margin: 0 0 15px 0;
}

.challenge-card h3 i {
    font-size: 1.5rem;
}

.challenge-card p {
    margin: 10px 0;
    line-height: 1.7;
}

.challenge-card strong {
    color: var(--text-dark);
    display: block;
    margin-top: 15px;
}

/* Key Learnings */
.learnings {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.learning-item {
    display: flex;
    gap: 20px;
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
}

.learning-item i {
    font-size: 2rem;
    color: #f59e0b;
    flex-shrink: 0;
}

.learning-item h4 {
    color: var(--accent-color);
    margin: 0 0 10px 0;
}

.learning-item p {
    margin: 0;
    line-height: 1.7;
    color: var(--text-gray);
}

/* Tech Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.tech-category {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
}

.tech-category h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.tech-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tech-category li {
    padding: 8px 0;
    color: var(--text-gray);
    display: flex;
    align-items: center;
}

.tech-category li::before {
    content: '▹';
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.2rem;
}

/* CTA Section */
.cta-section {
    background: var(--gradient-1) !important;
    color: white !important;
    text-align: center;
}

.cta-section h2 {
    color: white !important;
    border-bottom-color: rgba(255, 255, 255, 0.3) !important;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--bg-white); transition: background-color 0.3s ease;
    color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: var(--bg-white); transition: background-color 0.3s ease;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Footer */
.case-study-footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #94a3b8;
    padding: 2rem 2rem 1.5rem;
    text-align: center;
}

.case-study-footer .footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.case-study-footer .disclaimer {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.case-study-footer .disclaimer p {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #94a3b8;
    margin: 0;
}

.case-study-footer .disclaimer p i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.case-study-footer p {
    margin: 0 0 15px 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 1rem;
}

.footer-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

body.dark-mode .case-study-footer {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    border-top: 1px solid rgba(255, 140, 0, 0.2);
}

body.dark-mode .case-study-footer .disclaimer {
    background: rgba(255, 140, 0, 0.05);
    border-color: rgba(255, 140, 0, 0.15);
}

/* Tableau Container */
.tableau-access-box {
    margin-top: 40px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.05), rgba(210, 180, 140, 0.05));
    padding: 40px;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    text-align: center;
}

.tableau-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.tableau-access-box h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0 0 20px 0;
}

.tableau-access-box > p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    font-weight: 600;
}

.dashboard-features {
    list-style: none;
    padding: 0;
    margin: 25px 0;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.dashboard-features li {
    padding: 12px 0;
    color: var(--text-gray);
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dashboard-features i {
    color: var(--primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 3px;
}

.tableau-note {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-gray);
    font-style: italic;
}

.tableau-container {
    margin-top: 40px;
    background: var(--bg-white); transition: background-color 0.3s ease;
    padding: 30px;
    border-radius: 12px;
}

.tableau-container h3 {
    text-align: center;
    color: var(--primary-color);
    margin: 0 0 10px 0;
}

.tableau-description {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 25px;
}

.tableau-embed {
    min-height: 600px;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.tableau-note {
    margin-top: 20px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-gray);
    font-style: italic;
}

@media print {
    .case-nav,
    .cta-box,
    .case-footer {
        display: none;
    }

    .case-section {
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* Dashboard Mockup Styles */
.tableau-embed-container {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.dashboard-note {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    font-size: 0.9rem;
    color: #856404;
}

.dashboard-mockup {
    margin-top: 30px;
    padding: 30px;
    background: var(--bg-white); transition: background-color 0.3s ease;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dashboard-header-mock {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.dashboard-header-mock h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.dashboard-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 16px;
    font-size: 0.85rem;
}

.kpi-grid-mock {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card-mock {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.kpi-value-large {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.kpi-change {
    font-size: 0.85rem;
    font-weight: 600;
}

.kpi-change.positive {
    color: #28a745;
}

.kpi-change.negative {
    color: #dc3545;
}

.chart-row-mock {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-mock {
    background: var(--bg-white); transition: background-color 0.3s ease;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.chart-mock.full-width {
    grid-column: 1 / -1;
}

.chart-mock h4 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.audience-segment-mock {
    margin-top: 30px;
}

.audience-segment-mock h4 {
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 1.2rem;
}

.data-table-mock {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white); transition: background-color 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.data-table-mock thead {
    background: var(--primary-color);
    color: white;
}

.data-table-mock th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.data-table-mock td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    color: var(--text-gray);
}

.data-table-mock tbody tr:hover {
    background: #f8f9fa;
}

.data-table-mock tbody tr:last-child td {
    border-bottom: none;
}

@media (max-width: 768px) {
    .case-study-header {
        padding: 40px 20px;
    }
    
    .case-study-header h1 {
        font-size: 2rem;
    }
    
    .case-study-header .subtitle {
        font-size: 1.1rem;
    }
    
    .case-study-header .meta-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .case-study-content .section {
        padding: 30px 20px;
    }
    
    .summary-grid,
    .results-grid,
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-marker {
        left: 0;
    }
    
    .arch-boxes {
        flex-direction: column;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}


/* New Dashboard Container Styles */
.dashboard-container {
    background: var(--bg-white);
    transition: background-color 0.3s ease;
    border-radius: 12px;
    padding: 35px;
    margin: 35px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.dark-mode .dashboard-container {
    background: #1a1625;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Metrics Row */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 45px;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f8f9fa;
    padding: 28px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s, box-shadow 0.2s;
}

body.dark-mode .metric-card {
    background: #251e35;
    border-color: #3d3450;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

body.dark-mode .metric-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.metric-content {
    flex: 1;
    min-width: 0;
}

.metric-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

body.dark-mode .metric-label {
    color: #a0a0a0;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 6px;
}

.metric-change {
    font-size: 0.85rem;
    font-weight: 500;
}

.metric-change.positive {
    color: #10b981;
}

.metric-change.negative {
    color: #ef4444;
}

.metric-change.neutral {
    color: #64748b;
}

body.dark-mode .metric-change.positive {
    color: #34d399;
}

body.dark-mode .metric-change.negative {
    color: #f87171;
}

body.dark-mode .metric-change.neutral {
    color: #94a3b8;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 35px;
    margin-top: 30px;
}

@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
    transition: box-shadow 0.2s;
}

body.dark-mode .chart-container {
    background: #251e35;
    border-color: #3d3450;
}

.chart-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.dark-mode .chart-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chart-container h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #1a1a1a;
}

body.dark-mode .chart-container h3 {
    color: #e0e0e0;
}

/* Bar Chart Styles */
.bar-chart {
    margin-bottom: 20px;
}

.bar-group {
    margin-bottom: 20px;
}

.bar-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

body.dark-mode .bar-label {
    color: #d0d0d0;
}

.bar-wrapper {
    background: #f1f5f9;
    border-radius: 6px;
    overflow: visible;
    height: 40px;
    position: relative;
}

body.dark-mode .bar-wrapper {
    background: #1a1625;
}

.bar {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    position: relative;
    transition: width 0.3s ease;
}

.bar-best {
    background: linear-gradient(90deg, #10b981, #059669);
}

.bar-good {
    background: linear-gradient(90deg, #14b8a6, #0d9488);
}

.bar-neutral {
    background: linear-gradient(90deg, #94a3b8, #64748b);
}

.bar-stat {
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.9;
}

.bar-stat-external {
    font-size: 0.75rem;
    color: var(--text-gray);
    opacity: 0.9;
}

body.dark-mode .bar-stat-external {
    color: #b0b0b0;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

body.dark-mode .chart-legend {
    border-top-color: #3d3450;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #64748b;
}

body.dark-mode .legend-item {
    color: #94a3b8;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* SVG Dark Mode */
body.dark-mode svg text {
    fill: #d0d0d0 !important;
}

body.dark-mode svg text.axis-label,
body.dark-mode svg text.stage-label,
body.dark-mode svg text.flow-label,
body.dark-mode svg text.funnel-label,
body.dark-mode svg text.lift-label,
body.dark-mode svg text.data-label {
    fill: #d0d0d0 !important;
}

body.dark-mode svg line.grid-line {
    stroke: #3d3450 !important;
}

body.dark-mode svg line {
    stroke: #3d3450 !important;
}

body.dark-mode svg rect[fill="#f1f5f9"] {
    fill: #1a1625 !important;
}

body.dark-mode svg circle[fill="#e5e7eb"] {
    fill: #3d3450 !important;
}

/* Line chart specific dark mode */
body.dark-mode .line-chart svg path {
    fill: #ff8c00;
    opacity: 0.25;
}

body.dark-mode .line-chart svg polyline[stroke="#0d9488"],
body.dark-mode .line-chart svg polyline[stroke="#14b8a6"] {
    stroke: #ff8c00;
}

body.dark-mode .line-chart svg circle[fill="#0d9488"],
body.dark-mode .line-chart svg circle[fill="#14b8a6"] {
    fill: #ff8c00;
}

/* Donut chart dark mode */
body.dark-mode .donut-legend .legend-label {
    color: #e0e0e0;
}

/* Dashboard Description */
.dashboard-description {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

body.dark-mode .dashboard-description {
    color: #b0b0b0;
}


