/* ===========================================
   UNIT72784 - Blog Styles
   =========================================== */

/* Blog Hero Section */
.blog-hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 8rem 2rem 4rem;
    text-align: center;
    overflow: hidden;
}

.blog-hero .section-header {
    margin-bottom: 1.5rem;
}

.blog-hero-subtitle {
    max-width: 700px;
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Blog Content Section */
.blog-content {
    padding: 4rem;
    background: var(--bg-darker);
    min-height: 50vh;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Blog Card */
.blog-card {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.03) 0%, transparent 100%);
    border: 1px solid rgba(0, 255, 65, 0.15);
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--terminal-green), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover {
    border-color: var(--terminal-green);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1);
    transform: translateY(-3px);
}

.blog-card:hover::before {
    opacity: 1;
}

/* Blog Card Meta */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.blog-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--terminal-green);
    letter-spacing: 0.1em;
}

.blog-category {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--warning-amber);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(255, 170, 0, 0.3);
    background: rgba(255, 170, 0, 0.05);
}

/* Blog Card Content */
.blog-card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--terminal-green);
}

.blog-card-excerpt {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-read-more {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: var(--terminal-green);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.blog-read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-read-more::after {
    transform: translateX(5px);
}

/* Loading State */
.blog-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.loading-terminal {
    font-family: 'Share Tech Mono', monospace;
    color: var(--terminal-green);
    font-size: 1rem;
    letter-spacing: 0.1em;
}

.loading-cursor {
    animation: blink 1s step-end infinite;
    margin-right: 0.5rem;
}

.loading-text {
    animation: flicker 0.5s ease-in-out infinite alternate;
}

@keyframes flicker {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Empty State */
.blog-empty {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 2rem;
}

.empty-terminal {
    font-family: 'Share Tech Mono', monospace;
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 2;
}

.terminal-prompt {
    color: var(--terminal-green);
    margin-right: 0.5rem;
}

/* ===========================================
   Article Page Styles
   =========================================== */

/* Article Hero */
.article-hero {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    padding: 8rem 4rem 4rem;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.article-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
    color: white;
    line-height: 1.3;
    max-width: 900px;
}

.article-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    color: var(--terminal-green);
    letter-spacing: 0.1em;
    margin-top: 1rem;
    max-width: 700px;
}

/* Article Content */
.article-content {
    padding: 4rem;
    background: var(--bg-darker);
}

.article-body {
    max-width: 800px;
    margin: 0 auto;
}

/* Typography for Articles */
.article-body h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}

.article-body h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--terminal-green);
    margin: 2rem 0 1rem;
}

.article-body p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.article-body a {
    color: var(--terminal-green);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
    transition: all 0.3s ease;
}

.article-body a:hover {
    border-bottom-color: var(--terminal-green);
    text-shadow: 0 0 10px var(--terminal-green-glow);
}

.article-body ul,
.article-body ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.article-body li {
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.article-body ul li::marker {
    color: var(--terminal-green);
}

.article-body ol li::marker {
    color: var(--terminal-green);
    font-family: 'Share Tech Mono', monospace;
}

/* Code Blocks */
.article-body pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 65, 0.2);
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    position: relative;
}

.article-body pre::before {
    content: '// CODE';
    position: absolute;
    top: 0;
    right: 0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--terminal-green);
    padding: 0.25rem 0.75rem;
    background: rgba(0, 255, 65, 0.1);
    letter-spacing: 0.1em;
}

.article-body code {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--terminal-green);
}

.article-body pre code {
    color: var(--text-light);
}

/* Inline code */
.article-body p code,
.article-body li code {
    background: rgba(0, 255, 65, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
    font-size: 0.9em;
}

/* Blockquotes */
.article-body blockquote {
    border-left: 3px solid var(--terminal-green);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: rgba(0, 255, 65, 0.03);
    font-style: italic;
    color: var(--text-gray);
}

.article-body blockquote p {
    margin-bottom: 0;
}

/* Images */
.article-body img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border: 1px solid rgba(0, 255, 65, 0.2);
    display: block;
}

.article-body figure {
    margin: 1rem 0;
}

.article-body figcaption {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-gray);
    text-align: center;
    margin-top: 0.75rem;
    letter-spacing: 0.05em;
}

/* Enhanced Image Styles */
.article-body .img-container {
    margin: 2.5rem 0;
    position: relative;
}

.article-body .img-container img {
    margin: 0;
    width: 100%;
    transition: all 0.3s ease;
}

.article-body .img-container:hover img {
    border-color: var(--terminal-green);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.15);
}

/* Image with terminal-style frame */
.article-body .img-terminal {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 65, 0.3);
    padding: 0;
    margin: 2.5rem 0;
}

.article-body .img-terminal-header {
    background: rgba(0, 255, 65, 0.1);
    padding: 0.5rem 1rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--terminal-green);
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-body .img-terminal-header::before {
    content: '◆';
    font-size: 0.5rem;
}

.article-body .img-terminal img {
    margin: 0;
    border: none;
    display: block;
    width: 100%;
}

