/* DDEV Custom Theme for Reveal.js */

:root {
    /* Official DDEV Brand Colors */
    --ddev-blue: #02a8e2;
    --ddev-black: #1e2127;
    --ddev-white: #e1ded8;
    
    /* Additional theme colors derived from brand palette */
    --ddev-dark-blue: #0187b3;
    --ddev-light-blue: #e6f7fd;
    --ddev-gray: #666666;
    --ddev-light-gray: #f8f8f8;
    --ddev-accent: #ffffff;
    --ddev-cream: #faf9f6; /* Better background alternative to ddev-white */
    
    /* Typography scale following ddev.com patterns */
    --font-primary: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", monospace;
}

/* Override default theme colors */
.reveal {
    color: var(--ddev-black);
    background-color: var(--ddev-accent);
    font-family: var(--font-primary);
    font-size: 38px;
    font-weight: normal;
    letter-spacing: -0.02em;
}

/* Headers following ddev.com typography patterns */
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
    color: var(--ddev-black);
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    text-transform: none;
    letter-spacing: -0.025em;
}

/* Special styling for primary headings */
.reveal h1 {
    color: var(--ddev-blue);
    font-weight: 800;
}

.reveal h2 {
    color: var(--ddev-blue);
    font-weight: 700;
}

.reveal h1 {
    font-size: 2.5em;
}

.reveal h2 {
    font-size: 1.8em;
}

.reveal h3 {
    font-size: 1.3em;
    color: var(--ddev-black);
    font-weight: 600;
}

/* Links */
.reveal a {
    color: var(--ddev-blue);
    text-decoration: none;
    transition: color 0.15s ease;
}

.reveal a:hover {
    color: var(--ddev-dark-blue);
    text-shadow: none;
    border: none;
}

/* Code styling following ddev.com patterns */
.reveal code {
    background-color: var(--ddev-light-gray);
    color: var(--ddev-black);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.85em;
    font-weight: 500;
    border: 1px solid #e1e1e1;
}

