@font-face {
  font-family: "Nunito";
  src: url("font/Nunito-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("font/Nunito-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg-deep: #ffffff;
  --bg-soft: #ffffff;
  --ink-deep: #2f251f;
  --ink-soft: #6b5b4f;
  --accent-primary: #8a6b53;
  --accent-light: #c8a37e;
  --card: rgba(255, 255, 255, 0.92);
  --border: rgba(138, 107, 83, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  color: var(--ink-deep);
  background: #ffffff;
  line-height: 1.5;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  padding: 0.08rem 5vw;
  backdrop-filter: blur(8px);
  background: #5c4c3c;
  border-bottom: 1px solid rgba(53, 40, 30, 0.45);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0;
  color: var(--ink-deep);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(96px, 11vw, 140px);
  height: auto;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}

.main-nav {
  display: flex;
  gap: 0.28rem;
  align-items: center;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  color: #f7efe5;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.1;
}

.main-nav a:hover,
.main-nav a.active {
  border-color: rgba(255, 245, 231, 0.55);
  color: #ffffff;
  background: rgba(255, 245, 231, 0.2);
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-toggle {
  border: 1px solid transparent;
  background: transparent;
  color: #f7efe5;
  border-radius: 999px;
  padding: 0 0.18rem;
  cursor: pointer;
  line-height: 1;
}

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown:focus-within .nav-dropdown-toggle,
.nav-dropdown.is-open .nav-dropdown-toggle {
  color: #ffffff;
  background: rgba(255, 245, 231, 0.2);
  border-color: rgba(255, 245, 231, 0.55);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.1rem);
  left: 0;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 230px;
  padding: 0.22rem;
  border: 1px solid rgba(53, 40, 30, 0.35);
  border-radius: 0.75rem;
  background: rgba(92, 76, 60, 0.98);
  box-shadow: 0 12px 28px rgba(53, 40, 30, 0.22);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu a {
  border-radius: 0.55rem;
  padding: 0.14rem 0.46rem;
  border: 1px solid transparent;
  color: #f7efe5;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  border-color: rgba(255, 245, 231, 0.55);
  color: #ffffff;
  background: rgba(255, 245, 231, 0.18);
}

.lang-switch {
  display: inline-flex;
  gap: 0.3rem;
  margin-left: 0.35rem;
}

.lang-button {
  border: 1px solid rgba(138, 107, 83, 0.26);
  background: rgba(200, 163, 126, 0.18);
  color: var(--ink-deep);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  font-size: 0.86rem;
  cursor: pointer;
}

.lang-button.is-active {
  background: var(--accent-primary);
  color: #fffaf5;
  border-color: var(--accent-primary);
}

main {
  width: min(1080px, 92vw);
  margin: 1.35rem auto 4rem;
}

main,
main p,
main li,
main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
  color: var(--ink-deep);
}

main a:not(.button):not(.social-icon) {
  color: var(--accent-primary);
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 1.2rem;
  padding: 2rem;
  box-shadow: 0 20px 45px rgba(67, 49, 35, 0.12);
  animation: rise 700ms ease-out;
}

.hero::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 163, 126, 0.26), transparent 70%);
  top: -110px;
  right: -110px;
}

.hero-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  line-height: 1.15;
}

.hero h1 {
  margin: 0.4rem 0 0.9rem;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  max-width: 18ch;
}

.hero-copy {
  margin: 0;
  max-width: 62ch;
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font-weight: 700;
}

.button-primary {
  background: linear-gradient(130deg, var(--accent-primary), var(--accent-light));
  color: #fffaf5;
}

.button-ghost {
  border: 1px solid rgba(138, 107, 83, 0.46);
  color: var(--accent-primary);
}

.about-snapshot,
.resources-highlight,
.inner-card,
.inner-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 1rem;
}

.media-story {
  margin-top: 1.4rem;
  display: grid;
  gap: 1rem;
  width: 100%;
}

.media-story-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.media-story-figure,
.media-story-text,
.video-preview {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 1rem;
  overflow: hidden;
  width: 100%;
}

.media-story-figure {
  margin: 0;
  min-height: 280px;
}

.media-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

/* Ajuste: que las imágenes insertadas ocupen el ancho del contenedor */
.diagram img,
.photo-before-values img,
.team-profiles .inner-card img,
.inner-card img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.media-placeholder {
  height: 100%;
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  color: #6d5f54;
  background:
    linear-gradient(135deg, rgba(200, 163, 126, 0.28), rgba(255, 245, 235, 0.92)),
    repeating-linear-gradient(45deg, rgba(138, 107, 83, 0.06) 0, rgba(138, 107, 83, 0.06) 10px, transparent 10px, transparent 20px);
  border-radius: 1rem;
}

.media-story-text {
  padding: 1.25rem 1.2rem;
  width: 100%;
  border-radius: 1rem;
  background: #ffffff;
  color: #5c4c3c;
}

.media-story-text p {
  margin: 0;
  font-size: 1.08rem;
  max-width: none;
  width: 100%;
  margin: 0 auto;
  color: inherit;
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
  line-break: auto;
  white-space: normal;
}

.video-preview {
  padding: 1.2rem;
}

.video-preview h2 {
  margin-top: 0;
}

.video-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(138, 107, 83, 0.26);
}

.video-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Página: previsualizaciones de recursos */
.page-preview {
  padding: 1rem;
}
.preview-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(138, 107, 83, 0.18);
  background: var(--card);
}
.preview-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-frame-wrap {
  padding-top: 74%;
}

