/* ============================================================
   1777betapps.com - Main Stylesheet
   Target: Bangladesh (bn-BD) | Original Design System
   ============================================================ */

/* --- Reset & Base --- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,"Noto Sans Bengali",sans-serif;
  font-size:17px;line-height:1.7;color:#1a1a2e;background:#f8f9fc;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}
img{max-width:100%;height:auto;display:block}
a{color:#0d6efd;text-decoration:none;transition:color .2s}
a:hover{color:#0a58ca}
ul,ol{list-style:none}
h1,h2,h3,h4,h5,h6{line-height:1.25;font-weight:700;color:#0f1b34}
h1{font-size:clamp(28px,4vw,48px);margin:0 0 20px}
h2{font-size:clamp(24px,3vw,38px);margin:0 0 16px}
h3{font-size:clamp(20px,2.4vw,28px);margin:24px 0 12px}
p{margin:0 0 16px}
button{font-family:inherit;cursor:pointer}

/* --- CSS Variables --- */
:root{
  --clr-primary:#1a237e;
  --clr-primary-light:#3949ab;
  --clr-accent:#ff6f00;
  --clr-accent-light:#ffa726;
  --clr-success:#2e7d32;
  --clr-bg:#f8f9fc;
  --clr-surface:#ffffff;
  --clr-text:#1a1a2e;
  --clr-text-muted:#5a6178;
  --clr-border:#e0e3eb;
  --clr-hero-bg:linear-gradient(135deg,#0d1b4a 0%,#1a237e 40%,#283593 100%);
  --clr-footer-bg:#0a0e27;
  --clr-footer-text:#c5cae9;
  --shadow-sm:0 1px 3px rgba(0,0,0,.08);
  --shadow-md:0 4px 12px rgba(0,0,0,.1);
  --shadow-lg:0 8px 28px rgba(0,0,0,.12);
  --radius-sm:8px;
  --radius-md:14px;
  --radius-lg:20px;
  --radius-pill:999px;
  --max-w:1180px;
  --header-h:72px;
}

/* --- Utility --- */
.container{max-width:var(--max-w);margin:0 auto;padding:0 20px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
.text-center{text-align:center}
.mb-0{margin-bottom:0}

/* ============================================================
   HEADER - Stable Single-line Layout
   ============================================================ */
.site-header{
  position:sticky;top:0;z-index:1000;width:100%;
  background:var(--clr-primary);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.header-inner{
  max-width:var(--max-w);margin:0 auto;
  min-height:var(--header-h);padding:0 20px;
  display:grid;
  grid-template-columns:168px minmax(0,1fr) auto;
  align-items:center;gap:18px;
}
.brand-wrap{
  width:168px;min-width:168px;max-width:168px;height:56px;
  display:flex;align-items:center;gap:10px;overflow:hidden;
  text-decoration:none;color:#fff;
}
.brand-mark{
  width:42px;height:42px;flex:0 0 42px;
  display:grid;place-items:center;
  background:var(--clr-accent);border-radius:10px;
  font-weight:800;font-size:16px;color:#fff;
}
.brand-text{min-width:0;line-height:1.05}
.brand-text strong,.brand-text span{
  display:block;max-width:105px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;color:#fff;
}
.brand-text strong{font-size:15px;font-weight:700;letter-spacing:.3px}
.brand-text span{font-size:11px;opacity:.75;margin-top:2px}

/* Primary Nav */
.primary-nav{
  min-width:0;display:flex;align-items:center;
  justify-content:center;gap:clamp(8px,1.1vw,20px);
  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 7px;color:rgba(255,255,255,.85);
  font-size:14px;font-weight:500;
  border-bottom:2px solid transparent;
  transition:color .2s,border-color .2s;
}
.primary-nav a:hover,.primary-nav a.active{
  color:#fff;border-bottom-color:var(--clr-accent);
}

/* Header Actions */
.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:var(--radius-pill);
  font-size:14px;font-weight:600;border:none;
  transition:background .2s,transform .15s;
}
.btn-register{background:var(--clr-accent);color:#fff}
.btn-register:hover{background:var(--clr-accent-light);color:#fff;transform:translateY(-1px)}
.btn-login{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.25) !important}
.btn-login:hover{background:rgba(255,255,255,.2);color:#fff}

/* Nav Toggle (Mobile) */
.nav-toggle{
  display:none;width:42px;height:42px;
  background:transparent;border:none;
  color:#fff;font-size:22px;
  align-items:center;justify-content:center;
  border-radius:var(--radius-sm);
}
.nav-toggle:hover{background:rgba(255,255,255,.1)}

/* More Menu */
.nav-more{position:relative;flex:0 0 auto}
.more-toggle{
  min-height:38px;padding:0 12px;border:0;
  border-radius:var(--radius-pill);cursor:pointer;
  white-space:nowrap;display:inline-flex;
  align-items:center;justify-content:center;
  background:rgba(255,255,255,.1);color:rgba(255,255,255,.85);
  font-size:14px;font-weight:500;transition:background .2s;
}
.more-toggle:hover{background:rgba(255,255,255,.18)}
.more-menu{
  position:absolute;top:calc(100% + 12px);right:0;
  min-width:210px;padding:10px;border-radius:16px;
  z-index:1200;background:var(--clr-surface);
  box-shadow:var(--shadow-lg);
}
.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:var(--clr-text);font-size:14px;
  border-radius:var(--radius-sm);transition:background .15s;
}
.more-menu a:hover{background:#f0f2f8}

/* ============================================================
   HERO SECTIONS
   ============================================================ */
.hero{
  background:var(--clr-hero-bg);color:#fff;
  padding:clamp(48px,6vw,88px) 0;
  position:relative;overflow:hidden;
}
.hero::after{
  content:"";position:absolute;bottom:0;left:0;right:0;
  height:80px;background:linear-gradient(transparent,rgba(248,249,252,.06));
}
.hero .container{position:relative;z-index:2}
.hero h1{color:#fff;margin-bottom:18px}
.hero p{color:rgba(255,255,255,.88);font-size:18px;max-width:680px}
.hero-split{display:grid;grid-template-columns:1.1fr .9fr;gap:40px;align-items:center}
.hero-img{border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-lg)}
.hero-img img{width:100%;display:block}

/* Inner page hero - compact */
.hero-inner{padding:clamp(32px,4vw,56px) 0}
.hero-inner h1{font-size:clamp(24px,3.2vw,40px);margin-bottom:12px}
.hero-inner p{font-size:16px}
.hero-inner .breadcrumb{margin-bottom:16px}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb{display:flex;flex-wrap:wrap;gap:6px;font-size:13px;color:rgba(255,255,255,.7)}
.breadcrumb a{color:rgba(255,255,255,.8)}
.breadcrumb a:hover{color:#fff}
.breadcrumb span{color:rgba(255,255,255,.5)}

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */
.content-section{padding:clamp(48px,5vw,80px) 0}
.content-section:nth-child(even){background:var(--clr-surface)}
.content-section:nth-child(odd){background:var(--clr-bg)}

.section-header{text-align:center;max-width:740px;margin:0 auto 40px}
.section-header p{color:var(--clr-text-muted);font-size:16px}

/* Content Grid - Text + Image */
.content-grid{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(280px,.95fr);
  gap:36px;align-items:start;
}
.content-grid.reverse{direction:rtl}
.content-grid.reverse>*{direction:ltr}

/* Prose */
.prose{max-width:820px}
.prose p{font-size:17px;line-height:1.9;margin:0 0 18px}
.prose h2{font-size:clamp(24px,3vw,38px);line-height:1.25;margin:36px 0 18px;color:var(--clr-primary)}
.prose h2:first-child{margin-top:0}
.prose h3{font-size:clamp(19px,2vw,26px);line-height:1.35;margin:28px 0 12px;color:var(--clr-primary-light)}
.prose ul,.prose ol{margin:0 0 18px;padding-left:24px}
.prose ul{list-style:disc}
.prose ol{list-style:decimal}
.prose li{margin-bottom:8px;line-height:1.7}
.prose img{border-radius:var(--radius-md);margin:24px 0;box-shadow:var(--shadow-sm)}

/* Image float inside prose */
.prose .img-float-right{float:right;max-width:320px;margin:0 0 20px 28px;border-radius:var(--radius-md)}
.prose .img-float-left{float:left;max-width:320px;margin:0 28px 20px 0;border-radius:var(--radius-md)}
.prose::after{content:"";display:table;clear:both}

/* ============================================================
   CARDS SYSTEM
   ============================================================ */
.card-grid{display:grid;gap:24px}
.card-grid-2{grid-template-columns:repeat(2,1fr)}
.card-grid-3{grid-template-columns:repeat(3,1fr)}
.card-grid-4{grid-template-columns:repeat(4,1fr)}

.card{
  background:var(--clr-surface);border-radius:var(--radius-md);
  border:1px solid var(--clr-border);overflow:hidden;
  transition:transform .2s,box-shadow .2s;
}
.card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md)}
.card-img{aspect-ratio:16/10;overflow:hidden}
.card-img img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.card:hover .card-img img{transform:scale(1.04)}
.card-body{padding:20px}
.card-body h3{font-size:18px;margin:0 0 8px}
.card-body p{font-size:15px;color:var(--clr-text-muted);margin:0 0 12px}

/* Feature Cards (icon-based) */
.feature-card{
  background:var(--clr-surface);border-radius:var(--radius-md);
  padding:28px 24px;border:1px solid var(--clr-border);
  transition:transform .2s,box-shadow .2s;
}
.feature-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}
.feature-icon{
  width:52px;height:52px;border-radius:12px;
  background:linear-gradient(135deg,var(--clr-primary),var(--clr-primary-light));
  display:grid;place-items:center;margin-bottom:16px;
  color:#fff;font-size:24px;
}
.feature-card h3{font-size:18px;margin:0 0 8px}
.feature-card p{font-size:15px;color:var(--clr-text-muted);margin:0}

/* ============================================================
   STEPS / TIMELINE
   ============================================================ */
.steps-list{counter-reset:step}
.step-item{
  display:grid;grid-template-columns:56px 1fr;gap:20px;
  padding:24px 0;border-bottom:1px solid var(--clr-border);
  counter-increment:step;
}
.step-item:last-child{border-bottom:none}
.step-num{
  width:56px;height:56px;border-radius:50%;
  background:var(--clr-primary);color:#fff;
  display:grid;place-items:center;
  font-size:20px;font-weight:700;
}
.step-num::before{content:counter(step)}
.step-content h3{margin:0 0 8px;font-size:18px}
.step-content p{margin:0;color:var(--clr-text-muted)}

/* ============================================================
   FAQ (Accordion)
   ============================================================ */
.faq-list{max-width:820px;margin:0 auto}
.faq-item{
  border:1px solid var(--clr-border);border-radius:var(--radius-md);
  margin-bottom:12px;overflow:hidden;background:var(--clr-surface);
}
.faq-q{
  width:100%;display:flex;align-items:center;justify-content:space-between;
  padding:18px 20px;font-size:16px;font-weight:600;
  color:var(--clr-text);background:transparent;border:none;
  text-align:left;gap:12px;cursor:pointer;
}
.faq-q::after{
  content:"+";font-size:22px;flex-shrink:0;
  transition:transform .25s;color:var(--clr-primary);
}
.faq-item.open .faq-q::after{transform:rotate(45deg)}
.faq-a{
  max-height:0;overflow:hidden;
  transition:max-height .3s ease,padding .3s;
}
.faq-item.open .faq-a{max-height:600px;padding:0 20px 18px}
.faq-a p{font-size:15px;line-height:1.8;color:var(--clr-text-muted)}

/* ============================================================
   CTA SECTIONS
   ============================================================ */
.cta-section{
  background:var(--clr-hero-bg);color:#fff;
  padding:56px 0;text-align:center;
}
.cta-section h2{color:#fff;margin-bottom:12px}
.cta-section p{color:rgba(255,255,255,.85);margin-bottom:24px;max-width:600px;margin-left:auto;margin-right:auto}
.cta-btns{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}

.btn-cta{
  display:inline-flex;align-items:center;justify-content:center;
  padding:14px 32px;border-radius:var(--radius-pill);
  font-size:16px;font-weight:600;border:none;
  transition:transform .15s,box-shadow .15s;
}
.btn-cta:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}
.btn-cta-primary{background:var(--clr-accent);color:#fff}
.btn-cta-primary:hover{background:var(--clr-accent-light);color:#fff}
.btn-cta-outline{background:transparent;color:#fff;border:2px solid rgba(255,255,255,.4)}
.btn-cta-outline:hover{border-color:#fff;color:#fff}

/* ============================================================
   TABLES
   ============================================================ */
.info-table{width:100%;border-collapse:collapse;margin:24px 0;border-radius:var(--radius-md);overflow:hidden}
.info-table th,.info-table td{padding:14px 16px;text-align:left;border-bottom:1px solid var(--clr-border)}
.info-table th{background:var(--clr-primary);color:#fff;font-weight:600;font-size:14px}
.info-table td{font-size:15px;background:var(--clr-surface)}
.info-table tr:nth-child(even) td{background:#f4f6fa}

/* ============================================================
   WARNING / NOTICE BOXES
   ============================================================ */
.notice-box{
  padding:20px 24px;border-radius:var(--radius-md);
  margin:24px 0;border-left:4px solid;
}
.notice-box.warning{background:#fff8e1;border-color:#f9a825;color:#5d4037}
.notice-box.info{background:#e3f2fd;border-color:#1565c0;color:#0d47a1}
.notice-box.success{background:#e8f5e9;border-color:#2e7d32;color:#1b5e20}
.notice-box h3{margin:0 0 8px;font-size:16px}
.notice-box p{margin:0;font-size:15px}
.notice-box ul{margin:8px 0 0;padding-left:20px;list-style:disc}
.notice-box li{font-size:14px;margin-bottom:4px}

/* ============================================================
   RELATED LINKS / Internal Link Section
   ============================================================ */
.related-links{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:16px;margin:24px 0;
}
.related-link{
  display:flex;align-items:center;gap:14px;
  padding:16px 20px;background:var(--clr-surface);
  border:1px solid var(--clr-border);border-radius:var(--radius-md);
  transition:border-color .2s,box-shadow .2s;
}
.related-link:hover{border-color:var(--clr-primary);box-shadow:var(--shadow-sm);color:var(--clr-primary)}
.related-link .rl-icon{
  width:40px;height:40px;flex-shrink:0;border-radius:10px;
  background:linear-gradient(135deg,var(--clr-primary),var(--clr-primary-light));
  display:grid;place-items:center;color:#fff;font-size:18px;
}
.related-link .rl-text{font-size:15px;font-weight:600}

/* ============================================================
   ARTICLE LIST (Blog archive)
   ============================================================ */
.article-list{display:grid;gap:28px}
.article-card{
  display:grid;grid-template-columns:220px 1fr;gap:24px;
  background:var(--clr-surface);border:1px solid var(--clr-border);
  border-radius:var(--radius-md);overflow:hidden;
  transition:box-shadow .2s;
}
.article-card:hover{box-shadow:var(--shadow-md)}
.article-thumb{overflow:hidden}
.article-thumb img{width:100%;height:100%;object-fit:cover}
.article-info{padding:20px 20px 20px 0;display:flex;flex-direction:column;justify-content:center}
.article-meta{font-size:13px;color:var(--clr-text-muted);margin-bottom:8px}
.article-info h3{font-size:18px;margin:0 0 8px}
.article-info h3 a{color:var(--clr-text)}
.article-info h3 a:hover{color:var(--clr-primary)}
.article-info p{font-size:15px;color:var(--clr-text-muted);margin:0}

/* Article Detail */
.article-header{margin-bottom:32px}
.article-header .article-meta{margin-bottom:16px}
.article-cover{border-radius:var(--radius-lg);overflow:hidden;margin-bottom:32px}
.article-cover img{width:100%}

/* ============================================================
   FOOTER - Heavy Information Architecture
   ============================================================ */
.site-footer{
  background:var(--clr-footer-bg);color:var(--clr-footer-text);
  padding:56px 0 0;
}
.footer-grid{
  display:grid;
  grid-template-columns:1.2fr repeat(3,1fr);
  gap:36px;margin-bottom:40px;
}
.footer-brand p{font-size:14px;line-height:1.7;margin:12px 0 0;opacity:.8;max-width:280px}
.footer-col h4{
  color:#fff;font-size:15px;font-weight:600;
  margin-bottom:16px;padding-bottom:10px;
  border-bottom:2px solid var(--clr-accent);
  display:inline-block;
}
.footer-col a{
  display:block;padding:5px 0;font-size:14px;
  color:var(--clr-footer-text);transition:color .2s;
}
.footer-col a:hover{color:#fff}
.footer-contact{margin-top:16px;font-size:13px;line-height:1.8;opacity:.75}

.footer-bottom{
  border-top:1px solid rgba(255,255,255,.08);
  padding:20px 0;text-align:center;
  font-size:13px;opacity:.65;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-page{
  min-height:60vh;display:flex;align-items:center;
  justify-content:center;text-align:center;padding:60px 20px;
}
.error-page h1{font-size:72px;color:var(--clr-primary);margin-bottom:12px}
.error-page p{font-size:18px;color:var(--clr-text-muted);margin-bottom:24px}

/* ============================================================
   FUNCTIONAL PAGES (Login/Register)
   ============================================================ */
.func-page{padding:clamp(48px,6vw,80px) 0}
.func-card{
  max-width:520px;margin:0 auto;
  background:var(--clr-surface);border-radius:var(--radius-lg);
  padding:40px 36px;box-shadow:var(--shadow-md);
  border:1px solid var(--clr-border);
}
.func-card h1{font-size:28px;text-align:center;margin-bottom:8px}
.func-card .sub{text-align:center;color:var(--clr-text-muted);margin-bottom:28px}
.func-card .btn-cta{width:100%;margin-top:20px}
.func-card ul{padding-left:20px;list-style:disc;margin:16px 0}
.func-card li{font-size:15px;margin-bottom:8px;color:var(--clr-text-muted)}

/* ============================================================
   RESPONSIVE - TABLET
   ============================================================ */
@media(max-width:1024px){
  .card-grid-4{grid-template-columns:repeat(2,1fr)}
  .footer-grid{grid-template-columns:repeat(2,1fr)}
  .content-grid{grid-template-columns:1fr}
  .hero-split{grid-template-columns:1fr}
  .hero-img{max-width:480px;margin:24px auto 0}
}

/* ============================================================
   RESPONSIVE - MOBILE (<=900px)
   ============================================================ */
@media(max-width:900px){
  .header-inner{
    min-height:68px;
    grid-template-columns:140px 1fr 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-text strong,.brand-text span{max-width:86px}

  .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:var(--clr-surface);box-shadow:var(--shadow-lg);
    z-index:1100;
  }
  .primary-nav.is-open{display:flex}
  .primary-nav a{
    max-width:none;width:100%;padding:14px 12px;
    text-overflow:initial;color:var(--clr-text);
    border-bottom:1px solid var(--clr-border);
    font-size:15px;
  }
  .primary-nav a:last-child{border-bottom:none}
  .primary-nav a.active{color:var(--clr-primary);font-weight:700;border-bottom-color:var(--clr-border)}

  .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}
  .nav-more{display:contents !important}
  .nav-more .more-toggle{display:none !important}
  .nav-more .more-menu{
    display:contents !important;
    position:static;min-width:0;padding:0;border-radius:0;
    box-shadow:none;background:transparent;
  }
  .nav-more .more-menu a{
    max-width:none;width:100%;padding:14px 12px;
    text-overflow:initial;color:var(--clr-text);
    border-bottom:1px solid var(--clr-border);
    font-size:15px;border-radius:0;
  }
  .nav-more .more-menu a:last-child{border-bottom:none}

  .hero-split{grid-template-columns:1fr}
  .hero{padding:36px 0}
  .hero-inner{padding:28px 0}

  .card-grid-2,.card-grid-3,.card-grid-4{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
  .article-card{grid-template-columns:1fr}
  .article-thumb{height:180px}
  .article-info{padding:16px}

  .prose .img-float-right,.prose .img-float-left{float:none;max-width:100%;margin:16px 0}
  .content-section{padding:40px 0}
}

/* ============================================================
   RESPONSIVE - SMALL MOBILE
   ============================================================ */
@media(max-width:480px){
  .header-inner{padding:0 12px;gap:8px}
  .brand-wrap{width:120px;min-width:120px;max-width:120px}
  .header-actions .btn{padding:0 10px;font-size:12px;min-height:36px}
  .hero h1{font-size:24px}
  .func-card{padding:28px 20px}
  .related-links{grid-template-columns:1fr}
  .step-item{grid-template-columns:44px 1fr;gap:14px}
  .step-num{width:44px;height:44px;font-size:16px}
}
