/* =====================================================
   গল্পঘর — STYLE SHEET
   Design: ink-on-parchment light / deep-ink dark
   Font: Noto Serif Bengali + Hind Siliguri
   ===================================================== */

/* ---- CSS VARIABLES ---- */
:root {
  --accent:      #E8822A;
  --accent-dark: #C46A18;
  --rose:        #C4627A;
  --radius:      12px;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.08);
  --shadow-md:   0 6px 24px rgba(0,0,0,.12);
  --shadow-lg:   0 16px 48px rgba(0,0,0,.18);
  --transition:  0.25s ease;
  --max-w:       1200px;
}

[data-theme="light"] {
  --bg:          #FDF6E9;
  --bg2:         #F5EDD6;
  --bg3:         #EDE3CC;
  --surface:     #FFFFFF;
  --border:      #E2D5BC;
  --text:        #1C1208;
  --text2:       #4A3728;
  --text3:       #7A6352;
  --header-bg:   rgba(253,246,233,0.92);
  --ad-bg:       #F0E8D0;
}

[data-theme="dark"] {
  --bg:          #0F1923;
  --bg2:         #151F2B;
  --bg3:         #1C2A38;
  --surface:     #1A2535;
  --border:      #263545;
  --text:        #EDE3CC;
  --text2:       #C8B99A;
  --text3:       #8A7A6A;
  --header-bg:   rgba(15,25,35,0.95);
  --ad-bg:       #1C2A38;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Hind Siliguri', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

.hidden { display: none !important; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 {
  font-family: 'Noto Serif Bengali', serif;
  line-height: 1.3;
  color: var(--text);
}

/* ---- HEADER ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), background var(--transition);
}
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-lamp {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 6px #E8822A88);
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-bn {
  font-family: 'Noto Serif Bengali', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}
.logo-sub {
  font-size: 0.65rem;
  color: var(--text3);
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text2);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  background: var(--bg3);
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}
.theme-toggle:hover { background: var(--bg3); }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- HERO ---- */
.hero {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 4rem 0 3rem;
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.hero-text { max-width: 600px; }
.hero-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.25;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text2);
  margin-bottom: 1.75rem;
  max-width: 480px;
}
.hero-lamp {
  font-size: clamp(4rem, 10vw, 7rem);
  filter: drop-shadow(0 0 30px #E8822A55);
  animation: float 4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

.btn-primary {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50px;
  font-family: 'Noto Serif Bengali', serif;
  font-size: 1rem;
  font-weight: 600;
  transition: background var(--transition), transform 0.15s;
  box-shadow: 0 4px 16px rgba(232,130,42,.35);
}
.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* ---- AD SLOTS ---- */
.ad-slot {
  margin: 1.5rem auto;
}
.ad-banner {
  text-align: center;
}
.ad-placeholder {
  background: var(--ad-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--text3);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ad-inline {
  margin: 1.5rem 0;
}
.ad-inline .ad-placeholder { padding: 1rem; }

/* ---- MAIN CONTENT ---- */
.main-content {
  padding: 2.5rem 1.25rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  position: relative;
  padding-left: 1rem;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  height: 80%;
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.search-box,
.category-filter {
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.55rem 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}
.search-box { width: 220px; }
.search-box:focus,
.category-filter:focus {
  border-color: var(--accent);
}

/* ---- STORIES GRID ---- */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

/* ---- STORY CARD ---- */
.story-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.story-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.story-card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-cover {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 3rem;
  overflow: hidden;
}
.card-emoji {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.15));
}
.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-cat {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  font-size: 0.7rem;
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-weight: 600;
}

.card-body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.35;
}
.card-excerpt {
  font-size: 0.87rem;
  color: var(--text2);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 0.9rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text3);
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}
.btn-read {
  align-self: flex-start;
  padding: 0.5rem 1.25rem;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-read:hover {
  opacity: 0.85;
  transform: translateX(2px);
}

/* ---- NO RESULTS ---- */
.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text3);
  font-size: 1.1rem;
}

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  overflow-y: auto;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* reading mode চালু থাকলে overlay নিজেই পুরো স্ক্রিন স্ট্রেচ করে দেয়,
   যাতে .modal-box কোনো leftover padding/alignment ছাড়াই পুরো জায়গা পায় */
