:root {
  --rose-900: #7f294c;
  --rose-700: #a43a62;
  --rose-600: #b94e75;
  --rose-300: #eaa3bc;
  --rose-200: #f5cad7;
  --rose-100: #fdeef3;
  --cream: #fffafc;
  --text: #58283a;
  --shadow: 0 14px 35px rgba(127, 41, 76, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #fff7fa;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "Nunito", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 202, 215, 0.72), transparent 24rem),
    radial-gradient(circle at 92% 92%, rgba(234, 163, 188, 0.38), transparent 26rem),
    linear-gradient(135deg, #fffafd 0%, #fff5f8 100%);
}

.app-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.hero {
  margin-bottom: 24px;
  text-align: center;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 8px;
  place-items: center;
  border: 1px solid rgba(185, 78, 117, 0.16);
  border-radius: 50%;
  background: var(--rose-100);
  box-shadow: 0 8px 20px rgba(185, 78, 117, 0.12);
}

.brand-mark svg {
  width: 34px;
  fill: var(--rose-600);
}

.brand-mark circle {
  fill: var(--cream);
}

.hero h1 {
  margin: 0;
  color: var(--rose-900);
  font-family: "Playfair Display", serif;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -1.5px;
}

.hero p {
  margin: 8px 0 0;
  color: #966078;
  font-size: clamp(15px, 2vw, 18px);
}

.menu {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  position: relative;
  z-index: 10;
}

.menu-item,
.menu-button {
  min-width: 0;
}

.menu-button {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(185, 78, 117, 0.12);
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, var(--rose-600), var(--rose-700));
  box-shadow: 0 9px 22px rgba(164, 58, 98, 0.18);
  font: 800 15px/1.22 "Nunito", sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.menu-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 13px 28px rgba(164, 58, 98, 0.24);
  filter: saturate(1.05);
}

.menu-button:focus-visible,
.dropdown-options a:focus-visible {
  outline: 3px solid var(--rose-300);
  outline-offset: 3px;
}

.button-icon {
  display: grid;
  flex: 0 0 43px;
  height: 43px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
}

.button-icon svg,
.chevron,
.arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-icon svg {
  width: 24px;
  height: 24px;
}

.chevron,
.arrow {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-left: auto;
}

.chevron {
  transition: transform 180ms ease;
}

.dropdown-button[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.menu-dropdown {
  position: relative;
}

.dropdown-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--rose-200);
  border-radius: 16px;
  background: rgba(255, 252, 253, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}

.dropdown-options.open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.dropdown-category + .dropdown-category {
  border-top: 1px solid #f8e4eb;
}

.dropdown-category-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  color: var(--text);
  background: transparent;
  font: 800 14px/1.3 "Nunito", sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.dropdown-category-button:hover {
  color: var(--rose-700);
  background: var(--rose-100);
}

.dropdown-category-button:focus-visible {
  outline: 3px solid var(--rose-300);
  outline-offset: -3px;
}

.dropdown-category-button .chevron {
  transition: transform 180ms ease;
}

.dropdown-category-button[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.dropdown-suboptions {
  display: none;
  background: white;
}

.dropdown-category-button[aria-expanded="true"] + .dropdown-suboptions {
  display: block;
}

.dropdown-options a {
  display: block;
  padding: 11px 14px;
  border-bottom: 1px solid #f8e4eb;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.dropdown-options a:last-child {
  border-bottom: 0;
}

.dropdown-options a:hover {
  color: var(--rose-700);
  background: var(--rose-100);
}

.dropdown-suboptions a {
  padding-left: 28px;
}

.presentation {
  display: grid;
  flex: 1;
  min-height: 330px;
  margin-top: 24px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(185, 78, 117, 0.11);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(253, 238, 243, 0.9));
  box-shadow: 0 18px 45px rgba(127, 41, 76, 0.09);
}

.presentation img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-shell.content-view > .menu,
.app-shell.content-view > .presentation {
  display: none;
}

.home-return-button {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 16px;
  padding: 10px 16px;
  border: 1px solid var(--rose-200);
  border-radius: 14px;
  color: var(--rose-900);
  background: white;
  font: 800 15px/1.2 "Nunito", sans-serif;
  cursor: pointer;
}

.home-return-button[hidden] {
  display: none;
}

.home-return-button:focus-visible {
  outline: 3px solid var(--rose-300);
  outline-offset: 3px;
}

.document-image {
  width: min(820px, 100%);
  margin: 18px auto 24px;
  overflow: hidden;
  border-radius: 20px;
  background: #edf8f7;
}

.document-image img,
.document-resource img {
  display: block;
  width: 100%;
  height: auto;
}

.postnatal-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  align-items: center;
  gap: 24px;
  margin: 18px 0 24px;
}

