/* ============================================================
   8e88sign.com - Global Stylesheet
   Original design for Bangladesh market
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Noto Sans Bengali", sans-serif;
  background: #050d1a;
  color: #d1d9e6;
  line-height: 1.8;
  overflow-x: hidden;
}

a { color: #38bdf8; text-decoration: none; transition: color .2s; }
a:hover { color: #7dd3fc; }

img { max-width: 100%; height: auto; display: block; border-radius: 12px; }

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

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: linear-gradient(180deg, #0b1426 0%, #0f1b30 100%);
  border-bottom: 2px solid #1e3a5f;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
}

.brand-wrap {
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  height: 56px;
  overflow: hidden;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  height: 100%;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
}

.brand-mark svg { width: 42px; height: 42px; }

.brand-text { min-width: 0; line-height: 1.05; }

.brand-text strong {
  display: block;
  max-width: 105px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
  color: #38bdf8;
  font-weight: 800;
  letter-spacing: .5px;
}

.brand-text span {
  display: block;
  max-width: 105px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

/* --- Primary Nav --- */
.primary-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1vw, 18px);
  overflow: visible;
  flex-wrap: nowrap;
}

.primary-nav > a {
  white-space: nowrap;
  flex: 0 1 auto;
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
  padding: 10px 6px;
  font-size: 15px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  transition: color .2s;
  border-bottom: 2px solid transparent;
}

.primary-nav > a:hover,
.primary-nav > a.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

.primary-nav > a.nav-home {
  color: #facc15;
  font-weight: 700;
}

.primary-nav > a.nav-home:hover,
.primary-nav > a.nav-home.active {
  color: #fde047;
  border-bottom-color: #facc15;
}

/* --- More Menu --- */
.nav-more {
  position: relative;
  flex: 0 0 auto;
}

.more-toggle {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #334155;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  transition: all .2s;
}

