/* --- Alphabets Page Specific Styles --- */

.page-title {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 0.5rem;
}

.page-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2rem auto;
  color: #666;
}

section {
  margin-bottom: 3.5rem;
}

section h2 {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1.25rem;
}
.alphabet-grid.single {
  max-width: 125px;
  margin: 0 auto;
}

.letter-card {
  background: var(--text-light);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  text-align: center;
  padding: 1rem;
  font-size: 2rem;
  font-family: var(--tamil-font);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.letter-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow);
}

.letter-card span {
  color: var(--text-color);
}
.letter-card small {
  font-size: 1rem;
  color: #777;
  font-family: var(--english-font);
}

.audio-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--primary-color);
  margin-top: 10px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.audio-btn:hover {
  opacity: 1;
}
/* Pronunciation tooltip that appears on hover */
.letter-card::after {
  content: attr(data-pronunciation);
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 1rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 10;
}

/* Show the tooltip on hover */
.letter-card:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Quiz Section Styles */

#quiz-container {
  max-width: 400px;
  margin: auto;
}
.hidden {
  display: none !important;
}
#question-card {
  font-size: 3rem;
  padding: 2rem;
  margin: 1rem auto;
  background-color: #fff;
  border-radius: 12px;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
#options-container {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-top: 2rem;
}
.option-btn {
  background-color: #fff;
  color: #3498db;
  border: 2px solid #3498db;
  padding: 1rem;
  font-size: 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}
.option-btn:hover {
  background-color: #3498db;
  color: #fff;
}
.option-btn.correct {
  background-color: #2ecc71;
  color: white;
  border-color: #2ecc71;
}
.option-btn.wrong {
  background-color: #e74c3c;
  color: white;
  border-color: #e74c3c;
}
#result-container h3 {
  font-size: 2rem;
  color: #27ae60;
}
#result-container p {
  font-size: 1.5rem;
}
.cta-button {
  background: linear-gradient(to right, #ff6a00, #ee0979);
  color: #fff;
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
  margin-top: 1rem;
}
.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}
/* --- New Modern Card Styles --- */
.modern-info-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.info-card {
  background-color: var(--text-light);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border-left: 5px solid var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.info-card h3,
.info-card h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: var(--tamil-font);
  color: var(--primary-color);
}

.info-card p {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.info-card .example {
  font-weight: bold;
  margin-top: 1rem;
  background-color: var(--secondary-color);
  padding: 0.5rem;
  border-radius: 4px;
}
.info-card ul {
  padding-left: 0;
  margin-bottom: 1rem;
}
.info-card li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.info-card code,
.example {
  font-family: var(--tamil-font);
  font-size: 1.1rem;
}
/* Style for the formula cards in the irregular section */
.formula-card {
  background-color: #f1f3f5;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
  font-size: 1.5rem;
  font-weight: 500;
  color: #495057;
}

/* --- Writing practice section --- */
#writing-practice {
  text-align: center;
  background-color: var(--secondary-color);
  padding: 2rem;
  border-radius: var(--border-radius);
}
