/*
Theme Name: Sports News TH
Theme URI: https://example.com/theme12
Description: Magazine/news portal layout with deep red accents and orange highlights.
Version: 1.0
Author: ThemeDev
Text Domain: sports-news-th
*/

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Prompt', sans-serif; background: #f8f9fa; color: #212121; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* Red Accent Bar */
.accent-bar { background: #c62828; color: #fff; padding: 6px 0; font-size: 12px; }
.accent-bar .container { display: flex; justify-content: space-between; align-items: center; }
.accent-bar .date-info { opacity: 0.9; }
.accent-bar .social-links a { color: #fff; margin-left: 12px; opacity: 0.8; }
.accent-bar .social-links a:hover { opacity: 1; }

/* Header */
.site-header { background: #fff; padding: 15px 0; border-bottom: 1px solid #e0e0e0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.site-logo { font-size: 28px; font-weight: 700; color: #c62828; }
.site-logo span { color: #212121; }
.header-search { display: flex; }
.header-search input { border: 2px solid #e0e0e0; padding: 8px 15px; border-radius: 4px 0 0 4px; font-size: 14px; width: 220px; outline: none; font-family: 'Prompt', sans-serif; }
.header-search input:focus { border-color: #c62828; }
.header-search button { background: #c62828; color: #fff; border: none; padding: 8px 15px; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 14px; }

/* Navigation Tabs */
.nav-tabs-wrap { background: #212121; position: sticky; top: 0; z-index: 1000; }
.main-nav ul { display: flex; list-style: none; }
.main-nav ul li a { display: block; color: #fff; padding: 14px 20px; font-size: 14px; font-weight: 500; transition: all 0.3s; border-bottom: 3px solid transparent; }
.main-nav ul li a:hover, .main-nav ul li a.active { background: rgba(255,255,255,0.05); border-bottom-color: #ff6d00; color: #ff6d00; }
.menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; padding: 14px 20px; }

/* Featured Hero */
.featured-hero { margin: 25px 0; border-radius: 8px; overflow: hidden; position: relative; height: 450px; background: #212121; }
.featured-hero img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.featured-hero .overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); color: #fff; }
.featured-hero .overlay .cat-badge { display: inline-block; background: #c62828; padding: 4px 12px; border-radius: 3px; font-size: 12px; font-weight: 500; margin-bottom: 12px; }
.featured-hero .overlay h1 { font-size: 32px; margin-bottom: 10px; line-height: 1.3; }
.featured-hero .overlay .meta { font-size: 13px; opacity: 0.8; }

/* Post Grid */
.posts-grid-section { padding: 40px 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; border-bottom: 3px solid #c62828; padding-bottom: 10px; }
.section-header h2 { font-size: 22px; color: #212121; }
.section-header a { color: #c62828; font-size: 14px; font-weight: 500; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.grid-card { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: all 0.3s; }
.grid-card:hover { transform: translateY(-3px); box-shadow: 0 5px 20px rgba(0,0,0,0.12); }
.grid-card .card-thumb { height: 180px; overflow: hidden; position: relative; }
.grid-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.grid-card:hover .card-thumb img { transform: scale(1.05); }
.grid-card .card-thumb .cat-label { position: absolute; top: 10px; left: 10px; background: #ff6d00; color: #fff; padding: 3px 10px; border-radius: 3px; font-size: 11px; font-weight: 500; }
.grid-card .card-content { padding: 18px; }
.grid-card .card-content h3 { font-size: 16px; margin-bottom: 8px; line-height: 1.4; color: #212121; }
.grid-card .card-content h3 a:hover { color: #c62828; }
.grid-card .card-content .card-meta { font-size: 12px; color: #999; margin-bottom: 8px; }
.grid-card .card-content .card-excerpt { font-size: 13px; color: #666; line-height: 1.5; }

/* Sidebar */
.content-with-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: 30px; padding: 40px 0; }
.sidebar .widget { background: #fff; padding: 20px; border-radius: 6px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.sidebar .widget h3 { font-size: 16px; color: #212121; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #c62828; }
.sidebar .popular-item { display: flex; gap: 12px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; }
.sidebar .popular-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sidebar .popular-item .pop-thumb { width: 80px; height: 60px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.sidebar .popular-item .pop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar .popular-item .pop-info h4 { font-size: 13px; line-height: 1.4; margin-bottom: 4px; }
.sidebar .popular-item .pop-info h4 a:hover { color: #c62828; }
.sidebar .popular-item .pop-info span { font-size: 11px; color: #999; }

/* News Section */
.news-section { padding: 40px 0; background: #fff; }
.news-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.news-mini-card { border-radius: 6px; overflow: hidden; }
.news-mini-card .mini-thumb { height: 140px; overflow: hidden; }
.news-mini-card .mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-mini-card h4 { padding: 12px; font-size: 14px; line-height: 1.4; background: #f8f9fa; }
.news-mini-card h4 a:hover { color: #c62828; }

/* Page Header */
.page-header { background: linear-gradient(135deg, #c62828, #8e0000); color: #fff; padding: 40px 0; }
.page-header h1 { font-size: 30px; text-align: center; }

/* Posts Listing */
.posts-listing { padding: 40px 0; }
.post-list-item { display: flex; gap: 20px; background: #fff; margin-bottom: 20px; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.post-list-item .post-thumb { width: 260px; min-height: 180px; flex-shrink: 0; overflow: hidden; }
.post-list-item .post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-list-item .post-info { padding: 20px; flex: 1; }
.post-list-item .post-meta { font-size: 12px; color: #ff6d00; margin-bottom: 8px; font-weight: 500; }
.post-list-item h2 { font-size: 18px; color: #212121; margin-bottom: 10px; }
.post-list-item h2 a:hover { color: #c62828; }
.post-list-item .post-excerpt { color: #666; font-size: 14px; margin-bottom: 15px; }
.post-list-item .btn-read { display: inline-block; background: #c62828; color: #fff; padding: 7px 18px; border-radius: 4px; font-size: 13px; font-weight: 500; }
.post-list-item .btn-read:hover { background: #8e0000; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 35px; }
.pagination a, .pagination span { display: inline-block; padding: 8px 14px; border: 1px solid #e0e0e0; border-radius: 4px; color: #212121; font-size: 14px; }
.pagination .current, .pagination a:hover { background: #c62828; color: #fff; border-color: #c62828; }

/* Single Article */
.single-article { padding: 40px 0; }
.article-header { margin-bottom: 25px; }
.article-header .breadcrumb { font-size: 13px; color: #999; margin-bottom: 15px; }
.article-header .breadcrumb a { color: #c62828; }
.article-header h1 { font-size: 30px; color: #212121; margin-bottom: 12px; line-height: 1.3; }
.article-meta { font-size: 13px; color: #666; display: flex; gap: 15px; }
.article-meta span { display: flex; align-items: center; gap: 4px; }
.article-featured-img { margin-bottom: 25px; border-radius: 8px; overflow: hidden; }
.article-content { font-size: 16px; line-height: 1.8; max-width: 800px; }
.article-content p { margin-bottom: 18px; }
.article-content h2, .article-content h3 { color: #212121; margin: 25px 0 12px; }

/* Post Nav */
.post-nav { display: flex; justify-content: space-between; margin-top: 35px; padding-top: 25px; border-top: 1px solid #e0e0e0; }
.post-nav a { padding: 10px 18px; background: #212121; color: #fff; border-radius: 4px; font-size: 13px; }
.post-nav a:hover { background: #c62828; }

/* Related */
.related-posts { margin-top: 40px; padding-top: 30px; border-top: 1px solid #e0e0e0; }
.related-posts h2 { font-size: 22px; margin-bottom: 20px; color: #212121; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Footer */
.site-footer { background: #212121; color: #fff; padding: 45px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 35px; }
.footer-col h3 { font-size: 16px; margin-bottom: 15px; color: #ff6d00; }
.footer-col p, .footer-col li { font-size: 13px; opacity: 0.7; margin-bottom: 8px; }
.footer-col ul { list-style: none; }
.footer-col ul li a:hover { color: #ff6d00; opacity: 1; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; text-align: center; font-size: 12px; opacity: 0.6; }

/* Responsive */
@media (max-width: 992px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .content-with-sidebar { grid-template-columns: 1fr; }
  .news-list { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .main-nav ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #212121; z-index: 999; }
  .main-nav ul.active { display: flex; }
  .main-nav ul li a { border-bottom-color: transparent; border-left: 3px solid transparent; }
  .main-nav ul li a:hover, .main-nav ul li a.active { border-left-color: #ff6d00; border-bottom-color: transparent; }
  .featured-hero { height: 300px; }
  .featured-hero .overlay h1 { font-size: 22px; }
  .posts-grid { grid-template-columns: 1fr; }
  .news-list { grid-template-columns: 1fr; }
  .post-list-item { flex-direction: column; }
  .post-list-item .post-thumb { width: 100%; height: 180px; }
  .footer-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .header-search { display: none; }
  .header-inner { justify-content: center; }
  .post-nav { flex-direction: column; gap: 10px; }
}
