/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #121214;
    color: #e1e1e6;
    line-height: 1.6;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: #00e676;
    margin-bottom: 5px;
}

.container {
    max-width: 900px; /* Slightly wider to give side-by-side blocks room */
    margin: 0 auto;
}

.card {
    background-color: #202024;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 50px;
}

h2 {
    color: #ffffff;
    margin-bottom: 10px;
    margin-top: 20px;
}

.subtitle {
    margin-bottom: 20px;
    color: #a8a8b3;
    font-style: italic;
}

/* Slider Component Layout */
.slider-container {
    position: relative;
    width: 100%;
    /* aspect-ratio: 16 / 9; */
    overflow: hidden;
    border-radius: 6px;
    background-color: #121214;
}

.slider-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
}

.slider-label {
    position: absolute;
    top: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(18, 18, 20, 0.85);
    color: #e1e1e6;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    z-index: 5;
    pointer-events: none;
    text-transform: uppercase;
}

.before-label {
    left: 16px;
}

.after-label {
    right: 16px;
}

.image-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.image-after-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

.image-after-wrapper img {
    width: 850px; /* Adjusted to match modern responsive box sizing */
    max-width: none;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 4;
}

.slider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: #00e676;
    z-index: 3;
    pointer-events: none;
    transform: translateX(-50%);
}

/* Side-by-Side Block Styles */
.journey-timeline h2 {
    text-align: center;
    margin-bottom: 40px;
}

.journey-row {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    background-color: #202024;
    padding: 20px;
    border-radius: 8px;
}

/* Alternates the layout order for even blocks */
.journey-row.reverse {
    flex-direction: row-reverse;
}

.journey-media {
    flex: 1;
    min-width: 280px;
}

.journey-media img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.journey-text {
    flex: 1.2;
}

.step-badge {
    display: inline-block;
    background-color: rgba(0, 230, 118, 0.1);
    color: #00e676;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 10px;
}

.journey-text h3 {
    color: #ffffff;
    margin-bottom: 10px;
}

.journey-text p {
    color: #a8a8b3;
}

/* Responsive fixes for small mobile screens */
@media (max-width: 680px) {
    .journey-row, .journey-row.reverse {
        flex-direction: column;
        align-items: stretch;
    }
    .journey-media {
        min-width: 100%;
    }
}

/* Code sample styling */
.code-sample {
    background-color: #171718;
    padding: 20px;
    border-radius: 8px;
}
.code-sample h2 {
    color: #00e676;
    margin-bottom: 8px;
}
.code-sample .subtitle {
    color: #a8a8b3;
    margin-bottom: 12px;
}
.code-sample pre {
    background: #0b0b0d;
    padding: 16px;
    border-radius: 6px;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace;
    font-size: 0.95rem;
    color: #dcdcdc;
    line-height: 1.45;
}
.code-sample code {
    display: block;
    white-space: pre;
}
.code-sample pre::-webkit-scrollbar {
    height: 8px;
}
.code-sample pre::-webkit-scrollbar-thumb {
    background: #2b2b2b;
    border-radius: 4px;
}

/* Download footer */
.download-footer {
    margin-top: 30px;
    padding: 24px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}
.container-btn {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;

}
.download-footer .download-btn {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    text-decoration: none;
    background: linear-gradient(180deg, #00e676 0%, #00c853 100%);
    color: #07110a;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 700;
    margin: 10px;
}
.download-footer .download-btn:hover {
    filter: brightness(0.95);
}
.download-footer .download-note {
    display: block;
    font-weight: 400;
    font-size: 0.85rem;
    color: rgba(7,17,10,0.85);
}

.side-by-side-images {
    width: 100%;
    overflow: hidden;
    margin: 0;
}

.side-by-side-images .image-pair {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.side-by-side-images .image-pair img {
    flex: 1 1 calc(50% - 0.5rem);
    max-width: calc(50% - 0.5rem);
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

figure {
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100%;
}

figure img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    padding-top: 25px;
}

figcaption {
    text-align: center;
    margin-top: 0.5em;
    color: #a8a8b3;
    font-size: 0.9em;
    font-style: italic;
}

@media (max-width: 768px) {
    .side-by-side-images .image-pair img {
        flex: 1 1 100%;
        max-width: 100%;
    }
}