/* === Global Resets === */
body {
  margin: 0;
  padding: 20px;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

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

/* === Header Section === */
.header {
  margin-bottom: 40px;
}

.title {
  font-size: 2.5rem;
  font-weight: bold;
}

.subtitle {
  font-size: 1.1rem;
  color: #666;
}

/* === Language Toggle === */
.lang-toggle {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.lang-toggle button {
  background-color: transparent;
  border: 1px solid #007bff;
  color: #007bff;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.lang-toggle button:hover {
  background-color: #007bff;
  color: white;
}

/* === Lesson Grid === */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.lesson-card {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 25px 15px;
  text-align: center;
  font-size: 1.1rem;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.lesson-card:hover {
  background-color:#f0f8ff;
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* === Footer === */
footer {
  margin-top: 60px;
  font-size: 0.9rem;
  color: #888;
}

/* === Progress Bar === */
#progress-bar {
  width: 100%;
  height: 10px;
  background-color: #e0e0e0;
  border-radius: 5px;
  margin-bottom: 20px;
}

#progress-fill {
  height: 100%;
  background-color: #007bff;
  border-radius: 5px;
  width: 0%;
  transition: width 0.4s ease-in-out;
}

.lesson-card.disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* === Pre/Post Test Container === */
.container {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* === Quiz Form Spacing === */
form#quizForm {
  margin-top: 20px;
}

form#quizForm label {
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
  color: #333;
}

form#quizForm input[type="radio"] {
  margin-right: 8px;
}

form#quizForm div.mb-4 {
  margin-bottom: 24px;
  text-align: left;
}

/* === Buttons === */
button[type="submit"] {
  padding: 10px 24px;
  font-size: 1rem;
  border-radius: 8px;
}

/* === Quiz Result Styling === */
#result {
  font-size: 1.25rem;
  padding: 16px;
  border-radius: 10px;
  font-weight: 500;
}

#result .text-success {
  color: #28a745;
}

#result .text-danger {
  color: #dc3545;
}

/* === Responsive Text === */
@media screen and (max-width: 600px) {
  h2 {
    font-size: 1.5rem;
  }

  button[type="submit"] {
    width: 100%;
  }
}

/* === Global Code Block Styling === */
pre {
  background-color: #f5f5f5;
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  font-size: 0.95em;
  line-height: 1.5;
  text-align: left;
  margin: 2em 0;
  border: 1px solid #ddd;
}

code {
  font-family: 'Courier New', Courier, monospace;
  color: #333;
  white-space: pre-wrap;
  display: block;
}

/* === Task Content Section Formatting === */
.task-content {
  text-align: left;
  padding: 20px;
}

/* Keep key headings centered */
.task-content h1,
.task-content h2,
.task-content h3.title,
.task-content p.subtitle {
  text-align: center;
}

