/* Language Toggle */
.language-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: white;
  border-radius: 25px;
  padding: 8px 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 10px;
}

.lang-btn {
  background: none;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.lang-btn.active {
  background: #3498db;
  color: white;
}

.kannada-font {
  font-family: 'Noto Sans Kannada', sans-serif;
}

/* Language content styling - FIXED */
.en { display: block; }
.kn { display: none; font-family: 'Noto Sans Kannada', sans-serif; }

/* When body has kannada class, show Kannada content */
body.kannada .en { display: none; }
body.kannada .kn { display: block; }

/* ---------------- ROOT COLORS ---------------- */
:root {
  --teal-primary: #008080;
  --teal-dark: #004d4d;
  --teal-light: #00cccc;
  --orange-primary: #ff7f50;
  --orange-dark: #e65c35;
  --orange-light: #ff9a75;
  --white: #ffffff;
  --gray-light: #f5f7fa;
  --gray-medium: #e2e8f0;
  --gray-dark: #2c3e50;
  --cream-bg: #fff8dc;
  --shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  --transition: all 0.4s ease;
}

/* ... rest of your CSS remains the same ... */
/* ---------------- GLOBAL ---------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--cream-bg);
  color: var(--gray-dark);
  line-height: 1.7;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
}

p {
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Smooth scroll bar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--teal-primary), var(--orange-primary));
  border-radius: 6px;
}

::-webkit-scrollbar-track {
  background: #ddd;
}


/* ---------------- HEADER ---------------- */
.page-header {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
  overflow: hidden;
  margin-top: 0;
}

.header-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7));
  z-index: 0;
}

.header-content {
  max-width: 800px;
  z-index: 2;
  padding: 20px;
}

.page-header h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  animation: fadeInDown 1.2s ease;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.page-header p {
  font-size: 1.4rem;
  margin-bottom: 40px;
  animation: fadeInUp 1.2s ease;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.scroll-indicator {
  animation: bounce 2s infinite;
  color: var(--white);
  margin-top: 40px;
}

/* ---------------- SECTION BASE ---------------- */
.section {
  padding: 60px 0;
  position: relative;
  background: var(--cream-bg);
  scroll-margin-top: 80px;
}

.section.alt {
  background: var(--cream-bg);
}

.section.cream {
  background: var(--cream-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-primary), var(--orange-primary));
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  animation: bounce 2s infinite;
}

.section h2 {
  font-size: 2.8rem;
  margin-bottom: 15px;
  color: var(--teal-dark);
  position: relative;
  display: inline-block;
}

.section h2::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--teal-primary), var(--orange-primary));
}

.section-header p {
  font-size: 1.2rem;
  color: var(--gray-dark);
  max-width: 600px;
  margin: 0 auto;
}

.section-content {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.section-content.reverse {
  flex-direction: row-reverse;
}

.section-content .content {
  flex: 1;
  min-width: 300px;
}

.section-content .image-container {
  flex: 1;
  min-width: 300px;
}

.section-img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.6s ease;
}

.section-img:hover {
  transform: scale(1.03);
}

/* Features in Overview */
.features {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 25px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 15px;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.9rem;
}

.feature i {
  color: var(--teal-primary);
  font-size: 1.1rem;
}

/* ---------------- STATS GRID ---------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  margin: 40px 0;
}

.stat {
  background: var(--white);
  border-radius: 18px;
  padding: 25px 15px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.stat:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  font-size: 38px;
  margin-bottom: 15px;
  color: var(--teal-primary);
  transition: var(--transition);
}

.stat:hover .stat-icon {
  color: var(--orange-primary);
  transform: scale(1.2);
}

.stat h3 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: var(--teal-dark);
}

.stat p {
  color: var(--gray-dark);
  font-weight: 500;
  font-size: 0.9rem;
}

/* ---------------- DEMOGRAPHY ENHANCEMENTS ---------------- */
.demography-content {
  margin: 40px 0;
}

.population-growth {
  list-style: none;
  margin-top: 15px;
}

.population-growth li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--gray-medium);
}

.population-growth li:last-child {
  border-bottom: none;
}

.population-growth strong {
  color: var(--teal-primary);
  margin-right: 10px;
  min-width: 60px;
  display: inline-block;
}

/* Religion and Language Charts */
.religion-chart,
.language-chart {
  margin-top: 20px;
}

.religion-item,
.language-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 0;
}

.religion-label,
.language-label {
  min-width: 150px;
  font-weight: 500;
  color: var(--teal-dark);
}

.religion-bar,
.language-bar {
  flex-grow: 1;
  height: 20px;
  background: var(--gray-light);
  border-radius: 10px;
  margin: 0 15px;
  overflow: hidden;
  position: relative;
}

.religion-fill,
.language-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1.5s ease-in-out;
}

.religion-percent,
.language-percent {
  min-width: 50px;
  text-align: right;
  font-weight: 600;
  color: var(--teal-primary);
}

.additional-info {
  background: var(--white);
  padding: 25px;
  border-radius: 15px;
  margin-top: 40px;
  box-shadow: var(--shadow);
}

