html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Source Sans Pro', sans-serif;
  background-color: #f5f7f9;
  color: #2e4f49;
  line-height: 1.65;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  padding-top: 220px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #056b62;
  color: #eaf2f1;
  text-align: center;
  padding: 1rem 1.5rem; /* Reduced top/bottom padding to minimize vertical space */
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
  font-family: 'Playfair Display', serif;
  z-index: 2000;
  display: flex; /* Use flexbox for better vertical alignment */
  flex-direction: column;
  align-items: center;
  min-height: 140px; /* Consistent min height to prevent shifting */
}

header img {
  width: 100px;
  margin-bottom: 0.3rem; /* Reduced margin for tighter vertical spacing */
  background: #fff;
  border-radius: 50%;
  padding: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}

header h1 {
  margin: 0;
  font-size: 2.8rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #daf7a6;
}

header .tagline {
  font-size: 1.2rem;
  margin-top: 0.2rem; /* Reduced margin for tighter spacing */
  margin-bottom: 0.5rem; /* Added bottom margin to separate from nav */
  font-style: italic;
  color: #c2f0d1;
  letter-spacing: 0.07em;
}

header nav {
  display: flex; /* Flexbox for nav */
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem; /* Consistent horizontal gaps */
}

header nav a {
  font-size: 1.2rem;
  font-weight: 700;
  color: #b2f6e4;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

header nav a:hover,
header nav a:focus {
  background-color: #aaf1d3;
  color: #00443e;
  box-shadow: 0 4px 6px rgba(0,67,58,0.5);
  outline: none;
}

header nav a.active {
  background-color: #86ddb5;
  color: #00462f;
  box-shadow: 0 4px 10px rgba(54,139,99,0.7);
}

section {
  background: #fff;
  padding: 2rem 1.5rem;
  margin-bottom: 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

section h2 {
  font-family: 'Playfair Display', serif;
  color: #056a64;
  font-size: 2.6rem;
  margin-bottom: 1rem;
  text-align: center;
}

section p, section ul {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #325f56;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

section ul {
  list-style: disc inside;
  padding-left: 0;
}

section ul li {
  margin-bottom: 0.7rem;
}

.splide__slide img {
  width: 100%;
  height: 350px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem 1.5rem;
}

.card {
  background-color: #e3f1f0;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(4, 121, 113, 0.2);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(5, 145, 138, 0.38);
}

.card h3 {
  font-family: 'Playfair Display', serif;
  color: #00594f;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.card p {
  flex-grow: 1;
  color: #30675a;
  font-size: 1.15rem;
  margin-bottom: 1.3rem;
}

.card a {
  align-self: start;
  color: #028471;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
  text-decoration: none;
}

.card a:hover {
  border-color: #054d46;
}

/* Responsive */
@media (max-width: 650px) {
  header h1 {
    font-size: 2.2rem;
  }

  header nav a {
    font-size: 1rem;
    padding: 6px 10px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

footer {
  background: #056b62;
  color: #eaf2f1;
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 3rem;
  font-family: 'Source Sans Pro', sans-serif;
}

footer a {
  color: #daf7a6;
  text-decoration: none;
  margin: 0 0.4rem;
  font-weight: 600;
}

footer a:hover,
footer a:focus {
  text-decoration: underline;
  outline: none;
}

a.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #056b62;
  color: #eaf2f1;
  padding: 8px 10px;
  z-index: 3000;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a.skip-link:focus {
  opacity: 1;
  outline: 2px solid #daf7a6;
}

/* Smooth scroll offset for anchor targeting */
section, [id] {
  scroll-margin-top: 140px;
}

/* Language toggle styles */
#language-switcher {
  position: absolute; /* Changed to absolute to position relative to header and avoid vertical overlap */
  top: 10px; /* Moved slightly higher to fit within header without overlapping title */
  right: 20px; /* Increased right margin for clearance */
  z-index: 3001;
  background-color: #056b62;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  user-select: none;
}

#language-switcher button {
  background: transparent;
  border: none;
  color: #eaf2f1;
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#language-switcher button.active,
#language-switcher button:hover,
#language-switcher button:focus {
  background-color: #86ddb5;
  color: #00462f;
  outline: none;
}

/* Language content toggling */
.english, .telugu {
  display: none; /* Hide both by default */
  direction: ltr;
  unicode-bidi: embed;
}

.english.active, .telugu.active {
  display: block; /* Show active one */
}
