/* ===== BASE ===== */
html,
body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: #f5f5f5;
  color: #1f2933;
  padding-top: var(--header-offset);
}

/* ===== NAVBAR ===== */
.navbar {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06);
  z-index: 1030;
}

.navbar-logo {
  height: 80px;
  max-height: 80px;
}

@media (max-width: 575.98px) {
  .navbar-logo {
    height: 60px;
    max-height: 60px;
  }
}

.nav-link {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.1rem;
  width: 0;
  height: 2px;
  background: #43c668;
  transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 480px;
  padding: 4rem 0 5rem;
  background-image: url("img/backgrnd_wider.jpg");
  background-repeat: no-repeat;
  background-position: center right;
  background-size: cover;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.46) 0%,
    rgba(0, 0, 0, 0.28) 40%,
    rgba(0, 0, 0, 0) 70%
  );
  pointer-events: none;
}

.hero-section > .container-xxl {
  position: relative;
  z-index: 1;
}

.hero-section .section-label,
.hero-section .hero-title {
  color: #fff !important;
}

/* etiqueta genérica */
.section-label {
  letter-spacing: 0.16em;
  font-size: 0.9rem;
  font-weight: 600;
  color: #00579b;
}

/* Card del hero */
.hero-card {
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.hero-card-ref {
  color: #00579b;
  font-weight: 700;
  font-size: 1.35rem;
}

.hero-card-call {
  color: #00579b;
  font-size: 1.15rem;
  line-height: 1.3;
}

.hero-card-subtitle,
.hero-card-label {
  font-size: 0.9rem;
  color: #6b7280;
}

.hero-card-title {
  font-size: 1rem;
  color: #0f172a;
}

.hero-card-value {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

/* ===== SLICES GENERALES ===== */
.slice {
  position: relative;
  width: 100%;
  min-height: 50vh;
  display: flex;
  align-items: center;
  padding: 4rem 0;
}

@media (min-width: 992px) {
  .slice {
    min-height: 55vh;
    padding: 6rem 0;
  }
}

.slice-content {
  position: relative;
  z-index: 1;
}

section[id] {
  scroll-margin-top: var(--header-offset);
}

.slice--light {
  background: #fff;
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1.5px);
  background-size: 18px 18px;
}

.slice--image {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  --tint-rgb: 0, 0, 0;
  --tint-alpha: 0.45;
}

.slice--image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(var(--tint-rgb), var(--tint-alpha));
  pointer-events: none;
}

.slice--image .section-label,
.slice--image .section-title,
.slice--image p {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* fondos específicos */
.slice--image-1 {
  background-image: url("img/background_2.jpg");
}

.slice--image-2 {
  background-image: url("img/background_3.jpg");
}

.slice--image-3 {
  background-image: url("img/background_5.jpg");
}

.slice .section-title {
  font-size: 1.9rem;
  font-weight: 600;
}

.slice-title-block {
  position: relative;
  padding-left: 1rem;
}

.slice-title-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #43c668;
  border-radius: 4px;
}

.slice--light .slice-title {
  font-size: clamp(2.2rem, 1.2rem + 2.4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.slice-two-col .col-lg-8 p {
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.35rem);
  line-height: 1.7;
  color: #374151;
  max-width: 58ch;
  padding-inline: 1.25rem;
}

@media (min-width: 1200px) {
  .slice-two-col .col-lg-8 p {
    max-width: 62ch;
    padding-inline: 1.5rem;
  }
}

@media (min-width: 992px) {
  .slice-two-col .col-lg-8 {
    padding-left: 0.5rem;
  }
}

@media (max-width: 991.98px) {
  .slice-title-block {
    margin-bottom: 0.5rem;
  }
}

/* ===== ACTIVIDADES ===== */
.actividades-section {
  background: #f1f5f9;
  padding: 4rem 0;
}

.activity-card {
  border-radius: 0.75rem;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#actividades .row.g-3 > .col {
  display: flex;
}

.activity-card:hover {
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.25);
  transform: translateY(-2px);
}

.activity-card h3,
#actividades .activity-card p {
  color: #fff;
}

.activity-logo {
  max-height: 60px;
  width: auto;
  display: block;
  margin: 0 auto 1rem;
}

/* colores por actividad */
.activity-cobra {
  background: #00579b;
}
.activity-keyter {
  background: #009664;
}
.activity-cedrion {
  background: #000;
}
.activity-uxama {
  background: #2ecec1;
}
.activity-global {
  background: #1048c1;
}
.activity-geopannel {
  background: #25d49c;
}

