:root {
  --primary: #00509D;
  --accent: #FDC500;
  --bg: #ffffff;
  --text: #0d0d0d;
  --secondary-text:#252525;
  --muted: #313131;
  --sectionbg: #d9e5f1;
  --onaccentbg: #332700;
  --primarybg: #99b9d8;
  --onprimarybg: #00203f;
  --onprimary:#ffffff;
  --primary-hover:#00264c;
  --primary-active:#336698;
  --accentbg: #fee899;
  --onaccent:#121212;
  --accent-hover:#fdd133;
  --accent-active:#fedc66;
  --bg:#f1f1f1;
  --border:#767676;
}

* {
  box-sizing: border-box;
  margin: 0;
  font-family: system-ui, sans-serif;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif, Arial, Helvetica;
  color: var(--text);
  line-height: 1.6;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.loader-logo {
  width: 180px;
  max-width: 60vw;
}

.loader-ring {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(0, 80, 157, 0.15);
  border-top-color: var(--primary);
  animation: loader-spin 0.9s linear infinite;
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}
h1,h2,h3,h4,h5,h6{
  font-family: 'Lora', serif;
}

.body-container{
    background-color:var(--bg);
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
}

h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}

h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}

p {
  margin-bottom: 1.25rem;
}
 .description{font-size: 1.25rem;}

/* TABLES */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

th,td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.75rem;
  text-align: left;
}

th {
  background: #f3f4f6;
}


/* Header */
#header{
  margin: 0;
  padding: 0;
  box-shadow: 0 6px 22px rgba(0,0,0,0.05);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 2rem;
}

.logo {
  font-weight: 700;
}
 /* Sidenav */
.nav-desktop {
 background: #ffffff;
 padding:20px;
}

.nav-links{
  padding-top: 50px;
}
.nav-btn-container {
  margin-top: 20px; 
  padding-top:20px;
  
}

.nav-desktop a, .side-nav .nav-links a {
  text-decoration: none;
  display: inline-block;
  padding:10px;
  color: var(--text);
}

.nav-desktop a.active, .side-nav .nav-links a.active {
  font-weight: 600;
  border-bottom: 2px solid var(--primary);
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
}

/* Hero */
.hero {
  background: var(--accent);
  /*background-image: url(images/banner-bg.png);*/
  background-repeat: no-repeat;
  background-size:100% 100%;
  text-align: center;
  padding: 10rem 10rem;
  min-height: 400px;
}

.hero .subtitle{
   font-size: 1.5rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 500;
}

.hero .description{
  text-align: center;
  font-size: 1.2rem;
}

/* Sections */
.section {
  max-width: 1380px;
  margin: auto;
  padding: 0;
  margin-top:5rem;
}

.blog-section {
  max-width: 100%;
  background-color:var(--sectionbg);
  /* margin-top:5rem; */
  /* margin-bottom:2rem; */
  padding:2rem;  
}

.section h2, .blog-section h2{
  text-align:center;
  font-size: 2rem;
  font-weight: 500;
}
.section-desc {
  text-align: center;
  color: var(--muted);
  margin: 0;
}

/* Cards */



.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 2fr));
  gap: 1rem;
  max-width: 90%;
  margin: auto;
  padding: 40px 20px;
  
  
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 2fr));
  gap: 1rem;
  max-width: 90%;
  margin: auto;
  padding: 40px 20px;
 
}



/* Card Base */
.short-story-card {
  display: flex;
  gap: 16px;
  background: white;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.short-story-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}

/* Card wrapper */
.story-card {
 display: flex;
 flex-direction: row;     /* image left, text right */
  gap: 1.25rem;
  align-items: flex-start;
  background: white;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Image */
.story-card .card-image {
 flex: 0 0 180px;
}
.story-card .card-image img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

/* Content */
.story-content {
   flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.story-content h3 {
    margin: 0;
  }
.story-content p {
    margin-bottom: 0.5rem;
  }

.story-link {
  color: inherit;
  text-decoration: none;
}

.story-link:hover {
  text-decoration: underline;
}

.blog-card {
  display: flex;
  gap: 16px;
  background: white;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.05);
  font-family: Inter, system-ui, sans-serif;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}


/* Card Image */
.short-story-card .card-image img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
 
}

