/* ============================================================
   Node detail pages — estilos comunes para páginas de nodo
   ============================================================ */

/* Hero image */
.node-detail-hero {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin-bottom: 0;
}
.node-detail-hero--rounded {
  border-radius: 34px;
  margin-bottom: 1.5rem;
}

/* Tecnologías hero: inside wrapper, rounded corners */
.tecnologias-hero {
  border-radius: 34px;
  margin-bottom: 1.5rem;
}

/* Wrapper contenido */
.node-detail-wrapper {
  padding: 2rem 0 3rem;
  overflow: hidden;
  max-width: 100%;
}

/* Badges superiores (Opinión, Comunicado, Fuente…) */
.node-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0.75rem;
}
.node-detail-badge {
  display: inline-block;
  background: var(--rtvc-blue, #0943B5);
  color: #fff;
  padding: 3px 12px;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.node-detail-badge--rojo {
  background: var(--color-primary, #c7013d);
}
.node-detail-badge--gris {
  background: #555;
}

/* Título */
.node-detail-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #0943b5;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

/* Metadata (fecha, fuente) */
.node-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.88rem;
  color: #666;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}
.node-detail-meta .meta-icon {
  margin-right: 4px;
}

/* Cuerpo */
.node-detail-body {
  font-size: 1rem;
  line-height: 1.75;
  color: #333;
}
.node-detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: 34px;
}
.node-detail-body iframe {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
}
.node-detail-body p {
  margin-bottom: 1.1rem;
}
.node-detail-body h2 {
  color: #0943b5;
  font-size: 24px;
}
.node-detail-body h3,
.node-detail-body h4 {
  color: #0943b5;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.node-detail-body a {
  color: #0052A3;
}
.node-detail-body a:visited {
  color: #6b21a8;
}
.node-detail-body ul {
  list-style: none;
  padding-left: 0;
}
.node-detail-body ul li {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
}
.node-detail-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  background-color: #0943b5;
  border-radius: 50%;
}
.node-detail-body blockquote {
  background: #fff;
  border: 1px solid #f2f2f2;
  border-radius: 0;
  padding: 2rem 2.5rem;
  color: #4b4b4b;
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 1.5rem 0;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

/* Tags */
.node-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e0e0e0;
}
.node-detail-tags a {
  display: inline-block;
  background: #f0f4fb;
  color: #0052A3;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s;
}
.node-detail-tags a:hover {
  background: #d8e4f5;
  text-decoration: none;
}

/* ============================================================
   Galería de imágenes (nodo galer_a)
   ============================================================ */
.node-gallery-section {
  margin-top: 2rem;
}

/* Thumbnails grid: 4 columns x 2 rows */
.node-gallery-thumbs-wrapper {
  position: relative;
}
.node-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 20px;
}
.node-gallery-thumb {
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  /*aspect-ratio: 3/2;*/
  transition: border-color 0.2s, opacity 0.2s;
}
.node-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.node-gallery-thumb:hover {
  opacity: 0.8;
}
.node-gallery-thumb.active {
  border-color: #0943b5;
}
.node-gallery-thumbs-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  padding: 0;
}
.node-gallery-thumbs-nav svg {
  stroke: #c7013d;
  width: 36px;
  height: 36px;
}
.node-gallery-thumbs-nav:hover {
  background: rgba(226,1,69,0.1);
}
.node-gallery-thumbs-prev {
  left: -16px;
}
.node-gallery-thumbs-next {
  right: -16px;
}

/* Main carousel */
.node-gallery-carousel {
  position: relative;
  margin-top: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}
.node-gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: #000;
  overflow: hidden;
}
.node-gallery-slide {
  display: none;
  position: absolute;
  inset: 0;
}
.node-gallery-slide.active {
  display: block;
}
.node-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.node-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  padding: 0;
  transition: background 0.2s;
}
.node-gallery-nav svg {
  stroke: #fff;
  width: 44px;
  height: 44px;
}
.node-gallery-nav:hover {
  background: rgba(255,255,255,0.2);
}
.node-gallery-prev {
  left: 12px;
}
.node-gallery-next {
  right: 12px;
}

/* ============================================================
   Tecnologías — información lateral
   ============================================================ */