.more-toggle:hover { background: #334155; color: #e2e8f0; }

.more-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 210px;
  padding: 10px;
  border-radius: 16px;
  z-index: 1200;
  background: #1e293b;
  border: 1px solid #334155;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}

.more-menu[hidden] { display: none !important; }

.nav-more.is-open .more-menu {
  display: grid;
  gap: 4px;
}

.more-menu a {
  display: block;
  width: 100%;
  max-width: none;
  padding: 11px 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s;
}

.more-menu a:hover { background: #334155; color: #38bdf8; }

/* --- Header CTA Buttons --- */
.header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.header-actions .btn {
  min-height: 40px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
  border: none;
  cursor: pointer;
}

.btn-register {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}
.btn-register:hover { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; }

.btn-login {
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #0b1426;
}
.btn-login:hover { background: linear-gradient(135deg, #eab308, #ca8a04); color: #0b1426; }

/* --- Nav Toggle (Mobile) --- */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid #334155;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hamburger {
  display: block;
  width: 22px;
  height: 2px;
  background: #94a3b8;
  position: relative;
  transition: background .2s;
}

.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: #94a3b8;
  transition: transform .3s;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.nav-toggle[aria-expanded="true"] .hamburger::before { transform: rotate(45deg); top: 0; }
.nav-toggle[aria-expanded="true"] .hamburger::after { transform: rotate(-45deg); top: 0; }

/* --- Hero Section --- */
.hero {
  position: relative;
  padding: 80px 0 60px;
  background: linear-gradient(160deg, #0b1426 0%, #162544 50%, #0b1426 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,.08) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.2;
  font-weight: 800;
  color: #f0f6ff;
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  color: #38bdf8;
}

.hero .hero-desc {
  font-size: 18px;
  color: #94a3b8;
  margin-bottom: 30px;
  line-height: 1.8;
}

.hero-img {
  border-radius: 16px;
  border: 2px solid #1e3a5f;
  box-shadow: 0 8px 40px rgba(0,0,0,.4);
  margin-top: 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}

/* --- Sections --- */
.content-section {
  padding: 72px 0;
}

.content-section:nth-child(even) {
  background: #0a1225;
}

.section-title {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800;
  color: #e2e8f0;
  margin-bottom: 20px;
  line-height: 1.25;
}

.section-subtitle {
  font-size: 17px;
  color: #94a3b8;
  margin-bottom: 40px;
  max-width: 720px;
}

/* --- Prose (Long content) --- */
.prose { max-width: 820px; }

.prose p {
  font-size: 17px;
  line-height: 1.9;
  margin: 0 0 18px;
  color: #cbd5e1;
}

.prose h2 {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.25;
  margin: 48px 0 18px;
  color: #e2e8f0;
  font-weight: 800;
}

.prose h3 {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.35;
  margin: 32px 0 12px;
  color: #38bdf8;
  font-weight: 700;
}

.prose ul, .prose ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.prose li {
  margin-bottom: 8px;
  line-height: 1.7;
  color: #cbd5e1;
}

.prose img {
  margin: 30px 0;
  border: 2px solid #1e3a5f;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.prose th {
  background: #1e293b;
  color: #38bdf8;
  padding: 14px 16px;
  text-align: left;
  border: 1px solid #334155;
  font-weight: 700;
}

.prose td {
  padding: 12px 16px;
  border: 1px solid #1e3a5f;
  color: #cbd5e1;
}

.prose tr:nth-child(even) td { background: #0a1225; }

/* --- Content Grid (Text + Image) --- */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: 36px;
  align-items: start;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 30px 0;
}

.card {
  background: linear-gradient(160deg, #111d33, #0d1627);
  border: 1px solid #1e3a5f;
  border-radius: 16px;
  padding: 28px 24px;
  transition: transform .25s, box-shadow .25s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(56,189,248,.1);
}

.card h3 {
  font-size: 20px;
  color: #38bdf8;
  margin-bottom: 12px;
  font-weight: 700;
}

.card p {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.7;
}

.card img {
  border-radius: 10px;
  margin-bottom: 16px;
  border: 1px solid #1e3a5f;
}

/* --- CTA Block --- */
.cta-block {
  background: linear-gradient(135deg, #162544, #1e3a5f);
  border: 2px solid #22c55e;
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  margin: 48px 0;
}

.cta-block h2 {
  font-size: clamp(24px, 3vw, 36px);
  color: #22c55e;
  margin-bottom: 16px;
  font-weight: 800;
}

.cta-block p {
  font-size: 17px;
  color: #94a3b8;
  margin-bottom: 28px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 16px 40px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  transition: all .25s;
  box-shadow: 0 4px 20px rgba(34,197,94,.3);
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(34,197,94,.4);
  color: #fff;
}

/* --- FAQ --- */
.faq-list { max-width: 820px; margin: 0 auto; }

.faq-item {
  background: #111d33;
  border: 1px solid #1e3a5f;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.faq-q {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: #e2e8f0;
  font-size: 16px;
  transition: background .2s;
}

.faq-q:hover { background: #162544; }

.faq-q::after {
  content: '+';
  font-size: 22px;
  color: #38bdf8;
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform .3s;
}

.faq-item.open .faq-q::after {
  content: '−';
}

.faq-a {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}

.faq-item.open .faq-a {
  max-height: 600px;
  padding: 0 24px 20px;
}

.faq-a p {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.8;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 14px 0;
  font-size: 14px;
  color: #64748b;
  background: #0a1225;
  border-bottom: 1px solid #1e3a5f;
}

.breadcrumb a { color: #38bdf8; }
.breadcrumb a:hover { color: #7dd3fc; }

/* --- Footer --- */
.site-footer {
  background: #060e1c;
  border-top: 2px solid #1e3a5f;
  padding: 60px 0 24px;
  margin-top: 0;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 18px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 16px;
}

.footer-col p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 8px;
}

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

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  color: #94a3b8;
  font-size: 14px;
  text-decoration: none;
  transition: color .2s;
}

.footer-col a:hover { color: #38bdf8; }

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #1e3a5f;
}

.footer-bottom p {
  font-size: 13px;
  color: #475569;
  line-height: 1.7;
}

/* --- Bonus Table --- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: #111d33;
  border-radius: 12px;
  overflow: hidden;
}

.info-table th {
  background: #1e293b;
  color: #38bdf8;
  padding: 14px 18px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid #334155;
}

.info-table td {
  padding: 12px 18px;
  border-bottom: 1px solid #1e3a5f;
  color: #cbd5e1;
}

/* --- Steps --- */
.steps-list {
  counter-reset: step;
  margin: 30px 0;
}

.step-item {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  padding: 24px;
  background: #111d33;
  border: 1px solid #1e3a5f;
  border-radius: 14px;
}

.step-item::before {
  counter-increment: step;
  content: counter(step);
  flex: 0 0 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  border-radius: 12px;
}

.step-content h3 {
  font-size: 18px;
  color: #e2e8f0;
  margin-bottom: 8px;
  font-weight: 700;
}

.step-content p {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.7;
}

/* --- Notice Box --- */
.notice-box {
  background: linear-gradient(135deg, #1e1a05, #1a1505);
  border: 1px solid #854d0e;
  border-left: 4px solid #facc15;
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}

.notice-box h3 {
  color: #facc15;
  font-size: 18px;
  margin-bottom: 10px;
}

.notice-box p, .notice-box li {
  color: #d4b54a;
  font-size: 15px;
  line-height: 1.7;
}

/* --- Related Links --- */
.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 30px 0;
}

.related-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: #111d33;
  border: 1px solid #1e3a5f;
  border-radius: 12px;
  text-decoration: none;
  transition: all .2s;
}

.related-link:hover {
  background: #162544;
  border-color: #38bdf8;
  transform: translateX(4px);
}

.related-link span {
  color: #cbd5e1;
  font-weight: 600;
  font-size: 15px;
}

.related-link::before {
  content: '→';
  color: #38bdf8;
  font-size: 18px;
  font-weight: 700;
}

/* --- Article List --- */
.article-list { margin: 30px 0; }

.article-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 24px;
  background: #111d33;
  border: 1px solid #1e3a5f;
  border-radius: 14px;
  margin-bottom: 20px;
  transition: all .2s;
}

.article-card:hover {
  border-color: #38bdf8;
  transform: translateY(-3px);
}

.article-card img { border-radius: 10px; width: 200px; height: 140px; object-fit: cover; }
.article-card h3 { font-size: 20px; color: #e2e8f0; margin-bottom: 8px; }
.article-card h3 a { color: inherit; text-decoration: none; }
.article-card h3 a:hover { color: #38bdf8; }
.article-card .meta { font-size: 13px; color: #64748b; margin-bottom: 8px; }
.article-card p { font-size: 15px; color: #94a3b8; line-height: 1.7; }

/* --- 404 --- */
.page-404 {
  text-align: center;
  padding: 120px 20px;
}

.page-404 h1 { font-size: 72px; color: #38bdf8; margin-bottom: 16px; }
.page-404 p { font-size: 18px; color: #94a3b8; margin-bottom: 30px; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .header-inner {
    min-height: 68px;
    grid-template-columns: 140px 1fr auto auto;
    gap: 10px;
  }

  .brand-wrap {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    height: 48px;
  }

  .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .brand-mark svg { width: 38px; height: 38px; }

  .brand-text strong { max-width: 86px; font-size: 17px; }
  .brand-text span { max-width: 86px; font-size: 11px; }

  .primary-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border-radius: 18px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    background: #0f1b30;
    border: 1px solid #1e3a5f;
    box-shadow: 0 16px 48px rgba(0,0,0,.6);
    z-index: 999;
  }

  .primary-nav.is-open { display: flex; }

  .primary-nav > a {
    max-width: none;
    width: 100%;
    padding: 14px 12px;
    text-overflow: initial;
    border-bottom: 1px solid #1e3a5f;
    border-bottom-width: 1px;
  }

  .primary-nav > a:last-of-type { border-bottom: none; }

  .nav-more { display: none !important; }

  /* show all nav items in mobile menu including more items */
  .primary-nav .mobile-extra { display: block !important; }

  .header-actions {
    justify-content: flex-end;
    gap: 6px;
  }

  .header-actions .btn {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .nav-toggle { display: inline-flex; }

  .hero { padding: 48px 0 40px; }

  .hero-grid { grid-template-columns: 1fr; gap: 24px; }

  .hero h1 { font-size: 28px; }

  .content-section { padding: 48px 0; }

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

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

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

  .article-card { grid-template-columns: 1fr; }
  .article-card img { width: 100%; height: 180px; }

  .related-links { grid-template-columns: 1fr; }

  .cta-block { padding: 32px 20px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }

  .header-inner { gap: 6px; }

  .brand-wrap { width: 120px; min-width: 120px; max-width: 120px; }
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-accent { color: #38bdf8; }
.text-green { color: #22c55e; }
.text-gold { color: #facc15; }
.mt-0 { margin-top: 0 !important; }
