/**
 * Custom Theme for Fetal Growth Restriction Presentation
 * Built on Reveal.js framework
 */

/* ===== CSS Variables ===== */
:root {
    --background-color: #1a1a2e;
    --text-color: #eeeeee;
    --primary-color: #4fc3f7;
    --secondary-color: #81c784;
    --highlight-color: #ffd54f;
    --accent-color: #2d4059;
    --border-color: rgba(79, 195, 247, 0.3);
}

/* ===== Base Styles ===== */
.reveal {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 32px;
    font-weight: normal;
    color: var(--text-color);
}

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

/* ===== Background ===== */
.reveal-viewport {
    background: var(--background-color);
    background-image: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* ===== Typography ===== */
.reveal h1 {
    font-size: 3.5em;
    font-weight: 300;
    color: var(--primary-color);
    text-shadow: 0 2px 10px rgba(79, 195, 247, 0.3);
    margin-bottom: 0.5em;
    line-height: 1.2;
    letter-spacing: 1px;
}

.reveal h2 {
    font-size: 2.5em;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 0.8em;
    line-height: 1.3;
}

.reveal h3 {
    font-size: 1.8em;
    font-weight: 400;
    color: var(--secondary-color);
    margin-bottom: 0.5em;
    line-height: 1.4;
}

.reveal p {
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0 0 1em 0;
}

/* ===== Subtitle & Navigation Hint ===== */
.reveal .subtitle {
    font-size: 1.2em;
    color: #aaaaaa;
    font-style: italic;
    margin-bottom: 2em;
}

.reveal .navigation-hint {
    font-size: 0.8em;
    color: #888888;
    margin-top: 3em;
    opacity: 0.8;
}

/* ===== Special Text Styles ===== */
.reveal .highlight {
    color: var(--highlight-color);
    font-weight: 600;
}

.reveal .reassurance {
    color: var(--secondary-color);
    font-weight: 500;
}

/* ===== Icon ===== */
.reveal .icon {
    font-size: 4em;
    margin-bottom: 0.5em;
    display: block;
    line-height: 1;
}

/* ===== Lists ===== */
.reveal ul,
.reveal ol {
    text-align: left;
    margin: 0 auto;
    max-width: 900px;
    font-size: 1em;
}

.reveal ul {
    list-style-type: none;
    padding-left: 0;
}

.reveal li {
    margin-bottom: 0.8em;
    padding-left: 1.5em;
    position: relative;
}

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

/* ===== Tables ===== */
.reveal table {
    margin: 2em auto;
    border-collapse: collapse;
    font-size: 0.85em;
    max-width: 90%;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
}

.reveal th {
    background: var(--accent-color);
    padding: 1em;
    text-align: left;
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

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

.reveal tr:last-child td {
    border-bottom: none;
}

.reveal tr:hover {
    background: rgba(79, 195, 247, 0.05);
}

/* ===== Definition Box ===== */
.reveal .definition {
    background: rgba(79, 195, 247, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 1.5em;
    margin: 2em auto;
    max-width: 850px;
    text-align: left;
    font-size: 1em;
    border-radius: 4px;
}

.reveal .definition strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== Key Point Box ===== */
.reveal .key-point {
    background: rgba(129, 199, 132, 0.12);
    border-radius: 12px;
    padding: 2em;
    margin: 1.5em auto;
    max-width: 850px;
    font-size: 1em;
    border: 1px solid rgba(129, 199, 132, 0.2);
}

.reveal .key-point-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 1em;
    color: var(--secondary-color);
}

.reveal .key-point p {
    margin: 0.8em 0;
}

/* ===== Remember & Summary Boxes ===== */
.reveal .remember-box {
    background: rgba(129, 199, 132, 0.15);
    font-size: 1.1em;
}

.reveal .summary-box {
    text-align: center;
    font-size: 1em;
    padding: 2em;
}

.reveal .summary-box p {
    margin: 1em 0;
}

/* ===== Comparison Grid ===== */
.reveal .comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    max-width: 900px;
    margin: 2em auto;
}

.reveal .comparison-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 2em;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reveal .comparison-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(79, 195, 247, 0.2);
}

.reveal .comparison-item h3 {
    font-size: 1.5em;
    margin-bottom: 0.8em;
    color: var(--primary-color);
}

.reveal .comparison-item p {
    font-size: 0.9em;
}

/* ===== Timeline ===== */
.reveal .timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 3em auto;
    position: relative;
    padding: 2em 0;
}

.reveal .timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 0;
    transform: translateY(-50%);
}

.reveal .timeline-item {
    background: var(--accent-color);
    padding: 1.2em 1.8em;
    border-radius: 12px;
    z-index: 1;
    font-size: 0.85em;
    min-width: 150px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.reveal .timeline-item:hover {
    transform: scale(1.1);
}

.reveal .timeline-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.3em;
    font-size: 1.1em;
}

/* ===== Fragment Animations ===== */
.reveal .fragment {
    transition: all 0.3s ease;
}

/* ===== Progress Bar ===== */
.reveal .progress {
    background: rgba(0, 0, 0, 0.3);
    height: 4px;
}

.reveal .progress span {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

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

.reveal .controls button {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.reveal .controls button:hover {
    opacity: 1;
}

/* ===== Slide Number ===== */
.reveal .slide-number {
    color: var(--primary-color);
    background: rgba(26, 26, 46, 0.8);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.7em;
}

/* ===== Responsive Design ===== */
@media screen and (max-width: 768px) {
    .reveal h1 {
        font-size: 2.5em;
    }
    
    .reveal h2 {
        font-size: 2em;
    }
    
    .reveal h3 {
        font-size: 1.5em;
    }
    
    .reveal p {
        font-size: 1em;
    }
    
    .reveal .comparison {
        grid-template-columns: 1fr;
        gap: 1.5em;
    }
    
    .reveal .timeline {
        flex-direction: column;
        gap: 1.5em;
    }
    
    .reveal .timeline::before {
        width: 3px;
        height: 100%;
        left: 50%;
        top: 0;
        transform: translateX(-50%);
    }
    
    .reveal .timeline-item {
        width: 100%;
        max-width: 300px;
    }
    
    .reveal table {
        font-size: 0.7em;
    }
    
    .reveal th,
    .reveal td {
        padding: 0.7em;
    }
}

/* ===== Print Styles ===== */
@media print {
    .reveal {
        background: white;
        color: black;
    }
    
    .reveal h1,
    .reveal h2,
    .reveal h3 {
        color: #333;
    }
    
    .reveal .progress,
    .reveal .controls,
    .reveal .slide-number {
        display: none;
    }
}

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

.reveal a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.reveal a:hover {
    color: var(--secondary-color);
}

/* ===== High Contrast Mode Support ===== */
@media (prefers-contrast: high) {
    :root {
        --background-color: #000000;
        --text-color: #ffffff;
        --primary-color: #00d4ff;
        --secondary-color: #00ff88;
    }
}

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