/* ============================================
   MAPYO — Mar Addai Parish Youth Group
   ============================================ */

:root {
  /* Mar Addai Parish palette — matched to maraddai.org */
  --bg: #ffffff;
  --bg-alt: #e7d9cb;
  --bg-section: #f5f0ea;
  --text: #000000;
  --text-muted: #5a5a5a;
  --text-soft: rgba(0, 0, 0, 0.65);
  --accent: #3d4435;
  --accent-light: #4f5645;
  --accent-dark: #2e3329;
  --accent-secondary: #c2c8cc;
  --cream: #e7d9cb;

  /* Legacy variable aliases */
  --purple: var(--bg);
  --purple-light: var(--bg-alt);
  --purple-dark: var(--bg-section);
  --gold: var(--accent);
  --gold-light: var(--accent-light);
  --gold-dark: var(--accent-dark);
  --white: var(--text);
  --gray: var(--text-muted);
  --dark: #ffffff;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'Almarai', system-ui, sans-serif;
  --font-display: 'Libre Baskerville', Georgia, serif;

  --surface: rgba(255, 255, 255, 0.8);
  --surface-solid: #ffffff;
  --surface-hover: rgba(61, 68, 53, 0.1);
  --surface-accent: rgba(61, 68, 53, 0.08);
  --surface-accent-strong: rgba(61, 68, 53, 0.15);
  --border: rgba(61, 68, 53, 0.12);
  --border-strong: rgba(61, 68, 53, 0.2);
  --border-subtle: rgba(61, 68, 53, 0.1);
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-bg-scrolled: rgba(255, 255, 255, 0.97);
  --nav-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
  --nav-shadow-scrolled: 0 2px 20px rgba(0, 0, 0, 0.08);
  --hero-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(231, 217, 203, 0.75) 50%, rgba(231, 217, 203, 0.92) 100%);
  --btn-text: #ffffff;
  --footer-bg: #3d4435;
  --footer-text: rgba(255, 255, 255, 0.75);
  --footer-text-muted: rgba(255, 255, 255, 0.55);
  --text-body: rgba(0, 0, 0, 0.8);
  --text-body-soft: rgba(0, 0, 0, 0.65);
  --text-body-faint: rgba(0, 0, 0, 0.6);
  --breadcrumb-sep: rgba(90, 90, 90, 0.4);
  --ring-track: rgba(255, 255, 255, 0.08);
  color-scheme: light;

}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--nav-shadow);
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.nav.scrolled {
  background: var(--nav-bg-scrolled);
  box-shadow: var(--nav-shadow-scrolled);
  padding: 0;
}

.nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
  line-height: 1.3;
  max-width: min(42vw, 220px);
  transition: opacity var(--transition);
}

.nav__logo:hover {
  opacity: 0.8;
}

.nav__links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.85;
  transition: opacity var(--transition), color var(--transition);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  opacity: 1;
  color: var(--gold);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}

.nav__toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/hero-bg.svg');
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 8s ease-out;
}

.hero:hover .hero__bg {
  transform: scale(1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
  max-width: 700px;
}

.hero__eyebrow {
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 400;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text);
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-soft);
  margin-bottom: 40px;
  font-weight: 400;
}

.hero__cta {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: var(--btn-text);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 50px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.hero__cta:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61, 68, 53, 0.2);
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  opacity: 0.5;
  animation: bob 2s ease-in-out infinite;
}

.hero__scroll span {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ---- Info Card ---- */
.info {
  padding: 80px 0;
  margin-top: -60px;
  position: relative;
  z-index: 3;
}

.info__card {
  background: var(--bg-section);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.info__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  color: var(--gold);
}

.info__icon svg {
  width: 100%;
  height: 100%;
}

.info__card h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: 32px;
  color: var(--gold);
}

.info__details {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

.info__detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info__label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
}

.info__value {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--white);
}

/* ---- Section Headers ---- */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--gold);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-body-soft);
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Bible Studies ---- */
.studies {
  padding: 100px 0;
  background: var(--bg-alt);
}

.study-group {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.study-group:hover {
  border-color: var(--border-strong);
}

.study-group__header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface-solid);
  border: none;
  cursor: pointer;
  color: var(--white);
  font-family: var(--font-body);
  text-align: left;
  transition: background var(--transition);
}

