/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark: #0d4a2e;
  --green: #1a6b42;
  --green-light: #2d8a5e;
  --red: #c0392b;
  --red-dark: #96281b;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f0f2f5;
  --gray-200: #e2e6ea;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,.12);
  --radius: 6px;
  --font: 'Noto Sans Bengali', sans-serif;
  --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
}

a { text-decoration: none; color: inherit; transition: color .2s; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Top Bar ===== */
.top-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  font-size: 13px;
  color: var(--gray-600);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-links a:hover { color: var(--green); }

.social-icons {
  display: flex;
  gap: 10px;
  margin-left: 8px;
}

.social-icons a {
  color: var(--gray-600);
  display: flex;
  align-items: center;
}

.social-icons a:hover { color: var(--green); }

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  padding: 4px;
}

.search-btn:hover { color: var(--green); }

/* ===== Header / Logo ===== */
.site-header {
  position: relative;
  background: var(--white);
  padding: 24px 16px 20px;
  text-align: center;
  overflow: hidden;
  border-bottom: 3px solid var(--green);
}

.header-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.header-left-img,
.header-right-img {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28%;
  background-size: cover;
  background-position: center;
  opacity: .85;
}

.header-left-img {
  left: 0;
  background-image: url('https://images.unsplash.com/photo-1512453979798-5ea266f8880c?w=400&q=80');
  mask-image: linear-gradient(to right, rgba(0,0,0,.6), transparent);
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.6), transparent);
}

.header-right-img {
  right: 0;
  background-image: url('https://images.unsplash.com/photo-1591604126609-455aead9940f?w=400&q=80');
  mask-image: linear-gradient(to left, rgba(0,0,0,.6), transparent);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,.6), transparent);
}

.logo-area {
  position: relative;
  z-index: 1;
}

.logo {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.logo-arab { color: var(--green-dark); }
.logo-dash { color: var(--gray-400); font-weight: 400; }
.logo-bangla { color: var(--red); }
.logo-post { color: var(--green-dark); }

.logo-sub {
  font-size: 13px;
  color: var(--gray-600);
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.logo-tagline {
  font-size: 14px;
  color: var(--green);
  font-weight: 500;
}

/* ===== Navigation ===== */
.main-nav {
  background: var(--green-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
}

.nav-home {
  background: var(--red);
  color: var(--white);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-home:hover { background: var(--red-dark); }

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar { display: none; }

.nav-menu li a {
  display: block;
  padding: 12px 14px;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.nav-menu li a:hover { background: rgba(255,255,255,.12); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
}

/* ===== Ticker ===== */
.ticker-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.ticker-inner {
  display: flex;
  align-items: center;
  height: 40px;
  gap: 12px;
}

.ticker-label {
  background: var(--red);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-content {
  flex: 1;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  gap: 16px;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-track span { font-size: 13px; color: var(--gray-800); }
.ticker-sep { color: var(--gray-400); }

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-nav {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.ticker-nav button {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  width: 28px;
  height: 28px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 16px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticker-nav button:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

/* ===== Main Content ===== */
.main-content {
  padding: 24px 16px;
}

/* Hero Grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px 280px;
  gap: 20px;
  margin-bottom: 32px;
}

/* Featured Story */
.featured-story {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--gray-800);
}

.featured-link { display: block; position: relative; }

.featured-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.featured-link:hover .featured-img img { transform: scale(1.03); }

.featured-img .category-tag {
  position: absolute;
  top: 12px;
  left: 12px;
}

.featured-overlay {
  padding: 16px 20px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  color: var(--white);
}

.featured-overlay h2 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.featured-overlay p {
  font-size: 13px;
  opacity: .9;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-tag {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 3px;
}

.category-tag.small {
  font-size: 10px;
  padding: 2px 8px;
  margin-bottom: 4px;
}

.meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--gray-400);
}

.featured-overlay .meta { color: rgba(255,255,255,.7); }

/* Side News */
.side-news {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.news-item {
  border-bottom: 1px solid var(--gray-100);
}

.news-item:last-child { border-bottom: none; }

.news-item a {
  display: flex;
  gap: 12px;
  padding: 12px;
  transition: background .2s;
}

.news-item a:hover { background: var(--gray-50); }

.news-item img {
  width: 90px;
  height: 68px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.news-item-text h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item a:hover h3 { color: var(--green); }

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.widget-title {
  background: var(--green-dark);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 16px;
}

.popular-list { padding: 8px 0; }

.popular-list li a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  transition: background .2s;
}

.popular-list li a:hover {
  background: var(--gray-50);
  color: var(--green);
}

.rank {
  background: var(--green);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.newsletter { padding-bottom: 16px; }

.newsletter p {
  padding: 12px 16px 8px;
  font-size: 13px;
  color: var(--gray-600);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
}

.newsletter-form input {
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
}

.newsletter-form input:focus { border-color: var(--green); }

.newsletter-form button {
  background: var(--green-dark);
  color: var(--white);
  border: none;
  padding: 10px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.newsletter-form button:hover { background: var(--green); }

/* Category Grid */
.category-section { margin-bottom: 32px; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.cat-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  text-align: center;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.cat-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.cat-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--green-dark);
  padding: 10px 8px 2px;
}

.cat-card p {
  font-size: 11px;
  color: var(--gray-400);
  padding: 0 8px 12px;
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  background: var(--green-dark);
  color: var(--white);
  text-align: center;
  overflow: hidden;
}

.footer-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1512453979798-5ea266f8880c?w=1200&q=60') center/cover;
  opacity: .08;
}

.footer-tagline {
  position: relative;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 600;
  padding: 40px 16px;
  letter-spacing: .5px;
}

.footer-bottom {
  position: relative;
  background: rgba(0,0,0,.2);
  padding: 12px 16px;
  font-size: 13px;
  opacity: .85;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sidebar {
    grid-column: 1 / -1;
    flex-direction: row;
  }
  .sidebar .widget { flex: 1; }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .top-links a:not(.social-icons a) { display: none; }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .sidebar { flex-direction: column; }

  .category-grid { grid-template-columns: repeat(3, 1fr); }

  .nav-toggle { display: block; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--green-dark);
    flex-direction: column;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.open { display: flex; }

  .nav-menu li a { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }

  .main-nav .nav-inner { position: relative; flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .social-icons { display: none; }
  .ticker-nav { display: none; }
}
