/* CSS Variables for Theme */
:root {
    --primary-color: #2c3e50;
    --accent-color: #2980b9;
    --tech-color: #1abc9c;
    --warning-color: #e74c3c;
    --bg-color: #ffffff;
    --text-color: #333333;
    --light-gray: #f5f6fa;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-gray);
    color: var(--text-color);
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Prevent scrolling on body */
}

/* Mobile Friendly Container */
.presentation-container {
    background: var(--bg-color);
    width: 100%;
    height: 100%;
    box-shadow: none;
    /* Full screen on mobile */
    border-radius: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 4px;
    background: #eee;
}

.progress-bar {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* Slides */
.slides-wrapper {
    flex: 1;
    position: relative;
    padding: 20px;
    /* Reduced padding for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    /* Allow content scrolling within slide if needed */
}

.slide {
    display: none;
    width: 100%;
    height: auto;
    /* Allow height to grow */
    max-height: 100%;
    /* But constraint to viewport */
    flex-direction: column;
    justify-content: center;
    text-align: center;
    animation: fadeIn 0.4s ease;
    overflow-y: auto;
    /* Scroll if content exceeds screen */
}

.slide.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography & Content - Mobile sizes */
h1 {
    font-size: 1.8rem;
    /* Smaller for mobile */
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    /* Smaller */
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    margin: 8px auto 0;
}

h3 {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

p,
li {
    font-size: 1rem;
    /* Readable on phone */
    line-height: 1.5;
    color: #555;
}

.intro-icon {
    font-size: 3rem;
    margin: 20px 0;
}

/* Lists */
ul {
    list-style: none;
    text-align: left;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

li {
    margin-bottom: 12px;
}

.clean-list li {
    padding-left: 15px;
    border-left: 3px solid var(--accent-color);
}

/* Stats Grid - Stack on mobile */
.stats-grid {
    display: flex;
    flex-direction: row;
    /* Keep side-by-side if they fit, or wrap */
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.stat-card {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Split Layout - Stack on mobile */
.split-layout {
    display: flex;
    flex-direction: column;
    /* Stack vertically */
    gap: 20px;
    margin-top: 20px;
    text-align: left;
}

.split-layout .left,
.split-layout .right {
    flex: 1;
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
}

.quote-box {
    background: white;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: monospace;
    font-size: 1.1rem;
    text-align: center;
    margin: 10px 0;
}

.price {
    color: var(--tech-color);
    font-weight: bold;
}

/* Warning Box */
.warning-box {
    background: #fff5f5;
    border-left: 4px solid var(--warning-color);
    padding: 15px;
    margin-top: 15px;
    text-align: left;
}

.code-example {
    display: block;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    margin: 10px 0;
    font-size: 0.9rem;
    overflow-x: auto;
}

/* Timeline - Vertical on mobile */
.timeline {
    display: flex;
    flex-direction: column;
    /* Stack */
    gap: 10px;
    margin: 20px 0;
    position: relative;
}

.timeline::before {
    /* Change to vertical line */
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    /* Align with left side */
    width: 2px;
    height: 100%;
    background: #ddd;
    z-index: 0;
}

.timeline-item {
    position: relative;
    z-index: 1;
    background: white;
    padding: 10px 15px 10px 40px;
    /* Space for line */
    border: 1px solid #ddd;
    border-radius: 8px;
    /* Box style instead of bubble */
    text-align: left;
    margin-left: 0;
}

.timeline-item.highlight {
    border-color: var(--accent-color);
    background: #eef7fb;
}

.timeline-item .time {
    display: block;
    font-weight: bold;
    color: var(--primary-color);
}

/* Cards - Stack on mobile */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.card {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    text-align: left;
}

/* Download Button */
.download-section {
    margin-top: 30px;
}

.download-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    text-align: center;
}

/* Navigation - Touch Friendly */
.navigation-controls {
    padding: 15px;
    background: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

button {
    padding: 12px 20px;
    /* Larger hit area */
    cursor: pointer;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    flex: 1;
    margin: 0 5px;
}

#slideCounter {
    font-weight: bold;
    color: #7f8c8d;
    min-width: 60px;
    text-align: center;
}

/* Desktop Overrides for larger screens */
@media (min-width: 768px) {
    .presentation-container {
        width: 900px;
        height: 600px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .split-layout {
        flex-direction: row;
    }

    .timeline {
        flex-direction: row;
        justify-content: space-between;
    }

    .timeline::before {
        width: 100%;
        height: 2px;
        top: 50%;
        left: 0;
    }

    .timeline-item {
        padding: 10px 20px;
        text-align: center;
        border-radius: 20px;
    }

    .cards-container {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }

    button {
        flex: initial;
    }

    .download-btn {
        display: inline-block;
        width: auto;
    }
}