.study-group__header:hover {
  background: var(--bg-section);
}

.study-group__badge {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  background: var(--surface-accent-strong);
  color: var(--gold);
  border-radius: 50px;
  white-space: nowrap;
  flex-shrink: 0;
}

.study-group__header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  flex: 1;
}

.study-group__chevron {
  width: 20px;
  height: 20px;
  color: var(--gold);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.study-group__header[aria-expanded="true"] .study-group__chevron {
  transform: rotate(180deg);
}

.study-group__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s ease;
  padding: 0 24px;
}

.study-group__header[aria-expanded="true"] + .study-group__body {
  max-height: 2000px;
  padding: 8px 24px 24px;
}

.study-group__note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--gray);
}

.study-group__note a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Week Grid */
.week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.week-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.week-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.week-card__num {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.week-card__title {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Book List */
.book-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.book-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  transition: background var(--transition);
  gap: 16px;
  flex-wrap: wrap;
}

.book-item:hover {
  background: var(--bg-section);
}

.book-item__title {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--white);
  transition: color var(--transition);
}

.book-item__title:hover {
  color: var(--gold);
}

.book-item__weeks {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.book-item__weeks a {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: rgba(61, 68, 53, 0.12);
  color: var(--gold);
  border-radius: 50px;
  transition: background var(--transition);
}

.book-item__weeks a:hover {
  background: rgba(61, 68, 53, 0.25);
}

/* ---- Worksheets ---- */
.worksheets {
  padding: 100px 0;
  background: var(--bg);
}

.worksheet-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.worksheet-tab {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
}

.worksheet-tab:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.worksheet-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--btn-text);
  font-weight: 600;
}

.worksheet-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.worksheet-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.download-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.download-card svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
  flex-shrink: 0;
}

.download-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

/* ---- Contact ---- */
.contact {
  padding: 100px 0;
  background: var(--bg-section);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
}

.contact__form-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.contact__form-card h3,
.contact__team h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.contact__form-card p {
  color: var(--text-body-soft);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 50px;
  transition: all var(--transition);
  margin-right: 12px;
  margin-bottom: 8px;
}

.btn--gold {
  background: var(--accent);
  color: var(--btn-text);
}

.btn--gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(61, 68, 53, 0.15);
}

.btn--outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.btn--outline:hover {
  background: var(--surface-hover);
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition);
}

.team-card:hover {
  border-color: var(--border-strong);
}

.team-card__role {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.team-card__name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 12px;
}

.team-card__link {
  display: block;
  font-size: 0.85rem;
  color: var(--text-body-faint);
  margin-bottom: 4px;
  transition: color var(--transition);
}

.team-card__link:hover {
  color: var(--gold);
}

/* ---- Footer ---- */
.footer {
  padding: 60px 0 32px;
  background: var(--footer-bg);
  border-top: none;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 32px;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cream);
  display: block;
  margin-bottom: 8px;
}

.footer__brand p {
  font-size: 0.85rem;
  color: var(--footer-text);
  line-height: 1.5;
}

.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__links a {
  font-size: 0.85rem;
  color: var(--footer-text);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--cream);
}

.footer__bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer__bottom p {
  font-size: 0.8rem;
  color: var(--footer-text-muted);
}

/* ---- Animations ---- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
/* ---- Squarespace iframe embed ---- */
html.is-embed,
html.is-embed body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100%;
}

html.is-embed .fade-up {
  opacity: 1;
  transform: none;
}

html.is-embed .hero {
  min-height: 70vh;
  min-height: 70dvh;
}

html.is-embed .hero__scroll {
  display: none;
}

@media (max-width: 768px) {
  .nav__logo {
    font-size: 0.82rem;
    max-width: 38vw;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--nav-bg-scrolled);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    pointer-events: none;
  }

  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav__links li {
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav__links a {
    display: block;
    padding: 16px 0;
    font-size: 1rem;
  }

  .info__card {
    padding: 32px 24px;
  }

  .info__details {
    gap: 32px;
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .week-grid {
    grid-template-columns: 1fr;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .book-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 2.25rem;
  }

  .worksheet-tabs {
    gap: 6px;
  }

  .worksheet-tab {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}

/* ---- Subpages ---- */
.page {
  padding: 100px 0 80px;
  min-height: 60vh;
  background: var(--bg);
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.breadcrumb a {
  color: var(--gold);
  transition: opacity var(--transition);
}

.breadcrumb a:hover {
  opacity: 0.8;
}

.breadcrumb__sep {
  color: var(--breadcrumb-sep);
}

.breadcrumb__current {
  color: var(--white);
}

.page-content {
  max-width: 780px;
  margin: 0 auto;
}

.page-hero {
  margin-bottom: 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

.page-hero img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
}

.page-hero--local {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

.page-hero--local img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-content__h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--gold);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-content__h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold);
  margin: 32px 0 16px;
}

.page-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 16px;
}