.postnatal-intro p {
  margin: 0;
}

.handwashing-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
  align-items: center;
  gap: 16px;
  margin: 0 0 12px;
}

.handwashing-copy .subsection-title {
  margin: 0 0 8px;
  font-size: 20px;
}

.handwashing-copy .subsection-title:not(:first-child) {
  margin-top: 12px;
}

.handwashing-copy p {
  margin: 0;
}

.handwashing-copy ul {
  margin: 0;
}

.handwashing-intro .document-image {
  width: min(260px, 100%);
  margin: 0;
  justify-self: center;
}

.handwashing-intro + .subsection-title {
  margin-top: 12px;
}

.topic-sixteen-image {
  width: min(460px, 100%);
  margin: 18px auto 24px;
}

.topic-image-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.topic-image-layout .document-image {
  width: 100%;
  margin: 0;
  justify-self: center;
}

.bathing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  align-items: start;
  gap: 16px;
  margin: 0 0 8px;
}

.bathing-layout + .subsection-title {
  margin-top: 12px;
}

.bathing-copy p {
  margin-top: 0;
}

.bathing-copy ul {
  margin-bottom: 0;
  font-size: 19px;
  line-height: 1.5;
}

.bathing-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.bathing-images .document-image {
  width: 100%;
  margin: 0;
}

.bathing-images img {
  height: auto;
  max-height: 200px;
  object-fit: contain;
}

.postnatal-intro .document-image {
  width: 100%;
  margin: 0;
}

#revision-posnatal .postnatal-lochia-image {
  width: min(460px, 100%);
  margin: 16px auto 0;
}

#revision-posnatal .postnatal-baby-image {
  width: min(240px, 100%);
  margin: 16px auto 0;
}

.objective-card,
.how-to-arrive,
.urgent-action {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #f0cad7;
  border-radius: 18px;
  background: var(--cream);
}

.objective-card h3,
.how-to-arrive h3 {
  margin-top: 0;
  color: var(--rose-900);
}

.subsection-title {
  margin: 24px 0 12px;
  color: var(--rose-900);
  font-size: 22px;
}

.infographic-section-title {
  font-size: 30px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #efccd7;
  border-radius: 16px;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.table-wrap th,
.table-wrap td {
  padding: 14px 16px;
  border-bottom: 1px solid #f2dbe3;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

.table-wrap th {
  color: white;
  background: var(--rose-700);
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

.how-to-arrive ul,
.references ul {
  margin-bottom: 0;
  line-height: 1.65;
}

.urgent-action {
  border-left: 5px solid #c23f6a;
  background: #fff2f6;
}

.urgent-action p {
  display: inline;
  margin: 0;
}

.guide,
.content-section {
  scroll-margin-top: 24px;
  margin-top: 24px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(185, 78, 117, 0.11);
  border-radius: 28px;
  background: rgba(255, 252, 253, 0.94);
  box-shadow: 0 18px 45px rgba(127, 41, 76, 0.09);
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 2px 0 6px;
  color: var(--rose-900);
  font-family: "Playfair Display", serif;
  font-size: clamp(29px, 4vw, 44px);
  line-height: 1.08;
}

.section-heading p {
  margin: 0;
}

.eyebrow {
  color: var(--rose-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.alarm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.food-access-grid {
  padding: 18px;
  border-radius: 20px;
  background: url("tema 9/imagen-alimentacion-hidratacion.jpeg") center / cover no-repeat;
}

.food-access-grid .alarm-card {
  background: rgba(255, 250, 243, 0.68);
  backdrop-filter: blur(3px);
}

.food-access-grid summary {
  color: var(--rose-900);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 800;
}

.food-access-grid summary::marker {
  color: var(--rose-600);
}

.food-access-grid summary:focus-visible {
  outline: 3px solid var(--rose-600);
  outline-offset: 4px;
}

.location-card,
.alarm-card,
.step-card,
.baby-alert {
  border: 1px solid #f2ccd8;
  border-radius: 20px;
  background: var(--cream);
  padding: 22px;
}

.location-card h3,
.alarm-card h3,
.step-card h3 {
  margin: 8px 0;
  color: var(--rose-900);
}

.location-card p,
.alarm-card li,
.step-card p,
.baby-alert li {
  line-height: 1.55;
}

.card-number,
.step-card span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--rose-600);
  font-weight: 800;
}

.text-link,
.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 12px;
  color: white;
  background: var(--rose-700);
  font-weight: 800;
  text-decoration: none;
}

.info-banner {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 16px 18px;
  border-left: 5px solid #c23f6a;
  border-radius: 12px;
  background: #fff0f5;
}

.info-banner a {
  color: var(--rose-900);
  font-weight: 800;
}

.alarm-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.alarm-card {
  border-top: 5px solid var(--rose-600);
}

#revision-posnatal .alarm-card summary {
  color: var(--rose-900);
  cursor: pointer;
  font-size: 17px;
  font-weight: 800;
}

#revision-posnatal .alarm-card summary::marker {
  color: var(--rose-600);
}