#actividades .activity-card {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 260px;
  padding: 2rem 1.5rem;
}

#actividades .activity-card h1,
#actividades .activity-card h2,
#actividades .activity-card h3,
#actividades .activity-card h4,
#actividades .activity-card h5,
#actividades .activity-card h6,
#actividades .activity-card p {
  color: #ffffff !important;
}

#actividades .activity-card h3 {
  font-weight: 600;
  line-height: 1.35;
  font-size: clamp(1rem, 0.9rem + 0.25vw, 1.15rem);
  margin-bottom: 0.25rem;
}

#actividades .activity-card .activity-leader {
  font-size: 0.95rem;
  opacity: 0.95;
  margin: 0;
}

#actividades .activity-logo {
  max-height: 70px;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.75rem;
}

@media (max-width: 575.98px) {
  #actividades .activity-card {
    min-height: 220px;
    padding: 1.5rem 1rem;
  }
}

/* ===== CONSORCIO ===== */
.consorcio-section {
  background: #fff;
  padding: 4rem 0;
}

.partner-logo {
  max-height: 60px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.partner-card {
  color: inherit;
}

.partner-card:hover {
  text-decoration: none;
}

#consorcio .partner-card:hover .partner-logo {
  filter: none;
  opacity: 1;
  transform: translateY(-4px);
}

/* ===== FINANCIACIÓN + FOOTER ===== */
.financiacion-section {
  background: #f9fafb;
  padding: 2.5rem 0;
  border-top: 1px solid #e5e7eb;
}

.footer {
  background: #fff;
  font-size: 1rem;
  color: #6b7280;
  padding: 1.5rem 0 2.5rem;
}

.footer-company-name {
  color: #00579b;      
  font-weight: 600;
}

.footer-copy {
  margin-top: 0.5rem;
}


.financiacion-section .fin-narrow {
  max-width: 720px;
  margin-inline: auto;
  padding-inline: 0.75rem;
}

.financiacion-section .logos-row {
  --bs-gutter-x: 0.375rem;
  --bs-gutter-y: 0.375rem;
  text-align: center;
}

.fin-logo {
  max-height: 60px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ===== SLICES COMPACTAS (las verdes) ===== */
.slice--compact {
  min-height: 38vh;
  padding: 3rem 0;
}

@media (min-width: 992px) {
  .slice--compact {
    min-height: 44vh;
    padding: 3.5rem 0;
  }
}

@media (max-width: 991.98px) {
  .slice--compact {
    min-height: auto;
    padding: 2.5rem 0;
  }
}

.slice--image .slice-title-block {
  padding-left: 1.25rem;
}

.slice--image .slice-title-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: #fff;
  border-radius: 6px;
  opacity: 0.95;
}

.slice--image .slice-title {
  font-size: clamp(2.2rem, 1.2rem + 2.4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.slice--image .slice-two-col .col-lg-8 p {
  color: #fff;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.35rem);
  line-height: 1.7;
  max-width: 58ch;
  padding-inline: 1.25rem;
}

@media (min-width: 1200px) {
  .slice--image .slice-two-col .col-lg-8 p {
    max-width: 62ch;
    padding-inline: 1.5rem;
  }
}

/* ===== TINTES PARA SLICES CON IMAGEN ===== */
.slice--image.tint-gradient::before {
  background: linear-gradient(
    90deg,
    rgba(var(--tint-rgb), calc(var(--tint-alpha) * 1)) 0%,
    rgba(var(--tint-rgb), calc(var(--tint-alpha) * 0.8)) 38%,
    rgba(var(--tint-rgb), calc(var(--tint-alpha) * 0.6)) 100%
  );
}

/* distintos tonos de verde */
.tint-78e68d {
  --tint-rgb: 120, 230, 141;
}
.tint-71e590 {
  --tint-rgb: 113, 229, 144;
}
.tint-018377 {
  --tint-rgb: 1, 131, 119;
}
.tint-8eef8e {
  --tint-rgb: 142, 239, 142;
}
.tint-b8ef68 {
  --tint-rgb: 184, 239, 104;
}
.tint-077d71 {
  --tint-rgb: 7, 125, 113;
}
.tint-005758 {
  --tint-rgb: 0, 87, 88;
}

.tint-30 {
  --tint-alpha: 0.3;
}
.tint-40 {
  --tint-alpha: 0.4;
}
.tint-45 {
  --tint-alpha: 0.45;
}
.tint-55 {
  --tint-alpha: 0.55;
}
.tint-65 {
  --tint-alpha: 0.65;
}

/* ===== SECCIÓN RESUMEN ===== */
#resumen {
  --resumen-title-size: clamp(2.4rem, 1.4rem + 2.6vw, 3.2rem);
  --resumen-body-size: clamp(1.125rem, 0.95rem + 0.5vw, 1.35rem);
  --resumen-img-max-width: 460px;

  min-height: 70vh;
  padding: 6rem 0;
  background-image: url("img/trama.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

#resumen .slice-title {
  font-size: var(--resumen-title-size);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

#resumen .resumen-title-main {
  display: block;
  font-size: 1.35em;
  font-weight: 700;
}

#resumen .resumen-title-sub {
  display: block;
  font-size: 0.6em;
  margin-top: 0.2rem;
}

#resumen .section-intro.section-intro-lg {
  font-size: var(--resumen-body-size);
  line-height: 1.7;
  color: #1f2937;
  max-width: 58ch;
  margin-inline: auto;
}