.node-tecnologia-meta {
  background: #f0f4fb;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}
.node-tecnologia-meta h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0052A3;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991px) {
  .node-detail-title {
    font-size: 2rem;
  }
  .node-gallery-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 576px) {
  .node-detail-title {
    font-size: 1.35rem;
  }
  .node-gallery-thumbs {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .node-detail-wrapper {
    padding: 1.25rem 0 2rem;
  }
}

/* ============================================================
   Widget "¿Cómo le ha parecido esta información?"
   ============================================================ */
.node-useful-widget {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.node-useful-question {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0943b5;
  margin-bottom: 1rem;
}

.node-useful-buttons {
  display: flex;
  gap: 16px;
}

.node-useful-count {
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 1.5em;
}

.node-useful-feedback {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: #555;
  font-style: italic;
}

@media (max-width: 576px) {
  .node-useful-question {
    font-size: 1.1rem;
  }
}

/* ============================================================
   Webform embebido (cotización coubicación, etc.)
   ============================================================ */
.node-webform-section {
  margin-top: 2rem;
}

/* Fieldset title (estación primaria/secundaria) */
.node-webform-section fieldset > legend,
.node-webform-section .fieldset-legend {
  color: #0943b5;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Labels — azul bold */
.node-webform-section .form-item label,
.node-webform-section .js-form-item label {
  color: #0943b5;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* Descriptions — gris, debajo del label */
.node-webform-section .form-item .description,
.node-webform-section .js-form-item .description {
  color: #4b4b4b;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

/* Inputs — borde gris, esquinas redondeadas, sombra */
.node-webform-section select,
.node-webform-section .form-select {
  border: 1px solid #c8c8c8;
  border-radius: 5px;
  padding: 8px 12px;
  height: 40px;
  max-width: 457px;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.node-webform-section input[type="number"],
.node-webform-section input[type="text"],
.node-webform-section .form-number,
.node-webform-section .form-text {
  border: 1px solid #c8c8c8;
  border-radius: 5px;
  padding: 8px 12px;
  height: 40px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.node-webform-section input[type="number"]:focus,
.node-webform-section input[type="text"]:focus,
.node-webform-section select:focus {
  border-color: #0943b5;
  box-shadow: 0 2px 6px rgba(9, 67, 181, 0.2);
  outline: none;
}

/* Input group (input + suffix badge) — inline flex */
.node-webform-section .input-group {
  display: flex;
  flex-wrap: nowrap;
  max-width: 457px;
}
.node-webform-section .input-group .form-control {
  flex: 1 1 auto;
  width: auto;
  border-radius: 5px 0 0 5px;
}
.node-webform-section .input-group .input-group-text {
  flex: 0 0 auto;
  background: #b5c7e9;
  color: #0943b5;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid #b5c7e9;
  border-radius: 0 5px 5px 0;
  padding: 8px 16px;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
/* Input sin suffix — ancho completo */
.node-webform-section .form-item:not(.webform-has-field-suffix) input[type="number"],
.node-webform-section .form-item:not(.webform-has-field-suffix) input[type="text"] {
  max-width: 457px;
  width: 100%;
}

/* Spacing entre campos */
.node-webform-section .form-item,
.node-webform-section .js-form-item {
  margin-bottom: 1.5rem;
}

/* Select (netpicker) — una sola flecha nativa */
.node-webform-section .form-select {
  max-width: 457px;
  background-image: none;
  appearance: auto;
  -webkit-appearance: auto;
}

/* CAPTCHA section styling */
.node-webform-section .captcha {
  margin-top: 1.5rem;
}
.node-webform-section .captcha .fieldset-legend {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0943b5;
}
.node-webform-section .captcha .fieldset-wrapper .description {
  font-size: 0.9rem;
  color: #4b4b4b;
  margin-bottom: 0.75rem;
}

/* ============================================================
   Mapas de Red — Bootstrap 5 tabs con estilo RTVC
   ============================================================ */
.mapas-tabs {
  border-bottom: none;
  margin-top: 1.5rem;
  margin-bottom: 0;
  gap: 6px;
  padding: 0;
  display: flex;
}
.mapas-tabs .nav-item {
  flex: 1;
}
.mapas-tabs .nav-link {
  color: #4b4b4b;
  font-weight: 400;
  font-size: 1.05rem;
  border: none;
  border-bottom: 3px solid #afafaf;
  border-radius: 5px 5px 0 0;
  padding: 16px 20px;
  text-align: center;
  width: 100%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.mapas-tabs .nav-link:hover {
  color: #0943b5;
  background: #edf3fd;
}
.mapas-tabs .nav-link.active {
  color: #0943b5;
  font-weight: 600;
  border-bottom: 3px solid #c7013d;
  border-radius: 2px 2px 0 0;
  background: #edf3fd;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}
.mapas-tab-content {
  padding: 1.5rem 0;
}
.mapas-tab-content h4 {
  color: #0943b5;
  margin-bottom: 1rem;
  font-size: 1.15rem;
  font-weight: 700;
}
.mapas-tab-content .ratio {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.mapas-tab-content iframe {
  border: none;
}
@media (max-width: 576px) {
  .mapas-tabs .nav-link {
    font-size: 0.85rem;
    padding: 10px 8px;
  }
}

/* ============================================================
   En los medios — detalle
   ============================================================ */
.node--en-los-medios .node-detail-hero--rounded {
  border-radius: 34px;
}
/* Hide the "Lee la nota completa acá" link that comes inside the body field */
.node--en-los-medios .node-detail-body p:last-child:has(> a:only-child) {
  display: none;
}
.en-medios-fuente {
  margin: 1.5rem 0;
}
.en-medios-fuente-url {
  margin: 1rem 0 1.5rem;
  font-size: 1rem;
  word-break: break-all;
}
.en-medios-fuente-url .en-medios-fuente-label {
  display: block;
  color: #c7013d;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.en-medios-fuente-url a {
  color: #0943b5;
  text-decoration: underline;
}