#revision-posnatal .alarm-card summary:focus-visible {
  outline: 3px solid var(--rose-600);
  outline-offset: 4px;
}

#revision-posnatal .alarm-card[open] summary {
  margin-bottom: 8px;
}

.alarm-card ul,
.baby-alert ul,
.location-card p {
  margin-bottom: 0;
}

.baby-alert {
  border-left: 6px solid #d14770;
  background: #fff4f7;
  font-size: 17px;
}

.baby-alert p {
  margin-top: 0;
  font-weight: 800;
}

.steps-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card span {
  margin-bottom: 12px;
}

.route-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.route-actions .primary-link,
.route-actions .secondary-link,
.route-button {
  min-height: 68px;
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 17px;
  text-align: center;
}

.route-button {
  grid-column: 1 / -1;
  border: 0;
  color: white;
  background: linear-gradient(135deg, #c43e70, #7f294c);
  box-shadow: 0 10px 24px rgba(127, 41, 76, 0.22);
  font: 800 18px/1.2 "Nunito", sans-serif;
  cursor: pointer;
}

.route-button:hover {
  filter: brightness(1.07);
  transform: translateY(-2px);
}

.route-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.route-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff0f5;
  color: var(--rose-900);
  font-weight: 700;
  text-align: center;
}

.secondary-link {
  border: 1px solid var(--rose-300);
  color: var(--rose-900);
  background: white;
}

.youtube-window {
  width: min(560px, 100%);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #efccd7;
  border-radius: 18px;
  background: #201218;
  box-shadow: 0 12px 28px rgba(127, 41, 76, 0.16);
}

.youtube-window iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.local-video {
  display: block;
  width: min(720px, 100%);
  max-height: 70vh;
  margin: 18px auto 24px;
  border: 1px solid #efccd7;
  border-radius: 18px;
  background: #201218;
  box-shadow: 0 12px 28px rgba(127, 41, 76, 0.16);
}

.youtube-window p {
  display: grid;
  height: 100%;
  margin: 0;
  place-items: center;
  color: #966078;
  font-weight: 800;
  text-align: center;
}

