/* ======================= */
/* Base Styles & Flexing   */
/* ======================= */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;         /* This replaces the old height: 100%; rule */
  margin: 0px;
  background-color: #fff5d5;
  color: #263238;
  line-height: 1.5;
  font-family: Arial, sans-serif;
}

main {
  flex: 1;
}

p {
  margin-bottom: 1.2em;
}


/* ======================= */
/* Header Structure        */
/* ======================= */

header {
  background-color: #263238;
  text-align: center;
  color: #f2f2f2;
}

/* Banner area (Title + Sub-nav) - scrolls up normally */
.header-banner {
  padding: 20px 20px 10px 20px;
}

.site-title {
  font-size: 2.5em;
  font-weight: bold;
  color: white;
  text-decoration: none;
  margin-bottom: 10px;
  display: inline-block;
}

.sub-nav {
  color: white;
  font-size: 1em;
}

.sub-nav span,
.sub-nav a {
  color: white;
  text-decoration: none;
}

.sub-nav a:hover {
  text-decoration: underline;
}

/* Sticky Button Bar - locks to the top of screen when scrolled to */
.sticky-nav-bar {
  position: sticky;
  top: 0px;
  background-color: #263238; 
  padding: 10px 20px 15px 20px;
  z-index: 1000;
  border-bottom: 1px solid #37474f; 
}


/* ======================= */
/* Header Navigation Boxes */
/* ======================= */

.header-nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.nav-box {
  display: inline-block;
  padding: 6px 14px;
  background-color: #37474f;
  color: #f2f2f2;
  border: 1px solid #546e7a;
  border-radius: 4px;
  font-size: 0.85em;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav-box:hover {
  background-color: #455a64;
  border-color: #90a4ae;
  color: #ffffff;
  text-decoration: none;
}


/* ======================= */
/* Essay                   */
/* ======================= */

.small-biography-section {
  padding: 20px;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  margin: 20px auto;
  max-width: 800px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.small-biography-section h2 {
  margin-top: 0;
}

.small-biography-section a {
  color: #333;
  font-weight: bold;
  text-decoration: none;
}

/* ======================= */
/* Index                   */
/* ======================= */

.essay-index {
  padding: 20px;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  margin: 20px auto;
  max-width: 500px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.essay-index h2 {
  margin-top: 0;
}

.essay-index a {
  color: #333;
  font-weight: bold;
  text-decoration: none;
}
/* ======================= */
/* Gallery Layout & Images */
/* ======================= */

.gallery-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  text-align: center;
}

.gallery-section h2 {
  font-size: 1.8em;
  color: #263238;
  margin-bottom: 25px;
}

/* Creates a responsive grid without needing media queries */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 30px 0;
}

/* Forces images to maintain uniform aspect ratios and sizes nicely */
.gallery-grid img {
  width: 100%;
  height: 200px;             /* Change to desired height (e.g., 200px for landscape grid) */
  object-fit: cover;         /* Crops the image center to prevent stretching/distortion */
  border-radius: 6px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: block;
}

/* Subtle hover interaction */
.gallery-grid img:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
}


/* ======================= */
/* Pagination Buttons      */
/* ======================= */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 25px 0;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.9em;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Standard links */
.pagination a {
  background-color: #ffffff;
  color: #263238;
  border: 1px solid #dcd3b8; /* Soft border coordinating with the cream bg */
}

.pagination a:hover {
  background-color: #263238;
  color: #fff5d5;
  border-color: #263238;
}

/* Current active page styling */
.pagination span.current {
  background-color: #ff605b; /* Accent red color from Sanskrit text rule */
  color: #ffffff;
  border: 1px solid #ff605b;
  font-weight: bold;
}

/* Spacer dots (...) */
.pagination span:not(.current) {
  border: 1px solid transparent;
  color: #777;
  padding: 8px 4px;
}
/* ======================= */
/* Sanskrit Text Styles    */
/* ======================= */

.sanskrit {
  font-style: italic;
}

main .sanskrit {
  color: # ff605b;
}

h1 .sanskrit,
h2 .sanskrit,
h3 .sanskrit,
h4 .sanskrit,
h5 .sanskrit,
h6 .sanskrit {
  color: inherit;
  font-style: inherit;
}

header span[lang="sa-Latn"]{
  font-style: normal;
  letter-spacing: 0.02em;
}

.site-footer span[lang="sa-Latn"]{
  font-style: normal;
  letter-spacing: 0.02em;
}

nav .sanskrit {
  font-style: inherit;
}



/* ======================= */
/* Footer                  */
/* ======================= */

.site-footer {
  background-color: #263238;
  color: #f2f2f2;
  padding: 40px 20px;
}

.footer-bottom {
  text-align: center;
  font-size: 0.9em;
  color: #aaa; 
}

.footer-bottom p {
  margin: 0 0 4px 0;
  line-height: 1.35;
}