.reveal pre {
    background-color: var(--ddev-light-gray);
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    padding: 24px;
    margin: 24px 0;
    font-size: 0.75em;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.reveal pre code {
    background-color: transparent;
    padding: 0;
    color: var(--ddev-black);
    border: none;
    font-size: inherit;
}

/* Blockquotes */
.reveal blockquote {
    background: var(--ddev-light-blue);
    border-left: 5px solid var(--ddev-blue);
    margin: 20px 0;
    padding: 20px;
    font-style: italic;
    color: var(--ddev-dark-blue);
}

/* Lists */
.reveal ul,
.reveal ol {
    color: var(--ddev-black);
}

.reveal ul li::marker,
.reveal ol li::marker {
    color: var(--ddev-blue);
}

/* Progress bar */
.reveal .progress {
    color: var(--ddev-blue);
}

/* Controls */
.reveal .controls {
    color: var(--ddev-blue);
}

.reveal .controls button {
    color: var(--ddev-blue);
}

/* Title slide styling */
.reveal section[data-background-color] h1 {
    color: var(--ddev-accent); /* Pure white for better contrast */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Speaker notes indicator */
.reveal .speaker-notes-indicator {
    background-color: var(--ddev-blue);
}

/* Custom classes for special content following ddev.com patterns */
.ddev-highlight {
    background: linear-gradient(135deg, var(--ddev-light-blue), #f0f9ff);
    padding: 20px 24px;
    border-radius: 12px;
    border-left: 4px solid var(--ddev-blue);
    margin: 24px 0;
    font-weight: 500;
    box-shadow: 0 2px 12px rgba(2, 168, 226, 0.1);
    border: 1px solid rgba(2, 168, 226, 0.1);
}

.ddev-highlight strong {
    color: var(--ddev-blue);
    font-weight: 700;
}

/* DDEV Logo styling */
.ddev-logo {
    max-height: 120px;
    max-width: 300px;
    margin: 20px auto;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
    /* Ensure SVG displays properly */
    object-fit: contain;
}

/* Ensure logo centering on title slide */
.reveal .slides section:first-child .ddev-logo {
    margin: 20px auto !important;
    display: block !important;
    text-align: center !important;
}

.ddev-logo-small {
    max-height: 60px;
    margin: 10px;
    vertical-align: middle;
}

/* Header logo integration */
.reveal .slide-header {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.reveal .slide-header .ddev-logo-small {
    max-height: 40px;
    margin: 0;
}

.demo-section {
    background-color: var(--ddev-light-gray);
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    border: 2px solid var(--ddev-blue);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .reveal h1 {
        font-size: 2em;
    }
    
    .reveal h2 {
        font-size: 1.5em;
    }
    
    .reveal pre {
        padding: 15px;
        font-size: 0.8em;
    }
}

/* Navigation and UI enhancements */
.reveal .progress {
    height: 4px;
}

.reveal .slide-number {
    background-color: var(--ddev-blue);
    color: var(--ddev-accent); /* Pure white for better contrast */
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.reveal .controls {
    bottom: 30px;
    right: 30px;
}

.reveal .controls button {
    color: var(--ddev-blue);
    width: 40px;
    height: 40px;
}

.reveal .controls button:hover {
    color: var(--ddev-dark-blue);
}

/* Section navigation styling */
.reveal section[id] h1 {
    border-bottom: 3px solid var(--ddev-blue);
    padding-bottom: 10px;
    margin-bottom: 30px;
}

/* Table of contents styling following ddev.com patterns */
.reveal .toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin: 32px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.reveal .toc-link {
    display: block;
    background: linear-gradient(135deg, var(--ddev-light-blue), #f8fcff);
    color: var(--ddev-black);
    padding: 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(2, 168, 226, 0.1);
    text-align: left;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.reveal .toc-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ddev-blue), var(--ddev-dark-blue));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.reveal .toc-link:hover {
    background: linear-gradient(135deg, var(--ddev-blue), var(--ddev-dark-blue));
    color: var(--ddev-accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(2, 168, 226, 0.25);
    border-color: var(--ddev-blue);
}

.reveal .toc-link:hover::before {
    transform: scaleX(1);
}

.reveal .toc-link strong {
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
}

.reveal .toc-link small {
    opacity: 0.8;
    font-size: 0.85em;
    font-weight: 400;
}

/* Back to TOC button */
.reveal .back-to-toc {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--ddev-blue);
    color: var(--ddev-accent); /* Pure white for better contrast */
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.reveal .back-to-toc:hover {
    opacity: 1;
    color: var(--ddev-accent); /* Pure white for better contrast */
}

/* Section breadcrumbs */
.reveal .section-breadcrumb {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--ddev-light-gray);
    color: var(--ddev-dark-blue);
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: 600;
}

/* Speaker notes indicator */
.reveal.show-notes .speaker-notes {
    border-top: 2px solid var(--ddev-blue);
}

/* Overview mode styling */
.reveal.overview .slides section {
    border: 2px solid var(--ddev-light-blue);
}

.reveal.overview .slides section.present {
    border-color: var(--ddev-blue);
}

/* Modern footer styling */
.reveal .slide-footer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7em;
    color: var(--ddev-gray);
    opacity: 0.8;
    border-top: 1px solid rgba(2, 168, 226, 0.1);
    padding-top: 10px;
}

.reveal .slide-footer .footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reveal .slide-footer .footer-right {
    color: var(--ddev-blue);
    font-weight: 600;
}

/* Enhanced button styling */
.reveal .ddev-button {
    background: linear-gradient(135deg, var(--ddev-blue), var(--ddev-dark-blue));
    color: var(--ddev-accent);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(2, 168, 226, 0.2);
}

.reveal .ddev-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(2, 168, 226, 0.3);
    color: var(--ddev-accent);
}

/* Print styles */
@media print {
    .reveal {
        background-color: white;
    }
    
    .reveal h1,
    .reveal h2,
    .reveal h3 {
        color: var(--ddev-black);
    }
    
    .reveal .progress,
    .reveal .controls,
    .reveal .slide-number,
    .reveal .slide-footer {
        display: none;
    }
}

/* Base alignment: Keep headings centered, but left-align body content */
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
    text-align: center;
}

/* Left-align body content in non-title slides */
.reveal .slides section:not(.title-slide) blockquote,
.reveal .slides section:not(.title-slide) pre,
.reveal .slides section:not(.title-slide) ul,
.reveal .slides section:not(.title-slide) ol,
.reveal .slides section:not(.title-slide) li,
.reveal .slides section:not(.title-slide) p {
    text-align: left !important;
}

/* Title slide: keep everything centered */
.reveal .slides section:first-child h1,
.reveal .slides section:first-child h2,
.reveal .slides section:first-child p,
.reveal .slides section:first-child strong,
.reveal .slides section:first-child .ddev-logo {
    text-align: center !important;
}

/* Ensure list indentation feels natural when left-aligned */
.reveal .slides section:not(.title-slide) ul,
.reveal .slides section:not(.title-slide) ol {
    display: block !important;
    margin-left: 1.5em;
    padding-left: 0.5em;
}

/* Keep blockquotes flush-left without extra unintended indentation */
.reveal .slides section:not(.title-slide) blockquote {
    margin-left: 0;
}

/* Special handling for spans and inline elements on title slide */
.reveal .slides section:first-child span {
    text-align: center !important;
    display: block;
}
