/* Custom theme for AML Training Presentation */
:root {
    /* Enhanced color palette with lighter/darker variants */
    --navy: #1a2b3c;
    --navy-light: #2a3b4c;
    --navy-dark: #0a1b2c;
    --crimson: #7c1d2b;
    --crimson-light: #8c2d3b;
    --crimson-dark: #6c0d1b;
    --forest: #2c5234;
    --forest-light: #3c6244;
    --forest-dark: #1c4224;
    --steel: #b8c5d6;
    --steel-light: #c8d5e6;
    --steel-dark: #a8b5c6;
    --warm-gray: #d9d9d9;
    /* Purple family */
    --purple: #4b2d5c;
    --purple-light: #5b3d6c;
    --purple-dark: #3b1d4c;

    /* Amber family */
    --amber: #c17f23;
    --amber-light: #d18f33;
    --amber-dark: #b16f13;

    /* Teal family */
    --teal: #1b4b4d;
    --teal-light: #2b5b5d;
    --teal-dark: #0b3b3d;

    /* Slate family */
    --slate: #445566;
    --slate-light: #546576;
    --slate-dark: #344556;

    /* Typography scale using modular ratio */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;

    /* Spacing scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-medium: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;

    /* Add section height variable */
    --section-height: 90%;
    --section-min-height: 80%;
}

/* Base styles with dark mode support */
.reveal {
    font-family:
        "Segoe UI",
        system-ui,
        -apple-system,
        sans-serif;
    font-size: var(--text-base);
    line-height: 1.5;
}

/* Enhanced slide styles */
.reveal .slides section {
    /* Existing styles */
    background: white;
    width: min(90%, 900px);
    margin: 0 auto;
    border-radius: 8px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);

    /* Updated height and padding */
    height: var(--section-height);
    min-height: var(--section-min-height);
    padding: var(--space-xl) var(--space-xl);

    /* Improved grid layout */
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: var(--space-md);

    /* Overflow handling */
    overflow-y: auto;

    /* Maintain transitions */
    transition:
        transform var(--transition-medium),
        box-shadow var(--transition-medium);
}
.reveal .slides section section {
    min-height: 100%;
}
.reveal-viewport {
    background-color: var(--steel);
}
.reveal .slides section:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Improved title slide */
.reveal .slides section:first-of-type {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--steel-light);
    text-align: center;

    /* Enhanced grid layout for better centering */
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-xl);
}

.reveal .slides section:first-of-type h1 {
    padding-top: 25%;
    color: var(
        --steel-light
    ); /* Using the light steel color from our palette for better contrast */
}

.reveal .slides section:first-of-type h2 {
    font-size: var(--text-2xl);
    padding-top: 7%;
    color: var(
        --amber-light
    ); /* Using the light steel color from our palette for better contrast */
}

.reveal .slides section:first-of-type h3 {
    font-size: var(--text-sm);
    text-align: center;
    color: var(
        --warm-gray
    ); /* Using the light steel color from our palette for better contrast */
}

.reveal .slides section:first-of-type p {
    font-size: var(--text-sm);
    text-align: center;
    display: block;
    color: var(
        --steel-light
    ); /* Using the light steel color from our palette for better contrast */
}

/* Enhanced typography */
.reveal h1 {
    font-size: var(--text-4xl);
    color: var(--crimson);
    margin-bottom: var(--space-lg);
    font-weight: 700;
    line-height: 1.2;
    transition: color var(--transition-fast);
}

.reveal h2 {
    font-size: var(--text-2xl);
    color: var(--navy);
    padding-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    font-weight: 600;
    line-height: 1.3;
}

.reveal h3 {
    font-size: var(--text-xl);
    color: var(--amber-light);
    margin-bottom: var(--space-sm);
    padding-top: var(--space-lg);
}

.reveal h4 {
    font-size: var(--text-lg);
    color: var(--navy);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
}

/* Paragraph styling */
.reveal p {
    font-size: var(--text-lg);
    color: var(--navy);
    margin-bottom: var(--space-sm);
    line-height: 1.6;
    text-align: left;
}

/* Enhanced lists with animations */
.reveal ul,
.reveal ol {
    display: grid;
    gap: var(--space-sm);
    padding-left: var(--space-xl);
}

