:root {
  --primary-blue: #052C53;
  --primary-red: #E91B24;
  --primary-red-hover: #C4121A;
  --dark-grey: #4D4D4D;
  --light-grey: #6C757D;
  --extra-light-grey: #E9ECEF;
  --light-bg: #F8F9FA;
  --white: #FFFFFF;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--light-bg);
  color: var(--dark-grey);
  line-height: 1.6;
  overflow-x: hidden;
}

section {
  width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Reemplazo de azul a gris en títulos base */
h1, h2, h3, h4, h5, h6 {
  color: var(--dark-grey);
  font-weight: 700;
}

/* Mantener las etiquetas secundarias en rojo */
.sub-tag {
  color: var(--primary-red);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.sub-tag::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 3px;
  background-color: var(--primary-red);
  border-radius: 2px;
}

.sub-tag.light {
  color: var(--primary-red);
}

.light-text {
  color: var(--white);
}

.section-header.center {
  text-align: center;
  margin-bottom: 50px;
}

/* Mantener el resaltado en rojo de las palabras clave dentro de títulos */
.section-header h2 span,
.hero-title-area h1 span,
.logo-text span,
.critical-infra-header h2 span,
.footer-logo span {
  color: var(--primary-red);
}

.text-red {
  color: var(--primary-red);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-accent-orange {
  background-color: var(--primary-red);
  color: var(--white);
}

.btn-accent-orange:hover {
  background-color: var(--primary-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(233, 27, 36, 0.3);
}

.btn-secondary {
  background-color: var(--primary-blue);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: #031c36;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(5, 44, 83, 0.25);
}

.btn-arrow {
  background: rgba(255, 255, 255, 0.2);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.navbar {
  width: 100%;
  background-color: var(--white);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 15px 0;
  transition: transform 0.4s ease, background-color 0.3s ease;
}

.navbar--hidden {
  transform: translateY(-100%);
}

.logo-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  align-items: center;
}

.logo-icon img {
  width: 90px;
  height: auto;
  margin-right: 10px;
}

.logo-img-link {
  display: inline-block;
  line-height: 0;
  transition: transform 0.3s ease;
}

.logo-img-link:hover {
  transform: scale(1.05);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-grey);
}

.nav-links {
  display: flex;
  gap: 25px;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark-grey);
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-red);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--primary-red);
  border-radius: 2px;
  transition: width 0.3s ease-in-out;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--dark-grey);
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 101;
}

.menu-toggle:hover {
  color: var(--primary-red);
}

.hero {
  padding: 50px 0;
}

.hero-top-info {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 40px;
}

.hero-title-area h1 {
  font-size: 2.8rem;
  line-height: 1.15;
  margin-top: 0;
  color: var(--dark-grey);
}

.pills-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.pill {
  background: var(--white);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--dark-grey);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(5, 44, 83, 0.1);
}

.hero-buttons-wrapper {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.hero-banner-grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
}

.hero-main-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.hero-main-image img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}

.hero-stats-card {
  background: var(--primary-blue);
  color: var(--white);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  box-shadow: 0 10px 25px rgba(5, 44, 83, 0.2);
}

.stat-item h3 {
  color: var(--white);
  font-size: 1.8rem;
}

.stat-item p {
  font-size: 0.85rem;
  opacity: 0.9;
}

.stat-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.about {
  padding: 70px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.about-image-card img {
  width: 100%;
  height: 100%;
  min-height: 450px;
  object-fit: cover;
  border-radius: 20px;
}

.about-blue-card {
  background: var(--primary-blue);
  color: var(--white);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.about-blue-card h3 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.card-bullets {
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.bullet-item {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-red);
}

.flow-diagram {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  background: var(--white);
  padding: 30px 12px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(5, 44, 83, 0.05);
  border-left: 4px solid var(--primary-red);
  margin-top: 20px;
  flex-wrap: nowrap;
}

.flow-step {
  flex: 1;
  text-align: center;
  padding: 4px;
  min-width: 0;
}

.flow-icon {
  width: 44px;
  height: 44px;
  background: var(--light-bg);
  color: var(--dark-grey);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.flow-step h4 {
  font-size: 0.75rem;
  color: var(--dark-grey);
  margin-bottom: 4px;
  line-height: 1.2;
}

.flow-step p {
  font-size: 0.70rem;
  color: var(--dark-grey);
  line-height: 1.25;
}

.flow-arrow {
  color: var(--primary-red);
  font-size: 0.85rem;
  margin-top: 15px;
  opacity: 0.7;
}

.services {
  background: var(--white);
  padding: 80px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--light-bg);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  border-top: 3px solid transparent;
}

.service-card:hover {
  transform: translateY(-8px);
  border-top-color: var(--primary-red);
  box-shadow: 0 15px 30px rgba(5, 44, 83, 0.08);
}

.service-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-body {
  padding: 35px 25px 25px;
}

.service-body h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--dark-grey);
}

.service-body p {
  font-size: 0.88rem;
  margin-bottom: 15px;
}

.tags-mini {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-red);
  margin-bottom: 10px;
}

.projects-section {
  background-color: var(--primary-blue);
  padding: 80px 0;
}

