/* ===== RESET & BASE ===== */

:root {
  --color-primary: #00695c;
  --color-primary-dark: #004d40;
  --color-primary-soft: #e0f2f1;
  --color-bg: #f5f7fb;
  --color-text-main: #1f2933;
  --color-text-muted: #6b7280;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.16);
  --radius-lg: 18px;
  --radius-md: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  margin: 0;
  padding: 0;
  color: var(--color-text-main);
  background-color: var(--color-bg);
}

/* Corrige el offset por el navbar fijo */
:target::before {
  content: "";
  display: block;
  height: 80px;
  margin-top: -80px;
}

/* ===== NAVBAR ===== */

.navbar-main {
  background: linear-gradient(
    90deg,
    rgba(0, 77, 64, 0.98),
    rgba(0, 105, 92, 0.98)
  );
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.logo-container {
  width: 44px;
  height: 44px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.logo-img {
  height: 26px;
  width: auto;
}

.brand-text {
  color: #e0f2f1;
  line-height: 1.15;
}

.brand-subtitle {
  font-size: 0.8rem;
  opacity: 0.85;
}

.navbar-nav .nav-link {
  color: #e0f2f1;
  font-weight: 500;
  font-size: 0.95rem;
  padding-inline: 0.9rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.55);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===== HERO ===== */

.hero-image {
  position: relative;
  min-height: 78vh;
  padding-top: 96px; /* espacio por el navbar */
  padding-bottom: 64px;
  background:
    radial-gradient(circle at top left, rgba(224, 242, 241, 0.55), transparent 55%),
    radial-gradient(circle at bottom right, rgba(0, 105, 92, 0.85), #002b36);
  color: #ffffff;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(0, 0, 0, 0.26), transparent 55%);
  pointer-events: none;
}

.hero-title {
  font-size: clamp(2.1rem, 3vw + 1.3rem, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-title span {
  color: #b2dfdb;
}

.hero-text {
  max-width: 560px;
  font-size: 1.02rem;
  color: #e0f2f1;
}

.hero-badge {
  background-color: rgba(0, 0, 0, 0.18);
  color: #e0f2f1;
  font-size: 0.82rem;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.02em;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
  font-size: 0.86rem;
  color: #c8e6c9;
}

.hero-meta span {
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(200, 230, 201, 0.5);
  background: rgba(0, 0, 0, 0.18);
}

/* Botones hero */
.hero-actions .btn-primary {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--color-primary-dark);
  font-weight: 600;
}

.hero-actions .btn-primary:hover {
  background: #e0f2f1;
  border-color: #e0f2f1;
  color: #00332b;
}

.hero-actions .btn-outline-light {
  border-width: 1px;
}

/* Hero card lateral */

.hero-card {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 1.9rem 1.8rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(178, 223, 219, 0.35);
}

.hero-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
  color: #e0f2f1;
}

.hero-card-list {
  padding-left: 1.1rem;
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
  color: #e0f2f1;
}

.hero-card-list li + li {
  margin-top: 0.3rem;
}

.hero-card-footer {
  font-size: 0.88rem;
  color: #c8e6c9;
  margin-bottom: 0;
}

/* ===== SECCIONES GENERALES ===== */

.section-padding {
  padding: 4.5rem 0;
}

.section-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-intro {
  max-width: 620px;
  margin-inline: auto;
  font-size: 0.98rem;
  color: var(--color-text-muted);
}

.bg-soft {
  background-color: #ecf3f6;
}

/* ===== QUIÉNES SOMOS / INFO PANEL ===== */

.info-panel {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.info-panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.info-panel-list {
  font-size: 0.95rem;
  padding-left: 1.1rem;
  color: var(--color-text-muted);
}

.info-panel-list li + li {
  margin-top: 0.3rem;
}

.info-panel-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 1.3rem;
}

.stat-number {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ===== DIFERENCIALES ===== */

.highlight-card {
  border-radius: var(--radius-lg);
  border: none;
  padding: 1.6rem 1.4rem;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.12);
  background: #ffffff;
}

.highlight-icon {
  font-size: 1.4rem;
  margin-bottom: 0.65rem;
}

.highlight-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.highlight-text {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* ===== SERVICIOS ===== */

.service-highlight {
  border-radius: var(--radius-lg);
  border: none;
  padding: 1.8rem 1.5rem 1.6rem;
  box-shadow: var(--shadow-soft);
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  background: rgba(0, 105, 92, 0.08);
}

.service-badge {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-primary-dark);
  background-color: var(--color-primary-soft);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  display: inline-block;
  margin-bottom: 0.8rem;
}

.service-list {
  list-style: none;
  padding-left: 0;
  font-size: 0.94rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.service-list li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.35rem;
}

.service-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* Hover sutil */
.service-highlight:hover,
.highlight-card:hover,
.info-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18);
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out;
}

/* ===== CLIENTES ===== */

.clientes-carousel {
  max-width: 980px;
  margin-inline: auto;
}

.clientes-img {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  object-fit: contain;
}

/* Ajuste indicadores carrusel */
.carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.35);
}

