@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&display=swap');

:root {
    --primary-dark: #233C49;
    --primary-dark-rgb: 35, 60, 73;
    --primary-teal: #28B5B5;
    --primary-teal-rgb: 40, 181, 181;
    --accent-light-blue: #6EC1E4;
    --accent-gold: #c5a880;
    --accent-gold-rgb: 197, 168, 128;
    --accent-gold-dark: #a4855b;
    --accent-green: #61CE70;
    --accent-red: #CA3232;
    --bg-light: #ffffff;
    --bg-alt: #f4f8fa;
    --bg-dark: #192b34;
    --text-main: #1C2B33;
    --text-muted: #54595F;
    --text-light: #ffffff;
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 30px rgba(35, 60, 73, 0.1);
    --shadow-gold: 0 10px 30px rgba(197, 168, 128, 0.15);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
}

/* ==========================================================================
   Presentation Layout & Shell
   ========================================================================== */
.presentation-container {
    flex: 1;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.slides-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    perspective: 1500px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateZ(-50px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.8s cubic-bezier(0.25, 1, 0.5, 1),
                visibility 0.8s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 6rem;
    box-sizing: border-box;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateZ(0);
    z-index: 10;
}

/* Page transitions from Javascript */
.slide.exit-left {
    opacity: 0;
    transform: translateX(-100%) rotateY(-20deg);
}

.slide.enter-right {
    opacity: 0;
    transform: translateX(100%) rotateY(20deg);
}

/* Slide Content Layout */
.slide-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: 100%;
    justify-content: center;
}

/* Dark themed slides */
.slide.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-light);
    background-image: radial-gradient(circle at 10% 20%, rgba(35, 60, 73, 0.15) 0%, rgba(25, 43, 52, 0.3) 90.2%);
}

.slide.dark-theme .slide-title h2 {
    color: var(--text-light);
}

.slide.dark-theme .slide-title h2::after {
    background: linear-gradient(90deg, var(--accent-gold), transparent);
}

.slide.dark-theme p, 
.slide.dark-theme .slide-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, .serif-font {
    font-family: 'Playfair Display', serif;
}

.slide-title {
    margin-bottom: 1rem;
}

.slide-title h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
    position: relative;
    padding-bottom: 0.75rem;
}

.slide-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-teal), transparent);
    border-radius: 2px;
}

.slide-title p.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
}

p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.highlight {
    color: var(--primary-teal);
    font-weight: 600;
}

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

/* ==========================================================================
   Slide Elements & Cards
   ========================================================================== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

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

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Fancy Cards */
.card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(35, 60, 73, 0.04);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(40, 181, 181, 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-teal);
    opacity: 0;
    transition: var(--transition-smooth);
}

.card:hover::before {
    opacity: 1;
}

.card.gold-card {
    border-color: rgba(197, 168, 128, 0.2);
}

.card.gold-card::before {
    background-color: var(--accent-gold);
}

.card.gold-card:hover {
    box-shadow: var(--shadow-gold);
}

/* Stat Box */
.stat-box {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary-teal);
    font-family: 'Playfair Display', serif;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background-color: rgba(40, 181, 181, 0.1);
    color: var(--primary-teal);
}

.badge-gold {
    background-color: rgba(197, 168, 128, 0.15);
    color: var(--accent-gold-dark);
}

.badge-red {
    background-color: rgba(202, 50, 50, 0.1);
    color: var(--accent-red);
}

/* List details */
.list-premium {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-premium li {
    position: relative;
    padding-left: 2rem;
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.list-premium li::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-gold);
    font-size: 1.1rem;
}

.list-premium.teal-bullets li::before {
    color: var(--primary-teal);
}

/* ==========================================================================
   Navigation and Controls
   ========================================================================== */
.presentation-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    background-color: var(--bg-light);
    border-top: 1px solid rgba(35, 60, 73, 0.05);
    z-index: 100;
}

.progress-container {
    flex: 1;
    max-width: 60%;
    height: 4px;
    background-color: rgba(35, 60, 73, 0.08);
    border-radius: 2px;
    margin: 0 2rem;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-teal), var(--accent-light-blue));
    border-radius: 2px;
    transition: width 0.4s ease;
}

.controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(35, 60, 73, 0.1);
    background: var(--bg-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 1rem;
}

.btn-nav:hover:not(:disabled) {
    background-color: var(--primary-dark);
    color: var(--text-light);
    border-color: var(--primary-dark);
    transform: scale(1.05);
}

.btn-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slide-number {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

/* Sidebar Menu / TOC */
.sidebar-toc {
    width: 280px;
    height: 100%;
    background-color: var(--bg-dark);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    z-index: 200;
    transition: var(--transition-smooth);
}

.sidebar-toc.collapsed {
    margin-left: -280px;
}

.sidebar-header {
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-teal), var(--accent-light-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
}

.sidebar-brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    flex: 1;
}

.toc-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toc-item span.num {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    opacity: 0.4;
    width: 20px;
}

.toc-item:hover, .toc-item.active {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.05);
}

.toc-item.active {
    border-left: 3px solid var(--primary-teal);
    background-color: rgba(40, 181, 181, 0.1);
    padding-left: calc(1rem - 3px);
}

.toc-toggle {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 150;
}

.btn-toggle {
    background: rgba(35, 60, 73, 0.05);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    transition: var(--transition-smooth);
}

.btn-toggle:hover {
    background-color: var(--primary-dark);
    color: var(--text-light);
}

