/*
Theme Name: prothonalo News
Theme URI: 
Author: prothonalo
Description: Bangladesh-flavoured digital news theme for prothonalo — white canvas, flag-inspired accents, image-led cards.
Version: 1.2.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: bcsn
*/

:root {
  --ink: #16191c;
  --ink-soft: #4a5259;
  --paper: #ffffff;
  --soft: #f3f6f4;
  --line: #e2e8e4;
  --bd-green: #006a4e;
  --bd-red: #d61f26;
  --bd-red-deep: #a5161c;
  --gold: #c9a227;
  --serif: "Source Serif 4", "Noto Serif", Georgia, serif;
  --sans: "Hind Siliguri", "Segoe UI", system-ui, sans-serif;
  --measure: 44rem;
  --page: 74rem;
  --radius: 0.35rem;
  --shadow: 0 10px 28px rgba(22, 25, 28, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(0, 106, 78, 0.06), transparent 55%),
    radial-gradient(900px 360px at 100% 0%, rgba(214, 31, 38, 0.05), transparent 50%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--bd-red);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 40;
  background: var(--paper);
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
}

.wrap {
  width: min(var(--page), calc(100% - 2rem));
  margin-inline: auto;
}

/* Masthead — inspired by BD digital news, not a clone */

.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.masthead__top {
  background: linear-gradient(90deg, var(--bd-green) 0%, var(--bd-green) 62%, var(--bd-red) 62%, var(--bd-red) 100%);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.masthead__top-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  letter-spacing: 0;
}

.lang-switch a {
  color: rgba(255, 255, 255, 0.82);
  padding: 0.1rem 0.2rem;
}

.lang-switch a.is-active,
.lang-switch a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.lang-switch__sep {
  opacity: 0.55;
}

body.lang-bn {
  font-size: 1.08rem;
}

body.lang-bn .lead h1,
body.lang-bn .article-head h1,
body.lang-bn .story-card h2,
body.lang-bn .story-card h3 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0;
}

body.lang-bn .entry-content p,
body.lang-bn .entry-content li,
body.lang-bn .dek {
  font-family: var(--sans);
  line-height: 1.75;
}

.masthead__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem 0 0.75rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
}

.wordmark:hover {
  color: var(--ink);
}

.wordmark__mark {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #fff 0 18%, transparent 19%),
    var(--bd-red);
  box-shadow: inset 0 0 0 0.22rem rgba(255, 255, 255, 0.15);
  flex: 0 0 auto;
}

.wordmark__text {
  font-family: var(--sans);
  font-size: clamp(1.7rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: lowercase;
}

.standfirst {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.masthead__nav {
  border-top: 1px solid var(--line);
  background: rgba(243, 246, 244, 0.92);
  backdrop-filter: blur(8px);
}

.nav-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.2rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-primary a {
  display: inline-block;
  padding: 0.7rem 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
}

.nav-primary a:hover,
.nav-primary .current-menu-item a {
  color: var(--bd-red);
  border-bottom-color: var(--bd-red);
}

/* Lead story */

.lead {
  padding: 1.5rem 0 0.5rem;
}

.lead__grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lead__media {
  display: block;
  min-height: 100%;
  background: #d7e0db;
}

.lead__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
  aspect-ratio: 16 / 10;
}

.lead__copy {
  padding: 1.4rem 1.4rem 1.5rem 0.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kicker {
  margin: 0 0 0.55rem;
  color: var(--bd-red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead h1 {
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.55rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lead h1 a:hover {
  color: var(--bd-red-deep);
}

.dek {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.5;
}

.lead__more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.95rem;
  background: var(--bd-green);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 999px;
}

.lead__more:hover {
  background: #085c45;
  color: #fff !important;
}

.home-block,
.feed {
  padding: 1.8rem 0 3rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--bd-green);
}

.section-label {
  margin: 0;
  padding-bottom: 0.45rem;
  color: var(--bd-green);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.story-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.story-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #c9d5ce;
  color: inherit;
}

.story-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  background: #d7e0db;
  overflow: hidden;
}

.story-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 0.95rem 1.05rem;
}

.story-card h2,
.story-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}

.story-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

/* Article */

.article-head {
  padding: 1.6rem 0 0.2rem;
}

.article-head__inner {
  max-width: 48rem;
}

.article-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.article-hero {
  margin-top: 1.2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.article-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-col {
  width: min(var(--measure), 100%);
  margin: 1.4rem auto 3.2rem;
  padding-inline: 1rem;
}

.entry-content p,
.entry-content li {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.65;
}

.entry-content p {
  margin: 0 0 1.1rem;
}

.entry-content h2 {
  margin: 2rem 0 0.75rem;
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--bd-green);
}

.entry-content a {
  color: var(--bd-red);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.entry-content ul {
  padding-left: 1.2rem;
}

/* Footer */

.site-footer {
  background: #0f241c;
  color: rgba(255, 255, 255, 0.78);
  padding: 2rem 0 2.3rem;
  font-size: 0.92rem;
  border-top: 4px solid var(--bd-red);
}

.site-footer strong {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
}

.site-footer p {
  margin: 0.45rem 0 0;
  max-width: 38rem;
}

.search-form {
  display: flex;
  gap: 0.4rem;
  margin: 1.5rem 0 0;
}

.search-form input[type="search"] {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.55rem 0.7rem;
  font: inherit;
}

.search-form input[type="submit"] {
  border: 0;
  background: var(--bd-red);
  color: #fff;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.navigation.pagination {
  margin-top: 1.5rem;
}

@media (max-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead__grid {
    grid-template-columns: 1fr;
  }

  .lead__copy {
    padding: 0 1.1rem 1.2rem;
  }
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .masthead__top-inner {
    font-size: 0.72rem;
  }

  .nav-primary a {
    padding: 0.65rem 0.55rem;
    font-size: 0.88rem;
  }
}
