/*
Theme Name: TechNews.bd
Theme URI: https://technews.bd/
Author: TechNews.bd
Description: Modern premium Bangladesh technology media theme — editorial news layout, Bengali font support, responsive.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: technews
*/

:root {
  --cream: #FBF8F3;
  --card: #FFFFFF;
  --ink: #14161A;
  --muted: #5B6472;
  --line: #EAE3D7;
  --grad: linear-gradient(135deg, #4F46E5 0%, #9333EA 100%);
  --red: #DC2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,22,26,.04), 0 8px 24px rgba(20,22,26,.06);
  --display: 'Space Grotesk', 'Hind Siliguri', sans-serif;
  --body: 'Hind Siliguri', 'Space Grotesk', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1200px, 92%); margin: 0 auto; }

h1,h2,h3,h4 { font-family: var(--display); font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: #EDEDF0; font-size: 13.5px; padding: 8px 0; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar a { opacity: .85; }
.topbar a:hover { opacity: 1; }
.topbar .tb-right { display: flex; gap: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,248,243,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--grad); }
.brand .bd { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.main-nav ul { display: flex; gap: 22px; list-style: none; font-weight: 600; font-size: 15.5px; }
.main-nav a { padding: 6px 2px; border-bottom: 2px solid transparent; }
.main-nav a:hover { border-color: #9333EA; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 18px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 34px 0 10px; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; }
.hero-main {
  border-radius: var(--radius); overflow: hidden; color: #fff;
  background: var(--grad); box-shadow: var(--shadow);
  padding: 34px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 380px; position: relative;
}
.hero-main .kicker {
  display: inline-block; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35);
  padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 14px; width: fit-content;
}
.hero-main h1 { font-size: clamp(26px, 3.2vw, 40px); color: #fff; margin-bottom: 12px; }
.hero-main h1 a:hover { text-decoration: underline; }
.hero-main .excerpt { opacity: .92; font-size: 16.5px; max-width: 56ch; }
.hero-main .meta { margin-top: 18px; font-size: 13.5px; opacity: .85; display: flex; gap: 14px; }

.hero-side { display: flex; flex-direction: column; gap: 16px; }
.hero-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); flex: 1; display: flex; flex-direction: column; justify-content: center;
}
.hero-card .kicker { color: #7C3AED; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.hero-card h2 { font-size: 19px; margin: 8px 0 8px; }
.hero-card h2 a:hover { color: #7C3AED; }
.hero-card .meta { color: var(--muted); font-size: 13px; }

/* ---------- Ticker ---------- */
.ticker { margin: 26px 0 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: stretch; overflow: hidden; box-shadow: var(--shadow); }
.ticker .label {
  background: var(--red); color: #fff; font-weight: 700; font-size: 14px;
  padding: 12px 18px; display: flex; align-items: center; white-space: nowrap; letter-spacing: .02em;
}
.ticker .track { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker .move { display: flex; gap: 48px; white-space: nowrap; animation: slide 38s linear infinite; padding-left: 24px; }
.ticker:hover .move { animation-play-state: paused; }
.ticker .move a { font-weight: 600; font-size: 15px; }
.ticker .move a:hover { color: #7C3AED; }
.ticker .move .sep { color: var(--red); }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 34px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 25px; position: relative; padding-left: 15px; }
.section-head h2::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 4px; background: var(--grad);
}
.section-head .more { color: #7C3AED; font-weight: 700; font-size: 14.5px; }
.section-head .more:hover { text-decoration: underline; }

.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(20,22,26,.10); }
.card .thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, #EDE9FE, #FAE8FF); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .thumb img { transform: scale(1.05); }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.chip {
  display: inline-block; width: fit-content; background: #F1ECFE; color: #6D28D9;
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .02em;
}
.card h3 { font-size: 17.5px; line-height: 1.4; }
.card h3 a:hover { color: #7C3AED; }
.card .meta { margin-top: auto; color: var(--muted); font-size: 12.5px; display: flex; gap: 10px; }

/* ---------- Newsletter ---------- */
.newsletter { margin: 46px 0 10px; border-radius: 18px; background: var(--grad); color: #fff; padding: 42px; display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.newsletter h2 { color: #fff; font-size: 27px; }
.newsletter p { opacity: .92; margin-top: 6px; }
.newsletter form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter input[type=email] {
  border: none; border-radius: 10px; padding: 13px 18px; font-size: 15px; min-width: 260px; font-family: var(--body);
}
.newsletter button {
  border: none; border-radius: 10px; padding: 13px 24px; font-size: 15px; font-weight: 700;
  background: var(--ink); color: #fff; cursor: pointer; font-family: var(--display);
}
.newsletter button:hover { background: #000; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 54px; background: var(--ink); color: #C9CDD6; padding: 52px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer p { font-size: 14.5px; line-height: 1.8; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #2A2E36; margin-top: 38px; padding-top: 20px; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Post / page content ---------- */
.single-wrap, .page-wrap { padding: 40px 0 20px; }
.entry-header .chip { margin-bottom: 12px; }
.entry-header h1 { font-size: clamp(28px, 3.6vw, 42px); margin-bottom: 14px; }
.entry-meta { color: var(--muted); font-size: 14px; display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.entry-content { max-width: 760px; font-size: 18px; }
.entry-content p { margin-bottom: 1.25em; }
.entry-content h2 { font-size: 27px; margin: 1.6em 0 .6em; }
.entry-content h3 { font-size: 22px; margin: 1.4em 0 .5em; }
.entry-content a { color: #6D28D9; text-decoration: underline; }
.entry-content ul, .entry-content ol { margin: 0 0 1.25em 1.3em; }
.entry-content blockquote { border-left: 4px solid #9333EA; background: #F5F1FF; padding: 16px 20px; border-radius: 8px; margin: 1.4em 0; font-style: normal; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { color: var(--muted); font-size: 13.5px; text-align: center; margin-top: 8px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry-content th { background: #F5F1FF; }

/* ---------- Archive / list ---------- */
.list-item { display: grid; grid-template-columns: 260px 1fr; gap: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; box-shadow: var(--shadow); }
.list-item .thumb { aspect-ratio: 16/10; overflow: hidden; }
.list-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-item .body { padding: 20px 22px; display: flex; flex-direction: column; gap: 9px; justify-content: center; }
.list-item h2 { font-size: 21px; }
.list-item h2 a:hover { color: #7C3AED; }
.list-item .excerpt { color: var(--muted); font-size: 15px; }

.pagination { display: flex; gap: 8px; margin: 30px 0; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-weight: 600; font-size: 14px; }
.pagination .current { background: var(--grad); color: #fff; border-color: transparent; }

.page-header { padding: 36px 0 6px; }
.page-header h1 { font-size: clamp(26px, 3.2vw, 36px); }
.page-header .desc { color: var(--muted); margin-top: 8px; }

.search-form { display: flex; gap: 10px; margin: 20px 0 30px; }
.search-form input[type=search] { flex: 1; max-width: 420px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; font-family: var(--body); font-size: 15px; }
.search-form button { padding: 12px 22px; border: none; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 700; cursor: pointer; }

.alignwide { width: min(1100px, 94vw); margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }

.wp-caption { max-width: 100%; }
.sticky-label { color: var(--red); font-weight: 700; font-size: 12.5px; text-transform: uppercase; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .topbar .tb-right { display: none; }
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--cream); border-bottom: 1px solid var(--line); padding: 14px 4%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .card-grid { grid-template-columns: 1fr; }
  .hero-main { padding: 24px; min-height: 300px; }
  .newsletter { padding: 28px; }
  .newsletter input[type=email] { min-width: 0; width: 100%; }
  .list-item { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