.blog-grid .blog-card .card-image img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 14px;
 
}


/* Content */
.short-story-card .card-content {
  flex: 1;
}
.card-body {
  flex: 1;
}
.label-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap; /* prevents overflow on small screens */
}


.badge {
  display: inline-flex; 
  width: fit-content; 
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text);
  border:#e0e0e0 1px solid;
  min-width:80px;
  text-align: center;
}

.category1{
  background: #e3fde6;
}

.category2{
  background: #fde9d9;
}

.category3{
  background: #d6fbf3;
}
.category4{
  background: #ffd9db;
}

.category5{
  background: #d3f1fb;
}

.category6{
  background: #f9e6f6;
}
.category7 {
  background: #ece3f9;
}

.category8 {
  background: #dae7fa;
}

.category9 {
  background: #fdfceb;
}



.short-story-card .title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: #111827;
}

.short-story-card .excerpt {
  font-size: 14px;
  color:var(--secondary-text);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
}

.meta {
  font-size: 0.9rem;
  color: #666;
  display: flex;
  justify-content: space-between;
}

.meta-icons {
  display: flex;
  gap: 16px;
  position: relative;
}

.meta-icons img {
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.share-icon-btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  line-height: 0;
  cursor: pointer;
}

.story-share {
  position: relative;
}

.story-share-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 150px;
  background: #fff;
  border: 1px solid #e6ebf1;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  padding: 6px;
  z-index: 20;
}

.story-share-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.story-share-item:hover {
  background: #edf4fb;
}

.story-share-item svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}



/* Buttons */
button{
  border: 0px;
  background-color: var(--primary);
}

.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--primary);
  text-align: center;
}

.btn.primary {
  background: var(--primary);
  color: var(--onprimary);
  text-decoration: none;
}


/* View All Button */
.view-all-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.view-all-btn {
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--primary);
  color:var(--onprimary);
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.view-all-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.view-all-btn:active {
  background: var(--primary-active);
  transform: translateY(-1px);
}

.card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #eee;
}

.card .card-image {
  width:150px;
  height: 150px;
}

/* Tags */
.tag {
  display: inline-flex; 
  width: fit-content; 
  font-size: 0.75rem;
  background: var(--primary20);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  color: var(--onprimary)
}

.tag.subtle {
  background: var(--accent);
  color: var(--onaccent);
  font-size: 11px;
}

/* Breadcrumb */
.breadcrumb {
  max-width: 1100px;
  margin: 0.5rem 2rem;
  color: var(--primary);
  font-weight: 600;
}
.breadcrumb a {
  color: var(--primary);
} 

.breadcrumb a:visited{
  color: var(--muted);
}

/* Stories */
.page-header {
  text-align: center;
  padding: 0;
  margin: 0;
}


.filters, .stories-list, .glossary {
  max-width: 1200px;
  margin: auto;
  padding: 2rem;
}
.stories-list, .glossary {
background-color: var(--bg);
}

.story-row, .glossary-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
}
.alphabets{
  display: flex;
  flex-wrap: wrap;  /* allows wrapping when needed */
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0;
}
.alphabets .btn {
  min-width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  font-weight: 600;
  line-height: 40px;
  text-align: center;
}
.alphabets a {text-decoration: none;}
.alphabets .alphabet-btn.active {
  background: var(--primary);
  color: var(--onprimary);
  border-color: var(--primary);
}

.glossary-story-count {
  display: inline-block;
  text-decoration: none;
  font-size: 0.82rem;
  color: var(--onprimary);
  background: var(--primary);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.story-detail-wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.story-detail-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.05);
  padding: 1.25rem;
}

.story-detail-head {
  margin-bottom: 1rem;
}

.story-detail-title {
  margin: 0.5rem 0 0.75rem;
  font-size: 2.2rem;
  line-height: 1.25;
}

.story-detail-summary {
  margin-bottom: 0.75rem;
  color: var(--secondary-text);
}