.slide.dark-theme ~ .toc-toggle .btn-toggle {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* ==========================================================================
   Interactive Presentation Widgets
   ========================================================================== */

/* 1. Timeline Widget */
.timeline-container {
    width: 100%;
    margin-top: 1rem;
}

.timeline-navigation {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background-color: rgba(35, 60, 73, 0.08);
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-progress-line {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    background-color: var(--primary-teal);
    transform: translateY(-50%);
    z-index: 2;
    transition: width 0.5s ease;
    width: 0%;
}

.timeline-node {
    position: relative;
    z-index: 3;
    background-color: var(--bg-light);
    border: 3px solid rgba(35, 60, 73, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-bounce);
    font-weight: 600;
    color: var(--text-muted);
}

.timeline-node:hover, .timeline-node.active {
    border-color: var(--primary-teal);
    color: var(--primary-teal);
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(40, 181, 181, 0.3);
}

.timeline-node.active {
    background-color: var(--primary-teal);
    color: var(--text-light);
}

.timeline-node .node-label {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.timeline-node.active .node-label {
    color: var(--primary-teal);
}

.timeline-content-pane {
    display: none;
    animation: fadeInUp 0.5s ease forwards;
}

.timeline-content-pane.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

/* 2. Stakeholder Tabs Widget */
.tab-widget {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.tab-buttons {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid rgba(35, 60, 73, 0.08);
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: var(--transition-smooth);
}

.tab-btn:hover, .tab-btn.active {
    color: var(--primary-dark);
}

.tab-btn.active {
    border-bottom-color: var(--primary-teal);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-pane.active {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* 3. Live Economics Calculator Widget */
.calc-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    background: var(--bg-alt);
    border-radius: 12px;
    padding: 2.5rem;
    border: 1px solid rgba(35, 60, 73, 0.05);
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.calc-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calc-label-wrapper {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 600;
}

.calc-label {
    color: var(--text-main);
}

.calc-value-display {
    color: var(--primary-teal);
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(35, 60, 73, 0.1);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-teal);
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: 0 2px 6px rgba(40, 181, 181, 0.3);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.calc-results {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    border: 1px solid rgba(197, 168, 128, 0.1);
}

.calc-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(35, 60, 73, 0.08);
    padding-bottom: 0.75rem;
}

.calc-result-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.calc-result-label {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.calc-result-val {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.calc-result-val.ratio-val {
    font-size: 2.2rem;
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

.ratio-badge {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 600;
}

.ratio-good {
    background-color: rgba(97, 206, 112, 0.12);
    color: #3b8e46;
}

.ratio-bad {
    background-color: rgba(202, 50, 50, 0.12);
    color: var(--accent-red);
}

/* ==========================================================================
   Table layouts & comparison matrix
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.premium-table th {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 1rem 1.25rem;
    font-weight: 500;
    border-bottom: 3px solid var(--accent-gold);
}

.premium-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(35, 60, 73, 0.06);
    color: var(--text-muted);
}

.premium-table tr:hover {
    background-color: rgba(40, 181, 181, 0.02);
}

.premium-table tr.row-highlight {
    background-color: rgba(197, 168, 128, 0.08);
}

.premium-table tr.row-highlight td {
    color: var(--text-main);
    font-weight: 500;
}

.premium-table tr.row-highlight td:first-child {
    border-left: 4px solid var(--accent-gold);
}

/* Strategic Options Matrix specific */
.options-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    width: 100%;
}

.option-card {
    background: var(--bg-light);
    border: 1px solid rgba(35, 60, 73, 0.08);
    border-radius: 8px;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition-smooth);
}

.option-card.recommended {
    border: 2px solid var(--accent-gold);
    box-shadow: var(--shadow-gold);
    background-color: rgba(197, 168, 128, 0.04);
}

.option-card.recommended::after {
    content: 'RECOMMENDED';
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-gold-dark);
    letter-spacing: 1px;
    align-self: flex-start;
    background: rgba(197, 168, 128, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

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

.option-card h3 {
    font-size: 1.15rem;
    color: var(--primary-dark);
}

.option-cost {
    font-weight: 600;
    color: var(--primary-teal);
    font-size: 0.9rem;
}

.option-risk {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Visual Progress Bars / Charts
   ========================================================================== */
.budget-chart {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.budget-row {
    display: grid;
    grid-template-columns: 200px 1fr 80px;
    align-items: center;
    gap: 1.5rem;
}

.budget-label {
    font-weight: 500;
    font-size: 0.95rem;
    text-align: right;
}

.budget-bar-wrapper {
    height: 14px;
    background-color: rgba(35, 60, 73, 0.06);
    border-radius: 50px;
    overflow: hidden;
}

.budget-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-teal), var(--accent-light-blue));
    border-radius: 50px;
    width: 0%;
    transition: width 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.budget-val {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* ==========================================================================
   Cover Slide Custom Styling
   ========================================================================== */
.cover-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    gap: 1.5rem;
}

.cover-badge {
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 50px;
}

.cover-title {
    font-size: 4rem;
    font-weight: 800;
    color: white;
    max-width: 900px;
    line-height: 1.15;
}

.cover-subtitle {
    font-size: 1.4rem;
    color: var(--accent-light-blue);
    font-weight: 400;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.cover-meta {
    margin-top: 3rem;
    font-size: 0.95rem;
    opacity: 0.6;
    letter-spacing: 1px;
}

/* ==========================================================================
   Responsiveness
   ========================================================================== */
@media (max-width: 1024px) {
    body {
        flex-direction: column;
    }
    .sidebar-toc {
        display: none; /* Auto collapse on tablets/mobiles */
    }
    .slide {
        padding: 3rem 2rem;
    }
    .slide-title h2 {
        font-size: 2.2rem;
    }
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .calc-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