.page-content__list {
  list-style: none;
  margin: 16px 0 24px;
  padding: 0;
}

.page-content__list li {
  padding: 10px 16px;
  margin-bottom: 6px;
  background: var(--surface);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  color: var(--text-body);
}

.def-item {
  padding: 14px 20px;
  margin-bottom: 8px;
  background: var(--surface-accent);
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
}

.def-item strong {
  color: var(--gold);
  font-weight: 600;
}

.def-item__desc {
  color: var(--text-body-soft);
  font-size: 0.9rem;
}

.ref-item {
  display: flex;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 6px;
  background: var(--surface);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.ref-item__label {
  color: var(--gold);
  font-weight: 500;
  min-width: 100px;
}

.ref-item__verse {
  color: var(--text-body-soft);
  font-size: 0.9rem;
}

.child-nav {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.child-nav__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.child-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.child-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.child-card__title {
  font-size: 0.9rem;
  font-weight: 500;
}

.child-card svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex-shrink: 0;
}

.page-links {
  margin-top: 32px;
}

.form-embed {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

.form-embed iframe {
  display: block;
  background: #fff;
}

/* ---- Video embeds ---- */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: 24px 0 32px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #000;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Interactive quizzes ---- */
.quiz-section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border-strong);
}

.quiz-section__header {
  text-align: center;
  margin-bottom: 32px;
}

.quiz-section__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.quiz-section__subtitle {
  color: var(--gray);
  font-size: 0.95rem;
}

.quiz-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.quiz-question {
  border: none;
  margin: 0 0 28px;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--border-subtle);
}

.quiz-question:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.quiz-question--highlight {
  animation: quiz-highlight 1.5s ease;
}

@keyframes quiz-highlight {
  0%, 100% { background: transparent; }
  30%, 70% { background: var(--surface-accent); border-radius: var(--radius); }
}

.quiz-question__text {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.quiz-question__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-accent-strong);
  color: var(--gold);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 40px;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.quiz-option:hover {
  background: var(--surface-accent);
  border-color: var(--border-strong);
}

.quiz-option:has(input:checked) {
  background: rgba(61, 68, 53, 0.12);
  border-color: var(--border-strong);
}

.quiz-option input {
  margin-top: 3px;
  accent-color: var(--gold);
  flex-shrink: 0;
}

.quiz-option__label {
  font-size: 0.92rem;
  line-height: 1.45;
}

.quiz-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  padding-top: 8px;
}

.quiz-submit,
.quiz-retry {
  min-width: 180px;
}

.quiz-results__score {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
}

.quiz-results__circle {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(
    var(--gold) calc(var(--pct, 0) * 1%),
    var(--ring-track) 0
  );
  position: relative;
}

.quiz-results__circle::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--bg);
}

.quiz-results__pct {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
}

.quiz-results__heading {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--white);
  margin-bottom: 6px;
}

.quiz-results__message {
  color: var(--gray);
  font-size: 0.95rem;
}

.quiz-results__breakdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-result-item {
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.quiz-result-item--correct {
  background: rgba(76, 175, 80, 0.08);
  border-color: rgba(76, 175, 80, 0.25);
}

.quiz-result-item--wrong {
  background: rgba(244, 67, 54, 0.06);
  border-color: rgba(244, 67, 54, 0.2);
}

.quiz-result-item__header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.quiz-result-item__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.quiz-result-item--correct .quiz-result-item__icon {
  background: rgba(76, 175, 80, 0.2);
  color: #81c784;
}

.quiz-result-item--wrong .quiz-result-item__icon {
  background: rgba(244, 67, 54, 0.2);
  color: #e57373;
}

.quiz-result-item__question {
  font-size: 0.95rem;
  line-height: 1.45;
}

.quiz-result-item__answer {
  font-size: 0.88rem;
  padding-left: 36px;
  margin-bottom: 4px;
}

.quiz-result-item__answer--correct {
  color: #2e7d32;
}

.quiz-result-item__answer--wrong {
  color: #c62828;
}

.quiz-result-item__correction {
  margin-top: 12px;
  margin-left: 36px;
  padding: 14px 16px;
  background: var(--surface-accent);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.quiz-result-item__correct-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 6px;
  font-weight: 600;
}

.quiz-result-item__correct-answer {
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--white);
}

