/* ========================================
   Type 1 Diabetes Pregnancy - Custom Theme
   ======================================== */

/* Base Variables */
:root {
    --primary-color: #4a9eff;
    --primary-dark: #357abd;
    --bg-dark: #1a1a2e;
    --bg-card: rgba(74, 158, 255, 0.1);
    --text-light: #eee;
    --text-accent: #a8dadc;
    --success-color: #52b788;
    --warning-color: #ffb703;
    --border-color: #4a9eff;
}

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

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

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

/* Typography */
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: none;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.reveal h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.reveal h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
}

.reveal h3 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
}

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

/* Subtitle Styling */
.subtitle {
    font-size: 1.8rem;
    color: var(--text-accent);
    margin-bottom: 1rem;
    font-weight: 300;
}

/* Content Container */
.content {
    font-size: 1.6rem;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
}

/* Text Highlights */
.highlight {
    color: var(--primary-color);
    font-weight: 600;
}

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

.action {
    color: var(--warning-color);
    font-weight: 600;
}

/* Box Component */
.box {
    background: var(--bg-card);
    border-left: 4px solid var(--border-color);
    padding: 1.5rem;
    margin: 1.5rem auto;
    border-radius: 8px;
    max-width: 900px;
}

.box p {
    margin: 0.5rem 0;
}

/* Info Grid Layout */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem auto;
    max-width: 900px;
}

.info-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.info-card h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}

.info-card p {
    font-size: 1.4rem;
    line-height: 1.6;
    margin: 0.5rem 0;
}

/* Lists */
.reveal ul {
    text-align: left;
    font-size: 1.5rem;
    line-height: 2;
    max-width: 800px;
    margin: 1.5rem auto;
    list-style-type: disc;
}

.reveal ul li {
    margin-bottom: 1rem;
}

.reveal ol {
    text-align: left;
    font-size: 1.5rem;
    line-height: 2;
    max-width: 800px;
    margin: 1.5rem auto;
}

.reveal ol li {
    margin-bottom: 1rem;
}

/* Tables */
.reveal table {
    margin: 2rem auto;
    border-collapse: collapse;
    font-size: 1.4rem;
    max-width: 800px;
    width: 100%;
}

.reveal th,
.reveal td {
    padding: 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.reveal th {
    background: rgba(74, 158, 255, 0.2);
    color: var(--primary-color);
    font-weight: 600;
}

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

/* Key Takeaways */
.takeaway-text {
    font-size: 1.6rem;
    line-height: 1.8;
    margin: 1rem 0;
}

/* 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, 158, 255, 0.2);
    color: var(--primary-color);
    height: 4px;
}

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

/* Slide Number */
.reveal .slide-number {
    color: var(--text-accent);
    background-color: rgba(26, 26, 46, 0.8);
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    font-size: 1rem;
}

/* 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;
    }
    
    .box {
        border: 2px solid #333;
        page-break-inside: avoid;
    }
}

/* Responsive Design - Tablet */
@media (max-width: 1024px) {
    .reveal h1 {
        font-size: 3rem;
    }
    
    .reveal h2 {
        font-size: 2.4rem;
    }
    
    .content {
        font-size: 1.4rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    .reveal {
        font-size: 1.3rem;
    }
    
    .reveal h1 {
        font-size: 2.5rem;
    }
    
    .reveal h2 {
        font-size: 2rem;
    }
    
    .reveal h3 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1.4rem;
    }
    
    .content {
        font-size: 1.3rem;
    }
    
    .reveal ul,
    .reveal ol {
        font-size: 1.3rem;
        padding-left: 1.5rem;
    }
    
    .reveal table {
        font-size: 1.2rem;
    }
    
    .reveal th,
    .reveal td {
        padding: 0.7rem;
    }
    
    .box {
        padding: 1rem;
        margin: 1rem auto;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .info-grid {
        gap: 1rem;
    }
    
    .reveal .slides section {
        padding: 1rem;
    }
}

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

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

/* High Contrast Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #66b3ff;
        --text-light: #ffffff;
        --border-color: #66b3ff;
    }
    
    .box,
    .info-card {
        border-width: 3px;
    }
}

/* 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 (already dark by default, but explicit) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-dark: #1a1a2e;
        --text-light: #eee;
    }
}

/* Custom Animations for Fragments */
.reveal .fragment.fade-up {
    transform: translateY(20px);
    opacity: 0;
}

.reveal .fragment.fade-up.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Speaker Notes (not visible in presentation) */
.reveal aside.notes {
    display: none;
}