main.inner-page.map-page {
  width: min(1500px, 96vw);
}

main.inner-page.map-page .inner-card.video-preview {
  padding: 0.9rem;
}

@media (min-width: 1100px) {
  main.inner-page.map-page .video-frame-wrap.map-frame-wrap {
    padding-top: 58%;
  }
}

.about-snapshot,
.resources-highlight {
  margin-top: 1.4rem;
  padding: 1.4rem;
}

.about-snapshot ul {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
}

.section-head {
  grid-column: 1 / -1;
}

.section-head p {
  margin-top: -0.5rem;
  color: var(--ink-soft);
}

.instagram-feed {
  margin-top: 1.35rem;
  padding: 1.6rem;
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at top right, rgba(200, 163, 126, 0.24), transparent 34%),
    var(--card);
  box-shadow: 0 20px 45px rgba(67, 49, 35, 0.12);
}

.social-follow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.social-text {
  margin: 0;
  font-size: 1.06rem;
  color: var(--ink-deep);
}

.social-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.social-icon {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  border: 1px solid rgba(138, 107, 83, 0.3);
  background: rgba(255, 251, 245, 0.9);
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.social-icon:hover,
.social-icon:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(138, 107, 83, 0.55);
  background: rgba(200, 163, 126, 0.22);
}

.social-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.instagram-embeds {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.2rem;
  align-items: start;
  justify-items: center;
}

.instagram-embed {
  display: block;
  width: min(100%, 280px);
  max-width: 280px;
  height: 520px;
  margin: 0 !important;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 32px rgba(67, 49, 35, 0.14);
}

.instagram-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.resources-highlight {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.inner-page {
  display: grid;
  gap: 1rem;
}

.inner-page h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

.resource-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.resources-grid {
  grid-template-columns: 1fr;
  align-items: start;
}

main.inner-page.resources-page {
  width: min(1440px, 96vw);
}

.resources-grid .inner-card {
  padding: 1rem;
}

.resources-grid .page-preview,
.resources-grid .video-preview {
  padding: 0.9rem;
}

.resources-grid .preview-frame-wrap,
.resources-grid .video-frame-wrap {
  padding-top: 48%;
}

.resources-grid .video-frame-wrap {
  padding-top: 54%;
}

.resources-grid .page-preview p,
.resources-grid .video-preview p {
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .resources-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resources-grid .inner-card {
    min-height: 100%;
  }
}

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

.inner-card {
  padding: 1.1rem;
}

.site-footer {
  width: min(1080px, 92vw);
  margin: 0 auto 2.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(53, 40, 30, 0.42);
  border-radius: 1rem;
  background: #5c4c3c;
  color: #f8f3ee;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: stretch;
}

.footer-block {
  border: 1px solid rgba(248, 243, 238, 0.22);
  border-radius: 0.75rem;
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.06);
}

.footer-block h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: #ffffff;
}

.footer-block p {
  margin: 0.12rem 0;
  color: #f2e7dc;
}

.footer-block-contact .social-icons {
  margin-top: 0.45rem;
}

.site-footer a {
  color: #ffffff;
}

.footer-block-logo {
  display: grid;
  place-items: center;
}

.footer-logo2 {
  display: block;
  width: min(180px, 95%);
  height: auto;
  margin: 0;
}

.footer-block-ue {
  display: grid;
  place-items: center;
}

.footer-ue-logo {
  display: block;
  width: min(220px, 92%);
  height: auto;
}

.footer-social-icons .social-icon {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.footer-social-icons .social-icon:hover,
.footer-social-icons .social-icon:focus-visible {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.18);
}

.footer-bottom {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(248, 243, 238, 0.24);
}

.legal {
  max-width: none;
  color: #f8f3ee;
  margin: 0;
}

.legal-intro {
  text-align: center;
}

.compact-footer {
  justify-content: center;
}

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

@media (max-width: 880px) {
  .instagram-embeds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    right: 5vw;
    top: 4.2rem;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(28, 21, 16, 0.98);
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    padding: 0.5rem;
    min-width: 220px;
    transform-origin: top right;
    transform: scale(0.92);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .main-nav.open {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }

  .nav-dropdown {
    width: 100%;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .nav-dropdown-toggle {
    margin-left: 0.25rem;
  }

  .nav-dropdown-menu {
    position: static;
    display: none;
    margin-top: 0.2rem;
    width: 100%;
    min-width: 0;
    box-shadow: none;
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu,
  .nav-dropdown.is-open .nav-dropdown-menu {
    display: flex;
  }

  .lang-switch {
    margin-left: 0;
    margin-top: 0.25rem;
  }

  .instagram-feed {
    padding: 1.2rem;
  }

  .social-follow {
    justify-content: center;
  }

  .social-text {
    text-align: center;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-block-contact .social-icons {
    gap: 0.7rem;
  }

  .footer-social-icons .social-icon {
    width: 2.55rem;
    height: 2.55rem;
  }

  .footer-social-icons .social-icon svg {
    width: 1.3rem;
    height: 1.3rem;
  }

  .instagram-embeds {
    grid-template-columns: 1fr;
  }

  .instagram-embed {
    width: min(100%, 280px);
    max-width: 280px;
    height: 520px;
  }

  .media-story-text p {
    width: min(1080px, 90vw);
  }

  .media-placeholder,
  .media-story-figure,
  .media-image {
    min-height: 220px;
  }
}