.modal-overlay.reading-active {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  overflow-y: hidden;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 740px;
  margin: 2rem auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.25s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-overlay.active .modal-box {
  transform: translateY(0);
}

/* normal মোডে .modal-scroll নিজে স্ক্রল করে না — পুরো box-ই overlay-র
   ভেতরে স্ক্রল হয়। reading mode-এ এটাই একমাত্র স্ক্রলেবল এলাকা হয়। */
.modal-scroll {
  display: flex;
  flex-direction: column;
}

/* progress bar + header + toolbar একসাথে একটাই sticky ইউনিট —
   আলাদা আলাদা sticky rule দিলে সব একই জায়গায় (top: 0) ওভারল্যাপ করে,
   তাই একটাই wrapper-কে sticky করা হয়েছে, ভেতরের ক্রম স্বাভাবিক flex flow-তে */
.modal-sticky-top {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.modal-category {
  display: inline-block;
  font-size: 0.72rem;
  color: #fff;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.modal-meta {
  font-size: 0.82rem;
  color: var(--text3);
}

.modal-close {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg2);
  cursor: pointer;
  font-size: 1rem;
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--bg3); }

.modal-body {
  padding: 0 1.75rem 1.5rem;
}
.modal-body p {
  font-family: 'Noto Serif Bengali', serif;
  font-size: 1.05rem;
  line-height: 2;
  color: var(--text);
  margin-bottom: 1.1rem;
  text-align: justify;
}

.modal-footer {
  flex-shrink: 0;
  padding: 1rem 1.75rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.btn-secondary {
  padding: 0.6rem 1.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text2);
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-secondary:hover { background: var(--bg3); }

/* ---- GALLERY (multi photo + video, inside modal-body) ---- */
.modal-gallery {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -1.75rem 1.5rem;
  padding: 1.25rem 1.75rem 0;
  -webkit-overflow-scrolling: touch;
  justify-content: center;   /* add this */
}
.modal-gallery:empty { display: none; margin: 0; padding: 0; }

.gallery-item {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: center;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg2);
}
.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;  
  display: block;
}
.mute-toggle {
  position: absolute;
  bottom: .6rem;
  right: .6rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
}

@media (min-width: 700px) {
  .gallery-item { flex: 0 0 45%; }
}
@media (min-width: 1000px) {
  .gallery-item { flex: 0 0 30%; }
}

.modal-gallery:has(.gallery-item:only-child) .gallery-item {
  flex: 0 0 100%;
}
/* ============================================================
   ফুল-স্ক্রিন রিডিং মোড — একটিমাত্র base layout rule
   (head এর inline <style> এ এই rule আর ডুপ্লিকেট করা নেই)
   ============================================================ */
.modal-box.reading-mode {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
  z-index: 10000;
  background: #FBF6EC;
  color: #2B2420;
}

/* reading mode-এ modal-scroll-ই একমাত্র স্ক্রলেবল এলাকা —
   sticky-top + ad + body সব এর ভেতরে, একসাথে স্ক্রল হয় */
.modal-box.reading-mode .modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: inherit;
}

/* sticky-top (progress + header + toolbar একসাথে) উপরে আটকে থাকে,
   কিন্তু normal ডকুমেন্ট ফ্লো-এর মধ্যেই — fixed/position trick নয়,
   এবং একটা মাত্র sticky element হওয়ায় কোনো ওভারল্যাপ হয় না */
.modal-box.reading-mode .modal-sticky-top {
  flex-shrink: 0;
}

.modal-box.reading-mode .modal-body {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1.75rem 4rem;
  font-family: 'Noto Serif Bengali', serif;
  font-size: 1.25rem;
  line-height: 1.9;
  letter-spacing: .01em;
}

/* ---- মোবাইল টিউনিং (reading mode body) ---- */
@media (max-width: 600px) {
  .modal-box.reading-mode .modal-body {
    padding: 1.5rem 1.25rem 3.5rem;
    font-size: 1.1rem;
    line-height: 1.85;
  }
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 3rem 0 0;
  margin-top: 3rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.footer-brand .logo-lamp { font-size: 2rem; margin-bottom: 0.35rem; }
.footer-name {
  font-family: 'Noto Serif Bengali', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 0.4rem;
}
.footer-brand p {
  font-size: 0.88rem;
  color: var(--text3);
}
.footer-links h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  margin-bottom: 1rem;
}
.footer-links a {
  display: block;
  font-size: 0.92rem;
  color: var(--text2);
  margin-bottom: 0.5rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.1rem 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text3);
}

