/* ========================================
   PPROM Clinical Management - Custom Theme
   ======================================== */

/* Base Variables */
:root {
    --primary-color: #4A90E2;
    --primary-dark: #357ABD;
    --bg-dark: #1a1a1a;
    --bg-panel: rgba(255, 255, 255, 0.05);
    --text-light: #ffffff;
    --text-muted: #999;
    --success-color: #2ECC71;
    --warning-color: #E74C3C;
    --caution-color: #F1C40F;
    --accent-yellow: #E8B339;
    --border-primary: #4A90E2;
}

/* Global Reveal.js Overrides */
.reveal {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.75rem;
    font-weight: normal;
    color: var(--text-light);
}

.reveal .slides {
    text-align: center;
}

.reveal .slides section {
    background: var(--bg-dark);
    padding: 3rem 2rem;
}

/* Typography */
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4 {
    text-transform: none;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.reveal h1 {
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--text-light);
}

.reveal h2 {
    font-size: 3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
}

.reveal h3 {
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--accent-yellow);
    margin-bottom: 1.5rem;
}

.reveal p {
    margin: 1rem 0;
    line-height: 1.6;
}

/* Subtitle */
.subtitle {
    font-size: 1.75rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-weight: 300;
}

.title-footer {
    margin-top: 3.75rem;
    font-size: 1.5rem;
    color: #666;
}

/* Content Boxes */
.content-box {
    background: var(--bg-panel);
    border-left: 6px solid var(--border-primary);
    padding: 2.5rem;
    border-radius: 8px;
    max-width: 75rem;
    margin: 0 auto;
}

.warning-box {
    background: rgba(231, 76, 60, 0.1);
    border-left: 6px solid var(--warning-color);
    padding: 1.875rem;
    border-radius: 8px;
    max-width: 75rem;
    margin: 1.25rem auto;
}

.evidence-box {
    background: rgba(46, 204, 113, 0.1);
    border-left: 6px solid var(--success-color);
    padding: 1.875rem;
    border-radius: 8px;
    max-width: 75rem;
    margin: 1.25rem auto;
}

.consensus-box {
    background: rgba(241, 196, 15, 0.1);
    border-left: 6px solid var(--caution-color);
    padding: 1.875rem;
    border-radius: 8px;
    max-width: 75rem;
    margin: 1.25rem auto;
}

.protocol-box {
    background: rgba(74, 144, 226, 0.1);
    border: 2px solid var(--primary-color);
    padding: 1.875rem;
    border-radius: 8px;
    max-width: 75rem;
    margin: 1.25rem auto;
}

.protocol-box h3 {
    color: var(--primary-color);
    margin-bottom: 1.25rem;
}

.steroid-box {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--success-color);
}

.neuro-box {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--success-color);
}

/* Statistics */
.stat {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1.25rem 0;
    text-align: center;
}

.stat-label {
    font-size: 1.75rem;
    color: #ccc;
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Lists */
.reveal ul {
    text-align: left;
    font-size: 1.75rem;
    line-height: 1.8;
    max-width: 75rem;
    margin: 0 auto;
    list-style: none;
}

.reveal ul li {
    margin: 1.25rem 0;
    padding-left: 2.5rem;
    position: relative;
}

.reveal ul li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 87.5rem;
    width: 100%;
    margin: 0 auto;
}

.column {
    background: var(--bg-panel);
    padding: 2.5rem;
    border-radius: 8px;
}

.column h3 {
    font-size: 2rem;
    margin-bottom: 1.5625rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.9375rem;
}

.column ul {
    font-size: 1.5rem;
}

/* Highlight */
.highlight {
    color: var(--accent-yellow);
    font-weight: 600;
}

/* Timeline */
.timeline {
    display: flex;
    justify-content: space-between;
    max-width: 87.5rem;
    width: 100%;
    margin: 2.5rem auto;
    gap: 1rem;
}

.timeline-item {
    text-align: center;
    flex: 1;
    padding: 1.25rem;
    background: var(--bg-panel);
    border-radius: 8px;
    border-top: 4px solid var(--primary-color);
}

.timeline-ga {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.9375rem;
}

.timeline-text {
    font-size: 1.25rem;
    line-height: 1.4;
}

/* Dose Information */
.dose {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.9375rem;
    border-radius: 4px;
    font-size: 1.375rem;
    margin: 0.625rem 0;
}

/* Key Point */
.key-point {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-yellow);
    text-align: center;
    padding: 1.875rem;
    background: rgba(232, 179, 57, 0.1);
    border-radius: 8px;
    max-width: 75rem;
    margin: 1.25rem auto;
}

