/*
Theme Name: 7ezbd Editorial
Theme URI: https://7ezbd.asia/
Author: 7ezbd তথ্যসাইট
Description: A Bengali editorial help-centre theme for the independent 7ezbd information site.
Version: 1.0.2
Text Domain: sevenezbd
*/

:root {
  --canvas: #f7f4ee;
  --surface: #ffffff;
  --surface-muted: #f0ebe2;
  --brand: #a83e32;
  --brand-dark: #8e332a;
  --amber: #d89a32;
  --ink: #242321;
  --muted: #68645e;
  --line: #ddd5c8;
  --info: #eef4f1;
  --sage: #2f7764;
  --warning: #fff4d9;
  --warning-ink: #8a5b13;
  --danger: #b43b3b;
  --shadow: 0 12px 32px rgba(58, 45, 30, .09);
  --radius: 12px;
  --content: 780px;
  --wide: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Noto Sans Bengali", "Hind Siliguri", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.76;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
body.admin-bar .site-header { top: 32px; }
a { color: var(--brand-dark); text-decoration-thickness: 1.5px; text-underline-offset: .18em; }
a:hover { color: #6f251f; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
}
img { display: block; max-width: 100%; height: auto; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus { width: auto; height: auto; clip: auto; padding: 12px 16px; background: #fff; z-index: 99999; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  min-height: 68px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner { width: min(var(--wide), calc(100% - 40px)); min-height: 68px; margin: 0 auto; display: flex; align-items: center; gap: 28px; }
.site-brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.site-brand__mark { display: grid; width: 36px; height: 36px; place-items: center; border: 2px solid #fff; border-radius: 11px 11px 11px 4px; background: linear-gradient(145deg, #b94a3d 0%, #7f2b24 100%); box-shadow: 0 4px 12px rgba(127,43,36,.22); color: #fffaf1; font-size: 1.35rem; font-weight: 950; line-height: 1; transform: rotate(-2deg); transition: transform .2s ease, box-shadow .2s ease; }
.site-brand__word { display: inline-flex; align-items: baseline; color: var(--ink); font-size: 1.68rem; font-weight: 950; letter-spacing: -.055em; line-height: 1; }
.site-brand__word-base { color: var(--ink); }
.site-brand__word-accent { color: var(--brand); }
.site-brand:hover { color: var(--ink); }
.site-brand:hover .site-brand__mark { transform: rotate(0) translateY(-1px); box-shadow: 0 6px 16px rgba(127,43,36,.28); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: flex; align-items: center; min-height: 46px; padding: 8px 12px; border-radius: 9px; color: var(--ink); font-weight: 700; text-decoration: none; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { background: var(--surface-muted); color: var(--brand-dark); }
.header-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 18px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 800; text-decoration: none; white-space: nowrap; }
.header-cta:hover { background: var(--brand-dark); color: #fff; }
.menu-toggle { display: none; width: 48px; height: 48px; margin-left: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; }
.menu-toggle-lines, .menu-toggle-lines::before, .menu-toggle-lines::after { display: block; width: 22px; height: 2px; margin: auto; background: currentColor; content: ""; transition: transform .2s ease; }
.menu-toggle-lines::before { transform: translateY(-7px); }
.menu-toggle-lines::after { transform: translateY(5px); }
.menu-open .menu-toggle-lines { background: transparent; }
.menu-open .menu-toggle-lines::before { transform: translateY(0) rotate(45deg); }
.menu-open .menu-toggle-lines::after { transform: translateY(-2px) rotate(-45deg); }

.site-main { min-height: 60vh; }
.article-header { padding: 72px 20px 42px; background: linear-gradient(135deg, #f0ebe2 0%, #f7f4ee 68%); border-bottom: 1px solid var(--line); }
.article-header-inner { width: min(var(--content), 100%); margin: 0 auto; }
.eyebrow { margin: 0 0 10px; color: var(--brand-dark); font-size: .85rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3 { color: var(--ink); line-height: 1.22; letter-spacing: -.025em; }
h1 { margin: 0 0 22px; font-size: clamp(2.25rem, 5.4vw, 3.7rem); }
h2 { position: relative; margin: 0 0 22px; padding-top: 8px; font-size: clamp(1.85rem, 4vw, 2.35rem); }
h2::before { position: absolute; top: 0; left: 0; width: 48px; height: 4px; border-radius: 4px; background: var(--brand); content: ""; }
h3 { margin: 30px 0 12px; font-size: clamp(1.35rem, 2.8vw, 1.6rem); }
.lede { margin: 0; color: #3c3935; font-size: clamp(1.08rem, 2.3vw, 1.23rem); line-height: 1.8; }
.page-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; color: var(--muted); font-size: .9rem; }

.entry-content { width: min(var(--content), calc(100% - 40px)); margin: 0 auto; padding: 54px 0 82px; }
.entry-content > section { margin: 0 0 72px; scroll-margin-top: 100px; }
.entry-content p { margin: 0 0 1.25em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.entry-content li { margin: .48em 0; }
.entry-content strong { color: #171614; }
.entry-content .wide { width: min(var(--wide), calc(100vw - 40px)); margin-left: 50%; transform: translateX(-50%); }
.editorial-image { margin: 32px 0; }
.editorial-image img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.editorial-image figcaption { margin-top: 10px; color: var(--muted); font-size: .9rem; text-align: center; }
.hero-image { margin-top: -18px; margin-bottom: 64px; }
.hero-image img { aspect-ratio: 16 / 9; object-fit: cover; }

.info-box, .warning-box, .danger-box { margin: 28px 0; padding: 22px 24px; border-left: 4px solid var(--sage); border-radius: 0 var(--radius) var(--radius) 0; background: var(--info); }
.warning-box { border-left-color: var(--amber); background: var(--warning); color: var(--warning-ink); }
.danger-box { border-left-color: var(--danger); background: #fff1f0; }
.info-box > :last-child, .warning-box > :last-child, .danger-box > :last-child { margin-bottom: 0; }

.step-list { margin: 28px 0; padding: 0; list-style: none; counter-reset: steps; }
.step-list li { position: relative; min-height: 68px; margin: 0; padding: 4px 0 28px 64px; counter-increment: steps; }
.step-list li::before { position: absolute; top: 0; left: 0; display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 900; content: counter(steps); }
.step-list li:not(:last-child)::after { position: absolute; top: 46px; bottom: 2px; left: 21px; width: 2px; background: var(--line); content: ""; }
.step-list strong { display: block; margin-bottom: 4px; font-size: 1.06rem; }

.table-scroll { width: min(var(--wide), calc(100vw - 40px)); margin: 30px 0 34px 50%; transform: translateX(-50%); overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 7px 20px rgba(58,45,30,.05); }
table { width: 100%; min-width: 680px; border-collapse: collapse; line-height: 1.55; }
th, td { padding: 15px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-muted); color: var(--ink); font-size: .95rem; }
tr:last-child td { border-bottom: 0; }

.faq-list { margin-top: 28px; }
.faq-item { margin: 0 0 12px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.faq-item[open] { border-left: 4px solid var(--brand); }
.faq-item summary { min-height: 56px; padding: 15px 52px 15px 18px; cursor: pointer; font-weight: 800; line-height: 1.5; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { float: right; margin-right: -32px; color: var(--brand); font-size: 1.25rem; content: "+"; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 18px 18px; color: #3f3c38; }
.faq-answer > :last-child { margin-bottom: 0; }

.related-links { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-muted); }
.related-links h2 { font-size: 1.55rem; }
.related-links ul { margin-bottom: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 10px 18px; border: 2px solid var(--brand); border-radius: 10px; background: var(--brand); color: #fff; font-weight: 800; text-decoration: none; }
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.button-secondary { background: #fff; color: var(--brand-dark); }
.button-secondary:hover { background: var(--surface-muted); color: var(--brand-dark); }

.contact-form { margin-top: 30px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin: 0 0 18px; }
.form-field label { display: block; margin-bottom: 6px; font-weight: 800; }
.form-field input, .form-field textarea { width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid #bfb6a9; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.form-field textarea { min-height: 150px; resize: vertical; }
.form-hint { margin-top: 6px; color: var(--muted); font-size: .88rem; }
.form-status { margin: 0 0 20px; padding: 14px 16px; border-radius: 8px; background: var(--info); color: #245f50; }
.form-status.error { background: #fff1f0; color: #8f2f2f; }
.hp-field { position: absolute; left: -9999px; }

.site-footer { background: var(--ink); color: #f7f4ee; }
.footer-inner { width: min(var(--wide), calc(100% - 40px)); margin: 0 auto; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 42px; }
.footer-brand { margin: 0 0 12px; color: #fff; font-size: 1.8rem; font-weight: 900; }
.site-footer h2 { margin: 0 0 14px; padding: 0; color: #fff; font-size: 1.05rem; letter-spacing: 0; }
.site-footer h2::before { display: none; }
.site-footer p { color: #d7d1c8; }
.site-footer a { color: #fff; }
.footer-menu { margin: 0; padding: 0; list-style: none; }
.footer-menu li { margin: 7px 0; }
.footer-bottom { margin-top: 38px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18); color: #c9c2b8; font-size: .9rem; }
.error-404 { width: min(var(--content), calc(100% - 40px)); margin: 0 auto; padding: 110px 0; text-align: center; }

@media (max-width: 900px) {
  body.admin-bar .site-header { top: 46px; }
  .header-inner { width: min(100% - 32px, var(--wide)); min-height: 58px; }
  .site-header { min-height: 58px; }
  .js .menu-toggle { display: block; }
  .js .site-nav { position: absolute; top: 58px; right: 16px; left: 16px; display: none; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
  .js .site-nav.menu-open { display: block; }
  .site-nav ul { align-items: stretch; flex-direction: column; gap: 2px; }
  .site-nav a { min-height: 48px; }
  .header-cta { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .article-header { padding: 44px 16px 30px; }
  h1 { font-size: clamp(2.1rem, 11vw, 2.65rem); }
  h2 { font-size: 1.8rem; }
  .entry-content { width: calc(100% - 32px); padding: 42px 0 60px; }
  .entry-content > section { margin-bottom: 48px; }
  .entry-content .wide, .table-scroll { width: calc(100vw - 32px); }
  .hero-image { margin-bottom: 48px; }
  .hero-image img { aspect-ratio: 4 / 5; object-position: center; }
  .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 20px 16px; }
  .cta-row { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .footer-inner { width: calc(100% - 32px); padding-top: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.site-bottom-cta {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 99999;
  display: flex;
  width: max-content;
  max-width: calc(100% - 24px);
  align-items: center;
  gap: 10px;
  padding: 8px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(9, 13, 24, .94);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .48), 0 4px 12px rgba(0, 0, 0, .3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-bottom-cta__button {
  display: inline-flex;
  min-width: 130px;
  height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none !important;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, background-color .2s ease;
}

.site-bottom-cta__login {
  color: #fff !important;
  background: #20283a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.site-bottom-cta__login:hover {
  color: #fff !important;
  background: #2d3850;
  transform: translateY(-2px);
}

.site-bottom-cta__register {
  color: #07130c !important;
  background: linear-gradient(135deg, #46f28c 0%, #14c968 100%);
  box-shadow: 0 8px 22px rgba(20, 201, 104, .42), inset 0 1px 0 rgba(255, 255, 255, .5);
}

.site-bottom-cta__register:hover {
  color: #07130c !important;
  transform: translateY(-3px) scale(1.025);
  filter: brightness(1.08);
  box-shadow: 0 12px 30px rgba(20, 201, 104, .56), inset 0 1px 0 rgba(255, 255, 255, .55);
}

.site-bottom-cta__button:active {
  transform: translateY(0) scale(.97);
}

.site-bottom-cta__button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .site-bottom-cta {
    bottom: max(10px, env(safe-area-inset-bottom));
    width: calc(100% - 20px);
    gap: 7px;
    padding: 7px;
  }

  .site-bottom-cta__button {
    flex: 1 1 0;
    min-width: 0;
    height: 48px;
    padding: 0 12px;
    font-size: 15px;
  }

  .site-bottom-cta__register {
    flex-grow: 1.15;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-bottom-cta__button {
    transition: none;
  }
}
