/* =========================================================
   গল্পের বাহার - Episode Page (Updated Modern CSS)
   Fully Responsive + LiPurnoPran Font + Reduced Border Radius
========================================================= */

:root {
  --bg-color: #f9f6f0;
  --text-color: #2c2c2c;
  --accent-color: #8B3A62;
  --accent-hover: #6B2A4A;
  --button-bg: #2C3E50;
  --button-hover: #1E2A38;
  --card-bg: #f5f2ec;
  --border-color: #e8e0d5;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Noto Serif Bengali', 'Kalpurush', Georgia, serif;
  line-height: 1.9;
  margin: 0;
  padding: 0;
  font-size: 17px;
}

/* Breadcrumb */
.gb-breadcrumb-wrap {
  width: 100%;
  padding: 12px 20px 0;
}

.gb-breadcrumb {
  font-size: 14px;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gb-breadcrumb a {
  color: #555;
  text-decoration: none;
  transition: color 0.2s ease;
}

.gb-breadcrumb a:hover {
  color: var(--accent-color);
}

.gb-breadcrumb span {
  color: #aaa;
}

/* Grid Container - Fully Responsive */
.gridContainer {
  width: 100%;
  padding: 20px;
  display: grid;
  grid-template-columns: 260px minmax(0, 900px) 240px;
  justify-content: center;
  gap: 30px;
  align-items: start;
}

/* Header */
.header {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 10px;
  padding: 20px 0 10px;
}

.story-title {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--accent-color);
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.header p {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  color: #555;
  margin: 0;
  font-weight: 500;
}

body{
  user-select:none;
  -webkit-user-select:none;
  -moz-user-select:none;
  -ms-user-select:none;
}

.story-image {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-image:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.story-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.story-image:hover img {
  transform: scale(1.02);
}

/* Main Content Area */
.mainContent {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 42px 48px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

/* গল্পের মূল টেক্সট - LiPurnoPran Font + Larger Size */
.mainContent p {
  font-family: 'LiPurnoPran', 'Kalpurush', 'Noto Serif Bengali', Georgia, serif;
  font-size: clamp(1.15rem, 0.9vw + 0.8rem, 1.55rem);
  line-height: 2.00;
  margin-bottom: 1.45em;
  color: #2c2c2c;
  text-align: justify;
}

.mainContent p:last-child {
  margin-bottom: 0;
}

/* Top Navigation */
.topSwitch {
  margin-bottom: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-color);
}

.topNav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

/* Episode Buttons - Reduced Border Radius */
.ep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 0.8vw, 11px)
           clamp(14px, 1.8vw, 24px);
  font-size: clamp(13px, 0.9vw, 15px);
  font-weight: 600;
  color: #fff;
  background: var(--button-bg);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(44, 62, 80, 0.18);
  white-space: nowrap;
}

.ep-btn:hover {
  background: var(--button-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(44, 62, 80, 0.25);
  color: #fff;
}

.ep-btn.active {
  background: var(--accent-color);
  box-shadow: 0 4px 12px rgba(139, 58, 98, 0.3);
  pointer-events: none;
}

.ep-btn.next {
  background: var(--accent-color);
}

.ep-btn.next:hover {
  background: var(--accent-hover);
}

/* Episode List */
.episode-switch {
  margin-top: 55px;
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
}

.ep-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.ep-list .ep-btn {
  font-size: clamp(12px, 0.8vw, 14.5px);
  padding:
    clamp(7px, 0.7vw, 9px)
    clamp(12px, 1.4vw, 20px);
  background: #f1e9df;
  color: #444;
  box-shadow: none;
  border-radius: 8px;
}

.ep-list .ep-btn:hover {
  background: #e8dccf;
  color: #222;
}

.ep-list .ep-btn.active {
  background: var(--accent-color);
  color: white;
}

/* Mini Episode Navigation */
.mini-episode-nav {
  max-width: 1280px;
  margin: 45px auto 0px;
  padding: 14px 18px;
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.mini-nav-item {
  padding:
    clamp(7px, 0.8vw, 10px)
    clamp(12px, 1.6vw, 22px);

  font-size:
    clamp(12px, 0.8vw, 14.5px);
  font-weight: 600;
  color: #444;
  background: #f4ede3;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-nav-item:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
}

.mini-nav-item.back-btn {
  background: #e8dccf;
}

/* Comments Section */
#story-comments {
  margin-top: 55px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}


#theEndText {
  text-align: center;
  font-size: 26px;
}

@media (max-width: 1000px) {
    #theEndText {
        font-size: 19px;
    }
}

@media (max-width: 600px) {
    #theEndText {
        font-size: 17px;
    }
}


/* ========== RESPONSIVE ========== */

/* Tablet & Small Laptop */
@media (max-width: 1100px) {
  .gridContainer {
    grid-template-columns: 220px 1fr;
    gap: 25px;
  }
}

/* Mobile & Tablet */
@media (max-width: 768px) {
  .gridContainer {
    grid-template-columns: 1fr;
    padding: 15px;
    gap: 22px;
  }

  .leftBar {
    position: static;
    order: 2;
    max-width: 340px;
    margin: 0 auto;
  }

  .rightBar {
  order: 3;
}

  .mainContent {
    order: 1;
    padding: 30px 26px;
    max-width: 100%;
    border-radius: 10px;
  }

  .header {
    order: 0;
  }

.mainContent p {
  font-size: clamp(0.95rem, 1.5vw + 0.7rem, 1.08rem);
  line-height: 1.85;
}

.topNav,
.ep-list {
  justify-content: flex-start;
}

.upperNAV{
  margin-bottom:14px;
}

.ep-list{
  margin-top:14px;
}

  .mini-episode-nav {
    border-radius: 10px;
    padding: 12px;
    gap: 8px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .mainContent {
    padding: 20px 16px;
  }

  .story-title {
    font-size: 1.75rem;
  }

  .ep-btn {
    padding: 9px 16px;
    font-size: 14px;
    border-radius: 7px;
  }

  .mini-episode-nav {
    flex-direction: column;
    align-items: stretch;
    border-radius: 8px;
  }
  
  .mini-nav-item {
    width: 100%;
    text-align: center;
    border-radius: 7px;
  }
}

/* Extra Polish */
a {
  color: var(--accent-color);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

.ep-btn:focus,
.mini-nav-item:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.more-short-stories{
  background:#f5f2ec;
  border:1px solid #e7ddd1;
  border-radius:12px;
  padding:16px;
  margin-top:20px;
}

.more-short-stories h3{
  margin:0 0 16px;
  font-size:1.2rem;
  text-align:center;
}

.nearby-story-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.nearby-story-card{
  display:block;
  background:#ffffff;
  border:1px solid #e8e0d5;
  border-radius:10px;
  padding:12px;
  text-decoration:none;
  transition:background-color .2s ease,
             border-color .2s ease;
}

.nearby-story-card:hover{
  background:#faf7f2;
  border-color:#d8c9b6;
}

.nearby-story-title{
  display:block;
  font-size:1rem;
  font-weight:700;
  color:#2c2c2c;
  margin-bottom:4px;
}

.nearby-story-category{
  display:block;
  font-size:.85rem;
  color:#666;
}

@media (max-width: 768px){

  .more-short-stories h3{
    text-align:center;
  }

  .nearby-story-title{
    text-align:center;
  }

  .nearby-story-category{
    text-align:center;
  }

}