.maint-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.maint-card {
  background: var(--white);
  padding: 25px 20px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  border-top: 3px solid var(--primary-red);
}

.maint-card i {
  font-size: 1.8rem;
  color: var(--primary-red);
  margin-bottom: 12px;
}

.maint-card h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--dark-grey);
}

.maint-card p {
  font-size: 0.82rem;
}

.timeline-steps {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 15px;
  margin-top: 40px;
}

.step-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 20px 15px;
  border-radius: 16px;
  color: var(--white);
  transition: transform 0.3s;
}

.step-box:hover {
  transform: translateY(-5px);
  border-color: var(--primary-red);
}

.step-box.highlight-step {
  border-color: var(--primary-red);
  background: rgba(233, 27, 36, 0.15);
}

.step-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-red);
  display: block;
  margin-bottom: 5px;
}

.step-box h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.step-box p {
  font-size: 0.78rem;
  opacity: 0.8;
  line-height: 1.3;
}

.clients-coverage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.target-card, .coverage-card {
  background: var(--white);
  padding: 35px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}

.coverage-card {
  text-align: center;
}

.coverage-card > p {
  margin: 10px auto 30px auto;
  max-width: 700px;
}

.target-list {
  list-style: none;
  margin-top: 15px;
}

.target-list li {
  font-size: 0.9rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.coverage-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.coverage-image-wrapper {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: var(--light-bg);
  padding: 15px;
}

.coverage-image-wrapper img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  display: block;
}

.country-pills-vertical {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.country-pills-vertical .country-box {
  text-align: left;
  padding: 20px;
}

.country-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 20px;
}

.country-box {
  background: var(--light-bg);
  padding: 15px;
  border-radius: 12px;
  border-left: 3px solid var(--primary-red);
  text-align: left;
}

.country-box h4 {
  font-size: 1rem;
  color: var(--dark-grey);
}

.country-box p {
  font-size: 0.8rem;
}

.critical-infra-card {
  background: var(--primary-blue);
  color: var(--white);
  border-radius: 20px;
  padding: 45px 40px;
  box-shadow: 0 10px 30px rgba(5, 44, 83, 0.15);
  border-top: 4px solid var(--primary-red);
}

.critical-infra-header h2 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 20px;
}

.critical-infra-body p {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: 15px;
}

.critical-infra-body strong {
  color: var(--white);
  font-weight: 600;
}

.critical-infra-footer {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.critical-infra-footer p {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0;
}

.calendly-wrapper {
  background: var(--white);
  border-radius: 20px;
  padding: 30px 20px 20px;
  box-shadow: 0 10px 30px rgba(5, 44, 83, 0.08);
  border-top: 4px solid var(--primary-red);
  overflow: hidden;
  margin-top: 40px;
}

.calendly-header {
  text-align: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--light-bg);
}

.calendly-header h1 {
  color: var(--dark-grey);
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.calendly-header h2 {
  color: var(--primary-red);
  font-size: 1.1rem;
  margin-top: 8px;
}

.calendly-header p {
  color: var(--dark-grey);
  font-size: 0.88rem;
}

.calendly-inline-widget {
  border-radius: 12px;
  overflow: hidden;
}

footer {
  width: 100%;
  background: #031c36;
  color: var(--white);
  padding: 35px 0;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--white);
}

footer p {
  font-size: 0.85rem;
  opacity: 0.7;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .timeline-steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-top-info,
  .hero-banner-grid,
  .about-grid,
  .clients-coverage-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .maint-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .flow-diagram {
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
  }

  .flow-arrow {
    transform: rotate(90deg);
    margin: 5px 0;
  }

  .logo-container {
    justify-content: space-between;
    position: relative;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    padding: 20px 0;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(5, 44, 83, 0.15);
    border-bottom: 3px solid var(--primary-red);
    z-index: 99;
  }

  .nav-links.nav-active {
    display: flex;
    animation: fadeInMenu 0.3s ease forwards;
  }

  .nav-links a {
    padding: 12px 25px;
    width: 100%;
    display: block;
    border-left: 4px solid transparent;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background-color: var(--light-bg);
    border-left-color: var(--primary-red);
  }

  @keyframes fadeInMenu {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .hero-title-area h1 {
    font-size: 2.1rem;
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .timeline-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .coverage-layout-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .coverage-image-wrapper img {
    max-height: 380px;
  }
}

@media (max-width: 600px) {
  .hero-buttons-wrapper {
    flex-direction: column;
  }

  .hero-buttons-wrapper .btn {
    width: 100%;
    justify-content: center;
  }

  .maint-grid,
  .timeline-steps {
    grid-template-columns: 1fr;
  }

  .country-pills {
    grid-template-columns: 1fr;
  }

  .country-box[style*="grid-column"] {
    grid-column: span 1 !important;
  }

  .critical-infra-card {
    padding: 30px 20px;
  }

  .critical-infra-header h2 {
    font-size: 1.6rem;
  }

  .calendly-wrapper {
    padding: 20px 10px 10px;
  }

  .calendly-inline-widget {
    height: 550px !important;
  }
}