/* =====================================================
   Vehicle Evacuation System Presentation - Dark Theme
   Colors:
   - Background: #0d1b2a (Deep Slate)
   - Secondary: #1b263b (Dark Blue)
   - Accent Blue: #0052FF (Electric Blue)
   - Accent Orange: #FF5722 (Safety Orange)
   - Text: #FFFFFF (Pure White)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Base Reveal.js Overrides */
.reveal {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 22px;
    font-weight: 400;
    color: #ffffff;
}

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

.reveal .slides section {
    padding: 25px 50px;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.reveal h1, .reveal h2, .reveal h3, .reveal h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #ffffff;
    text-transform: none;
    letter-spacing: -0.02em;
    margin-bottom: 0.5em;
}

.reveal h1 { font-size: 1.8em; }
.reveal h2 { font-size: 1.4em; }
.reveal h3 { font-size: 1.15em; }
.reveal h4 { font-size: 1em; }

.reveal p {
    line-height: 1.4;
    margin-bottom: 0.5em;
}

/* Slide Title */
.section-title {
    font-size: 1.4em !important;
    font-weight: 800 !important;
    margin-bottom: 0.5em !important;
    padding-bottom: 0.2em;
    border-bottom: 3px solid #0052FF;
    display: inline-block;
}

.subsection-title {
    font-size: 1em !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    margin-bottom: 0.5em !important;
}

.subsection-title.accent {
    color: #FF5722 !important;
    font-weight: 700 !important;
}