.youtube-link {
  display: block;
  width: fit-content;
  margin: 16px auto 0;
  color: var(--rose-700);
  font-weight: 800;
  text-align: center;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-card {
  padding: 18px 20px;
  border: 1px solid #efccd7;
  border-left: 5px solid var(--rose-600);
  border-radius: 16px;
  background: var(--cream);
}

.faq-card h3 {
  margin: 0 0 8px;
  color: var(--rose-900);
  font-size: 17px;
}

.faq-toggle summary {
  color: var(--rose-900);
  cursor: pointer;
  font-size: 17px;
  font-weight: 800;
}

.faq-toggle summary::marker {
  color: var(--rose-600);
}

.faq-toggle summary:focus-visible {
  outline: 3px solid var(--rose-600);
  outline-offset: 4px;
}

.faq-toggle[open] summary {
  margin-bottom: 8px;
}

.faq-card p {
  margin: 0;
  line-height: 1.55;
}

.procedure-toggle ol {
  margin: 0;
  padding-left: 22px;
  line-height: 1.55;
}

.answer-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.answer-button {
  min-height: 64px;
  padding: 12px;
  border: 2px solid #e1b2c2;
  border-radius: 14px;
  color: var(--text);
  background: white;
  font: 800 14px/1.35 "Nunito", sans-serif;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.answer-button:hover {
  transform: translateY(-2px);
  border-color: var(--rose-600);
  background: var(--rose-100);
}

.answer-button.correct {
  border-color: #287b57;
  color: #17583c;
  background: #e4f6ed;
  animation: correct-answer 700ms ease;
}

.answer-button.incorrect {
  border-color: #be3d54;
  color: #84283a;
  background: #fde7ec;
  animation: incorrect-answer 420ms ease;
}

.answer-button:disabled {
  cursor: default;
}

.answer-feedback {
  min-height: 22px;
  margin-top: 12px !important;
  font-weight: 800;
}

@keyframes correct-answer {
  0% { transform: scale(1); }
  45% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(40, 123, 87, 0.14); }
  100% { transform: scale(1); }
}

@keyframes incorrect-answer {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

.script-details {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #efccd7;
  border-radius: 14px;
  background: var(--cream);
}

.script-details summary {
  color: var(--rose-900);
  font-weight: 800;
  cursor: pointer;
}

.slides-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.slides-list article {
  min-height: 185px;
  padding: 14px;
  border: 1px solid #efccd7;
  border-radius: 16px;
  background: var(--cream);
}

.slides-list article span {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--rose-600);
  font-weight: 800;
}

.slides-list article p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.document-resource {
  overflow: hidden;
  margin: 0 0 20px;
  border: 1px solid #efccd7;
  border-radius: 18px;
}

.download-button {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, var(--rose-600), var(--rose-900));
  box-shadow: 0 12px 28px rgba(127, 41, 76, 0.22);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.download-button span {
  font-size: 30px;
  line-height: 1;
}

.secondary-resource {
  display: block;
  margin-top: 10px;
  color: var(--rose-700);
  font-weight: 800;
  text-align: center;
}

.slide-viewer {
  width: min(920px, 100%);
  margin: 20px auto;
  padding: 14px;
  border: 1px solid #efccd7;
  border-radius: 20px;
  background: white;
  box-shadow: 0 12px 28px rgba(127, 41, 76, 0.14);
}

.slide-frame {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #fff7fb;
}

.slide-image-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.slide-image-button:focus-visible,
.slide-control-button:focus-visible {
  outline: 3px solid var(--rose-600);
  outline-offset: 3px;
}

.slide-image-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-image-button:disabled {
  cursor: default;
}

.slide-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}

.slide-controls p {
  margin: 0;
  color: var(--rose-900);
  font-weight: 800;
  text-align: center;
}

.slide-control-button {
  min-width: 100px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--rose-700);
  font: 800 16px/1.2 "Nunito", sans-serif;
  cursor: pointer;
}

.slide-control-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.small-note {
  color: #795164;
  font-size: 14px;
}

@media (max-width: 900px) {
  .menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bathing-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dropdown-options {
    position: absolute;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .slides-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 22px, 1120px);
    padding-top: 22px;
  }

  .hero {
    margin-bottom: 18px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero p {
    padding: 0 18px;
  }

  .menu {
    grid-template-columns: 1fr;
  }

  .menu-button {
    min-height: 68px;
  }

  .dropdown-options {
    position: relative;
    top: 8px;
  }

  .presentation {
    min-height: 250px;
  }

  .presentation img {
    min-height: 0;
  }

  .location-grid,
  .alarm-grid {
    grid-template-columns: 1fr;
  }

  .postnatal-intro {
    grid-template-columns: 1fr;
  }

  .handwashing-intro {
    grid-template-columns: 1fr;
  }

  .bathing-layout {
    grid-template-columns: 1fr;
  }

  .bathing-images {
    grid-template-columns: 1fr;
  }

  .topic-image-layout {
    grid-template-columns: 1fr;
  }

  .info-banner {
    display: block;
  }

  .info-banner span {
    display: block;
    margin-top: 5px;
  }

  .route-actions {
    grid-template-columns: 1fr;
  }

  .route-actions a,
  .route-button {
    grid-column: 1;
    width: 100%;
  }

  .table-wrap th,
  .table-wrap td {
    min-width: 150px;
  }

  .slides-list {
    grid-template-columns: 1fr;
  }

  .answer-options {
    grid-template-columns: 1fr;
  }

  .download-button {
    min-height: 64px;
    font-size: 17px;
  }
}