#resumen.slice--image .section-label,
#resumen.slice--image .section-title,
#resumen.slice--image p {
  color: #1f2937;
  text-shadow: none;
}

#resumen.slice--image::before {
  background: rgba(255, 255, 255, 0.65);
}

#resumen.slice--light {
  background-image: none;
  background-color: transparent;
}

#resumen .resumen-figure {
  max-width: var(--resumen-img-max-width);
  margin: 0 auto;
  transition: transform 0.35s ease, filter 0.35s ease;
}

#resumen .resumen-img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.12));
}

#resumen .resumen-figure:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.16));
}

#resumen .resumen-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
  justify-content: center;
}

#resumen .resumen-tag {
  font-size: 0.8rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  font-weight: 500;
}


#resumen-gemelo {
  --tint-alpha: 0.04;  
}

#resumen-flexibilidad {
  --tint-alpha: 0.36;   
}

#resumen-gemelo.slice--image .section-label,
#resumen-gemelo.slice--image .section-title,
#resumen-gemelo.slice--image p {
  color: #1f2937;      
  text-shadow: none;
}

#resumen-gemelo .slice-title-block::before {
  background: #000000; 
}

#resumen-gemelo::before {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.7) 60%,
    rgba(252, 3, 3, 0) 100%
  );
}

#resumen-flexibilidad::before {
  background: linear-gradient(
    90deg,
    rgba(220, 219, 219, 0.1) 5%,
    rgba(82, 81, 81, 0.3) 20%,
    rgba(0, 0, 0, 0.42) 80%,
    rgb(255, 255, 255,0) 100%
  );
}

#resumen-diseno::before {
  background: linear-gradient(
    90deg,
    rgba(232, 232, 232, 0.1) 5%,
    rgba(82, 81, 81, 0.3) 20%,
    rgba(35, 35, 35, 0.42) 80%,
    rgb(255, 255, 255,0) 100%
  );
}

@media (min-width: 992px) {
  #resumen .resumen-tags {
    justify-content: flex-start;
  }
}

@media (min-width: 992px) {
  #resumen {
    min-height: 70vh;
    padding: 7rem 0;
  }
}

@media (max-width: 991.98px) {
  #resumen .section-label,
  #resumen .section-title,
  #resumen .section-intro {
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  #resumen {
    min-height: 90vh;
    padding: 4rem 0;
  }

  #resumen .resumen-figure {
    max-width: 260px;
  }
}

/* ===== OFFSET PARA NAVBAR FIJA + ANCLAS ===== */
:root {
  --header-offset: 80px;
}

section[id] {
  scroll-margin-top: var(--header-offset);
}

/* Tablet */
@media (max-width: 991.98px) {
  :root {
    --header-offset: 84px;
  }

  .navbar-logo {
    height: 64px;
    max-height: 64px;
  }
}

/* Móvil */
@media (max-width: 575.98px) {
  :root {
    --header-offset: 64px;
  }
}

/* ===== AJUSTES TEXTOS EN MÓVIL ===== */
@media (max-width: 575.98px) {
  #actividades .text-center p.text-muted {
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
    max-width: none;
  }

  #consorcio .text-center p.text-muted {
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
    max-width: none;
  }
}

/* ===== PARALLAX EN LAS 3 SECCIONES VERDES ===== */
@media (min-width: 992px) {
  #resumen-diseno,
  #resumen-gemelo,
  #resumen-flexibilidad {
    background-attachment: fixed;   
    background-position: center center;
  }
}

.activity-uxama {
  background: #1b7b73;   
}

.activity-geopannel {
  /* antes: #25d49c */
  background: #167f5d;   
}


.activity-keyter {
  background: #006b46;  
}