/* Step formatting using <p class="step"> */
.task-content p.step {
  padding-left: 1.2em;
  text-indent: -1.2em;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Section spacing */
.task-content .section {
  margin-bottom: 2em;
}

.task-content h3 {
  margin-top: 2em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.glossary-term-ref {
  position: relative;
  cursor: help;
  border-bottom: 1px dashed #007bff;
}

/* .glossary-term-ref::after {
  content: attr(data-definition);
  position: absolute;
  bottom: 125%;
  left: 0;
  background-color: #333;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.glossary-term-ref:hover::after {
  opacity: 1;
} */

a.glossary-term-ref {
  color: #8e5757;          /* gray color */
  text-decoration: none;
  border-bottom: 1px dotted #aaa; /* subtle indicator it's interactive */
  cursor: help;
}

a.glossary-term-ref:hover {
  color: #333;          /* darker gray on hover */
  border-bottom-color: #666;
}

/* Login card padding and spacing */
.login-card {
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  background-color: #fff;
}


.main_title {
  margin-top: 2rem;
}


.hover {
  transition: transform 0.4s ease-in-out;
  /* base scale */
  transform: scale(1);
}
.hover:hover {
  /* width: 200%;
  max-width: 800px;
  margin: 0 auto;
  display: block;
  transition: all 0.3s ease-in-out; */
  transform: scale(1.5) translate(10%, 5%);
}


iframe {
  /* margin-top: 2rem; */
  /* margin-bottom: 1rem; */
  /* padding: 1rem; */
  /* border-radius: 2rem; */
}

/* ============================================
   Arduino Course - arduino-course.css
   All classes prefixed with ac- to avoid conflicts
   ============================================ */

/* NAV */
.ac-nav {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.ac-nav-logo {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #1a1a1a;
  text-decoration: none;
}

.ac-nav-logo span { color: #008184; }

.ac-nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ac-lang-btn {
  background: none;
  border: 1px solid #d1d5db;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}

.ac-lang-btn:hover { border-color: #008184; color: #008184; }

.ac-progress-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a1a1a;
  text-decoration: none;
  border: 1.5px solid #1a1a1a;
  padding: 0.3rem 1rem;
  border-radius: 100px;
  transition: all 0.15s;
}

.ac-progress-btn:hover { background: #1a1a1a; color: #fff; }

/* HERO GRID */
.ac-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  min-height: 380px;
}

.ac-hero-card {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ac-hero-card--dark  { background: #2d2d2d; }
.ac-hero-card--teal  { background: #008184; }
.ac-hero-card--orange { background: #c8441a; }

.ac-hero-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 1.5rem;
  width: fit-content;
  background: #c8e600;
  color: #1a1a1a;
}

.ac-hero-card h2 {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.ac-hero-card p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.ac-hero-btn {
  display: inline-block;
  border: 1.5px solid rgba(255,255,255,0.6);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.55rem 1.25rem;
  border-radius: 100px;
  text-decoration: none;
  width: fit-content;
  transition: all 0.2s;
}

.ac-hero-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* LESSONS SECTION */
.ac-lessons-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.ac-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ac-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: #008184;
  color: #fff;
  padding: 0.2rem 0.65rem;
  border-radius: 3px;
}

.ac-section-label--s2 { background: #c8441a; }

.ac-section-title {
  font-family: 'Merriweather', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* LESSON GRID */
.ac-lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: #e5e7eb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 3rem;
}

.ac-lesson-grid a {
  text-decoration: none;
  display: block;
}

.ac-lesson-card {
  background: #fff;
  padding: 1.5rem;
  position: relative;
  transition: background 0.15s;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ac-lesson-card:hover { background: #f0fafa; cursor: pointer; }

.ac-lesson-card--locked { opacity: 0.45; }
.ac-lesson-card--locked:hover { background: #fff; cursor: not-allowed; }

.ac-lesson-num {
  font-size: 0.65rem;
  font-weight: 700;
  color: #008184;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.ac-lesson-title {
  font-family: 'Merriweather', serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
}

.ac-lock-icon {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  font-size: 0.75rem;
  color: #d1d5db;
}

/* PREMIUM BANNER */
.ac-premium-block {
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.ac-premium-block p {
  font-size: 0.875rem;
  font-weight: 600;
  color: #92400e;
  margin: 0;
}

.ac-premium-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: #c8441a;
  border: 1.5px solid #c8441a;
  padding: 0.3rem 1rem;
  border-radius: 100px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}

.ac-premium-link:hover { background: #c8441a; color: #fff; }

/* DIVIDER */
.ac-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0 0 3rem;
}

/* FOOTER */
.ac-footer {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 1.5rem 2rem;
  text-align: center;
}

.ac-footer p { font-size: 0.8rem; color: #9ca3af; margin: 0; }
.ac-footer a { color: #008184; text-decoration: none; font-weight: 600; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .ac-hero-grid { grid-template-columns: 1fr; }
  .ac-hero-card { min-height: 260px; }
  .ac-lesson-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .ac-lesson-grid { grid-template-columns: 1fr 1fr; }
  .ac-nav { padding: 0 1rem; }
}