/* 1. UNCC BRAND VARIABLES */
:root {
    --charlotte-green: #005035;
    --niner-gold: #A49665;
    --quartz-white: #FFFFFF;
    --ore-black: #101820;
    --jasper: #F1E6B2;
    --pine-green: #899064;
    --sky-blue: #007377;
    --clay-red: #802F2D;
}

/* 2. GLOBAL SETUP */
* {
    box-sizing: border-box;
}

body {
    background-color: #2a2a2a;
    /* Darker grey for PDF viewer look */
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--ore-black);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    /* For sidebar layout */
}

/* SIDEBAR DRAWER */
#slide-drawer {
    width: 260px;
    background-color: #1a1a1a;
    border-right: 1px solid #444;
    height: 100%;
    overflow-y: auto;
    transition: width 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

#slide-drawer.collapsed {
    width: 0;
    border-right: none;
}

.drawer-header {
    padding: 15px;
    color: #fff;
    font-weight: bold;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    position: sticky;
    top: 0;
    z-index: 10;
}

.drawer-item {
    padding: 12px 15px;
    color: #bbb;
    cursor: pointer;
    border-bottom: 1px solid #333;
    font-size: 13px;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-item:hover {
    background-color: #333;
    color: #fff;
}

.drawer-item.active {
    background-color: var(--charlotte-green);
    color: #fff;
    border-bottom-color: var(--charlotte-green);
}

.drawer-slide-num {
    font-size: 11px;
    opacity: 0.7;
    font-weight: bold;
}

.drawer-slide-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* MAIN CONTENT WRAPPER */
#main-content {
    flex-grow: 1;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* SCALER WRAPPER */
#slide-scaler {
    width: 1280px;
    height: 720px;
    position: relative;
    transform-origin: center center;
    background-color: #000;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    /* Drop shadow for presentation feel */
    flex-shrink: 0;
    /* Prevent flexbox from shrinking the layout size */
}

/* SLIDE CONTAINER */
.slide-container {
    background-color: var(--quartz-white);
    width: 1280px;
    height: 720px;
    padding: 30px 60px;
    position: absolute;
    top: 0;
    left: 0;
    border-top: 12px solid var(--charlotte-green);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.slide-container.active {
    display: flex;
}

/* 3. TYPOGRAPHY */
h1,
h2,
h3,
h4 {
    color: var(--charlotte-green);
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
}

h1 {
    font-size: 48px;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

h2 {
    font-size: 36px;
    margin-bottom: 15px;
    border-bottom: 3px solid var(--niner-gold);
    padding-bottom: 5px;
    display: inline-block;
}

h3 {
    font-size: 20px;
    color: var(--ore-black);
    margin-bottom: 5px;
    font-weight: 700;
}

p,
li {
    color: var(--ore-black);
    font-size: 18px;
    line-height: 1.4;
    font-weight: 400;
    margin-bottom: 8px;
}

ul {
    padding-left: 25px;
    margin-top: 5px;
}

li {
    margin-bottom: 6px;
}

.equation-box {
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-size: 18px;
    text-align: center;
}

/* 4. LAYOUT COMPONENTS */
.footer {
    position: absolute;
    bottom: 10px;
    left: 60px;
    right: 60px;
    height: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 5px;
    background: white;
    z-index: 10;
}

.footer-text {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.footer-logo {
    height: 25px;
}

.slide-number {
    font-weight: bold;
    color: var(--charlotte-green);
    font-size: 14px;
}

/* Controls */
.controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    gap: 15px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 30px;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

body:hover .controls,
.controls.visible {
    opacity: 1;
}

/* Hidden controls state */
body.controls-hidden .controls,
body.controls-hidden #slide-drawer {
    display: none !important;
}

/* If controls hidden, main content takes full width */
body.controls-hidden #main-content {
    width: 100vw;
}

.btn-control {
    background: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.2s;
}

.btn-control:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* PRINT STYLES */
@media print {
    @page {
        size: 1280px 720px;
        margin: 0;
    }

    body {
        background-color: white;
        margin: 0;
        padding: 0;
        width: 1280px;
        height: auto;
        overflow: visible;
        display: block;
    }

    #slide-drawer,
    .controls {
        display: none !important;
    }

    /* IMPORTANT: Do NOT hide #main-content or #slide-scaler, 
       but reset their layout properties so they flow naturally. */
    #main-content {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        position: static !important;
    }

    #slide-scaler {
        width: 100% !important;
        height: auto !important;
        transform: none !important;
        box-shadow: none !important;
        position: static !important;
        overflow: visible !important;
        background: white !important;
    }

    .slide-container {
        display: flex !important;
        /* Show all slides */
        position: relative !important;
        width: 1280px !important;
        height: 720px !important;
        page-break-after: always;
        break-after: page;
        top: auto !important;
        left: auto !important;
        margin: 0 !important;
        border: none !important;
        border-top: 12px solid var(--charlotte-green) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Hide videos in print */
    video {
        display: none;
    }
}