/* Tables */
.reveal table {
    width: 100%;
    max-width: 75rem;
    border-collapse: collapse;
    margin: 1.875rem auto;
    font-size: 1.375rem;
}

.reveal th {
    background: var(--primary-color);
    padding: 1.25rem;
    text-align: left;
    font-weight: 600;
}

.reveal td {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.reveal tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.reveal tbody tr:hover {
    background: rgba(74, 144, 226, 0.05);
}

/* Evidence Levels */
.evidence-level {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    margin-left: 0.9375rem;
}

.level-a {
    background: var(--success-color);
    color: #000;
}

.level-b {
    background: var(--caution-color);
    color: #000;
}

.level-c {
    background: #95A5A6;
    color: #000;
}

/* Grid Layout */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.875rem;
    max-width: 87.5rem;
    width: 100%;
    margin: 1.875rem auto;
}

.metric-card {
    background: var(--bg-panel);
    padding: 1.875rem;
    border-radius: 8px;
    text-align: center;
    border-top: 4px solid var(--warning-color);
}

.metric-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--warning-color);
    margin: 0.9375rem 0;
}

.metric-label {
    font-size: 1.25rem;
    color: #ccc;
    margin-bottom: 0.625rem;
}

.reveal small {
    font-size: 1.125rem;
    color: #888;
    font-style: italic;
    display: block;
    margin-top: 0.5rem;
}

/* References */
.references p {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 0.9375rem;
    text-align: left;
}

/* Controls Styling */
.reveal .controls {
    color: var(--primary-color);
}

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

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

/* Progress Bar */
.reveal .progress {
    background: rgba(74, 144, 226, 0.2);
    color: var(--primary-color);
    height: 4px;
}

.reveal .progress span {
    background: var(--primary-color);
}

/* Slide Number */
.reveal .slide-number {
    color: #666;
    background-color: transparent;
    font-size: 0.875rem;
    font-weight: 300;
}

/* Links */
.reveal a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.reveal a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Fragment Animations */
.reveal .fragment.visible {
    opacity: 1;
    visibility: visible;
}

/* Print Styles */
@media print {
    .reveal {
        background: white;
        color: black;
    }
    
    .reveal h1,
    .reveal h2,
    .reveal h3 {
        color: #333;
    }
    
    .content-box,
    .warning-box,
    .evidence-box,
    .consensus-box {
        border: 2px solid #333;
        page-break-inside: avoid;
    }
}

/* Responsive Design - Tablet */
@media (max-width: 1024px) {
    .reveal h1 {
        font-size: 3.5rem;
    }
    
    .reveal h2 {
        font-size: 2.5rem;
    }
    
    .reveal h3 {
        font-size: 2rem;
    }
    
    .reveal {
        font-size: 1.5rem;
    }
    
    .two-column,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .timeline {
        flex-direction: column;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    .reveal {
        font-size: 1.25rem;
    }
    
    .reveal h1 {
        font-size: 2.5rem;
    }
    
    .reveal h2 {
        font-size: 2rem;
    }
    
    .reveal h3 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 1.25rem;
    }
    
    .stat {
        font-size: 4rem;
    }
    
    .stat-label {
        font-size: 1.5rem;
    }
    
    .reveal ul {
        font-size: 1.25rem;
    }
    
    .reveal table {
        font-size: 1rem;
    }
    
    .reveal th,
    .reveal td {
        padding: 0.75rem;
    }
    
    .content-box,
    .warning-box,
    .evidence-box,
    .consensus-box,
    .protocol-box {
        padding: 1.25rem;
    }
    
    .dose {
        font-size: 1rem;
    }
    
    .key-point {
        font-size: 1.5rem;
    }
    
    .metric-value {
        font-size: 2.5rem;
    }
}

/* Accessibility Improvements */
.reveal :focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.reveal button:focus,
.reveal a:focus {
    outline: 2px solid var(--caution-color);
    outline-offset: 2px;
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #66b3ff;
        --text-light: #ffffff;
        --border-primary: #66b3ff;
    }
    
    .content-box,
    .warning-box,
    .evidence-box,
    .consensus-box,
    .protocol-box {
        border-width: 4px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .reveal .slides section,
    .reveal .fragment,
    .reveal .controls button,
    .reveal a {
        transition: none !important;
        animation: none !important;
    }
}

/* Dark Mode Support (explicit) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-dark: #1a1a1a;
        --text-light: #ffffff;
    }
}
