/* ==========================================================================
   Declaración de la fuente Ronzino (Formatos WOFF2)
   ========================================================================== */

/* Regular */
@font-face {
  font-family: "Ronzino";
  src: url("../fonts/Ronzino-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Oblique / Italic */
@font-face {
  font-family: "Ronzino";
  src: url("../fonts/Ronzino-Oblique.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Medium */
@font-face {
  font-family: "Ronzino";
  src: url("../fonts/Ronzino-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Medium Oblique / Italic */
@font-face {
  font-family: "Ronzino";
  src: url("../fonts/Ronzino-MediumOblique.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

/* Bold */
@font-face {
  font-family: "Ronzino";
  src: url("../fonts/Ronzino-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Bold Oblique / Italic */
@font-face {
  font-family: "Ronzino";
  src: url("../fonts/Ronzino-BoldOblique.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ==========================================================================
   Variables Globales (System Design)
   ========================================================================== */

:root {
  --color-gris: #e6e5e5;
  --color-azul: #635efa;
  --color-naranja: #ff9a86;
  --color-verde: #c0e1d2;
}

/* ==========================================================================
   Estilos de la Caja de Guía (Solo para la página System Design)
   ========================================================================== */

.system-design-title {
  text-align: center;
  color: var(--color-azul);
  font-size: 2.8rem;
  font-weight: 500;
  margin: 80px 0 40px 0;
  letter-spacing: -0.01em;
}

.guide-container {
  margin-top: 60px;
}

.guide-box {
  background-color: #fcfcfc;
  border: 2px dashed #cccccc;
  padding: 40px;
  margin: 60px auto;
}

.guide-title {
  display: flex;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 500;
  margin: 20px 0;
}

.guide-label {
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  color: #888888;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 10px;
  margin-bottom: 30px;
}

/* ==========================================================================
   Tipografía
   ========================================================================== */

.system-design-container {
  font-family: "Ronzino", sans-serif;
}

.typography-section {
  margin-top: 40px;
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.typo-row {
  display: flex;
  margin-bottom: 30px;
  align-items: flex-start;
}

.typo-label {
  flex: 0 0 250px;
  font-size: 1.25rem;
  padding-top: 5px;
}

.typo-sample {
  flex: 1;
  font-size: 2rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

/* Regular */
.typo-regular .typo-label,
.typo-regular .typo-sample {
  font-weight: 400;
  font-style: normal;
}

/* Oblique */
.typo-oblique .typo-label,
.typo-oblique .typo-sample {
  font-weight: 400;
  font-style: italic;
}

/* Medium */
.typo-medium .typo-label,
.typo-medium .typo-sample {
  font-weight: 500;
  font-style: normal;
}

/* Medium Oblique */
.typo-medium-oblique .typo-label,
.typo-medium-oblique .typo-sample {
  font-weight: 500;
  font-style: italic;
}

/* Bold */
.typo-bold .typo-label,
.typo-bold .typo-sample {
  font-weight: 700;
  font-style: normal;
}

/* Bold Oblique */
.typo-bold-oblique .typo-label,
.typo-bold-oblique .typo-sample {
  font-weight: 700;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .typo-row {
    flex-direction: column;
    margin-bottom: 40px;
  }

  .typo-label {
    flex: auto;
    margin-bottom: 10px;
  }

  .typo-sample {
    font-size: 1.5rem;
    word-break: break-all;
  }
}

/* ==========================================================================
   Jerarquía de Títulos (Global y Sección)
   ========================================================================== */

/* Título Global (Centrado, grande) */
.global-title {
  text-align: center;
  color: var(--color-azul);
  font-size: 2.8rem;
  font-weight: 500;
  margin: 80px 0 40px 0;
  letter-spacing: -0.01em;
}

/* Título de Sección (Izquierda, con línea inferior) */
.section-title {
  color: var(--color-azul) !important;
  font-size: 2rem;
  font-weight: 500;
  border-bottom: 1px solid #000000;
  padding-bottom: 15px;
  margin: 80px 0 30px 0;
}

/* --------------------------------------------------------------------------
   MODIFICADORES DE COLOR PARA TÍTULOS
   -------------------------------------------------------------------------- */
.section-title.color-naranja {
  color: var(--color-naranja);
}

.section-title.color-verde {
  color: var(--color-verde);
}

/* ==========================================================================
   Página: Línia de Recerca (page-linia.php)
   ========================================================================== */
.linia-recerca-container {
  max-width: 1200px;
  margin: 0 auto;
}

.linia-capcalera-imatge {
  width: 100%;
  max-height: 400px;
  overflow: hidden;
}

.linia-capcalera-imatge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .linia-recerca-container .guide-box {
    padding: 30px 20px !important;
  }
}

/* Ajustes Responsive para móviles */
@media (max-width: 768px) {
  .global-title {
    font-size: 2rem;
    margin: 50px 0 30px 0;
  }

  .section-title {
    font-size: 1.6rem;
    margin: 50px 0 20px 0;
  }
}

/* ==========================================================================
   Texto Introductorio (Lead Text)
   ========================================================================== */
.intro-text {
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.35;
  color: #000000;
  margin: 0;
}

/* Ajustes Responsive para móviles */
@media (max-width: 768px) {
  .guide-box {
    padding: 20px;
  }

  .intro-text {
    font-size: 1.4rem;
    line-height: 1.3;
  }
}

/* ==========================================================================
   Componente: Texto Dividido (Split Layout)
   ========================================================================== */

.content-split {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 40px;
}

.content-split-left {
}

.content-split-title {
  font-size: 2.2rem;
  font-weight: 500;
  color: #000000;
  line-height: 1.15;
  margin: 0;
}

.content-split-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content-split-right p,
.content-split-text {
  font-size: 1.25rem;
  font-weight: 400;
  color: #000000;
  line-height: 1.4;
  margin: 0;
}

/* ==========================================================================
   Ajustes Responsive (Móviles y Tablets) - Texto Dividido
   ========================================================================== */
@media (max-width: 992px) {
  .content-split {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .content-split-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }
}

/* ==========================================================================
   Sección de Bloques de Colores (Línia 1 y Línia 2)
   ========================================================================== */

.lines-section {
  display: flex !important;
  flex-direction: row !important;
  margin-top: 60px;
  width: 100%;
}

/* Modificador: usar quan el shortcode s'insereix dins d'un contenidor
   estret de Divi (ex: Row amb Content Width limitat) per trencar-lo
   i centrar-se respecte al viewport amb un ample propi més gran. */
.lines-section--full-bleed {
  width: 100vw !important;
  max-width: 1200px !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.line-block {
  flex: 1;
  padding: 40px 50px 60px 50px;
  display: flex;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
  flex-direction: column;
  color: #000000;
}

.line-orange {
  background-color: var(--color-naranja);
}

.line-green {
  background-color: var(--color-verde);
}

.lines-section a:hover .line-block {
  opacity: 0.85;
}

.line-header {
  font-size: 1.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.line-divider {
  width: 100%;
  height: 1px;
  background-color: #000000;
  margin-bottom: 40px;
}

.line-content {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 auto;
}

/* VARIANTE 2: Contenido detallado alineado a la izquierda */
.line-content-detailed {
  text-align: left;
}

.line-title {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 20px 0;
  color: #000000 !important;
}

.line-excerpt {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  color: #000000 !important;
}

.line-link {
  color: #000000 !important;
  text-decoration: underline;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.line-link:hover {
  opacity: 0.6;
}

/* ==========================================================================
   Ajustes Responsive (Móviles y Tablets)
   ========================================================================== */
@media (max-width: 768px) {
  .typo-row {
    flex-direction: column;
    margin-bottom: 40px;
  }

  .typo-label {
    flex: auto;
    margin-bottom: 10px;
  }

  .typo-sample {
    font-size: 1.5rem;
    word-break: break-all;
  }

  .lines-section {
    flex-direction: column !important;
  }

  .line-block {
    padding: 30px 20px;
  }

  .line-content {
    font-size: 1.8rem;
  }

  /* Ajustes responsive para la Variante 2 */
  .line-title {
    font-size: 1.6rem;
    margin-bottom: 15px;
  }

  .line-excerpt {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   Componente: Lista de Sublíneas (Imagen + Texto)
   ========================================================================== */

.sublines-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.subline-item {
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: 30px;
  align-items: flex-start;
}

.subline-image {
  width: 100%;
  display: flex;
}

.subline-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.subline-image img.grayscale {
  filter: grayscale(100%);
}

.subline-text {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.subline-title {
  font-size: 1.8rem;
  font-weight: 500;
  color: #000000;
  line-height: 1.15;
  margin: 0;
}

.subline-desc {
  font-size: 1.25rem;
  font-weight: 400;
  color: #000000;
  line-height: 1.4;
  margin: 0;
}

/* ==========================================================================
   Ajustes Responsive (Móviles y Tablets) - Lista de Sublíneas
   ========================================================================== */
@media (max-width: 992px) {
  .subline-item {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .subline-title {
    font-size: 1.6rem;
  }
}

/* ==========================================================================
   Sección Aproximació
   ========================================================================== */

.aproximacio-section {
  width: 100%;
}

.aproximacio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  align-items: stretch;
}

.aproximacio-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.aproximacio-heading {
  font-size: 2.2rem;
  font-weight: 700;
  color: #000000;
  text-align: center;
  line-height: 1.1;
  margin: 0;
  order: 1; /* Por defecto, el título es el elemento 1 */
}

.aproximacio-image {
  width: 100%;
  display: flex;
  overflow: hidden;
  order: 2; /* Por defecto, la imagen es el elemento 2 */
}

.aproximacio-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   CLASES MODIFICADORAS (Variantes)
   -------------------------------------------------------------------------- */

/* Variante de color: Filtro azul */
.aproximacio-image.filtre-blau {
  background-color: var(--color-azul);
}

.aproximacio-image.filtre-blau img {
  filter: grayscale(100%);
  mix-blend-mode: screen;
  opacity: 0.9;
}

.aproximacio-image.filtre-negre img {
  filter: grayscale(100%);
}

.aproximacio-col.imatge-dalt .aproximacio-heading {
  order: 2;
}

.aproximacio-col.imatge-dalt .aproximacio-image {
  order: 1;
}

/* ==========================================================================
   Ajustes Responsive (Móviles y Tablets)
   ========================================================================== */
@media (max-width: 992px) {
  .aproximacio-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .aproximacio-col .aproximacio-heading,
  .aproximacio-col.imatge-dalt .aproximacio-heading {
    font-size: 1.8rem;
    order: 1;
  }

  .aproximacio-col .aproximacio-image,
  .aproximacio-col.imatge-dalt .aproximacio-image {
    order: 2;
  }
}

/* ==========================================================================
   Componente: Filas Horizontales (Aproximació Variante 2)
   ========================================================================== */

.aproximacio-h-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-bottom: 60px;
}
.aproximacio-h-row:last-child {
  margin-bottom: 0;
}

.aproximacio-h-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  order: 1;
}

.aproximacio-h-title {
  font-size: 2rem;
  font-weight: 500;
  color: #000000;
  line-height: 1.15;
  margin: 0;
}

.aproximacio-h-desc {
  font-size: 1.25rem;
  font-weight: 400;
  color: #000000;
  line-height: 1.4;
  margin: 0;
}

.aproximacio-h-row .aproximacio-image {
  order: 2;
}
.aproximacio-h-row.imatge-esquerra .aproximacio-h-text {
  order: 2;
}

.aproximacio-h-row.imatge-esquerra .aproximacio-image {
  order: 1;
}

/* ==========================================================================
   Ajustes Responsive (Móviles y Tablets) - Filas Horizontales
   ========================================================================== */
@media (max-width: 992px) {
  .aproximacio-h-row,
  .aproximacio-h-row.imatge-esquerra {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 50px;
  }
  .aproximacio-h-row .aproximacio-h-text,
  .aproximacio-h-row.imatge-esquerra .aproximacio-h-text {
    order: 1;
  }

  .aproximacio-h-row .aproximacio-image,
  .aproximacio-h-row.imatge-esquerra .aproximacio-image {
    order: 2;
  }

  .aproximacio-h-title {
    font-size: 1.8rem;
  }
}

/* ==========================================================================
   Secció Projectes (Nou Disseny sense imatges)
   ========================================================================== */

.projectes-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  align-items: stretch;
  margin-bottom: 30px;
}

.projecte-card-v2 {
  background-color: var(--color-gris);
  padding: 40px 30px;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  color: #000000;
}

/* Títol del projecte */
.projecte-titol-v2 {
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 15px 0;
}

/* Agència / Finançador */
.projecte-agencia-v2 {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 25px;
}

/* Noms dels investigadors */
.projecte-investigadors-v2 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-top: auto;
}

/* Etiquetes */
.projecte-etiquetes-v2 {
  font-size: 1.1rem;
  font-weight: 400;
  margin-top: 15px;
}

/* ==========================================================================
   Ajustos Responsive (Mòbils i Tablets)
   ========================================================================== */
@media (max-width: 992px) {
  .projectes-grid-v2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ==========================================================================
   Componente: Cabecera de Proyecto Individual (Project Header)
   ========================================================================== */

.project-header {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 40px;
}

.project-header-image {
  flex: 0 0 350px;
}

.project-header-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.project-header-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Título principal (H1) */
.project-header-title {
  font-size: 2.8rem;
  font-weight: 500;
  color: #000000;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Subtítulo (H2) */
.project-header-subtitle {
  font-size: 1.6rem;
  font-weight: 400;
  color: #000000;
  line-height: 1.35;
  margin: 0;
}

/* Contenedor de las "etiquetas" circulares */
.project-header-indicators {
  display: flex;
  gap: 12px;
  flex: 0 0 auto;
}

/* El círculo base */
.indicator-circle {
  width: 45px;
  height: 45px;
  border-radius: 50%;
}

/* Modificadores de color para los círculos */
.indicator-verde {
  background-color: var(--color-verde);
}

.indicator-naranja {
  background-color: var(--color-naranja);
}

/* ==========================================================================
   Ajustes Responsive (Móviles y Tablets) - Cabecera de Proyecto
   ========================================================================== */
@media (max-width: 992px) {
  .project-header {
    flex-direction: column;
    gap: 25px;
  }

  .project-header-image {
    flex: 1 1 auto;
    width: 100%;
  }

  .project-header-indicators {
    order: -1;
  }

  .project-header-title {
    font-size: 2.2rem;
  }

  .project-header-subtitle {
    font-size: 1.3rem;
  }
}

/* ==========================================================================
   Componente: Cuerpo de Texto de Proyecto (Project Body)
   ========================================================================== */

.project-content-section {
  width: 100%;
}

.project-body-text p {
  font-size: 1.25rem;
  font-weight: 400;
  color: #000000;
  line-height: 1.5;
  margin: 0 0 25px 0;
}

.project-body-text a {
  color: var(--color-azul);
  text-decoration: none;
  border-bottom: 1px solid var(--color-azul);
  transition: opacity 0.3s ease;
}

.project-body-text a:hover {
  opacity: 0.6;
}

/* ==========================================================================
   Ajustes Responsive (Móviles y Tablets) - Cuerpo de Texto
   ========================================================================== */
@media (max-width: 768px) {
  .project-body-text p {
    font-size: 1.15rem;
  }
}

/* ==========================================================================
   Componente: Pestañas (Tabs Header)
   ========================================================================== */

.tabs-header {
  display: flex;
  gap: 40px;
  border-bottom: 1px solid #000000;
  padding-bottom: 15px;
  margin: 80px 0 40px 0;
}

/* Botones que actúan como títulos de sección */
.tab-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-azul);
  font-size: 2rem;
  font-weight: 500; /* Ronzino Medium */
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

/* Reducimos la opacidad de la pestaña inactiva para indicar cuál está abierta */
.tab-button:not(.active) {
  opacity: 0.4;
}

.tab-button:hover {
  opacity: 0.8;
}

/* ==========================================================================
   Componente: Grid de Investigadores (Cuadrados)
   ========================================================================== */

.researchers-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 30px;
}

.researcher-square {
  background-color: var(--color-gris);
  width: 100%;
  aspect-ratio: 1 / 1;
}

/* ==========================================================================
   Ajustes Responsive (Móviles y Tablets) - Pestañas e Investigadores
   ========================================================================== */
@media (max-width: 992px) {
  .tabs-header {
    gap: 20px;
    flex-wrap: wrap;
  }

  .tab-button {
    font-size: 1.6rem;
  }

  .researchers-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .researchers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ==========================================================================
   Componente: Información Técnica
   ========================================================================== */

.technical-info-section {
  width: 100%;
}

.technical-info-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.tech-info-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 15px;
  font-size: 1.35rem;
  line-height: 1.4;
  color: #000000;
  align-items: flex-start;
}

.tech-info-label {
  font-weight: 700;
  margin: 0;
}

.tech-info-value {
  font-weight: 400;
}

/* ==========================================================================
   Ajustes Responsive (Móviles y Tablets) - Información Técnica
   ========================================================================== */
@media (max-width: 768px) {
  .technical-info-list {
    gap: 15px;
  }

  .tech-info-row {
    font-size: 1.15rem;
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

/* ==========================================================================
   Componente: Botones y Enlaces (Btn Link)
   ========================================================================== */

.btn-link {
  display: inline-block;
  color: #000000;
  font-size: 1.35rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

/* Efecto al pasar el ratón */
.btn-link:hover {
  opacity: 0.6;
  text-underline-offset: 6px;
}
