/* Impulsa Ruralia: recommended routes (routes.php) and one route (route.php).
   Loaded only by those two pages, after setup_page. Prototype is the visual
   source of truth. Work Sans, olive #6e7d41, yellow #fdc608, beige #f2e7dd,
   ink #263619. Dark values follow the operating-system preference. */

body.impulsa-routes-view {
  --rt-ink: light-dark(#000000, #f2e7dd);
  --rt-title: light-dark(#263619, #f2e7dd);
  --rt-muted: light-dark(#656d60, #c6cbbb);
  --rt-text: light-dark(#5f5a54, #d9d2c8);
  --rt-link: light-dark(#56683b, #dbe6b6);
  --rt-eyebrow: light-dark(#5d7130, #cfdf8a);
  --rt-card: light-dark(#ffffff, #2b3127);
  --rt-card-on: light-dark(#fbf5ef, #343c2f);
  --rt-line: light-dark(#d9dbcf, #4a5143);
  --rt-line-soft: light-dark(#e3d6ca, #4a5143);
  --rt-chip: light-dark(#f2e7dd, #3b472d);
  --rt-chip-ink: light-dark(#566135, #cfdf8a);
  --rt-olive: #6e7d41;
  --rt-yellow: #fdc608;
  max-width: none;
  margin: 0;
  background: light-dark(#ffffff, #22251d);
}

/* Moodle page heading repeats the in-page title; the prototype has one. */
body.impulsa-routes-view #page-header,
body.impulsa-routes-view .secondary-navigation,
body.impulsa-routes-view #page-navbar {
  display: none;
}

/* Same bar as the front door: logo and the four links, nothing else. */
body.impulsa-routes-view #header .primary-navigation:not(:has(.custom-menu)),
body.impulsa-routes-view #usernavigation {
  display: none;
}

body.impulsa-routes-view #header .primary-navigation:has(.custom-menu) {
  margin-left: auto;
}

body.impulsa-routes-view #header {
  align-items: center;
  height: 70px;
  padding-top: 0;
  padding-bottom: 0;
}

body.impulsa-routes-view #header .header-menubar .custom-menu .navbar-nav {
  gap: 22px;
}

body.impulsa-routes-view #header .header-menubar .custom-menu .navbar-nav .nav-link {
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

/* Content frame: 36px gutters at 1440, 1380px cap, as the prototype. */
body.impulsa-routes-view #page-wrapper {
  background: light-dark(#ffffff, #22251d);
}

body.impulsa-routes-view #page-wrapper > .container-fluid,
body.impulsa-routes-view #page,
body.impulsa-routes-view #page.drawers,
body.impulsa-routes-view #page-content,
body.impulsa-routes-view #region-main-box,
body.impulsa-routes-view #region-main,
body.impulsa-routes-view [role="main"] {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.impulsa-routes-view #topofscroll,
body.impulsa-routes-view #page-content {
  padding: 0;
}

.impulsa-rt {
  box-sizing: border-box;
  max-width: calc(1380px + 2 * clamp(20px, 2.5vw, 40px));
  margin: 0 auto;
  padding: 37px clamp(20px, 2.5vw, 40px) 60px;
  color: var(--rt-ink);
  font-family: "Work Sans", Arial, sans-serif;
  line-height: normal;
}

.impulsa-rt *,
.impulsa-rt *::before,
.impulsa-rt *::after {
  box-sizing: border-box;
}

.impulsa-rt a {
  text-decoration: none;
}

.impulsa-rt a:focus-visible {
  outline: 3px solid var(--rt-yellow);
  outline-offset: 3px;
}

.impulsa-rt h1,
.impulsa-rt h2,
.impulsa-rt h3 {
  font-family: "Work Sans", Arial, sans-serif !important;
  font-weight: 700;
}

.impulsa-rt__heading {
  margin: 0 0 28px;
}

.impulsa-rt .impulsa-rt__back {
  color: var(--rt-link);
  font-size: 14px;
  font-weight: 700;
}

.impulsa-rt .impulsa-rt__back::before {
  content: "\2190\00a0";
}

.impulsa-rt .impulsa-rt__back:hover {
  text-decoration: underline;
}

.impulsa-rt h1 {
  margin: 17px 0 0;
  color: var(--rt-title) !important;
  font-size: 36px;
  line-height: 1.05;
}

.impulsa-rt__intro {
  margin: 0 0 17px;
}

.impulsa-rt .impulsa-rt__intro h2 {
  margin: 0 0 6px;
  color: var(--rt-ink);
  font-size: 22px;
  line-height: normal;
}

.impulsa-rt__intro p {
  max-width: 760px;
  margin: 0;
  color: var(--rt-text);
  font-size: 14px;
  line-height: 1.5;
}

.impulsa-rt__choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.impulsa-rt__choice {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  border: 1px solid var(--rt-line);
  border-radius: 13px;
  padding: 17px;
  background: var(--rt-card);
  color: inherit;
}

.impulsa-rt .impulsa-rt__choice:hover,
.impulsa-rt .impulsa-rt__choice.is-active {
  border-color: var(--rt-olive);
  background: var(--rt-card-on);
  color: inherit;
}

.impulsa-rt__choice.is-active {
  box-shadow: inset 0 0 0 1px var(--rt-olive);
}

.impulsa-rt__choice-text {
  display: block;
  color: var(--rt-muted);
}

.impulsa-rt__choice strong {
  display: block;
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.4;
}

.impulsa-rt__choice-text > span {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}

/* Icons are masks so they follow currentColor. */
.impulsa-rt__icon {
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: var(--impulsa-rt-icon) center / contain no-repeat;
  mask: var(--impulsa-rt-icon) center / contain no-repeat;
}

.impulsa-rt__choice .impulsa-rt__icon {
  margin-top: 1px;
  color: var(--rt-ink);
}

.impulsa-rt__goals {
  padding-top: 2px;
}

.impulsa-rt__panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
}

.impulsa-rt .impulsa-rt__panel-head h3 {
  margin: 0 0 4px;
  color: var(--rt-ink);
  font-size: 19px;
  line-height: normal;
}

.impulsa-rt__panel-head p {
  margin: 0;
  color: var(--rt-muted);
  font-size: 13px;
}

.impulsa-rt__panel-head > span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--rt-chip);
  color: var(--rt-chip-ink);
  font-size: 11px;
  font-weight: 700;
}

.impulsa-rt__guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.impulsa-rt__card {
  display: block;
  min-height: 142px;
  border: 1px solid var(--rt-line);
  border-radius: 12px;
  padding: 17px;
  background: var(--rt-card);
  color: var(--rt-ink);
}

.impulsa-rt .impulsa-rt__card:hover,
.impulsa-rt .impulsa-rt__card.is-active {
  border-color: var(--rt-olive);
  background: var(--rt-card-on);
  color: var(--rt-ink);
}

.impulsa-rt__card .impulsa-rt__icon {
  margin: 4px 0;
}

.impulsa-rt__card strong {
  display: block;
  margin: 9px 0 7px;
  font-size: 15px;
  line-height: 1.3;
}

.impulsa-rt__desc {
  display: block;
  color: var(--rt-muted);
  font-size: 13px;
  line-height: 1.45;
}

.impulsa-rt__preview {
  margin-top: 16px;
  border: 1px solid var(--rt-olive);
  border-radius: 15px;
  padding: 20px;
  background: light-dark(#ffffff, #293024);
}

.impulsa-rt__preview-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 17px;
}

.impulsa-rt__preview-head small {
  display: block;
  margin-bottom: 5px;
  color: var(--rt-eyebrow);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.impulsa-rt .impulsa-rt__preview-head h3 {
  margin: 0 0 6px;
  color: var(--rt-ink);
  font-size: 20px;
  line-height: 1.25;
}

.impulsa-rt__preview-head p {
  margin: 0;
  color: var(--rt-muted);
  font-size: 13px;
}

.impulsa-rt__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.impulsa-rt__meta span {
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--rt-chip);
  font-size: 11px;
  white-space: nowrap;
}

.impulsa-rt__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.impulsa-rt__step {
  border-top: 4px solid var(--rt-yellow);
  border-radius: 12px;
  padding: 16px;
  background: var(--rt-card-on);
}

.impulsa-rt__step-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.impulsa-rt__number {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rt-olive);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.impulsa-rt__step-head b {
  font-size: 16px;
}

.impulsa-rt__step > p {
  min-height: 40px;
  margin: 0 0 12px;
  color: var(--rt-muted);
  font-size: 12px;
  line-height: 1.4;
}

.impulsa-rt__resource {
  display: block;
  border: 1px solid var(--rt-line-soft);
  border-radius: 9px;
  padding: 10px;
  background: light-dark(#ffffff, #293024);
  color: var(--rt-ink);
}

.impulsa-rt .impulsa-rt__resource:hover {
  border-color: var(--rt-olive);
  color: var(--rt-ink);
}

.impulsa-rt__resource small {
  display: block;
  margin-bottom: 4px;
  color: var(--rt-eyebrow);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.impulsa-rt__resource strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
}

.impulsa-rt__resource span {
  display: block;
  margin-top: 5px;
  color: var(--rt-muted);
  font-size: 11px;
}

.impulsa-rt__note {
  margin: 12px 0 0;
  color: var(--rt-muted);
  font-size: 11px;
}

@media (max-width: 900px) {
  .impulsa-rt__choices,
  .impulsa-rt__guide,
  .impulsa-rt__steps {
    grid-template-columns: 1fr;
  }

  .impulsa-rt__panel-head,
  .impulsa-rt__preview-head {
    display: block;
  }

  .impulsa-rt__panel-head > span {
    display: inline-block;
    margin-top: 8px;
  }

  .impulsa-rt__meta {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .impulsa-rt h1 {
    font-size: 29px;
  }
}

/* List page only (routes.php). The prototype centers each goal card's content
   vertically (it is a button). */
.impulsa-rt--list .impulsa-rt__card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.impulsa-rt--list .impulsa-rt__card .impulsa-rt__icon {
  flex: 0 0 auto;
  margin: 0 0 3px;
}

.impulsa-rt--list .impulsa-rt__card strong {
  margin: 9px 0 7px;
}

/* Route icons (lucide paths, as in the prototype). */
.impulsa-rt__choice[data-icon="target"] .impulsa-rt__icon {
  --impulsa-rt-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
}

.impulsa-rt__choice[data-icon="compass"] .impulsa-rt__icon {
  --impulsa-rt-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z'/%3E%3C/svg%3E");
}

.impulsa-rt__card[data-area="diseno"] .impulsa-rt__icon {
  --impulsa-rt-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z'/%3E%3Cpath d='M15 5.764v15'/%3E%3Cpath d='M9 3.236v15'/%3E%3C/svg%3E");
}

.impulsa-rt__card[data-area="gestion"] .impulsa-rt__icon {
  --impulsa-rt-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 12h4'/%3E%3Cpath d='M10 8h4'/%3E%3Cpath d='M14 21v-3a2 2 0 0 0-4 0v3'/%3E%3Cpath d='M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2'/%3E%3Cpath d='M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16'/%3E%3C/svg%3E");
}

.impulsa-rt__card[data-area="liderazgo"] .impulsa-rt__icon {
  --impulsa-rt-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.414 14.414C21 12.828 22 11.5 22 9.5a5.5 5.5 0 0 0-9.591-3.676.6.6 0 0 1-.818.001A5.5 5.5 0 0 0 2 9.5c0 2.3 1.5 4 3 5.5l5.535 5.362a2 2 0 0 0 2.879.052 2.12 2.12 0 0 0-.004-3 2.124 2.124 0 1 0 3-3 2.124 2.124 0 0 0 3.004 0 2 2 0 0 0 0-2.828l-1.881-1.882a2.41 2.41 0 0 0-3.409 0l-1.71 1.71a2 2 0 0 1-2.828 0 2 2 0 0 1 0-2.828l2.823-2.762'/%3E%3C/svg%3E");
}

.impulsa-rt__card[data-area="evaluacion"] .impulsa-rt__icon {
  --impulsa-rt-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16v5'/%3E%3Cpath d='M16 14.639V21'/%3E%3Cpath d='M20 10.656V21'/%3E%3Cpath d='m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15'/%3E%3Cpath d='M4 18.463V21'/%3E%3Cpath d='M8 14.656V21'/%3E%3C/svg%3E");
}

.impulsa-rt__card[data-area="comunicacion"] .impulsa-rt__icon {
  --impulsa-rt-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z'/%3E%3Cpath d='M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14'/%3E%3Cpath d='M8 6v8'/%3E%3C/svg%3E");
}

.impulsa-rt__card[data-area="financiamiento"] .impulsa-rt__icon {
  --impulsa-rt-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17'/%3E%3Cpath d='m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9'/%3E%3Cpath d='m2 16 6 6'/%3E%3Ccircle cx='16' cy='9' r='2.9'/%3E%3Ccircle cx='6' cy='5' r='3'/%3E%3C/svg%3E");
}

.impulsa-rt__card[data-area="articulacion"] .impulsa-rt__icon {
  --impulsa-rt-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 18v-7'/%3E%3Cpath d='M11.119 2.205a2 2 0 0 1 1.762 0l7.84 3.846A.5.5 0 0 1 20.5 7h-17a.5.5 0 0 1-.22-.949z'/%3E%3Cpath d='M14 18v-7'/%3E%3Cpath d='M18 18v-7'/%3E%3Cpath d='M3 22h18'/%3E%3Cpath d='M6 18v-7'/%3E%3C/svg%3E");
}
