/* ==========================================================================
   NAMASMARANAM - Modern Clean Responsive Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --primary: #8b1d24;
  --primary-light: #b82d36;
  --gold: #d4af37;
  --gold-light: #f3e5ab;
  --dark: #121316;
  --dark-surface: #1c1d22;
  --text-light: #ffffff;
  --text-muted: #b8bcc8;
  --text-dark: #222222;
  --bg-light: #fdfbf7;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.25);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Lora', serif;
  font-weight: 600;
  letter-spacing: normal;
}

.lora {
  font-family: 'Lora', serif;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Containers */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 38px;
  width: auto;
}

.logo-text {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: #333333;
  transition: var(--transition);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-dropdown {
  position: relative;
}

.lang-btn {
  background: #f0f2f5;
  color: #333;
  border: 1px solid #e1e4e8;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.lang-btn:hover {
  background: #e2e6eb;
}

.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  list-style: none;
  min-width: 150px;
  padding: 8px 0;
  display: none;
}

.lang-dropdown:hover .lang-menu {
  display: block;
}

.lang-menu a {
  display: block;
  padding: 8px 18px;
  font-size: 14px;
  color: #333;
  transition: var(--transition);
}

.lang-menu a:hover {
  background: #f7f8fa;
  color: var(--primary);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--dark);
  cursor: pointer;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: url('../images/balaji.png') center center / cover no-repeat;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 19, 22, 0.75) 0%, rgba(18, 19, 22, 0.85) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
}

.hero-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
  padding: 8px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-family: 'Lora', serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.4;
  color: #ffffff;
  margin-bottom: 24px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.hero-desc {
  font-family: 'Lora', serif;
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 820px;
  margin: 0 auto 36px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: var(--gold);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  transform: translateY(-2px);
}

/* ==========================================================================
   ABOUT NAMASMARANAM SECTION
   ========================================================================== */
.section-about {
  position: relative;
  padding: 100px 0;
  background: #15161a;
  overflow: hidden;
}

.video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  z-index: 0;
}

.about-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.about-text h2 {
  font-size: 32px;
  line-height: 1.4;
  margin-bottom: 24px;
  color: #ffffff;
}

.about-text p {
  font-family: 'Lora', serif;
  font-size: 17px;
  line-height: 1.8;
  color: #d1d5db;
  margin-bottom: 32px;
}

.lang-pills-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-light);
  margin-bottom: 16px;
  font-weight: 600;
}

.lang-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lang-pill {
  padding: 10px 24px;
  background: #ffffff;
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid transparent;
}

.lang-pill:hover {
  background: var(--dark);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.about-image-wrapper {
  position: relative;
  text-align: center;
}

.arch-image {
  width: 100%;
  max-width: 440px;
  border-radius: 220px 220px 16px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border: 3px solid rgba(212, 175, 55, 0.4);
  display: inline-block;
  transition: var(--transition);
}

.arch-image:hover {
  transform: scale(1.02);
  border-color: var(--gold);
}

/* ==========================================================================
   EBOOKS SECTION
   ========================================================================== */
.section-ebooks {
  padding: 100px 0;
  background: #111215;
  text-align: center;
}

.section-header {
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-tag {
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-title {
  font-size: 36px;
  color: #ffffff;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 16px;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.book-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.book-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.book-cover {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.book-card h3 {
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.4;
}

.book-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ==========================================================================
   ABOUT PAGE CONTENT & TABS
   ========================================================================== */
.about-page-header {
  padding: 140px 0 60px;
  text-align: center;
  background: #18191e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.tab-btn.active, .tab-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.story-section {
  padding: 70px 0;
}

.story-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 50px;
  align-items: flex-start;
}

.story-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 36px;
  margin-bottom: 28px;
}

.story-card h3 {
  font-size: 22px;
  color: var(--gold-light);
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 10px;
}

.story-card p {
  font-family: 'Lora', serif;
  font-size: 16px;
  line-height: 1.9;
  color: #d8dae0;
  margin-bottom: 16px;
}

.story-sidebar {
  position: sticky;
  top: 100px;
}

.vedavalli-img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(212, 175, 55, 0.3);
  margin-bottom: 20px;
}

/* ==========================================================================
   EBOOK READER FULLSCREEN
   ========================================================================== */
.reader-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #0f1013;
}

.reader-toolbar {
  height: 64px;
  background: #18191e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10;
}

.reader-left, .reader-center, .reader-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reader-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.reader-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.reader-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: auto;
}

.book-page-image {
  max-height: calc(100vh - 120px);
  max-width: 90%;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  background: #fff;
  transition: opacity 0.2s ease;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: #0d0e11;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 50px 0 30px;
  text-align: center;
}

.footer-logo {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 14px;
  transition: var(--transition);
}

.footer-nav a:hover {
  color: var(--gold);
}

.footer-copy {
  color: #666;
  font-size: 13px;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 900px) {
  .nav-menu {
    display: none;
  }
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: #ffffff;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    gap: 16px;
  }
  .mobile-toggle {
    display: block;
  }
  .about-grid, .story-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-title {
    font-size: 28px;
  }
  .hero-desc {
    font-size: 16px;
  }
}


/* ==========================================================================
   GLOBAL LANGUAGE MODAL & STYLING
   ========================================================================== */

.lang-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.lang-modal.active {
  display: flex;
}

.lang-modal-content {
  background: #18191e;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-md);
  max-width: 780px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}

.lang-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-modal-header h3 {
  color: #ffffff;
  font-size: 18px;
  margin: 0;
}

.lang-modal-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.lang-modal-close:hover {
  color: var(--primary);
}

.lang-modal-body {
  padding: 24px;
}

.lang-group-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 16px;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.lang-select-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  color: #ffffff;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lang-select-btn strong {
  font-size: 15px;
  color: #ffffff;
}

.lang-select-btn span {
  font-size: 12px;
  color: #a0a4b0;
}

.lang-select-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 29, 36, 0.4);
}

/* Hide Google Translate top banner */
.goog-te-banner-frame.skiptranslate, .goog-te-banner-frame {
  display: none !important;
}
body {
  top: 0px !important;
}
#goog-gt-tt, .goog-te-balloon-frame {
  display: none !important;
}
.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}
