/* Geothermal Retrofit Report - Main Styles */
/* Energy Solutions Intelligence 2026 - RTL Arabic Support */

:root {
    --primary-color: #e85d3a;
    --secondary-color: #0a2e5c;
    --accent-gold: #d4a844;
    --success-green: #00b894;
    --warning-orange: #f39c12;
    --danger-red: #d63031;
    --dark-bg: #0f1923;
    --light-bg: #f7f8fa;
    --text-dark: #1e272e;
    --text-light: #636e72;
    --border-color: #dfe6e9;
    --geo-gradient: linear-gradient(135deg, var(--dark-bg) 0%, #1a3a4a 100%);
}

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

body {
    font-family: 'Inter', 'Segoe UI', 'Tahoma', sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background: var(--light-bg);
    font-size: 16px;
    direction: ltr;
}

/* Header Styles */
.site-header {
    background: var(--geo-gradient);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: ltr;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
}

.logo-icon {
    font-size: 1.8rem;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.reports-link {
    background: var(--accent-gold);
    color: var(--dark-bg);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

/* Reading Progress */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-gold));
    z-index: 2000;
    transition: width 0.3s ease;
}

/* Container & Layout */
.container {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    padding: 2rem;
    direction: ltr;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.sidebar-header h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    text-align: left;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sidebar-nav .nav-link {
    color: var(--text-light);
    padding: 0.6rem 1rem;
    border-left: 3px solid transparent;
    border-right: none;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 0.9rem;
}

.sidebar-nav .nav-link:hover {
    background: rgba(232, 93, 58, 0.05);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.sidebar-nav .nav-link.active {
    background: rgba(232, 93, 58, 0.1);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

/* Hero Section */
.hero-section {
    background: var(--geo-gradient);
    color: white;
    padding: 4rem 3rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(212, 168, 68, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-block;
    background: var(--accent-gold);
    color: var(--dark-bg);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 2.8rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-gold), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    margin: 2rem 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.12);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Thesis Box */
.thesis-box {
    background: rgba(212, 168, 68, 0.12);
    border-left: 4px solid var(--accent-gold);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.thesis-box h3 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.highlight-text {
    background: rgba(232, 93, 58, 0.15);
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Section Styles */
.content-section {
    margin-bottom: 4rem;
}

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--accent-gold);
}

.section-header h2 {
    font-size: 2.1rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

.lead-text {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Cards */
.tech-card,
.market-card,
.case-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.tech-card h4,
.market-card h4 {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.tech-intro {
    margin: 1.5rem 0;
    font-weight: 500;
}

.detail-item {
    margin: 1.5rem 0;
}

.detail-item h5 {
    color: var(--primary-color);
    font-size: 1.15rem;
    margin-bottom: 0.7rem;
}

.detail-item ul,
.detail-item ol {
    margin-left: 1.5rem;
}

.detail-item li {
    margin: 0.5rem 0;
}

/* Formula Box */
.formula-box {
    background: var(--dark-bg);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.formula {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    text-align: center;
    margin: 1rem 0;
    color: var(--accent-gold);
    direction: ltr;
}

.formula-explanation {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1rem;
}

/* Info & Warning Boxes */
.info-box,
.warning-box,
.insight-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.info-box {
    background: rgba(0, 184, 148, 0.1);
    border-left: 4px solid var(--success-green);
}

.warning-box {
    background: rgba(243, 156, 18, 0.1);
    border-left: 4px solid var(--warning-orange);
}

.insight-box {
    background: rgba(232, 93, 58, 0.1);
    border-left: 4px solid var(--primary-color);
}

.emphasis {
    font-weight: 700;
    color: var(--primary-color);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

th {
    background: var(--secondary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

tbody tr:hover {
    background: rgba(232, 93, 58, 0.04);
}

.total-row {
    background: rgba(212, 168, 68, 0.15) !important;
    font-weight: 700;
}

.positive {
    color: var(--success-green);
    font-weight: 600;
}

.negative {
    color: var(--danger-red);
    font-weight: 600;
}

.neutral {
    color: var(--text-light);
}

/* Charts Container */
.chart-container {
    margin: 2rem 0;
    padding: 1.5rem 1.5rem 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chart-container h5 {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.chart-canvas-wrap {
    position: relative;
    width: 100%;
    height: 400px;
    max-height: 460px;
}

.chart-canvas-wrap canvas { display: block; }

.chart-caption {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.75rem;
    line-height: 1.5;
}

/* Case Study Cards */
.case-header {
    margin-bottom: 1.5rem;
}

.case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
}

.case-details h5 {
    color: var(--primary-color);
    margin: 1.5rem 0 0.8rem;
    font-size: 1.2rem;
}

.learnings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.learning-card {
    padding: 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.learning-card.positive {
    border-left: 3px solid var(--success-green);
    background: rgba(0, 184, 148, 0.05);
}

.learning-card.neutral {
    border-left: 3px solid var(--warning-orange);
    background: rgba(243, 156, 18, 0.05);
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.comp-column {
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.comp-column h5 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.comp-column ul,
.comp-column ol {
    margin-right: 1.5rem;
}

.comp-column li {
    margin: 0.5rem 0;
}

/* Key Findings */
.key-findings {
    margin: 2rem 0;
}

.finding-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid var(--secondary-color);
}

.finding-card h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.finding-card ul {
    margin-right: 1.5rem;
}

.finding-card li {
    margin: 0.5rem 0;
}

/* Methodology Card */
.methodology-card {
    background: linear-gradient(135deg, #f0f4f8, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

/* References Section */
.references-list {
    list-style: none;
    padding: 0;
}

.references-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    word-break: break-all;
}

.references-list li a {
    color: var(--secondary-color);
    text-decoration: none;
}

.references-list li a:hover {
    text-decoration: underline;
}

/* Disclaimer Box */
.disclaimer-box {
    background: rgba(214, 48, 49, 0.05);
    border: 1px solid rgba(214, 48, 49, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.disclaimer-box h3 {
    color: var(--danger-red);
    margin-bottom: 0.8rem;
}

/* Related Reports Grid */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.related-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.related-card h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.related-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Sponsorship Banner */
.sponsorship-banner {
    display: flex;
    align-items: stretch;
    margin: 2.5rem 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #0e3b23 0%, #175435 100%);
    border: 1px solid rgba(210, 166, 84, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.sp-bar {
    width: 6px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #d2a654 0%, #ecd39d 50%, #d2a654 100%);
}

.sp-body {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 1.5rem 2rem;
    flex: 1;
}

.sp-text-col {
    flex: 1;
    padding-left: 2rem;
}

.sp-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: #d2a654;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
}

.sp-hl {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.sp-copy {
    font-size: 0.9rem;
    color: #f1f5f9;
    line-height: 1.6;
    margin: 0;
}

.sp-rule {
    width: 2px;
    align-self: stretch;
    background: rgba(210, 166, 84, 0.25);
    margin: 0 2rem;
    flex-shrink: 0;
}

.sp-cta-wrap {
    text-align: center;
    flex-shrink: 0;
}

.sp-icon-top {
    font-size: 2rem;
    color: #d2a654;
    margin-bottom: 0.6rem;
    filter: drop-shadow(0 2px 8px rgba(210, 166, 84, 0.4));
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

.sp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #d2a654;
    color: #1a221f;
    font-size: 0.9rem;
    font-weight: 800;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(210, 166, 84, 0.4);
}

.sp-btn:hover {
    background: #e3b968;
    color: #1a221f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(210, 166, 84, 0.6);
}

.sp-btn i {
    font-size: 0.85rem;
}

.sp-footnote {
    font-size: 0.75rem;
    color: #ffffff;
    margin-top: 10px;
}

/* Footer */
.site-footer {
    background: var(--dark-bg);
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

.site-footer a {
    color: var(--accent-gold);
    text-decoration: none;
}

/* Map Container */
.map-container {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

/* Scenario Cards */
.scenario-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

.scenario-card.highlight {
    background: rgba(0, 184, 148, 0.08);
    border-left: 3px solid var(--success-green);
}

.verdict {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

.verdict.positive {
    background: rgba(0, 184, 148, 0.15);
}

.verdict.negative {
    background: rgba(214, 48, 49, 0.1);
}

.verdict.neutral {
    background: rgba(243, 156, 18, 0.1);
}

/* Region Distribution Map Styles */
.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.region-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.region-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.region-card h5 {
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

/* Print Styles */
@media print {
    .sidebar, .site-header, .sponsorship-banner, #reading-progress { display: none; }
    .container { grid-template-columns: 1fr; }
    .main-content { box-shadow: none; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light-bg); }
::-webkit-scrollbar-thumb { background: var(--text-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary-color); }