.article-body .img-terminal figcaption {
    padding: 0.75rem 1rem;
    margin: 0;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(0, 255, 65, 0.1);
}

/* Side-by-side images */
.article-body .img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.article-body .img-grid figure {
    margin: 0;
}

.article-body .img-grid img {
    margin: 0;
}

/* YouTube Embed Styles */
.video-container {
    position: relative;
    width: 100%;
    margin: 2.5rem 0;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 65, 0.3);
}

.video-container:hover {
    border-color: var(--terminal-green);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.15);
}

.video-header {
    background: rgba(0, 255, 65, 0.1);
    padding: 0.5rem 1rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--terminal-green);
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-header::before {
    content: '▶';
    font-size: 0.6rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-caption {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-gray);
    text-align: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(0, 255, 65, 0.1);
    letter-spacing: 0.05em;
}

/* Minimal video embed (no frame) */
.video-minimal {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 2.5rem 0;
    border: 1px solid rgba(0, 255, 65, 0.2);
}

.video-minimal:hover {
    border-color: var(--terminal-green);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.15);
}

.video-minimal iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Full-width hero image */
.article-body .img-hero {
    margin: 3rem -4rem;
    width: calc(100% + 8rem);
    max-width: none;
}

.article-body .img-hero img {
    width: 100%;
    margin: 0;
    border-left: none;
    border-right: none;
}

/* Tables */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9rem;
}

.article-body th {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    text-align: left;
    padding: 1rem;
    background: rgba(0, 255, 65, 0.1);
    color: var(--terminal-green);
    border: 1px solid rgba(0, 255, 65, 0.2);
    letter-spacing: 0.05em;
}

.article-body td {
    padding: 1rem;
    border: 1px solid rgba(0, 255, 65, 0.1);
    color: var(--text-light);
}

.article-body tr:hover td {
    background: rgba(0, 255, 65, 0.03);
}

/* Warning/Note Boxes */
.article-warning {
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid var(--warning-amber);
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.article-warning::before {
    content: '⚠ WARNING';
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--warning-amber);
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 0.75rem;
}

.article-note {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.3);
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.article-note::before {
    content: '> NOTE';
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--terminal-green);
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 0.75rem;
}

/* Article Navigation */
.article-nav {
    max-width: 800px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 255, 65, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.article-nav-link {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--terminal-green);
    text-decoration: none;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.article-nav-link:hover {
    text-shadow: 0 0 10px var(--terminal-green-glow);
}

/* Back to Blog Link */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-gray);
    text-decoration: none;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.back-to-blog::before {
    content: '←';
}

.back-to-blog:hover {
    color: var(--terminal-green);
}

/* Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.article-tag {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-gray);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border: 1px solid rgba(136, 136, 136, 0.3);
    background: transparent;
    transition: all 0.3s ease;
}

.article-tag:hover {
    border-color: var(--terminal-green);
    color: var(--terminal-green);
}

/* ===========================================
   Responsive Styles
   =========================================== */

@media (max-width: 1024px) {
    .blog-content {
        padding: 3rem 2rem;
    }

    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .article-hero {
        padding: 6rem 2rem 3rem;
    }

    .article-content {
        padding: 3rem 2rem;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 6rem 1.5rem 3rem;
        min-height: 40vh;
    }

    .blog-hero-subtitle {
        font-size: 0.95rem;
    }

    .blog-content {
        padding: 2rem 1.5rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-card {
        padding: 1.5rem;
    }

    .blog-card-title {
        font-size: 1.1rem;
    }

    .article-hero {
        padding: 5rem 1.5rem 2rem;
        min-height: 35vh;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .article-content {
        padding: 2rem 1.5rem;
    }

    .article-body h2 {
        font-size: 1.25rem;
    }

    .article-body h3 {
        font-size: 1.1rem;
    }

    .article-body pre {
        padding: 1rem;
        font-size: 0.8rem;
    }

    .article-nav {
        flex-direction: column;
        gap: 1rem;
    }

    /* Video responsive */
    .video-container {
        margin: 2rem 0;
    }

    .video-header {
        font-size: 0.65rem;
        padding: 0.4rem 0.75rem;
    }

    /* Image responsive */
    .article-body .img-terminal-header {
        font-size: 0.65rem;
        padding: 0.4rem 0.75rem;
    }

    .article-body .img-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .article-body .img-hero {
        margin: 2rem -1.5rem;
        width: calc(100% + 3rem);
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 5rem 1rem 2rem;
    }

    .blog-content {
        padding: 1.5rem 1rem;
    }

    .blog-meta {
        gap: 0.5rem;
    }

    .blog-date,
    .blog-category {
        font-size: 0.65rem;
    }

    .article-hero {
        padding: 4rem 1rem 1.5rem;
    }

    .article-meta {
        gap: 0.75rem;
    }

    .article-content {
        padding: 1.5rem 1rem;
    }

    .article-body p {
        font-size: 0.95rem;
    }
}