.reveal li {
    font-size: var(--text-lg);
    color: var(--navy);
    opacity: 0;
    transform: translateX(-20px);
    animation: slide-in 0.5s ease forwards;
    animation-delay: calc(var(--item-index, 0) * 100ms);
}

.reveal .slides strong {
    color: var(--navy);
    font-weight: 700;
    /* Removed display: block to keep bold text inline */
    /* Use display: inline or inline-block for natural text flow */
}

@keyframes slide-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Code blocks */
.reveal pre {
    background: var(--navy-dark);
    color: var(--steel-light);
    padding: var(--space-md);
    border-radius: 4px;
    overflow-x: auto;
    font-family: "Fira Code", monospace;
    font-size: var(--text-sm);
    line-height: 1.6;
}

.reveal code {
    background: var(--steel-light);
    color: var(--navy);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    font-family: "Fira Code", monospace;
    font-size: 0.9em;
}

/* Blockquotes */
.reveal blockquote {
    border-left: 4px solid var(--crimson);
    padding-left: var(--space-md);
    margin: var(--space-md) 0;
    font-style: italic;
    color: var(--navy-light);
}

/* Tables — readable on white slide background */
.reveal table {
    margin: var(--space-md) auto;
    border-collapse: collapse;
    font-size: var(--text-lg);
    color: var(--navy);
}

.reveal table th {
    background: var(--steel-light);
    color: var(--navy);
    font-weight: 700;
    text-align: left;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 2px solid var(--navy);
}

.reveal table td {
    color: var(--navy);
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--steel);
    vertical-align: top;
}

.reveal table tbody tr:nth-child(even) td {
    background: rgba(184, 197, 214, 0.18); /* steel @ ~18% */
}

/* Higher specificity to beat the global `.reveal .slides strong` rule (0,2,1) */
.reveal .slides table strong {
    color: var(--crimson);
}

/* Enhanced progress bar */
.reveal .progress {
    height: 4px;
    color: var(--crimson);
    background: var(--steel-dark);
}

.reveal .progress span {
    transition: width var(--transition-medium) ease-out;
}

/* Utility classes */
.reveal .columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.reveal .highlight {
    background: linear-gradient(
        120deg,
        transparent 0%,
        transparent 40%,
        var(--crimson-light) 40%,
        var(--crimson-light) 60%,
        transparent 60%,
        transparent 100%
    );
    background-repeat: no-repeat;
    background-size: 100% 0.5em;
    background-position: 0 88%;
    padding: 0 0.2em;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .reveal .slides section {
        padding: var(--space-lg);
    }

    .reveal h1 {
        font-size: var(--text-3xl);
    }
    .reveal h2 {
        font-size: var(--text-2xl);
    }
    .reveal h3 {
        font-size: var(--text-xl);
    }
    .reveal li,
    .reveal p {
        font-size: var(--text-base);
    }

    .reveal table {
        font-size: var(--text-sm);
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }

    .reveal table th,
    .reveal table td {
        padding: var(--space-xs) var(--space-sm);
    }
}

/* Print optimization */
@media print {
    .reveal .slides section {
        page-break-before: always;
        page-break-after: always;
        background-color: white !important;
        box-shadow: none;
    }

    .reveal .slides section:first-of-type {
        background: var(--navy) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .reveal .progress,
    .reveal .controls {
        display: none !important;
    }
}

/* Enhanced slide number styling */
.reveal .slide-number {
    /* Increase size and adjust position */
    font-size: var(--text-2xl);
    height: 1em;
    right: var(--space-xl);
    top: var(--space-lg);

    /* Add background container */
    background-color: var(--steel);
    color: var(--amber-dark);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;

    /* Add subtle shadow */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

    /* Smooth transitions */
    transition: all var(--transition-fast);

    /* Ensure it's always visible */
    opacity: 1 !important;

    /* Better font styling */
    font-weight: 500;
    font-family:
        "Segoe UI",
        system-ui,
        -apple-system,
        sans-serif;
}

/* Hover effect for better interaction */
.reveal .slide-number:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    background-color: var(--navy-light);
}

/* Ensure visibility on different backgrounds */
.reveal .slides section:first-of-type .slide-number {
    background-color: var(--steel);
    color: var(--navy);
}
