/*
Theme Name: Pro News Secure Speed V2
Author: Gemini Assistant
Description: ธีมข่าวเน้นความเร็ว ปลอดภัย รองรับมือถือ 100% พร้อมระบบ Hamburger Menu และ Ads
Version: 8.0
Text Domain: pro-news-secure-v2
*/

* { box-sizing: border-box; }
body { font-family: 'Sarabun', sans-serif; background: #f4f7f9; margin: 0; color: #333; line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* Header & Nav */
.site-logo { text-align: center; padding: 25px 0; background: #fff; }
.site-logo img { max-width: 280px; height: auto; }
.main-nav { position: sticky; top: 0; z-index: 999; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

/* Menu Toggle for Mobile */
.menu-toggle {
    display: none;
    background: rgba(0,0,0,0.2);
    color: #fff;
    border: none;
    padding: 12px;
    width: 100%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; }
.main-nav li a { color: #fff; padding: 18px 25px; display: block; font-weight: bold; text-decoration: none; }

/* Breaking News */
.breaking-bar { display: flex; align-items: center; background: #fff; padding: 6px; border-radius: 4px; margin: 15px 0; border: 1px solid #ddd; }
.bn-label { font-weight: bold; padding: 0 15px; border-right: 1px solid #eee; }

/* Grid Layouts */
.hero-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; height: 500px; }
.hero-item { position: relative; overflow: hidden; border-radius: 4px; background: #000; }
.hero-main { grid-row: span 2; }
.hero-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
.hero-text { position: absolute; bottom: 0; padding: 15px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,0.9)); width: 100%; }

/* Banners 728x90 */
.banner-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 25px 0; }
.ad-slot { background: #eee; height: 90px; border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; border: 1px solid #ddd; }
.ad-slot img { width: 100%; height: 90px; object-fit: cover; }

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-nav ul { display: none; flex-direction: column; width: 100%; }
    .main-nav ul.active { display: flex; }
    .main-nav li a { text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .hero-grid { grid-template-columns: 1fr; height: auto; grid-template-rows: auto; }
    .hero-main { height: 250px; }
    .hero-item { height: 160px; }
    .banner-row { grid-template-columns: 1fr; }
}

/* ส่วนโลโก้หลัก */
.site-logo { 
    text-align: center; /* จัดกึ่งกลางสำหรับ Desktop */
    padding: 20px 0; 
    background: #fff; 
    display: flex; /* ใช้ Flexbox ช่วยจัดกึ่งกลาง */
    justify-content: center; 
    align-items: center;
}

.site-logo img { 
    display: block; /* เปลี่ยนจาก inline-block เป็น block เพื่อให้คุม margin ได้ง่าย */
    margin: 0 auto; /* จัดกึ่งกลางแนวนอน */
    height: auto; 
    transition: 0.3s; 
}

/* ปรับแต่งพิเศษสำหรับมือถือ */
@media (max-width: 768px) {
    .site-logo {
        padding: 15px 0; /* ลดระยะห่างบนล่างในมือถือให้ดูพอดี */
    }
    .site-logo img {
        margin: 0 auto; /* ย้ำอีกครั้งว่าให้อยู่กึ่งกลางเสมอ */
    }
}