/* GLOBAL RESET */
body.terminal-body-bg {
background-color: #0c0612;
background-image: url("/images/black-felt.png");
/* This is mostly intended for prototyping; please download the pattern and re-host for production environments. Thank you! */
    color: #f1f1f1;
    font-family: 'Courier New', Courier, monospace;
    margin: 0; padding: 0;
}

.terminal-container { max-width: 1100px; margin: 0 auto; padding: 20px; width: auto; }

/* HEADER */
.terminal-header { width: 100%; background-color: #0c0612; background-image: url("/images/black-felt.png");}
.header-top { display: flex; justify-content: space-between; align-items: center; padding: 20px 5%;}
.site-logo { font-size: 28px; font-weight: bold; letter-spacing: 2px;}
.site-nav a { margin-left: 20px; text-decoration: none; color: #9c9c9c; font-size: 20px; font-weight:bold;}
.description-banner { background-color: #231c2b; background-image: url("/images/black-felt.png");border-top: 5px solid #333; border-bottom: 3px solid #333; padding: 10px 5%; color: #9c9c9c; font-size: 18px; }

/* DIVIDERS */
.section-divider { display: flex; align-items: center; margin: 40px 0 20px; color: #9c9c9c; letter-spacing: 1.5px; font-weight:bold; font-size: 28px;}
.section-divider::before, .section-divider::after { content: ''; flex: 1; border-bottom: 3px solid #333; }
.section-divider::before { margin-right: 15px; } .section-divider::after { margin-left: 15px; }
/* Divider under Post Title and Date */
.post-title-divider {
    border-bottom: 1px solid #333;
    margin: 10px 0 20px 0;
    width: 100%;
}

/* Divider before Tags */
.tags-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 10px;
    color: #444;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tags-divider::before {
    content: 'TAGS';
    margin-right: 10px;
    color: #888;
}

.tags-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #222;
}

/* CARDS */
.welcome-card, .latest-card, .log-card, .status-box { background-color: #171719; background-image: url("/images/black-felt.png"); border: 3px solid #454249; padding: 20px;}
.welcome-card { margin-bottom: 2px; max-width: 860px; margin-left: auto; margin-right: auto; width: 100%; padding-bottom: 4px;}
/* Target the image specifically inside the welcome-card */
.welcome-card img {
    float: right;           /* Moves the image to the right */
    margin-left: 20px;      /* Creates space so text doesn't touch the image */
    padding-top: 10px;
    height: auto;
}

/* IMPORTANT: Clearfix */
/* This prevents the card's border from collapsing if the image is taller than the text */
.welcome-card::after {
    content: "";
    display: table;
    clear: both;
}
.status-box { margin-bottom: 2px; max-width: 800px; margin-left: auto; margin-right: auto; width: 100%;}
.terminal-prompt { color: #88ff88; margin-bottom: 10px; }

.latest-card { display: flex; gap: 20px; text-decoration: none; color: inherit;}
.latest-card img { width: 50%; border: 1px solid #333; }

.logs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.log-card { text-decoration: none; color: inherit; text-align: center;}
.log-card:nth-child(2) { border-color: #d4af37; } /* Mockup gold highlight */
.log-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; margin-bottom: 10px;}

/* STATUS */
.status-row { border-bottom: 3px solid #222; padding: 8px 0; font-size: 14px;}
.lbl { color: #f1f1f1; margin-right: 10px; }

/* FOOTER */
.terminal-footer { border-top: 5px solid #333; margin-top: 50px; padding: 30px 5%; color: #888; }
.footer-inner { max-width: 800px; margin: 0 auto; position: relative; display: flex; justify-content: center; }
.sep { margin: 0 10px; color: #f1f1f1; }

/* --- SINGLE POST STYLES --- */
.post-header { margin-bottom: 30px;}
.post-title { font-size: 32px; margin: 10px 0; color: #f1f1f1; }
.post-image img { width: 100%; border: 1px solid #333; margin-bottom: 30px; }
.post-content { line-height: 1.6; font-size: 16px; color: #ccc; }
.post-content p { margin-bottom: 20px; }

/* --- POST NAVIGATION BUTTONS --- */
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
}
.nav-prev, .nav-next {
    flex: 1;
    border: 1px solid #333;
    background: #1a1c1e;
    transition: all 0.2s ease;
}
.nav-prev:hover, .nav-next:hover {
    border-color: #88ff88; /* Terminal green highlight on hover */
    background: #222;
}
.post-nav a {
    display: flex;
    flex-direction: column;
    padding: 15px;
    text-decoration: none;
    color: inherit;
}
.nav-label { font-size: 11px; color: #888; margin-bottom: 5px; }
.nav-title { font-size: 14px; font-weight: bold; }
.nav-next { text-align: right; }

.archive-list {
    margin-top: 30px;
}
.archive-item {
    display: flex;
    gap: 20px;
    padding: 15px;
    border-bottom: 1px solid #222;
    text-decoration: none;
    color: #ccc;
    font-family: 'Courier New', monospace;
}
.archive-item:hover {
    background: #1a1c1e;
    color: #88ff88;
}
.archive-date {
    color: #666;
    min-width: 100px;
}

/* ... [Keep everything above the Slider Layout the same] ... */

/* SLIDER LAYOUT & LOGIC */
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.slider-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.slider-container::-webkit-scrollbar { display: none; }

.log-slide {
    flex: 0 0 calc(33.333% - 1px); 
    flex-shrink: 0;  
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.6;
}

/* THE CARD INTERNALS */
.log-slide .log-card {
    padding: 12px; /* Extra tight padding */
    text-align: center;
}

.log-slide .log-card img {
    width: 100%;
    aspect-ratio: 3 / 2; /* Panoramic shape */
    object-fit: cover;
    margin-bottom: 6px; /* Reduced gap */
}

/* SMALLER FONT STYLES */
/* FORCE LARGER TITLES IN THE SLIDER */
.slider-container .log-slide .log-card .nav-title, 
.slider-container .log-slide .log-card h3,
.slider-container .log-slide .log-card .col-title {
    font-size: 18px !important; /* Increase this number to make it even bigger */
    font-weight: bold;
    line-height: 1.2;
    margin-top: 10px;
    display: block;
    color: #f1f1f1; /* Bright white to stand out */
}

/* Adjust the tags to stay small so the title looks bigger by comparison */
.slider-container .log-slide .log-card .col-tags {
    font-size: 11px !important;
    margin-top: 5px;
}

.log-slide .log-card .dashed-inside-divider {
    margin: 4px 0; /* Extremely tight divider spacing */
    border-top: 1px dashed #444; /* Dimmer color to make it look cleaner */
}

/* ACTIVE STATE */
.log-slide.is-active {
    opacity: 1;
    transform: scale(1.03);
}

.log-slide.is-active .log-card {
    border-color: #d4af37;
    background: #1c1c1f;
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 768px) {
    .log-slide {
        flex: 0 0 85%;
    }
}

.log-slide .log-card h3, 
.log-slide .log-card .nav-title, 
.log-slide .log-card .col-title {
    /* Existing styles */
    font-size: 13px;
    margin: 0;
    
    /* The Magic Lines */
    white-space: nowrap;      /* Prevents text from wrapping to a new line */
    overflow: hidden;         /* Hides the text that overflows the card */
    text-overflow: ellipsis;  /* Adds the '...' at the end */
    display: block;           /* Ensures it behaves like a block for the width */
    width: 100%;
}

/* NAVIGATION BUTTONS */
.slider-btn {
    background: #1a1c1e;
    color: #88ff88;
    border: 1px solid #333;
    padding: 15px 10px;
    cursor: pointer;
    z-index: 10;
    font-size: 20px;
    transition: 0.2s;
}

.slider-btn:hover {
    background: #88ff88;
    color: #151719;
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 600px) {
    .welcome-card img {
        float: none;        /* Stop floating */
        display: block;     /* Move to its own line */
        margin: 0 auto 15px; /* Center it and add space below */
        max-width: 100%;    /* Allow it to be larger on mobile if needed */
    }
}

@media (max-width: 768px) {
    .terminal-container {
        width: 95%;
        padding: 10px;
    }

    .header-top {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .site-nav a { margin: 0 10px; }

    .description-banner, .header-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .latest-card {
        flex-direction: column;
    }
    
    .latest-card img {
        width: 100%;
        height: auto;
    }

    /* Combined Slider Mobile Logic */
    .log-slide {
        flex: 0 0 100%; 
    }
    
    .terminal-search {
        margin-left: 0;
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
}
.dashed-divider {
    border: none;
    /* 2px thickness, dashed style, and dark grey color */
    border-top: 2px dashed #9c9c9c; 
    margin: 20px 0;
    width: 100%;
    height: 0;
}
.dashed-inside-divider {
    border: none;
    /* 2px thickness, dashed style, and dark grey color */
    border-top: 1px dashed #9c9c9c; 
    margin: 20px 0;
    width: 100%;
    height: 0;
}

.terminal-list {
    margin-top: 20px;
    font-family: 'Courier New', Courier, monospace;
}

/* Header Row Styling */
.list-header {
    display: flex;
    padding: 10px;
    color: #88ff88; /* Terminal Green */
    font-weight: bold;
    border-bottom: 2px dashed #333;
    font-size: 0.9rem;
}

/* Individual Row Styling */
.list-row {
    display: flex;
    gap: 20px;
    padding: 15px;
    border-bottom: 1px solid #222;
    text-decoration: none;
    color: #ccc;
    font-family: 'Courier New', monospace;
}

.list-row:hover {
    background: #1a1c1e;
    color: #88ff88;
}

/* Column Widths (Adjust to your liking) */
.col-date { width: 120px; flex-shrink: 0; color: #666; font-size: 0.85rem; }
.col-title { flex-grow: 1; font-weight: bold; padding-right: 10px; }
.col-tags { width: 200px; flex-shrink: 0; text-align: right; color: #555; font-size: 0.8rem; }

.tag-pill { margin-left: 5px; }

/* Mobile Responsive: Hide tags if screen is too small */
@media (max-width: 600px) {
    .col-tags { display: none; }
    .col-date { width: 100px; }
}

.post-featured-image {
    margin-bottom: 2rem;
    border: 1px solid #333;
    padding: 5px;
    background: #111;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    color: #666;
    text-align: right;
    padding-top: 8px;
    letter-spacing: 0.5px;
}

.image-caption a {
    color: #88ff88; /* Your terminal green */
    text-decoration: none;
    border-bottom: 1px dotted #444;
}

.image-caption a:hover {
    color: #fff;
    border-bottom-color: #88ff88;
}

/* --- NECESSARY MOBILE ADJUSTMENTS --- */
@media (max-width: 768px) {
    /* 1. Prevent the 1100px container from overflowing the screen */
    .terminal-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        box-sizing: border-box;
    }

    /* 2. Stack the Header (Logo and Nav) */
    .header-top {
        flex-direction: column !important;
        text-align: center;
        gap: 15px;
    }
    .site-nav a {
        margin: 0 10px !important;
        font-size: 16px !important;
    }

    /* 3. Welcome Card: Move image above text so it doesn't squish */
    .welcome-card img {
        float: none !important;
        display: block !important;
        margin: 0 auto 15px !important;
        max-width: 120px !important;
    }

    /* 4. Latest Card: Stack image on top of text */
    .latest-card {
        flex-direction: column !important;
    }
    .latest-card img {
        width: 100% !important;
    }

    /* 5. Slider: Show 1.5 cards so users know to swipe */
    .log-slide {
        flex: 0 0 80% !important; /* 80% width gives that "peek" of the next card */
        opacity: 1 !important;    /* Make cards fully visible on mobile */
    }

    /* 6. Grid: Change the 3-column grid to 1-column */
    .logs-grid {
        grid-template-columns: 1fr !important;
    }

    /* 7. Archive/Terminal List: Stack columns vertically */
    .list-row {
        flex-direction: column !important;
        gap: 5px;
    }
    .col-date, .col-tags {
        width: 100% !important;
        text-align: left !important;
    }
    
        .welcome-card, .status-box {
        max-width: 100% !important; /* Overrides the 860px/800px */
        width: 100% !important;     /* Forces it to fill the container */
        margin-left: 0 !important;  /* Resets the auto-centering */
        margin-right: 0 !important;
        box-sizing: border-box;     /* Ensures padding doesn't push it wider than the screen */
    }
    
    /* This ensures the main wrapper doesn't allow horizontal scrolling */
    .terminal-container {
        overflow-x: hidden;
    }
    
    /* 1. Stack the List Header columns */
.list-header {
        display: flex !important;
        flex-direction: row !important; /* Keep them side-by-side */
        justify-content: space-between !important; /* Date Left, Title Right */
        align-items: center !important;
        width: 100% !important;
        box-sizing: border-box !important; /* Crucial: includes padding in 100% */
        padding: 10px 5px !important; /* Slightly tighter padding for mobile */
        font-size: 0.7rem !important; /* Smaller text ensures they fit on one line */
        overflow: hidden !important; /* Prevents any "poking out" */
    }

    /* 2. Remove fixed widths that might be pushing the title off-screen */
    .list-header .col-date {
        width: auto !important; 
        flex-shrink: 0; /* Prevents date from getting squished */
        margin-right: 10px;
    }

    .list-header .col-title {
        width: auto !important;
        text-align: right !important; /* Aligns the 'FILE_NAME' text to the right */
        flex-grow: 1; /* Takes up the remaining space */
        white-space: nowrap; /* Keeps it on one line for the header look */
    }

    /* 3. Ensure the title text wraps if it's still too long */
    .col-title, .archive-title {
        white-space: normal !important;
        word-wrap: break-word !important;
        display: block !important;
    }
}