/* Layouts */
.two-column {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    height: 100%;
    min-height: 0;
    align-content: center;
}

.two-column.equal {
    grid-template-columns: 1fr 1fr;
}

.two-column.flipped {
    grid-template-columns: 0.8fr 1.2fr;
}

/* Full Width Layout */
.full-width-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-start;
}

.full-width-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-top: 10px;
    background: #fff;
}

.full-width-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Image Handling */
.figure-placeholder {
    width: 100%;
    height: 100%;
    max-height: 500px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.figure-placeholder img,
.figure-placeholder video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Section Header */
.section-header {
    background: var(--charlotte-green);
    color: white;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.section-header h1 {
    color: var(--niner-gold);
    font-size: 56px;
    margin-bottom: 20px;
}

.section-header h2 {
    color: white;
    border: none;
    font-size: 28px;
    text-transform: none;
    font-weight: 400;
}

/* Tables */
.tech-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 16px;
}

.tech-table th {
    background: var(--charlotte-green);
    color: white;
    padding: 8px;
    text-align: left;
    font-weight: 600;
}

.tech-table td {
    border-bottom: 1px solid #ddd;
    padding: 8px;
}

/* Cards */
.card {
    background: #f9f9f9;
    border-left: 5px solid var(--charlotte-green);
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card h3 {
    color: var(--charlotte-green);
    margin-top: 0;
    font-size: 20px;
}

.citation {
    font-size: 12px;
    color: #888;
    font-style: italic;
    margin-top: 10px;
    text-align: center;
    width: 100%;
}

/* Publication List */
.publication-list {
    list-style: none;
    padding: 0;
}

.publication-list li {
    margin-bottom: 12px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.pub-icon {
    color: var(--niner-gold);
    font-size: 18px;
    margin-top: 3px;
}

.pub-details {
    flex: 1;
}

.pub-venue {
    font-weight: bold;
    color: var(--charlotte-green);
    display: block;
    margin-bottom: 2px;
}

/* Flowchart Table for Training */
.training-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 10px;
}

.training-table td {
    background: var(--quartz-white);
    border: 2px solid var(--charlotte-green);
    border-radius: 8px;
    padding: 15px;
    vertical-align: top;
    width: 33%;
}

.training-table h4 {
    color: var(--niner-gold);
    margin-bottom: 10px;
    font-size: 18px;
}

.training-table ul {
    font-size: 14px;
    padding-left: 20px;
    margin: 0;
}

/* Timeline */
.timeline-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    position: relative;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 50px;
    right: 50px;
    height: 4px;
    background: #ddd;
    z-index: 0;
    transform: translateY(-50%);
}

.timeline-item {
    position: relative;
    z-index: 1;
    background: white;
    border: 3px solid var(--charlotte-green);
    border-radius: 12px;
    padding: 15px;
    width: 200px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    background: var(--niner-gold);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
}

/* LASER POINTER CURSOR */
.laser-active {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><circle cx="16" cy="16" r="10" fill="red" fill-opacity="0.8" stroke="white" stroke-width="2"/></svg>') 16 16, auto !important;
}

.laser-active * {
    cursor: inherit !important;
}