.additional-info h3 {
  color: var(--teal-primary);
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.additional-info p {
  margin-bottom: 15px;
  line-height: 1.6;
}

/* ---------------- TABLE ---------------- */
.table-container {
  overflow-x: auto;
  margin-top: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
}

thead {
  background: linear-gradient(to right, var(--teal-primary), var(--orange-primary));
  color: var(--white);
}

th, td {
  padding: 15px 20px;
  text-align: left;
}

th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

tbody tr {
  border-bottom: 1px solid var(--gray-medium);
  transition: var(--transition);
  background: var(--white);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(0, 128, 128, 0.08);
}

/* ---------------- CARDS GRID ---------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card:hover img {
  transform: scale(1.1);
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--teal-dark);
}

.card-content p {
  color: var(--gray-dark);
  font-size: 0.9rem;
}

/* ---------------- CUISINE SECTION ---------------- */
.cuisine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.cuisine-item {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.cuisine-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.cuisine-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.cuisine-content {
  padding: 20px;
}

.cuisine-content h3 {
  color: var(--teal-dark);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.cuisine-content p {
  color: var(--gray-dark);
  font-size: 0.9rem;
}

/* ---------------- CONTACT SECTION ---------------- */
.contact-content {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 25px;
}

.contact-item i {
  font-size: 24px;
  color: var(--teal-primary);
  margin-top: 5px;
}

.contact-item h4 {
  margin-bottom: 5px;
  color: var(--teal-dark);
}


/* ---------------- ANIMATIONS ---------------- */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 992px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 80px 30px 30px;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    transition: right 0.4s ease;
    z-index: 999;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .menu-btn {
    display: block;
  }
  
  .page-header h1 {
    font-size: 2.8rem;
  }
  
  .page-header p {
    font-size: 1.2rem;
  }
  
  .section h2 {
    font-size: 2.2rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section-content {
    flex-direction: column;
  }
  
  .section-content.reverse {
    flex-direction: column;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .religion-item,
  .language-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .religion-label,
  .language-label {
    margin-bottom: 8px;
  }
  
  .religion-bar,
  .language-bar {
    width: 100%;
    margin: 8px 0;
  }
  
  .religion-percent,
  .language-percent {
    align-self: flex-end;
  }
  
  .language-toggle {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
  }
  
  .lang-btn {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .page-header h1 {
    font-size: 2.2rem;
  }
  
  .page-header p {
    font-size: 1rem;
  }
  
  .section h2 {
    font-size: 1.8rem;
  }
  
  .stat h3 {
    font-size: 1.8rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}
/* Language content styling - FIXED */
.en { display: block; }
.kn { display: none; font-family: 'Noto Sans Kannada', sans-serif; }

/* When body has kannada class, show Kannada content */
body.kannada .en { display: none; }
body.kannada .kn { display: block; }
/* Language Toggle System - Fixed */
body:not(.kannada) .en {
    display: block;
}

body:not(.kannada) .kn {
    display: none;
}

body.kannada .en {
    display: none;
}

body.kannada .kn {
    display: block;
    font-family: 'Noto Sans Kannada', sans-serif;
}

/* Ensure proper font for Kannada content */
body.kannada {
    font-family: 'Noto Sans Kannada', sans-serif;
}
/* COMPACT SECTION SPACING */
.section {
    padding: 40px 0 !important;
    scroll-margin-top: 70px;
}

.section.alt, 
.section.cream {
    padding: 40px 0 !important;
}

.section-header {
    margin-bottom: 30px !important;
}

.section-content {
    gap: 25px !important;
    margin: 0 !important;
}

/* Compact stats grid */
.stats-grid {
    gap: 20px !important;
    margin: 25px 0 !important;
}

.stat {
    padding: 20px 15px !important;
}

/* Compact cards */
.cards-grid {
    gap: 20px !important;
    margin-top: 30px !important;
}

.card {
    margin-bottom: 0 !important;
}

/* Compact cuisine */
.cuisine-grid {
    gap: 20px !important;
    margin-top: 30px !important;
}

.cuisine-item {
    margin-bottom: 0 !important;
}

/* Reduce content spacing */
.content p,
.content ul,
.content ol {
    margin-bottom: 15px !important;
}

.population-growth li {
    padding: 6px 0 !important;
}

/* Compact table */
.table-container {
    margin-top: 25px !important;
}

/* Reduce header space */
.header-content {
    padding: 50px 20px !important;
}

.page-header h1 {
    margin-bottom: 15px !important;
}

.page-header p {
    margin-bottom: 25px !important;
}

/* Remove any extra margins */
br + br,
p + br {
    display: none !important;
}
/* Counter Animation Styles */
.counter {
    display: inline-block;
    font-weight: bold;
}

.stats-grid .stat {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.stats-grid .stat.visible {
    opacity: 1;
    transform: translateY(0);
}
/* White background for demography content */
.demography-content {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: var(--shadow);
}
.counter {
  transition: all 0.3s ease-out;
  display: inline-block;
}
/* Culture Section Specific Styles */
.culture .features {
  margin: 25px 0;
}

.culture .population-growth {
  margin: 20px 0;
}

.culture .population-growth li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--gray-medium);
}

.culture .population-growth li:last-child {
  border-bottom: none;
}

.culture .population-growth strong {
  color: var(--teal-primary);
  min-width: 120px;
  display: inline-block;
}