/* ---- BACK TO TOP ---- */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 90;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* ---- STATIC PAGES (about, contact etc) ---- */
.static-hero {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2rem;
  text-align: center;
}
.static-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  margin-bottom: 0.6rem;
}
.static-hero p {
  color: var(--text2);
  font-size: 1rem;
}

.static-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}
.static-content h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--accent);
}
.static-content p, .static-content li {
  font-size: 0.97rem;
  color: var(--text2);
  line-height: 1.85;
  margin-bottom: 0.75rem;
}
.static-content ul { padding-left: 1.4rem; }
.static-content li { margin-bottom: 0.5rem; }
.static-content a { color: var(--accent); }

/* contact form */
.contact-form {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.9rem; font-weight: 500; color: var(--text2); }
.form-group input,
.form-group textarea {
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }
.btn-submit {
  align-self: flex-start;
  padding: 0.7rem 2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Noto Serif Bengali', serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform 0.15s;
}
.btn-submit:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: 1 / -1; }
}

/* Mobile */
@media (max-width: 640px) {
  .hamburger { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--header-bg);
    border-top: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem 1rem 1rem;
    gap: 0.2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .nav-link { padding: 0.65rem 1rem; width: 100%; border-radius: 8px; }

  .hero { padding: 2.5rem 0 2rem; }
  .hero-inner { flex-direction: column-reverse; align-items: flex-start; }
  .hero-lamp { font-size: 3.5rem; align-self: center; }
  .hero-title { font-size: 1.6rem; }

  .section-header { flex-direction: column; align-items: flex-start; }
  .search-box { width: 100%; }
  .filter-bar { width: 100%; }
  .category-filter { flex: 1; }

  .stories-grid { grid-template-columns: 1fr; }

  .modal-box { margin: 0.5rem auto; border-radius: var(--radius) var(--radius) 0 0; }
  .modal-header { padding: 1.1rem 1.1rem 0.75rem; }
  .modal-body { padding: 0 1.1rem 1rem; }
  .modal-body p { font-size: 0.97rem; }
  .modal-footer { padding: 0.75rem 1.1rem 1.25rem; }
  .modal-title { font-size: 1.15rem; }
  .modal-gallery { margin: 0 -1.1rem 1.5rem; padding: 1rem 1.1rem 0; }

  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-brand { grid-column: auto; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
/* ---- LIGHTBOX ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 20000;
  display: none;
  flex-direction: column;
}
.lightbox.active { display: flex; }

.lightbox-close {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: 1rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.lightbox-track {
  flex: 1;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.lightbox-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  height: 100%;        /* add this */
  box-sizing: border-box;
}
.lightbox-slide img,
.lightbox-slide video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}
.lightbox-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  transition: background .2s ease, transform .2s ease;
  cursor: pointer;
}
.lightbox-dot.active {
  background: #E8822A;
  transform: scale(1.3);
}

.gallery-item { cursor: zoom-in; }


.modal-gallery-wrap {
  position: relative;
}
.modal-gallery-wrap:has(.modal-gallery:empty) { display: none; }

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.gallery-prev { left: 0.6rem; }
.gallery-next { right: 0.6rem; }
.gallery-nav:disabled { opacity: 0; pointer-events: none; }

/* ---- PWA ইনস্টল বাটন ---- */
/* ---- PWA ইনস্টল বাটন ---- */
.install-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  min-height: 40px;
  border: none;
  border-radius: 8px;
  background: #E8822A;
  color: #fff;
  font-family: 'Hind Siliguri', sans-serif;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s ease, transform .15s ease, opacity .2s ease, box-shadow .2s ease;
  box-shadow: 0 2px 8px rgba(232, 130, 42, .35);
}

.install-btn:hover {
  background: #d4711d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232, 130, 42, .45);
}

.install-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(232, 130, 42, .35);
}

.install-btn.hidden {
  display: none;
}

[data-theme="dark"] .install-btn {
  box-shadow: 0 2px 8px rgba(232, 130, 42, .25);
}

/* ---- মোবাইল টিউনিং (টেক্সট থাকবে, শুধু ছোট হবে) ---- */
@media (max-width: 600px) {
  .install-btn {
    padding: .5rem .8rem;
    font-size: .78rem;
    gap: .3rem;
  }
}

@media (max-width: 400px) {
  .install-btn {
    padding: .45rem .65rem;
    font-size: .72rem;
  }
}