﻿/* =============================================
   Everything Minecraft - News Page
   Minecraft / Game Hosting aesthetic
   ============================================= */

/* ---------- Base ---------- */
.news-page {
    background-color: #0d1117;
    background-image: url('images/mainimage.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #c9d4e3;
    font-family: "Montserrat", sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Layout ---------- */
.news-wrap {
    width: min(920px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 24px 0 48px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ---------- Grass + Dirt bars ---------- */
.grass-bar {
    height: 16px;
    background: linear-gradient(180deg, #6fb93d 0%, #5aac34 100%);
    box-shadow: 0 3px 0 #3d7c20, inset 0 1px 0 rgba(255,255,255,0.25);
}

.dirt-bar {
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        #5c3d1e 0px, #6b4826 8px, #5c3d1e 8px, #6b4826 16px
    );
    opacity: 0.7;
}

/* ---------- Page Header ---------- */
.news-page-header {
    border: 3px solid #8a6820;
    overflow: hidden;
    box-shadow: 0 8px 0 #3d2e0a, 0 12px 40px rgba(0,0,0,0.6);
}

.news-page-header-inner {
    background: linear-gradient(160deg, #1a1a0e 0%, #110f08 100%);
    padding: 18px 24px 16px;
    text-align: center;
}

.news-eyebrow {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #d4a847;
    margin: 0 0 6px;
}

.news-page-title {
    font-family: "Press Start 2P", monospace;
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    color: #ffffff;
    margin: 0 0 8px;
    text-shadow: 3px 3px 0 #3d2e0a, 2px 2px 0 rgba(0,0,0,0.5);
    letter-spacing: 0.03em;
    line-height: 1.5;
}

.news-page-desc {
    color: #8b9ab0;
    font-size: 0.88rem;
    line-height: 1.65;
    max-width: 600px;
    margin: 0 auto;
}

/* Article Modal Footer */
.article-modal-footer {
    border-top: 2px solid #1e2530;
    padding-top: 20px;
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

/* ---------- Section Labels ---------- */
.news-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-label span {
    font-family: "Press Start 2P", monospace;
    font-size: 0.58rem;
    color: #d4a847;
    letter-spacing: 0.08em;
    padding: 6px 12px;
    background: rgba(13, 17, 23, 0.95);
    border: 2px solid #8a6820;
    box-shadow: 2px 2px 0 #3d2e0a, 0 0 15px rgba(0,0,0,0.9);
}

.section-label::after {
    content: "";
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #8a6820, transparent);
}

/* ---------- Featured Post ---------- */
.post-featured {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    border: 3px solid #3d7c20;
    box-shadow: 0 8px 0 #1a3a0a, 4px 4px 0 #1a3a0a, 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    background: #131f0d;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 0 #1a3a0a, 4px 4px 0 #1a3a0a, 0 28px 60px rgba(0,0,0,0.6);
}

.post-featured-img {
    position: relative;
    min-height: 280px;
}

.post-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.85) saturate(1.1);
    transition: filter 0.3s ease;
}

.post-featured:hover .post-featured-img img {
    filter: brightness(0.95) saturate(1.2);
}

.post-featured-body {
    padding: 28px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg, #1a2e10 0%, #111e0a 100%);
    border-left: 3px solid #3d7c20;
}

/* ---------- Post Tags ---------- */
.post-tag {
    position: absolute;
    top: 18px;
    left: 18px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    color: #fff;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.tag-announce  { background: #5aac34; border: 2px solid #3d7c20; }
.tag-update    { background: #1d6b2e; border: 2px solid #124d20; }
.tag-crossplay { background: #5b34ac; border: 2px solid #3d2080; }
.tag-infra     { background: #ac6a34; border: 2px solid #8a4e22; }

/* ---------- Post Meta ---------- */
.post-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.post-date,
.post-author {
    font-size: 0.75rem;
    font-weight: 700;
    color: #c8975a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.post-author::before { content: "// "; }

/* ---------- Post Titles ---------- */
.post-title {
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin: 0 0 16px;
}

.post-featured-body .post-title {
    font-size: clamp(1.1rem, 2vw, 1.55rem);
    margin-bottom: 10px;
}

.post-featured-body > p {
    color: #a3c48a;
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 14px;
}

/* ---------- Post Chips ---------- */
.post-chips {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.post-chips li {
    font-size: 0.72rem;
    font-weight: 700;
    color: #7dd452;
    background: rgba(90,172,52,0.1);
    border: 1px solid rgba(90,172,52,0.3);
    padding: 4px 10px;
    letter-spacing: 0.04em;
}

/* ---------- Post Buttons ---------- */
.post-btn {
    display: inline-block;
    background: #5aac34;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    padding: 9px 18px;
    border: none;
    box-shadow: 0 4px 0 #3d7c20, 0 6px 0 #1a3a0a;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    align-self: flex-start;
}

.post-btn:hover {
    background: #68c43e;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #3d7c20, 0 8px 0 #1a3a0a;
}

.post-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #3d7c20, 0 3px 0 #1a3a0a;
}

.post-link {
    display: inline-block;
    margin-top: auto;
    padding: 7px 14px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    color: #c9d4e3;
    background: #1a1f2a;
    border: 2px solid #252d3a;
    box-shadow: 0 3px 0 #080c12;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    align-self: flex-start;
}

.post-link:hover {
    background: #1e2d45;
    border-color: #4e7fc4;
    color: #a3c4e8;
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #080c12;
}

.post-link:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #080c12;
}

/* ---------- News Grid ---------- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ---------- News Card ---------- */
.post-card {
    display: flex;
    flex-direction: column;
    background: #13171e;
    border: 3px solid #252d3a;
    box-shadow: 0 4px 0 #080c12, 2px 2px 0 #080c12;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s ease, transform 0.45s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-card.card-visible {
    opacity: 1;
    transform: translateY(0);
}

.post-card.card-visible:hover {
    transform: translateY(-4px);
    border-color: #4e7fc4;
    box-shadow: 0 8px 0 #080c12, 2px 2px 0 #080c12, 0 16px 40px rgba(0,0,0,0.5);
}

.post-card-img {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.post-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.8) saturate(1.05);
    transition: transform 0.4s ease, filter 0.3s ease;
}

.post-card:hover .post-card-img img {
    transform: scale(1.06);
    filter: brightness(0.9) saturate(1.15);
}

.post-card-body {
    padding: 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 7px;
    border-top: 2px solid #1e2530;
}

.post-card-body .post-date {
    font-size: 0.7rem;
    font-weight: 700;
    color: #c8975a;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.post-card-body .post-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #e8f0fc;
    line-height: 1.3;
    margin: 0;
}

.post-card-body p {
    font-size: 0.82rem;
    color: #7a8fa8;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* ---------- Roadmap Card ---------- */
.post-card-roadmap {
    background: linear-gradient(160deg, #1a1508 0%, #110f08 100%);
    border-color: #8a6820;
    box-shadow: 0 4px 0 #3d2e0a, 2px 2px 0 #3d2e0a;
}

.roadmap-body {
    padding: 20px 18px;
}

.roadmap-label {
    font-family: "Press Start 2P", monospace;
    font-size: 0.6rem;
    color: #d4a847;
    letter-spacing: 0.1em;
    margin: 0 0 14px;
}

.roadmap-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.roadmap-list li {
    font-size: 0.85rem;
    font-weight: 600;
    color: #c9a85c;
    padding: 8px 12px;
    background: rgba(212,168,71,0.07);
    border-left: 3px solid #d4a847;
    letter-spacing: 0.02em;
}

/* =============================================
   Navbar overrides for news page → moved to navbar.css
   ============================================= */

/* =============================================
   Login / Register Modal — news page restyle
   body.home-page.news-page beats body.home-page specificity
   ============================================= */
body.home-page.news-page .modal {
    background: rgba(4, 6, 10, 0.88) !important;
    backdrop-filter: blur(6px) !important;
}

body.home-page.news-page .modal-content {
    background: #13171e !important;
    border: 3px solid #8a6820 !important;
    border-top: 3px solid #d4a847 !important;
    border-radius: 0 !important;
    box-shadow: 0 8px 0 #080c12, 0 24px 60px rgba(0,0,0,0.85) !important;
    max-width: 400px !important;
}

/* Form and login/register modals styled in navbar.css */

/* =============================================
   Category Filter Bar
   ============================================= */
.news-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: "Montserrat", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #7a8fa8;
    background: rgba(78,127,196,0.06);
    border: 2px solid #252d3a;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 2px 2px 0 #080c12;
}

.filter-btn:hover,
.filter-btn.active {
    background: #2d4e82;
    border-color: #4e7fc4;
    color: #c9d8f0;
    box-shadow: 2px 2px 0 #080c12, 0 0 12px rgba(78,127,196,0.25);
}

/* =============================================
   Subscribe CTA Strip
   ============================================= */
.news-subscribe {
    border: 3px solid #3d7c20;
    overflow: hidden;
    box-shadow: 0 6px 0 #1a3a0a, 0 12px 30px rgba(0,0,0,0.5);
}

.news-subscribe-inner {
    background: linear-gradient(135deg, #1a2e10 0%, #0e1c09 60%, #111f0c 100%);
    padding: 32px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.news-subscribe-copy h3 {
    font-family: "Press Start 2P", monospace;
    font-size: 0.75rem;
    color: #fff;
    margin: 0 0 8px;
    text-shadow: 2px 2px 0 #1a3a0a;
    letter-spacing: 0.03em;
}

.news-subscribe-copy p {
    color: #8aad74;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

.news-subscribe-form {
    display: flex;
    gap: 0;
    flex-shrink: 0;
}

.news-subscribe-form input[type="email"] {
    font-family: "Montserrat", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #d4e8c2;
    background: #0a1508;
    border: 2px solid #3d7c20;
    border-right: none;
    padding: 10px 16px;
    outline: none;
    min-width: 220px;
    transition: border-color 0.2s ease;
}

.news-subscribe-form input[type="email"]::placeholder {
    color: #4a7035;
}

.news-subscribe-form input[type="email"]:focus {
    border-color: #5aac34;
}

.news-subscribe-form button {
    font-family: "Montserrat", sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: #5aac34;
    border: 2px solid #3d7c20;
    padding: 10px 20px;
    cursor: pointer;
    box-shadow: 0 3px 0 #1a3a0a;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.news-subscribe-form button:hover {
    background: #68c43e;
    transform: translateY(-1px);
    box-shadow: 0 4px 0 #1a3a0a;
}

.news-subscribe-form button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #1a3a0a;
}

/* =============================================
   Article Reader Modal
   ============================================= */
.post-article-content { display: none; }

.article-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.article-modal[hidden] { display: none; }

.article-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 10, 0.9);
    backdrop-filter: blur(3px);
}

.article-modal-box {
    position: relative;
    z-index: 1;
    width: min(660px, 100%);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: #13171e;
    border: 3px solid #4e7fc4;
    box-shadow: 0 10px 0 #080c12, 0 24px 60px rgba(0,0,0,0.85);
    overflow: hidden;
}

.article-modal-grass {
    height: 12px;
    background: linear-gradient(180deg, #6fb93d 0%, #5aac34 100%);
    box-shadow: 0 3px 0 #3d7c20, inset 0 1px 0 rgba(255,255,255,0.25);
    flex-shrink: 0;
}

.article-modal-dirt {
    height: 8px;
    background: repeating-linear-gradient(90deg, #5c3d1e 0px, #6b4826 8px, #5c3d1e 8px, #6b4826 16px);
    opacity: 0.7;
    flex-shrink: 0;
}

.article-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 12px;
    border-bottom: 2px solid #1e2530;
    flex-shrink: 0;
}

.article-modal-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.article-modal-date {
    font-size: 0.7rem;
    font-weight: 700;
    color: #c8975a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.article-modal-tag {
    position: static !important;
    top: auto !important;
    left: auto !important;
    font-size: 0.65rem !important;
    padding: 4px 10px !important;
    box-shadow: none !important;
    flex-shrink: 0;
}

.article-modal-close {
    background: rgba(78,127,196,0.1);
    border: 2px solid #4e7fc4;
    color: #6e9fd4;
    font-size: 0.85rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 2px 2px 0 #080c12;
    transition: background 0.15s ease, color 0.15s ease;
}

.article-modal-close:hover {
    background: #2d4e82;
    color: #fff;
}

.article-modal-staff {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ff8c42;
    background: rgba(255,140,66,0.12);
    border: 1px solid rgba(255,140,66,0.4);
    padding: 3px 8px;
    flex-shrink: 0;
}

/* ---------- Reading progress bar ---------- */
.article-modal-progress {
    height: 3px;
    background: #1e2530;
    flex-shrink: 0;
}

.article-modal-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff8c42, #d4a847);
    transition: width 0.1s linear;
}

/* ---------- Card footer (read more button) ---------- */
.post-card-footer {
    display: flex;
    align-items: center;
    margin-top: auto;
}

.article-modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
}

.article-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #e8f0fc;
    margin: 0 0 16px;
    line-height: 1.25;
}

.article-modal-content p {
    color: #8b9ab0;
    font-size: 0.9rem;
    line-height: 1.8;
    margin: 0 0 14px;
}

.article-modal-content p:last-child { margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .post-featured {
        grid-template-columns: 1fr;
    }
    .post-featured-img {
        min-height: 260px;
    }
    .post-featured-body {
        border-left: none;
        border-top: 3px solid #3d7c20;
        padding: 32px 28px;
    }
    .posts-grid {
        grid-template-columns: 1fr;
    }
    .news-page-title {
        font-size: 1.1rem;
    }
    .news-subscribe-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }
    .news-subscribe-form {
        width: 100%;
    }
    .news-subscribe-form input[type="email"] {
        flex: 1;
        min-width: 0;
    }
}