.carousel-indicators .active {
  background-color: var(--color-primary);
}

/* ===== CONTACTO ===== */

.contact-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.contact-box-alt {
  margin-bottom: 1.2rem;
}

.contact-icons .contact-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-primary-dark);
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: var(--color-primary-soft);
}

.contact-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.contact-list li + li {
  margin-top: 0.25rem;
}

.map-container iframe {
  border-radius: var(--radius-md);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.25);
}

/* ===== FOOTER ===== */

.footer {
  padding: 1.6rem 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  background: #0b1726;
  color: #cbd5f5;
}

/* ===== FORMULARIOS ===== */

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-main);
}

.form-control {
  border-radius: 10px;
  border-color: rgba(148, 163, 184, 0.5);
  font-size: 0.94rem;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.13rem rgba(0, 105, 92, 0.25);
}

/* ===== BOTONES ===== */

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  border-radius: 999px;
  padding-inline: 1.4rem;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 991.98px) {
  .hero-image {
    min-height: auto;
    padding-top: 92px;
    padding-bottom: 48px;
  }

  .hero-card {
    margin-top: 2rem;
  }

  .section-padding {
    padding: 3.25rem 0;
  }
}

@media (max-width: 575.98px) {
  .section-title {
    font-size: 1.6rem;
  }

  .hero-title {
    font-size: 1.9rem;
  }

  .hero-meta {
    gap: 0.55rem;
  }

  .service-highlight,
  .info-panel,
  .highlight-card,
  .contact-box {
    padding: 1.3rem 1.15rem;
  }
}

/* HERO: importante que tenga position: relative y overflow hidden */
.hero-image {
  position: relative;
  min-height: 78vh;              /* o la altura que estés usando */
  padding-top: 96px;
  padding-bottom: 64px;
  background:
    radial-gradient(circle at top left, rgba(224, 242, 241, 0.55), transparent 55%),
    radial-gradient(circle at bottom right, rgba(0, 105, 92, 0.85), #002b36);
  color: #ffffff;
  overflow: hidden;              /* para que el canvas no se salga */
}

/* Canvas de lluvia binaria */
#binaryRain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.4;                  /* más visible que antes */
  pointer-events: none;
}

/* El contenido del hero por delante del canvas */
.hero-image > .hero-overlay,
.hero-image > .container {
  position: relative;
  z-index: 5;
}

/* ===== DESCARGAS / BASE DE CONOCIMIENTO ===== */

#descargas .section-subtitle {
  max-width: 720px;
  margin: 0 auto;
}

.downloads-search-box {
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.downloads-search-box .form-control {
  border: none;
  box-shadow: none;
}

.downloads-search-box .form-control:focus {
  outline: none;
  box-shadow: none;
}

.download-item .card {
  border-radius: 16px;
}

.download-item .card-title {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.download-item .card-text {
  font-size: 0.88rem;
}

/* Badges "suaves" para categorías */
.badge-soft-primary {
  background-color: rgba(0, 150, 136, 0.12);
  color: #00695c;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-weight: 500;
}

.badge-soft-secondary {
  background-color: rgba(15, 23, 42, 0.05);
  color: #4b5563;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-weight: 500;
}

/* ===== EFECTO HOVER EN TARJETAS DE DESCARGAS ===== */

.download-item .card {
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.download-item .card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 140, 0.9); /* borde verde neón */
  box-shadow:
    0 0 0 1px rgba(0, 255, 140, 0.35),
    0 18px 40px rgba(15, 23, 42, 0.24);
}