.story-detail-banner img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 12px;
}

.story-detail-content {
  margin-top: 1.25rem;
  font-size: 1.05rem;
}

.story-detail-content p {
  margin-bottom: 1rem;
}

.story-detail-content ul {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.story-detail-content td,
.story-detail-content th {
  background: #fff;
}

.glossary-highlight {
  background: #ffe48a;
  color: #2b1f00;
  border-radius: 4px;
  padding: 0 3px;
}

.glossary-highlight.has-tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.glossary-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  background: #0b1220;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: normal;
  width: max-content;
  max-width: 280px;
  z-index: 60;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.glossary-tip::after {
  content: '';
  position: absolute;
  left: calc(50% - 6px);
  top: 100%;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #0b1220;
}

.glossary-highlight.has-tooltip:hover .glossary-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.story-detail-media img {
  width: 100%;
  border-radius: 12px;
}

.story-detail-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-bottom: 1rem;
}

.story-detail-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

.story-detail-quote {
  border-left: 4px solid var(--primary);
  background: #f8fbff;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0 1rem;
}

.story-hr-label {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.story-related {
  margin-top: 1.5rem;
}

.story-related h2 {
  margin-left: 0;
  margin-bottom: 0.75rem;
}
/* Side Nav */
.side-nav {
  position: fixed;
  left: -260px;
  top: 0;
  width: 260px;
  height: 100%;
  background: #fff;
  padding: 2rem;
  transition: 0.3s;
  z-index: 1000;
}

.side-nav.open {
  left: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  float: right;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
}

.overlay.show {
  display: block;
}

/* Form Components */
input{min-height: 48px;
border-radius: 8px;
padding: 8px;
border: 1px solid var(--border);
font-size: 1rem;
}

.search{
  width: 100%;
}

.filter-group{
 margin-top:20px;
 margin-bottom:20px;
 margin-left: 0px;
}

.filter-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.filter-reset-btn:hover {
  background: var(--primary);
  color: var(--onprimary);
}

select {
  height: 48px;
  border-radius: 8px;
  padding-right: 16px;
  margin-right:16px;
  font-size: 1rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  
}



/* Responsive */

/* Large laptops → 3 columns */
@media (max-width: 1280px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablets → 2 columns */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}




@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .side-nav .nav-links a {
    display: block;
  }
  .hamburger {
    display: block;
  }
  .story-card {
    flex-direction: row;
    gap: 1.25rem;
  }

  .card-image {
    flex: 0 0 180px;
  }

  .card-image img {
    height: 120px;
  }

  .story-content {
    flex: 1;
  }

  .story-card {
    flex-direction: column;  /* stack image on top */
  }

  .card-image {
    width: 100%;
  }

  .card-image img {
    height: 200px;
  }
  
}



/* Mobile → 1 column */
@media (max-width: 640px)
 {
  .story-detail-title {
    font-size: 1.6rem;
  }

  .story-detail-wrap {
    padding: 0.5rem 0.5rem 1.5rem;
  }

  .story-detail-card {
    padding: 0.9rem;
  }

  /* Hero */
.hero {
  padding: 3rem 3rem;
}

.hero .subtitle{
   font-size: 1 rem;
}

.hero h1 {
  font-size: 2rem;
}

.hero .description{
  text-align: center;
  font-size: 0.8rem;
}

  .section {
  max-width: 1100px;
  margin:0rem;
  padding: 0rem;
  margin-bottom:2rem;
  padding-bottom:2rem;
  padding-top:2rem;
  }
  .blog-section{
  max-width: 100%;
  background-color:var(--sectionbg);
  margin:0rem;
  padding: 0rem;
  margin-bottom:2rem;
  padding-bottom:2rem;
  padding-top:2rem;
}



  .short-story-card {
    flex-direction: column;
  }
  .short-story-card .card-image img {
    width: 100%;
    height: 180px;
  }
  .blog-card .card-image img {
    width: 100% !important;
    height: 180px;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }

  .alphabets {
    gap: 0.4rem;
  }

  .alphabets .btn {
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 0.85rem;
  }
}
