:root {
  --bg-color: white;
  --card-bg: rgba(255, 255, 255, 0.95);
  --text-color: #333;
  --button-bg: #00796b;
  --button-hover: #004d40;
  --header-bg: rgba(0, 105, 92, 0.85);
  --footer-bg: rgba(0, 77, 64, 0.85);

  --main-title-bg-day: #f9f6f1;
  --main-title-text-day: #4b2e14;

  --main-title-bg-dark: #2b2b2b;
  --main-title-text-dark: #d7c7b9;
}

body.dark-mode {
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --text-color: #e0e0e0;
  --button-bg: #26a69a;
  --button-hover: #004d40;
  --header-bg: #263238;
  --footer-bg: #1a237e;

  --main-title-bg: var(--main-title-bg-dark);
  --main-title-text: var(--main-title-text-dark);
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background-size: cover;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color 0.4s ease, color 0.4s ease;

  --main-title-bg: var(--main-title-bg-day);
  --main-title-text: var(--main-title-text-day);
}

.main-title {
  position: relative;
  overflow: hidden;
  height: 200px; /* adjust height as needed */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  font-family: "Tiro Devanagari Sanskrit", serif;
}

.main-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("abc.jpeg") center/cover no-repeat;
  filter: blur(4px);
  transform: scale(1.1);
  z-index: -2; /* background layer */
}

.main-title::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35); /* overlay for contrast */
  z-index: -1; /* above image, below text */
}

.main-title h1,
.main-title p {
  margin: 0;
  z-index: 1; /* keep text above everything */
}

.dark-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--button-bg);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  z-index: 1000;
  font-weight: bold;
  font-size: 1em;
  transition: background-color 0.3s ease;
}

.dark-toggle:hover {
  background-color: var(--button-hover);
}

header {
  background-color: rgba(0, 105, 92, 0.7);
  background-size: cover;
  padding: 60px 20px;
  text-align: center;
  color: white;
  position: relative;
  z-index: 1;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 105, 92, 0.7);
  z-index: -1;
}

header h1 {
  margin: 0 0 10px;
  font-size: 2.2em;
}

header p {
  margin: 0;
  font-size: 1.1em;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 40px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: calc(33% - 20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card h2 {
  margin-top: 0;
  font-size: 1.5em;
  color: #00695c;
}

.card p {
  flex-grow: 1;
  margin: 10px 0 15px;
}

a.button {
  text-align: center;
  padding: 12px 18px;
  background-color: var(--button-bg);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}

a.button:hover {
  background-color: var(--button-hover);
}

footer {
  text-align: center;
  padding: 20px 10px;
  background-color: var(--footer-bg);
  color: white;
  margin-top: 40px;
}

footer form {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

footer input,
footer textarea {
  padding: 10px;
  border-radius: 5px;
  border: none;
}

footer button {
  padding: 10px;
  background-color: var(--button-bg);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

footer button:hover {
  background-color: var(--button-hover);
}

@media (max-width: 900px) {
  .card {
    width: calc(50% - 20px);
  }
}

@media (max-width: 600px) {
  .card {
    width: 100%;
  }
}