.quiz-result-item__explanation {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .quiz-panel {
    padding: 20px 16px;
  }

  .quiz-options {
    padding-left: 0;
  }

  .quiz-results__score {
    flex-direction: column;
    text-align: center;
  }

  .quiz-result-item__correction {
    margin-left: 0;
  }

  .quiz-result-item__answer {
    padding-left: 0;
  }
}

/* ---- Dark mode ---- */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a1d18;
  --bg-alt: #22261f;
  --bg-section: #2a2e26;
  --text: #f5f0ea;
  --text-muted: #a8a89e;
  --text-soft: rgba(245, 240, 234, 0.7);
  --accent: #e7d9cb;
  --accent-light: #f5f0ea;
  --accent-dark: #c2c8cc;
  --accent-secondary: #4f5645;
  --cream: #e7d9cb;
  --surface: rgba(42, 46, 38, 0.9);
  --surface-solid: #252820;
  --surface-hover: rgba(231, 217, 203, 0.1);
  --surface-accent: rgba(231, 217, 203, 0.08);
  --surface-accent-strong: rgba(231, 217, 203, 0.14);
  --border: rgba(231, 217, 203, 0.12);
  --border-strong: rgba(231, 217, 203, 0.22);
  --border-subtle: rgba(231, 217, 203, 0.08);
  --nav-bg: rgba(26, 29, 24, 0.92);
  --nav-bg-scrolled: rgba(26, 29, 24, 0.97);
  --nav-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
  --nav-shadow-scrolled: 0 2px 20px rgba(0, 0, 0, 0.45);
  --hero-overlay: linear-gradient(180deg, rgba(26, 29, 24, 0.45) 0%, rgba(26, 29, 24, 0.78) 50%, rgba(26, 29, 24, 0.94) 100%);
  --btn-text: #1a1d18;
  --footer-bg: #2e3329;
  --footer-text: rgba(245, 240, 234, 0.75);
  --footer-text-muted: rgba(245, 240, 234, 0.5);
  --text-body: rgba(245, 240, 234, 0.88);
  --text-body-soft: rgba(245, 240, 234, 0.72);
  --text-body-faint: rgba(245, 240, 234, 0.6);
  --breadcrumb-sep: rgba(168, 168, 158, 0.45);
  --ring-track: rgba(255, 255, 255, 0.1);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.45);
  --purple: var(--bg);
  --purple-light: var(--bg-alt);
  --purple-dark: var(--bg-section);
  --gold: var(--accent);
  --gold-light: var(--accent-light);
  --gold-dark: var(--accent-dark);
  --white: var(--text);
  --gray: var(--text-muted);
  --dark: #1a1d18;
}

[data-theme="dark"] .hero__bg,
[data-theme="dark"] .page-hero--local img {
  filter: brightness(0.35) saturate(0.5);
}

[data-theme="dark"] .quiz-result-item--correct .quiz-result-item__icon {
  color: #66bb6a;
}

[data-theme="dark"] .quiz-result-item--wrong .quiz-result-item__icon {
  color: #ef5350;
}

[data-theme="dark"] .quiz-result-item__answer--correct {
  color: #81c784;
}

[data-theme="dark"] .quiz-result-item__answer--wrong {
  color: #e57373;
}

/* ---- Theme toggle ---- */
.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-solid);
  color: var(--accent);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.theme-toggle__sun,
.theme-toggle__moon,
.theme-toggle__auto {
  display: none;
}

[data-theme-mode="auto"] .theme-toggle__auto {
  display: block;
}

[data-theme-mode="light"] .theme-toggle__sun {
  display: block;
}

[data-theme-mode="dark"] .theme-toggle__moon {
  display: block;
}

@media (max-width: 768px) {
  .nav__actions {
    gap: 8px;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }
}