@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- RESET & CORE --- */
:root {
    --primary: #111827;
    --accent: #2563eb;
    --bg: #f8fafc;
    --border: #e2e8f0;
    --text-main: #1f2937;
    --text-muted: #64748b;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg); color: var(--text-main); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; transition: 0.2s; }

/* --- NAVIGATION --- */
nav {
    background: white; padding: 12px 5%; 
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000;
}
.logo { font-size: 1.5rem; font-weight: 800; color: #000; letter-spacing: -0.03em; }
.nav-links a { color: var(--text-muted); margin-left: 24px; font-weight: 600; font-size: 0.9rem; }
.nav-links a:hover { color: var(--primary); }

/* --- DISCOVERY SECTIONS --- */
.container { max-width: 1140px; margin: 40px auto; padding: 0 20px; }
.section-title { 
    font-size: 1.5rem; font-weight: 800; margin-bottom: 20px; 
    letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px;
}
.home-section { margin-bottom: 60px; }

/* --- TRENDING GRID (YouTube Style) --- */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.trend-card { 
    position: relative; border-radius: 12px; overflow: hidden; 
    display: block; aspect-ratio: 16 / 9; background: #000;
}
.trend-card img { 
    width: 100%; height: 100%; object-fit: cover; 
    opacity: 0.85; transition: 0.4s; 
}
.trend-card:hover img { transform: scale(1.05); opacity: 0.7; }
.trend-content { 
    position: absolute; bottom: 0; left: 0; right: 0; 
    padding: 20px; background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white;
}
.trend-content h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }

/* --- HORIZONTAL SCROLL (Netflix Style) --- */
.horizontal-scroll {
    display: flex; gap: 16px; overflow-x: auto; 
    padding: 10px 0 20px; scrollbar-width: none;
}
.horizontal-scroll::-webkit-scrollbar { display: none; }

.mini-card { flex: 0 0 240px; border-radius: 10px; transition: 0.3s; }
.mini-card img { width: 100%; height: 135px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }
.mini-body h4 { font-size: 0.95rem; margin-top: 10px; font-weight: 600; color: var(--text-main); }

/* --- LATEST FEED (Standard Grid) --- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.card {
    background: transparent; overflow: hidden; 
    display: flex; flex-direction: column; transition: 0.3s;
}
.card-img { width: 100%; height: 190px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.card-title { font-size: 1.15rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.card-meta { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 12px; }

/* --- PROFESSIONAL MOBILE REWORK --- */
@media (max-width: 600px) {
    .section-title { font-size: 1.3rem; }
    .trending-grid { grid-template-columns: 1fr; }
    
    /* Transforms latest posts into a clean news list */
    .grid { gap: 20px; }
    .card { flex-direction: row; align-items: center; gap: 12px; }
    .card-img { width: 100px; height: 100px; margin-bottom: 0; border-radius: 8px; }
    .card-title { font-size: 1rem; line-height: 1.2; -webkit-line-clamp: 3; }
    .card-meta { font-size: 0.75rem; }
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
.home-section { animation: fadeInUp 0.6s ease-out; }
