/* style.css */
:root {
    --primary: #FF6600;
    --black: #121212;
    --dark-gray: #333;
    --light-gray: #f4f4f4;
    --border: #e2e2e2;
    --font-head: 'Georgia', serif;
    --font-body: 'Arial', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background-color: #fff;
    color: var(--black);
}

a { text-decoration: none; color: inherit; cursor: pointer; }

/* --- HEADER --- */
header { border-bottom: 1px solid var(--border); background: white; position: sticky; top: 0; z-index: 1000; }
.top-bar { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; }
.logo-container { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 40px; }
.logo-text { font-size: 2rem; font-weight: 900; color: var(--primary); letter-spacing: -1px; }

.search-wrapper { position: relative; margin-right: 25px; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #888; }
.search-bar { padding: 8px 10px 8px 35px; border: 1px solid var(--border); border-radius: 20px; width: 250px; font-size: 0.9rem; outline: none; margin-right: 50px; }

.btn-auth { font-weight: bold; font-size: 0.9rem; padding: 8px 20px; border-radius: 4px; }
.btn-login { color: var(--black); margin-right: 10px; }
.btn-register { background: var(--black); color: white; }

/* --- NAV --- */
.nav-sections { border-top: 1px solid var(--border); border-bottom: 4px solid var(--black); }
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; gap: 30px; padding: 12px 20px; overflow-x: auto; }
.nav-link { font-weight: 700; font-size: 0.9rem; text-transform: uppercase; color: var(--dark-gray); }
.nav-link:hover { color: var(--primary); }

/* --- LAYOUT --- */
/* Full width container now */
.container {
    max-width: 1300px; /* Increased width since sidebar is gone */
    margin: 40px auto;
    padding: 0 20px;
}

.section-header {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: bold;
    border-left: 6px solid var(--primary);
    padding-left: 15px;
    margin-bottom: 30px;
}

/* --- ADVANCED BENTO GRID --- */
.bento-grid {
    display: grid;
    /* Creates flexible columns that are at least 280px wide */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    grid-auto-flow: dense; /* This packs items tightly to remove gaps */
}

/* Card Base Styles */
.news-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: white;
    transition: transform 0.2s;
    height: 100%;
    position: relative;
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }

.card-img-wrap { position: relative; overflow: hidden; height: 200px; width: 100%; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.news-card:hover .card-img { transform: scale(1.05); }

.card-category {
    position: absolute; top: 10px; left: 10px;
    background: var(--primary); color: white;
    padding: 4px 8px; font-size: 0.7rem; font-weight: bold; text-transform: uppercase;
    border-radius: 3px; z-index: 2;
}

.card-content { padding: 15px; display: flex; flex-direction: column; flex-grow: 1; }
.card-title { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 8px; line-height: 1.3; font-weight: 700; }
.card-excerpt { font-size: 0.85rem; color: #555; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.card-actions {
    border-top: 1px solid var(--border);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.85rem;
    background: #fafafa;
}
.action-btn { cursor: pointer; display: flex; align-items: center; gap: 5px; transition: 0.2s; }
.action-btn:hover { color: var(--primary); }


/* --- BENTO VARIATIONS (The Mosaic Layout) --- */

/* 1. HERO: The First Card (Huge, Top Left) */
.news-card:nth-child(1) {
    grid-column: span 2; 
    grid-row: span 2;
}
.news-card:nth-child(1) .card-img-wrap { height: 100%; position: absolute; z-index: 0; }
.news-card:nth-child(1) .card-content {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white; z-index: 1; height: 100%; justify-content: flex-end;
}
.news-card:nth-child(1) .card-title { font-size: 2rem; color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }
.news-card:nth-child(1) .card-excerpt { color: #ddd; -webkit-line-clamp: 2; }
.news-card:nth-child(1) .card-actions { display: none; } /* Hide actions on hero for cleaner look */

/* 2. FEATURE: The 5th and 10th cards (Wide) */
.news-card:nth-child(5), .news-card:nth-child(10) {
    grid-column: span 2;
}
.news-card:nth-child(5) .card-img-wrap { height: 250px; }


/* --- ARTICLE VIEW --- */
.article-view { max-width: 800px; margin: 0 auto; padding-bottom: 60px; }
.article-hero-img { width: 100%; height: 500px; object-fit: cover; margin-bottom: 30px; border-radius: 8px; }
.article-headline { font-family: var(--font-head); font-size: 3rem; line-height: 1.1; margin-bottom: 20px; color: var(--black); }
.article-meta-row { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 15px 0; margin-bottom: 40px; display: flex; justify-content: space-between; color: #555; font-size: 0.9rem; }
.article-text { font-size: 1.25rem; line-height: 1.8; color: #222; font-family: 'Georgia', serif; }

/* "Read Source" Button for truncated news */
.source-btn {
    display: inline-block; margin-top: 20px; padding: 12px 25px;
    background-color: var(--primary); color: white; font-weight: bold;
    border-radius: 5px; text-transform: uppercase; font-size: 0.9rem;
}
.source-btn:hover { opacity: 0.9; }

/* --- FOOTER --- */
footer { margin-top: 80px; padding: 40px; background: #1a1a1a; text-align: center; color: white; }
.footer-logo { font-size: 1.5rem; font-weight: 900; margin-bottom: 10px; }
.copyright { color: #666; font-size: 0.8rem; }

/* --- AUTH PAGES STYLING (Paste at the bottom of style.css) --- */

.auth-box {
    max-width: 400px;
    margin: 80px auto; /* Centers it vertically and horizontally */
    padding: 40px;
    background-color: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.auth-box h2 {
    font-family: var(--font-head);
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--black);
}

.auth-input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}

.auth-input:focus {
    border-color: var(--primary);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--black);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover {
    background-color: var(--primary);
}

/* Links inside auth forms */
.auth-box a {
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
}

.auth-box a:hover {
    text-decoration: underline;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .bento-grid { grid-template-columns: 1fr; } /* Stack on mobile */
    .news-card:nth-child(n) { grid-column: auto; grid-row: auto; } /* Disable bento on mobile */
}