/* ==========================================
   RC Planes Grid & Card Layout
   ========================================== */

/* Main Container Spacing */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333333;
}

#journey {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2.25rem;
    color: #1a202c;
}

/* Grid Layout: 1 column on mobile, 2 columns on wide screens */
.rc-plane-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .rc-plane-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Card Container */
.rcplane-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.rcplane-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Card Inner Content */
.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-title {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.35rem;
    color: #2d3748;
    line-height: 1.3;
}

/* Media Container & Viewport Styles */
.card-media-container {
    position: relative;
    width: 100%;
    margin-bottom: 1.25rem;
}

.media-viewport {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #f7fafc;
    border-radius: 8px;
    overflow: hidden;
}

.media-viewport iframe,
.media-viewport video {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.rc-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

/* Lazy loading placeholder style */
.lazy-thumb[src^="data:image"] {
    opacity: 0.3;
    filter: blur(4px);
}

/* Media Navigation Buttons Positioning */
.media-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.media-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.media-nav.prev-btn {
    left: 10px;
}

.media-nav.next-btn {
    right: 10px;
}

/* Hide disabled state cleanly */
.media-nav:disabled,
.media-nav.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Flight Time Statistics Section */
.card-flight-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: auto;
    padding: 10px 14px;
    background-color: #f7fafc;
    border-left: 3px solid #3182ce;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

/* Individual Stat Items */
.card-flight-stats > div {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

/* Hide empty stat items cleanly */
.card-flight-stats .card-flight-time:empty,
.card-flight-stats .card-total-flight-time:empty,
.card-flight-stats .card-cumulative-flight-time:empty,
.card-flight-stats .card-date:empty {
    display: none;
}

/* Specific Field Color Styling */
.card-flight-stats .card-flight-time {
    color: #1a202c;
}

.card-flight-stats .card-total-flight-time {
    color: #2b6cb0;
}

.card-flight-stats .card-cumulative-flight-time {
    color: #2f855a;
}

.card-flight-stats .card-date {
    color: #718096;
    text-transform: uppercase;
    font-size: 0.825rem;
    letter-spacing: 0.03em;
}

/* Responsive Mobile Layout */
@media (max-width: 600px) {
    .card-flight-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 8px 10px;
        font-size: 0.825rem;
        border-left-width: 2px;
    }

    .card-flight-stats > div {
        white-space: normal;
    }
}