/*
Theme Name: Bangla Tribune
Theme URI: https://banglatribune.com
Author: Bangla Tribune
Author URI: https://banglatribune.com
Description: A modern WordPress theme replicating Bangla Tribune news site design
Version: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bangla-tribune
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.4
*/

/* ============================================
   GENERAL STYLES
   ============================================ */

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

html, body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

body {
  background-color: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  background: linear-gradient(135deg, #d61624 0%, #c41020 100%);
  color: #fff;
  padding: 10px 0;
  font-size: 14px;
}

.header-top-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-date {
  color: #fff;
}

.header-social {
  display: flex;
  gap: 15px;
}

.header-social a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s;
}

.header-social a:hover {
  opacity: 0.8;
}

.site-branding {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 32px;
  font-weight: 700;
  color: #d61624;
  margin: 0;
}

.site-title a {
  text-decoration: none;
  color: #d61624;
}

.site-description {
  font-size: 14px;
  color: #666;
  font-style: italic;
}

/* Main Navigation */
.main-navigation {
  background-color: #fff;
  border-bottom: 3px solid #d61624;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
}

.main-navigation > ul > li {
  position: relative;
}

.main-navigation a {
  display: block;
  padding: 15px 20px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: #d61624;
  background-color: #f9f9f9;
}

/* Dropdown Menu */
.main-navigation ul ul {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  min-width: 200px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  gap: 0;
}

.main-navigation li:hover > ul {
  display: flex;
}

.main-navigation ul ul a {
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.main-navigation ul ul a:hover {
  background-color: #f9f9f9;
}

/* ============================================
   HERO SECTION / FEATURED
   ============================================ */

.hero-section {
  background-color: #fff;
  margin: 20px 0;
  padding: 20px;
  border-radius: 4px;
}

.featured-post {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 20px;
}

.featured-post-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.featured-post-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: #fff;
}

.featured-post-category {
  display: inline-block;
  background-color: #d61624;
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 3px;
  margin-bottom: 10px;
}

.featured-post-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}

.featured-post-title a {
  color: #fff;
  text-decoration: none;
}

.featured-post-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   POSTS LAYOUT
   ============================================ */

.posts-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  margin: 30px 0;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.post-card {
  background-color: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.post-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.post-card-content {
  padding: 15px;
}

.post-category {
  display: inline-block;
  background-color: #d61624;
  color: #fff;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  margin-bottom: 8px;
}

.post-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.post-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.post-title a:hover {
  color: #d61624;
}

.post-excerpt {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  font-size: 12px;
  color: #999;
  display: flex;
  gap: 15px;
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ============================================
   SIDEBAR / WIDGETS
   ============================================ */

.sidebar {
  background-color: #fff;
  padding: 20px;
  border-radius: 4px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.widget {
  margin-bottom: 30px;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 3px solid #d61624;
  color: #333;
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.widget li:last-child {
  border-bottom: none;
}

.widget a {
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.widget a:hover {
  color: #d61624;
}

/* Category Widget */
.category-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-count {
  background-color: #f0f0f0;
  color: #333;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

/* ============================================
   CATEGORIES SECTION
   ============================================ */

.categories-section {
  background-color: #fff;
  padding: 30px 20px;
  border-radius: 4px;
  margin: 30px 0;
}

.categories-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #333;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.category-card {
  background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
  padding: 20px;
  border-radius: 4px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.category-card:hover {
  background: linear-gradient(135deg, #d61624 0%, #c41020 100%);
  color: #fff;
  transform: translateY(-5px);
}

.category-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.category-card-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-card-count {
  font-size: 14px;
  opacity: 0.7;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 3px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s;
}

.pagination a:hover {
  background-color: #d61624;
  color: #fff;
  border-color: #d61624;
}

.pagination .current {
  background-color: #d61624;
  color: #fff;
  border-color: #d61624;
}

/* ============================================
   SINGLE POST / ARTICLE
   ============================================ */

.post-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 4px;
  margin: 30px 0;
}

.post-header {
  margin-bottom: 30px;
}

.post-title-single {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.3;
}

.post-meta-single {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #666;
  flex-wrap: wrap;
}

.post-meta-item-single {
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-featured-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 30px;
  display: block;
}

.post-body {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

.post-body p {
  margin-bottom: 20px;
}

.post-body h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 30px 0 15px 0;
  color: #333;
}

.post-body h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 25px 0 12px 0;
  color: #333;
}

.post-body img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 4px;
}

.post-body a {
  color: #d61624;
  text-decoration: none;
}

.post-body a:hover {
  text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background-color: #222;
  color: #fff;
  padding: 40px 0 20px;
  margin-top: 50px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-widget {
  color: #ccc;
}

.footer-widget-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #fff;
}

.footer-widget ul {
  list-style: none;
}

.footer-widget li {
  margin-bottom: 10px;
}

.footer-widget a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-widget a:hover {
  color: #d61624;
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 20px;
  text-align: center;
  color: #999;
}

.footer-bottom p {
  margin: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .posts-wrapper {
    grid-template-columns: 1fr;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .main-navigation ul {
    flex-direction: column;
  }

  .main-navigation a {
    padding: 12px 15px;
  }

  .featured-post-title {
    font-size: 22px;
  }

  .post-title-single {
    font-size: 24px;
  }

  .header-top-content {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .site-branding {
    flex-direction: column;
    text-align: center;
  }

  .site-title {
    font-size: 24px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 20px;
  }

  .main-navigation a {
    padding: 10px 12px;
    font-size: 14px;
  }

  .featured-post-title {
    font-size: 18px;
  }

  .post-title {
    font-size: 16px;
  }

  .post-title-single {
    font-size: 20px;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}
