:root {
  --bs-primary: #02734A;
  --azul-oscuro: #1B8CA6;
  --azul-claro: #1BA1BF;
  --verde: #038C5A;
  --blanco: #F2F2F2;
  --ink: #16241f;
  --ocre: #BE9A28;
  --ocre-oscuro: #8C7420;
  --ocre-claro: #E2D29E;
}

* { font-family: 'Open Sans', sans-serif; }
h1, h2, h3, h4, h5, .navbar-brand, .btn, .fw-heading { font-family: 'Poppins', sans-serif; }

body { background-color: #fff; color: var(--ink); }
.text-primary { color: var(--bs-primary) !important; }
.bg-primary { background-color: var(--bs-primary) !important; }
.bg-light-tint { background-color: var(--blanco) !important; }
.btn-primary {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}
.btn-primary:hover {
  background-color: var(--azul-oscuro) !important;
  border-color: var(--azul-oscuro) !important;
}
.btn-outline-primary {
  color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}
.btn-outline-primary:hover {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: #fff !important;
}

/* Topbar */
.topbar {
  background-color: var(--bs-primary);
  padding: 8px 0;
  font-size: 0.85rem;
}
.topbar a { color: #fff; text-decoration: none; }

/* Navbar */
.navbar { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.navbar-brand h1 { font-size: 1.7rem; font-weight: 800; margin: 0; }
.nav-link { font-weight: 600; color: #25383C !important; margin: 0 8px; }
.nav-link.active, .nav-link:hover { color: var(--bs-primary) !important; }

/* Hero carousel */
.carousel-header .carousel-item { height: 82vh; }
.carousel-header img { height: 82vh; width: 100%; object-fit: cover; }
.carousel-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2,40,30,0.75) 0%, rgba(2,40,30,0.25) 55%, rgba(2,40,30,0.05) 100%);
  pointer-events: none;
}
.carousel-header { position: relative; }
.carousel-caption-custom {
  position: absolute;
  top: 50%;
  left: 8%;
  transform: translateY(-50%);
  max-width: 620px;
  z-index: 5;
  text-align: left;
}
.carousel-caption-custom h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 800; color: #fff; }
.carousel-caption-custom p { color: #f0f0f0; font-size: 1.1rem; margin: 1rem 0 1.5rem; }

/* About */
.about-collage { position: relative; min-height: 420px; }
.about-collage img { position: absolute; border-radius: 0.5rem; box-shadow: 0 10px 30px rgba(0,0,0,0.18); object-fit: cover; }
.about-collage .img-a { width: 65%; height: 300px; top: 0; left: 0; }
.about-collage .img-b { width: 45%; height: 200px; bottom: 0; right: 0; border: 6px solid #fff; }

/* Foto única de "Quiénes somos"*/
.about-photo {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: 0.6rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.checklist li { margin-bottom: 0.6rem; }
.checklist i { color: var(--bs-primary); margin-right: 0.5rem; }

/* Why choose us */
.why-item {
  background-color: var(--blanco);
  border-radius: 0.6rem;
  border-top: 4px solid transparent;
  padding: 2rem 1.5rem;
  height: 100%;
  transition: transform 0.25s ease;
}
.why-item:hover { transform: translateY(-4px); }
.why-item .icon {
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--bs-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.why-accent-1 { border-top-color: var(--bs-primary); }
.why-accent-1 .icon { background-color: var(--bs-primary); }

.why-accent-2 { border-top-color: var(--ocre-oscuro); }
.why-accent-2 .icon { background-color: var(--ocre-oscuro); }

.why-accent-3 { border-top-color: var(--azul-oscuro); }
.why-accent-3 .icon { background-color: var(--azul-oscuro); }

/* Feature (I+D / Capacitación / Asesoramiento) split section */
.feature-block { background-color: #fff; }
.feature-block img { border-radius: 0.6rem; box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
.feature-line { display: flex; align-items: flex-start; margin-bottom: 1.2rem; }
.feature-line .num {
  width: 42px; height: 42px; flex-shrink: 0;
  background-color: var(--bs-primary); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin-right: 1rem;
}

/* Placeholder de foto pendiente (mockup 3, sección Asesoramiento) */
.feature-placeholder {
  width: 100%;
  height: 340px;
  border: 2px dashed #c7d0cc;
  border-radius: 0.6rem;
  background-color: #f7f9f8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b978f;
  font-style: italic;
  text-align: center;
  padding: 1.5rem;
}

/* Link con ícono hacia infraestructura.html */
.link-infraestructura {
  color: var(--azul-oscuro);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}
.link-infraestructura:hover { color: var(--azul-claro); text-decoration: underline; }

/* Services (mockup 1) / Servicio (mockup 3) — misma tarjeta, dos nombres */
.service-card,
.servicio-card {
  border: 1px solid #e7e7e7;
  border-radius: 0.6rem;
  padding: 2rem 1.5rem;
  height: 100%;
  position: relative;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.service-card:hover,
.servicio-card:hover { box-shadow: 0 12px 28px rgba(2,115,74,0.15); transform: translateY(-4px); }
.service-card .icon,
.servicio-card .icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background-color: rgba(2,115,74,0.1);
  color: var(--bs-primary);
  border-radius: 0.5rem;
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
}
.service-card a,
.servicio-card a { color: var(--bs-primary); font-weight: 600; text-decoration: none; font-size: 0.95rem; }

/* Panel oscuro que agrupa las servicio-card (sección "Más Servicios") */
.servicios-panel {
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--azul-oscuro) 100%);
  border-radius: 0.6rem;
  padding: 3rem 2rem;
}
.servicios-panel .servicio-card { background-color: #fff; border: none; }
.servicios-panel .servicio-card .icon {
  width: 60px; height: 60px;
  background-color: var(--bs-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Badge "Habilitado por INASE" */
.badge-inase {
  display: inline-block;
  background-color: rgba(2,115,74,0.1);
  color: var(--bs-primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.7rem;
  border-radius: 1rem;
  margin-bottom: 0.8rem;
}

/* Teaser de publicaciones: foto con overlay de texto */
.pub-teaser-photo {
  position: relative;
  border-radius: 0.6rem;
  overflow: hidden;
  min-height: 320px;
}
.pub-teaser-photo img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}
.pub-teaser-content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(2,40,30,0.88) 0%, rgba(2,40,30,0.55) 70%, rgba(2,40,30,0) 100%);
  padding: 2rem;
}

/* Formulario de contacto */
.contact-form .form-control {
  border-radius: 0.4rem;
  padding: 0.75rem 1rem;
  border: 1px solid #dcdfdd;
}
.contact-form .form-control:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(2,115,74,0.15);
}

/* Mapa de contacto */
.contact-map {
  border-radius: 0.6rem;
  overflow: hidden;
  min-height: 320px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
}

/* Download / donation-style section */
.donation-panel { background: linear-gradient(135deg, var(--bs-primary) 0%, var(--azul-oscuro) 100%); border-radius: 0.6rem; color: #fff; padding: 2.5rem; }
.donation-panel img { border-radius: 0.5rem; box-shadow: 0 10px 24px rgba(0,0,0,0.25); }

/* ============================================= */
/* Encabezado de páginas internas (page-banner)   */
/* ============================================= */
.page-banner {
  position: relative;
  min-height: 340px;
  overflow: hidden;
}
.page-banner img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}
.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2,40,30,0.85) 0%, rgba(2,40,30,0.35) 60%, rgba(2,40,30,0.05) 100%);
  pointer-events: none;
}
.page-banner-caption {
  position: absolute;
  left: 8%;
  bottom: 2rem;
  z-index: 5;
  max-width: 700px;
}
.page-banner-caption h5 { font-size: 1.05rem; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.page-banner-caption h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 800; }

/* ============================================= */
/* Equipo: Misión/Visión y tarjetas de integrantes */
/* ============================================= */
.mv-block {
  background-color: #fff;
  border-left: 4px solid var(--bs-primary);
  border-radius: 0.5rem;
  padding: 2rem;
  height: 100%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}
.mv-block h5 { color: var(--bs-primary); text-transform: uppercase; font-weight: 700; margin-bottom: 0.8rem; }

.team-card {
  background-color: #fff;
  border: 1px solid #e7e7e7;
  border-top: 4px solid transparent;
  border-radius: 0.6rem;
  padding: 2rem 1.5rem;
  text-align: center;
  height: 100%;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.team-card:hover { box-shadow: 0 12px 28px rgba(2,115,74,0.15); transform: translateY(-4px); }

.team-accent-1 { border-top-color: var(--bs-primary); }
.team-accent-1 .team-photo { border: 3px solid var(--bs-primary); box-shadow: 0 0 0 5px rgba(2,115,74,0.12); }

.team-accent-2 { border-top-color: var(--ocre-oscuro); }
.team-accent-2 .team-photo { border: 3px solid var(--ocre-oscuro); box-shadow: 0 0 0 5px rgba(140,116,32,0.15); }

.team-accent-3 { border-top-color: var(--azul-oscuro); }
.team-accent-3 .team-photo { border: 3px solid var(--azul-oscuro); box-shadow: 0 0 0 5px rgba(27,140,166,0.12); }

.team-photo {
  width: 90px; height: 90px;
  margin: 0 auto 1.2rem;
  display: flex; align-items: center; justify-content: center;
  background-color: rgba(2,115,74,0.1);
  color: var(--bs-primary);
  border-radius: 50%;
  font-size: 2.2rem;
  overflow: hidden; 
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-body h5 { margin-bottom: 0.2rem; }
.team-role { color: var(--azul-oscuro); font-weight: 600; font-size: 0.85rem; margin-bottom: 0.8rem; }
.team-lines { font-size: 0.9rem; color: #5a655f; margin-bottom: 1rem; }
.team-body a { color: var(--bs-primary); font-weight: 600; text-decoration: none; font-size: 0.9rem; }
.team-body a:hover { text-decoration: underline; }

/* ============================================= */
/* Cursos / Publicaciones: tarjetas pub-card       */
/* ============================================= */
.pub-card {
  background-color: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 0.6rem;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.pub-card:hover { box-shadow: 0 12px 28px rgba(2,115,74,0.15); transform: translateY(-4px); }
.pub-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.pub-cover.placeholder {
  border: none;
  border-bottom: 2px dashed #c7d0cc;
  background-color: #f7f9f8;
  color: #8b978f;
  font-style: italic;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Fotos de cursos: relación de aspecto en vez de altura fija, para que no se deformen al cambiar el ancho de la tarjeta */
.curso-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.pub-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.pub-body h5 { margin-bottom: 0.6rem; }
.pub-body .btn { align-self: flex-start; margin-top: auto; }
.curso-fecha, .curso-precio { font-size: 0.9rem; color: #5a655f; margin-bottom: 0.4rem; }
.curso-fecha i, .curso-precio i { color: var(--bs-primary); }

/* ============================================= */
/* I+D: badges de estado de desarrollo tecnológico */
/* ============================================= */
.badge-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.7rem;
  border-radius: 1rem;
  margin-bottom: 0.8rem;
}
.badge-status.available { background-color: rgba(2,115,74,0.1); color: var(--bs-primary); }
.badge-status.development { background-color: rgba(27,140,166,0.12); color: var(--azul-oscuro); }

/* ============================================= */
/* Infraestructura: lista de equipamiento y galería */
/* ============================================= */
.equip-list {
  list-style: none;
  padding-left: 0;
  columns: 1;
}
.equip-list li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.7rem;
}
.equip-list li::before {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: var(--bs-primary);
  position: absolute;
  left: 0;
  top: 0.15rem;
}
@media (min-width: 768px) {
  .equip-list { columns: 2; column-gap: 2rem; }
  .equip-list li { break-inside: avoid; }
}

.gallery-thumb {
  width: 100%;
  height: 160px;
  border: 2px dashed #c7d0cc;
  border-radius: 0.6rem;
  background-color: #f7f9f8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b978f;
  font-style: italic;
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

.logo-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.logo-item {
  background-color: var(--blanco);
  border-radius: 0.4rem;
  padding: 0.9rem 1.6rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #5a655f;
  font-size: 0.9rem;
}

/* ============================================= */
/* Publicaciones: buscador y listado de papers     */
/* ============================================= */
.paper-search {
  border-radius: 2rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid #dcdfdd;
  display: block;
  margin: 0 auto;
}
.paper-search:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(2,115,74,0.15);
}
.paper-list { max-width: 900px; margin: 0 auto; }
.paper-item {
  background-color: #fff;
  border-radius: 0.5rem;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}
.paper-authors { font-size: 0.85rem; color: #5a655f; margin-bottom: 0.3rem; }
.paper-title { font-weight: 600; margin-bottom: 0.3rem; }
.paper-journal { font-size: 0.85rem; color: #5a655f; margin-bottom: 0; font-style: italic; }
.paper-journal a { color: var(--bs-primary); font-style: normal; font-weight: 600; text-decoration: none; }
.paper-journal a:hover { text-decoration: underline; }
.paper-empty { text-align: center; color: #8b978f; font-style: italic; display: none; }

/* ============================================= */
/* Acordeón de preguntas frecuentes (FAQ)          */
/* ============================================= */
.accordion-item {
  border: none;
  border-left: 4px solid var(--bs-primary);
  border-radius: 0.6rem;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}
.accordion-item + .accordion-item { margin-top: 1rem; }
.accordion-item:nth-child(3n+2) { border-left-color: var(--ocre-oscuro); }
.accordion-item:nth-child(3n) { border-left-color: var(--azul-oscuro); }

.accordion-button {
  font-weight: 600;
  color: var(--ink);
  background-color: #fff;
  padding: 1.2rem 1.5rem;
}
.accordion-button:not(.collapsed) {
  color: var(--bs-primary);
  background-color: rgba(2,115,74,0.06);
  box-shadow: none;
}
.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(2,115,74,0.15);
  border-color: transparent;
}
.accordion-body { padding: 0.2rem 1.5rem 1.5rem; color: #5a655f; }

/* Footer */
.footer { background-color: #101f1a; color: #cdd6d2; }
.footer a { color: #cdd6d2; text-decoration: none; display: block; margin-bottom: 0.5rem; }
.footer a:hover { color: var(--azul-claro); }
.btn-square {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background-color: rgba(255,255,255,0.08);
  border-radius: 50%; color: #fff !important;
}
.copyright { background-color: #0b1713; color: #9fada8; font-size: 0.85rem; }
