/* ========= Home: Hero ========= */
.hero {
  color: #fff; 
  background: var(--blue-logo);
  padding: 0;
  position: relative; /* Necesario para que .hero-pattern (absolute) referencie a .hero */
}
section.hero > div.container {
  padding-bottom: 0;
} 
.hero-grid {
  position: relative; display: grid; gap: 15px; grid-template-columns: 1fr;
}
.hero-copy h1 {
  margin: 0; font-weight: 700; letter-spacing: 0.1rem;
  margin-left: 1rem;
  font-size: clamp(42px, 4.5vw, 60px);
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
}
.hero-visual {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  mask-image: url('/assets/img/a.svg');
  mask-repeat: no-repeat;
  mask-size: cover;
}

.parallax-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background-color: #5C8DAF;
}

.hero-visual .parallax-img {
  width: 100%;
  margin-top: -10px;
  height: 130%; /* Permitir espacio para el desplazamiento */
  object-fit: cover;
  object-position: top center;
  aspect-ratio: 1/1;
  display: block;
  will-change: transform;
  transition: transform 0.1s ease-out;
}

@media (min-width: 901px) {
  .hero-grid { 
    grid-template-columns: 1.1fr 543px; 
    align-items: center; 
  }
  .hero-visual { 
    height: 543px;
    width: 543px;
    margin: 0 auto;
  }
  .parallax-wrapper {
    height: 100%;
  }
  .hero-visual .parallax-img {
    height: 120%;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .hero-copy h1 { margin: 5rem 1rem; margin-bottom: 1rem; }
  .hero-pattern { background-size: 900px; }
}

.hero-card {
  position: relative; border-radius: 40px; overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,.25);
  outline: 1px solid rgba(255,255,255,.25);
  height: 320px;
}
.hero-card-fill {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #25c1ce 0%, #0a2c8e 100%);
  filter: saturate(110%) contrast(110%);
}
.hero-bubble {
  position: absolute; right: -28px; top: -28px; width: 120px; height: 120px;
  background: rgba(36,208,192,.5); filter: blur(18px); border-radius: 50%;
}

/* ===== Presentación ===== */
.presentacion-content {
  margin: 4rem auto;
  max-width: 950px;
}

.presentacion .img-circle {
  width: 290px;
  height: 290px;
  border-radius: 50%;
  object-fit: cover;
  float: right;
  shape-outside: circle(50%);
  shape-margin: 24px;
  margin-left: 24px;
  margin-top: -1rem;
  border: 6px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, var(--blue-logo) 0%, var(--blue-logo) 30%, var(--cyan-500) 70%, var(--cyan-500) 100%) border-box;
}

@media (max-width: 768px) {
  .presentacion .img-circle {
    float: none;
    display: block;
    margin: 0 auto 24px;
    shape-outside: none;
    width: 90%;
    height: 90%;
  }

  .presentacion p {
    text-align: center;
  }
}

/* ===== Comprometidos ===== */
.comprometidos {
  clear: both;
  background: linear-gradient(135deg, var(--blue-logo) 0%, var(--blue-logo) 30%, var(--cyan-500) 70%, var(--cyan-500) 100%) border-box;
  margin: 40px 0;
}
section.comprometidos > div.container {
  padding-bottom: 0;
} 

.comprometidos img {
  width: 80%;
  height: auto;
  margin-top: -0.8rem;
  margin-bottom: -0.8rem;
}
.comprometidos p {
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 500;
  color: white;
  margin: 1rem 0;
}
@media (max-width: 900px) {
  .comprometidos img {
    margin-top: -1.5rem;
    width: 90%;
  }
  .comprometidos p {
    margin: 1rem 0;
  }
}


/* ===== Sectores ===== */
.sectores {
  text-align: center;
  margin: 64px auto;
}
.sectores h2::after {
  background: var(--gray-light);
}
/* 3 columns by default (desktop) */
.sectores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 2 columns on tablets */
@media (max-width: 900px) {
  .sectores-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
  }
}

/* 1 column on mobile */
@media (max-width: 600px) {
  .sectores-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    padding: 0 1rem;
  }
}
.sectores-grid div {
  display: flex;
  align-items: center;
}
.sectores-grid div img {
  width: 4rem;
  height: auto;
}
.sectores-grid div span {
  font-size: 1.5rem;
  color: var(--text-weak);
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  margin-left: 1rem;
  display: inline-block;
  max-width: 150px;
  white-space: normal;
  word-break: keep-all;
  text-wrap: pretty;
}

/* ===== Quienes Somos ===== */
.quienes-card {
  border: 1px solid var(--border);
  font-size: 1.05rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}
.quienes-card h3 {
  font-size: 1.3rem;
}
.quienes-card h3 em {
  font-size: 1.1rem;
}
@media (min-width: 901px) {
  .quienes-card {
    column-count: 2;
    column-gap: 3rem;
    padding: 2.5rem 1rem;
  }
  .quienes-card p:first-child, .quienes-card h3 {
    margin: 0;
  }
}



/* ===== Servicios ===== */
.servicios {
  text-align: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
  background: var(--gray-light);
}
.servicios p {
  max-width: 900px;
  margin: 40px auto;
}
.servicios-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem auto;
}

.servicios-heading img {
  height: 4rem;
  width: auto;
}

.servicios-heading h2 {
  margin:0;
  text-align: left;
}

.servicios-heading h2::after {
  display: none;
}

.servicios-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.servicios .card {
  background: var(--blue-logo);
  padding: 1rem 0.3rem 2rem 0.5rem;
  color: white;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.servicios .card h3 {
  font-size: 1.8rem;
  line-height: 1.3;
  min-height: 4.5rem;
  font-weight: 500;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-grow: 1;
}
.servicios .card img {
  width: 50%;
  height: auto;
  margin: 0 auto;
}

/* ===== A quiénes hemos servido ===== */
.aquienes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

/* ===== Proyectos ===== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 1.5rem;
}

.proyectos-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 0.95rem;
  color: var(--text);
  background: white;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.proyectos-table th,
.proyectos-table td {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}

.proyectos-table thead th {
  background: var(--blue-logo);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .proyectos-table {
    min-width: 520px;
    font-size: 0.9rem;
  }
}