/* Stage Badges */
.stage-badge {
    display: inline-block;
    background: linear-gradient(135deg, #0052FF 0%, #0043d1 100%);
    color: white;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5em;
    box-shadow: 0 4px 15px rgba(0, 82, 255, 0.4);
}

.stage-badge.orange {
    background: linear-gradient(135deg, #FF5722 0%, #e64a19 100%);
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
}

.decree-badge {
    display: inline-block;
    background: #1b263b;
    border: 2px solid #0052FF;
    color: #0052FF;
    padding: 4px 16px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: 700;
    margin-bottom: 0.5em;
}

/* Title Slide */
.title-slide .title-container {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
}

.main-title {
    font-size: 2.2em !important;
    font-weight: 800 !important;
    margin-bottom: 0.3em !important;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.3em !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    margin-bottom: 0.8em !important;
}

.accent-line {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #0052FF 0%, #FF5722 100%);
    margin: 1.2em auto;
    border-radius: 2px;
}

.location {
    font-size: 1em !important;
    color: #64748b !important;
    margin-top: 2em;
}

/* Abbreviations Grid */
.abbreviations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 0.5em;
}

.abbr-card {
    background: rgba(27, 38, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    padding: 10px 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.abbr-card:hover {
    border-color: #0052FF;
    transform: translateY(-2px);
}

.abbr-card.blue {
    border-left: 4px solid #0052FF;
}

.abbr-card.orange {
    border-left: 4px solid #FF5722;
}

.abbr-code {
    display: block;
    font-size: 0.85em;
    font-weight: 700;
    color: #0052FF;
    margin-bottom: 4px;
}

.abbr-card.orange .abbr-code {
    color: #FF5722;
}

.abbr-card p {
    font-size: 0.62em;
    color: #94a3b8;
    line-height: 1.25;
    margin: 0;
}

/* Regulations Flow */
.regulations-flow {
    margin-top: 1em;
}

.reg-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.reg-icon {
    background: linear-gradient(135deg, #0052FF 0%, #0043d1 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1em;
    box-shadow: 0 4px 20px rgba(0, 82, 255, 0.3);
}

.reg-arrow {
    font-size: 2em;
    color: #0052FF;
    padding-top: 15px;
}

.reg-docs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.doc-card {
    background: rgba(27, 38, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    padding: 15px;
}

.doc-number {
    display: inline-block;
    background: #FF5722;
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 700;
    margin-bottom: 10px;
}

.doc-card p {
    font-size: 0.8em;
    color: #e2e8f0;
    margin: 0;
    line-height: 1.4;
}

/* Purpose Grid */
.purpose-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 1em;
}

.purpose-card {
    background: rgba(27, 38, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.purpose-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1em;
    flex-shrink: 0;
}

.purpose-icon.blue {
    background: rgba(0, 82, 255, 0.2);
    color: #0052FF;
}

.purpose-icon.orange {
    background: rgba(255, 87, 34, 0.2);
    color: #FF5722;
}

.purpose-card p {
    font-size: 0.8em;
    color: #e2e8f0;
    margin: 0;
    line-height: 1.4;
}

/* Structure Flow */
.structure-flow {
    margin-top: 1em;
}

.flow-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.flow-item {
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85em;
}

.flow-item.decree {
    background: rgba(255, 87, 34, 0.15);
    border: 2px solid #FF5722;
    color: #FF5722;
}

.flow-item.org {
    background: rgba(0, 82, 255, 0.15);
    border: 2px solid #0052FF;
    color: #0052FF;
}

.flow-item.org.main {
    background: #0052FF;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 82, 255, 0.4);
}

.flow-item.org.accent {
    background: #FF5722;
    border-color: #FF5722;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
}

.flow-arrow-h {
    font-size: 1.5em;
    color: #0052FF;
}

.flow-vertical {
    text-align: center;
    margin: 10px 0;
}

.flow-arrow-v {
    font-size: 1.5em;
    color: #FF5722;
}

/* Functions Container */
.functions-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 1em;
}

.function-org {
    background: rgba(27, 38, 59, 0.6);
    border-radius: 12px;
    overflow: hidden;
}

.org-header {
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: 700;
    color: white;
}

.org-header.blue {
    background: linear-gradient(135deg, #0052FF 0%, #0043d1 100%);
}

.org-header.orange {
    background: linear-gradient(135deg, #FF5722 0%, #e64a19 100%);
}

.function-list {
    padding: 12px 18px;
}

.func-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 0.75em;
    line-height: 1.4;
    color: #e2e8f0;
}

.func-item:last-child {
    border-bottom: none;
}

/* Functions Compare */
.functions-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 1em;
}

.function-panel {
    background: rgba(27, 38, 59, 0.6);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.panel-header {
    padding: 12px 20px;
    background: rgba(0, 82, 255, 0.15);
    border-bottom: 2px solid #0052FF;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #0052FF;
}

.panel-header.accent {
    background: rgba(255, 87, 34, 0.15);
    border-bottom-color: #FF5722;
}

.panel-header.accent h3 {
    color: #FF5722;
}

.panel-content {
    padding: 12px 15px;
}

.func-card {
    background: rgba(13, 27, 42, 0.5);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
    font-size: 0.75em;
    line-height: 1.4;
    color: #e2e8f0;
    border-left: 3px solid transparent;
}

.func-card.highlight {
    border-left-color: #FF5722;
    background: rgba(255, 87, 34, 0.1);
}

/* Criteria Grid */
.criteria-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 1em;
}

.criteria-card {
    background: rgba(27, 38, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.criteria-card:hover {
    border-color: #0052FF;
    transform: translateY(-4px);
}

.criteria-card.large {
    grid-column: span 1;
}

.criteria-icon {
    font-size: 2.2em;
    margin-bottom: 10px;
}

.criteria-card h4 {
    font-size: 0.9em !important;
    margin-bottom: 8px !important;
    color: #ffffff;
}

.criteria-card p {
    font-size: 0.75em;
    color: #94a3b8;
    margin: 0;
    line-height: 1.3;
}

/* Criteria List */
.criteria-list {
    margin-top: 1em;
}

.criteria-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    background: rgba(27, 38, 59, 0.6);
    border-radius: 10px;
    margin-bottom: 8px;
    border-left: 3px solid #0052FF;
}

.criteria-row:nth-child(even) {
    border-left-color: #FF5722;
}

.criteria-num {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #0052FF 0%, #0043d1 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85em;
    flex-shrink: 0;
}

.criteria-row:nth-child(even) .criteria-num {
    background: linear-gradient(135deg, #FF5722 0%, #e64a19 100%);
}

.criteria-row p {
    margin: 0;
    font-size: 0.8em;
    line-height: 1.3;
    color: #e2e8f0;
}

/* Districts */
.districts-container {
    margin-top: 1em;
}

.district-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.district-card {
    background: rgba(27, 38, 59, 0.6);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.district-card:hover {
    transform: translateY(-3px);
}

.district-card.central { border-color: #0052FF; }
.district-card.soviet { border-color: #FF5722; }
.district-card.pervomaisky { border-color: #00c853; }
.district-card.partizansky { border-color: #ffd600; }
.district-card.zavodskoy { border-color: #aa00ff; }
.district-card.leninsky { border-color: #00b8d4; }
.district-card.oktyabrsky { border-color: #ff1744; }
.district-card.moskovsky { border-color: #3d5afe; }
.district-card.frunzensky { border-color: #ff9100; }

.district-name {
    font-weight: 600;
    font-size: 0.9em;
    color: #ffffff;
    margin-bottom: 6px;
}

.district-icon {
    font-size: 1.4em;
}

/* Stage Steps */
.stage-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 1em;
}

.step-item {
    background: rgba(27, 38, 59, 0.6);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.3s ease;
}

.step-item:hover {
    border-color: #0052FF;
}

.step-item.highlight {
    border-color: #FF5722;
    background: rgba(255, 87, 34, 0.1);
}

.step-num {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0052FF 0%, #0043d1 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1em;
    margin-bottom: 10px;
}

.step-item.highlight .step-num {
    background: linear-gradient(135deg, #FF5722 0%, #e64a19 100%);
}

.step-item p {
    font-size: 0.8em;
    color: #e2e8f0;
    margin: 0;
    line-height: 1.3;
}

/* Software Section */
.software-intro {
    margin-top: 0.3em;
}

.approval-badges {
    display: flex;
    gap: 15px;
    margin-bottom: 0.6em;
}

.approval-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 82, 255, 0.1);
    border: 1px solid rgba(0, 82, 255, 0.3);
    border-radius: 8px;
    padding: 8px 14px;
}

.badge-icon {
    width: 26px;
    height: 26px;
    background: #0052FF;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    font-weight: 700;
    flex-shrink: 0;
}

.approval-badge p {
    margin: 0;
    font-size: 0.7em;
    color: #e2e8f0;
    line-height: 1.25;
}

.screenshot-container {
    text-align: center;
}

.screenshot-container.single {
    margin-top: 0.3em;
}

/* Device Mockups */
.device-mockup {
    display: inline-block;
    background: #1b263b;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.device-mockup:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

.device-mockup img {
    border-radius: 10px;
    max-width: 100%;
    height: auto;
    display: block;
}

.device-mockup.tiny {
    max-width: 110px;
}

.device-mockup.small {
    max-width: 120px;
}

.device-mockup.medium {
    max-width: 220px;
}

.device-mockup.large {
    max-width: 320px;
}

.screenshots-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 0.6em;
    flex-wrap: wrap;
}

.screenshots-row.center {
    align-items: center;
}

.screenshots-grid.five {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 0.5em;
}

.screenshots-grid.five .device-mockup {
    max-width: 100%;
    max-height: 160px;
}

.screenshots-grid.five .device-mockup img {
    width: 100%;
    max-height: 140px;
    object-fit: cover;
}

/* Advantages Grid */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 1em;
}

.adv-card {
    background: rgba(27, 38, 59, 0.6);
    border-radius: 10px;
    padding: 15px 12px;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.3s ease;
}

.adv-card:hover {
    border-color: #0052FF;
    transform: translateY(-3px);
}

.adv-card.highlight {
    border-color: #FF5722;
    background: rgba(255, 87, 34, 0.1);
    grid-column: span 2;
}

.adv-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    margin: 0 auto 10px;
}

.adv-icon.blue {
    background: rgba(0, 82, 255, 0.2);
}

.adv-icon.orange {
    background: rgba(255, 87, 34, 0.2);
}

.adv-card h4 {
    font-size: 0.8em !important;
    margin-bottom: 6px !important;
    color: #ffffff;
}

.adv-card p {
    font-size: 0.7em;
    color: #94a3b8;
    margin: 0;
    line-height: 1.3;
}

/* Detection Flow */
.detection-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 0.8em 0;
}

.flow-block {
    background: rgba(27, 38, 59, 0.6);
    border-radius: 12px;
    padding: 18px;
    min-width: 160px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.flow-block h4 {
    font-size: 0.85em !important;
    color: #0052FF !important;
    margin-bottom: 12px !important;
    text-align: center;
}

.trigger-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trigger-tag {
    background: rgba(255, 87, 34, 0.2);
    color: #FF5722;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7em;
    font-weight: 600;
    text-align: center;
}

.actor-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.actor {
    background: rgba(0, 82, 255, 0.2);
    color: #0052FF;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: 600;
    text-align: center;
}

.tool-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tool-item {
    font-size: 0.7em;
    color: #e2e8f0;
    padding: 3px 0;
}

.flow-arrow-large {
    font-size: 1.6em;
    color: #0052FF;
}

/* Confirmation Flow */
.confirmation-flow {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 0.3em 0;
}

.conf-step {
    text-align: center;
}

.conf-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #0052FF 0%, #0043d1 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    margin: 0 auto 6px;
}

.conf-arrow {
    font-size: 1.3em;
    color: #94a3b8;
    margin: 3px 0;
}

.conf-step p {
    font-size: 0.75em;
    color: #94a3b8;
    margin: 0;
}

/* Print Section */
.print-section {
    margin: 0.5em 0;
}

.print-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.print-step {
    text-align: center;
    background: rgba(27, 38, 59, 0.6);
    border-radius: 10px;
    padding: 15px 20px;
    min-width: 120px;
}

.step-icon {
    font-size: 1.6em;
    display: block;
    margin-bottom: 6px;
}

.print-step p {
    font-size: 0.8em;
    color: #e2e8f0;
    margin: 0;
}

.step-arrow {
    font-size: 1.5em;
    color: #0052FF;
}

/* Effects Container */
.effects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 1em;
}

.effect-column {
    background: rgba(27, 38, 59, 0.6);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.effect-header {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.effect-header.blue {
    background: rgba(0, 82, 255, 0.15);
}

.effect-header.orange {
    background: rgba(255, 87, 34, 0.15);
}

.effect-header.accent {
    background: linear-gradient(135deg, #0052FF 0%, #0043d1 100%);
}

.effect-icon {
    font-size: 1.6em;
    display: block;
    margin-bottom: 6px;
}

.effect-header h3 {
    font-size: 0.9em !important;
    margin: 0 !important;
}

.effect-header.blue h3 {
    color: #0052FF !important;
}

.effect-header.orange h3 {
    color: #FF5722 !important;
}

.effect-header.accent h3 {
    color: white !important;
}

.effect-items {
    padding: 12px;
}

.effect-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 0.72em;
    line-height: 1.3;
    color: #e2e8f0;
}

.effect-item:last-child {
    border-bottom: none;
}

/* PDF Print Styles */
@media print {
    .reveal .slides section {
        page-break-after: always;
        page-break-inside: avoid;
    }
    
    .device-mockup {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .abbreviations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stage-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .effects-container {
        grid-template-columns: 1fr;
    }
    
    .functions-container,
    .functions-compare {
        grid-template-columns: 1fr;
    }
    
    .criteria-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshots-grid.five {
        grid-template-columns: repeat(2, 1fr);
    }
}
