:root {
    --primary: #1e3a8a;
    --accent: #2563eb;
    --dark: #020617;
    --light: #f8fafc;
    --text-main: #334155;
    --white: #ffffff;
    --radius: 16px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Kanit', sans-serif; 
    line-height: 1.6; 
    color: var(--text-main);
    background-color: #f1f5f9;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.py-12 { padding: 3rem 0; }

/* Header */
.main-header {
    background-color: var(--dark);
    color: var(--white);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(2, 6, 23, 0.9);
}
.logo { font-size: 1.75rem; font-weight: 800; letter-spacing: -1px; }
.logo span { color: var(--accent); }
.main-nav ul { display: flex; list-style: none; gap: 2rem; }
.main-nav a { font-size: 0.95rem; font-weight: 500; color: rgba(255,255,255,0.7); transition: 0.3s; }
.main-nav a:hover, .main-nav a.active { color: var(--white); }

/* Hero Section */
.news-hero {
    background: linear-gradient(rgba(2, 6, 23, 0.8), rgba(2, 6, 23, 0.8)), url('https://images.unsplash.com/photo-1574629810360-7efbbe195018?auto=format&fit=crop&q=80&w=2000') center/cover;
    padding: 5rem 0;
    color: var(--white);
}
.hero-content { max-width: 600px; }
.badge { background: var(--accent); color: white; padding: 4px 12px; border-radius: 99px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 1rem; display: inline-block; }
.hero-content h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.1; }
.hero-content p { font-size: 1.1rem; opacity: 0.8; font-weight: 300; }

/* News Grid & Cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}
.news-card:hover { transform: translateY(-10px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }

.news-image { position: relative; overflow: hidden; height: 240px; }
.news-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.news-card:hover .news-image img { transform: scale(1.1); }
.category-tag { position: absolute; top: 1.5rem; left: 1.5rem; background: var(--white); color: var(--dark); padding: 4px 12px; border-radius: 8px; font-size: 0.75rem; font-weight: 700; z-index: 10; }

.news-content { padding: 1.75rem; flex-grow: 1; display: flex; flex-direction: column; }
.date-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: #94a3b8; margin-bottom: 1rem; }
.news-content h2 { font-size: 1.4rem; font-weight: 700; line-height: 1.3; margin-bottom: 1rem; color: var(--dark); }
.news-content h2 a:hover { color: var(--accent); }
.news-content p { color: #64748b; font-size: 0.95rem; margin-bottom: 1.5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.btn-read { margin-top: auto; display: inline-flex; align-items: center; gap: 0.5rem; color: var(--accent); font-weight: 700; font-size: 0.9rem; }

/* Skeleton Loading */
.skeleton-loader { height: 400px; background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: loading 1.5s infinite; border-radius: var(--radius); }
@keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Footer (ใช้อันเดิมที่เราปรับปรุงแล้ว) */
.main-footer { background-color: var(--dark); color: var(--white); padding-top: 4rem; margin-top: 5rem; border-top: 4px solid var(--accent); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; }
.footer-links h4 { margin-bottom: 1.5rem; position: relative; padding-bottom: 0.5rem; }
.footer-links h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 30px; height: 2px; background-color: var(--accent); }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.8rem; opacity: 0.6; font-size: 0.9rem; }
.footer-bottom { background-color: rgba(0,0,0,0.2); padding: 1.5rem 0; font-size: 0.85rem; border-top: 1px solid rgba(255,255,255,0.05); }

/* Mobile Menu Button */
.mobile-menu-btn { display: none; background: none; border: none; color: white; cursor: pointer; }

@media (max-width: 768px) {
    .main-nav, .md-only { display: none; }
    .mobile-menu-btn { display: block; }
    .hero-content h1 { font-size: 2.25rem; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-links h4::after { left: 50%; transform: translateX(-50%); }
    .mobile-column { flex-direction: column; gap: 1rem; }
}

/* บังคับสีโลโก้ไม่ให้เป็นสีน้ำเงินลิงก์ */
.logo a {
    color: var(--white); /* หรือสีขาวที่คุณต้องการ */
    text-decoration: none; /* เอาขีดเส้นใต้ออก */
    display: inline-block;
}

/* ส่วนเลข 169 ให้เป็นสีน้ำเงินเน้นตามดีไซน์เดิม */
.logo a span {
    color: var(--accent); 
}

/* ป้องกันสีเปลี่ยนเวลาคลิกแล้ว (Visited) */
.logo a:visited {
    color: var(--white);
}

/* เพิ่มลูกเล่นนิดหน่อยเวลาเอาเมาส์ชี้ (Optional) */
.logo a:hover {
    opacity: 0.9;
}