:root {
  --brand-dark:#2A587F;
  --brand-mid:#237CA9;
  --brand-gray:#86878A;
  --brand-soft:#BFC6CD;
  --brand-white:#fff;
}

html { scroll-behavior:smooth; }
body {
  font-family:'Montserrat',system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  color:#1b2a3a;
}

/* 🔹 MODIFICACIÓN: NAVBAR TRANSPARENTE + DIFUMINADO AL HACER SCROLL */
.navbar {
  --bs-navbar-color:#fff;
  --bs-navbar-hover-color:#fff;
  background: transparent;
  transition: background-color 0.6s ease, box-shadow 0.6s ease, backdrop-filter 0.6s ease;
  backdrop-filter: blur(0px);
  position: fixed;
  width: 100%;
  z-index: 1030;
}

.navbar.scrolled {
  background: linear-gradient(90deg,var(--brand-dark),var(--brand-mid));
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
}

/* 🔹 FIN MODIFICACIÓN NAVBAR */

/* Botones y elementos visuales existentes */


.stats-section {
  position: relative;
  overflow: hidden;
}

.stats-section .veil {
  padding: 60px 0;
  margin: 40px auto;
  max-width: 90%;
  border-radius: 12px;
}
.navbar-brand img {
  height:60px;
  transition: transform 0.3s ease;
}
.navbar-brand:hover img {
  transform: scale(1.05);
}

.btn-brand {
  --bs-btn-bg:var(--brand-mid);
  --bs-btn-border-color:var(--brand-mid);
  --bs-btn-hover-bg:#1f6b90;
  --bs-btn-hover-border-color:#1f6b90;
  --bs-btn-active-bg:#1a5876;
  --bs-btn-active-border-color:#1a5876;
  transition:all .3s ease;
}

.btn-outline-brand {
  --bs-btn-color:#fff;
  --bs-btn-border-color:#fff;
  --bs-btn-hover-bg:#fff;
  --bs-btn-hover-color:var(--brand-dark);
  transition:all .3s ease;
}

.btn-brand:hover, .btn-outline-brand:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.hero-carousel .carousel-item {
  min-height:72vh;
}
.hero-carousel .overlay {
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.45),rgba(0,0,0,.35));
}
.hero-caption {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  text-align:center;
  color:#fff;
}
.hero-caption .inner {
  max-width:1000px;
}

section {
  padding:72px 0;
}
.section-title {
  font-weight:800;
}
.section-sub {
  color:var(--brand-gray);
}

/* Efecto parallax para el band */
.band-parallax {
  position: relative;
  overflow: hidden;
  background: transparent;
}

.parallax-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://images.unsplash.com/photo-1514218953587-01263afe2d73?q=80&w=1600&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

.parallax-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(42,88,127,0.85), rgba(35,124,169,0.85));
  z-index: 1;
}

.band-parallax .container {
  position: relative;
  z-index: 2;
}

/* 🔹 MEJORA 1: Alternar colores de secciones */
section:nth-child(odd):not(.hero-carousel):not(.band) {
  background-color: #fff;
}

section:nth-child(even):not(.hero-carousel):not(.band) {
  background-color: #cdecf3;
}

#services {
  position:relative;
  z-index:1;
  box-shadow:0 5px 25px rgba(0,0,0,0.05);
  margin-top:20px;
  margin-bottom:20px;
}

.service-card {
  border:0;
  border-radius:1rem;
  background:#fff;
  transition:all 0.3s ease;
}
.service-card:hover {
  transform:translateY(-5px);
  box-shadow:0 10px 20px rgba(0,0,0,0.1);
}

.service-card .icon {
  font-size:2rem;
  width:3.5rem;
  height:3.5rem;
  display:grid;
  place-items:center;
  border-radius:.85rem;
  background:var(--brand-soft);
  color:var(--brand-dark);
}

.band {
  background:linear-gradient(90deg,#f7f9fb,#eef3f7);
}

.quote-fixed {
  background-image:url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?q=80&w=1600&auto=format&fit=crop');
  background-size:cover;
  background-position:center;
  background-attachment:fixed;
  position: relative;
  overflow: hidden;
}

/* 🔹 MEJORA 3: Ajustar el overlay azul para que sea más pequeño */
.quote-fixed .veil {
  background: linear-gradient(120deg, rgba(42,88,127,.85), rgba(35,124,169,.85));
  padding: 60px 0;
  margin: 40px auto;
  max-width: 90%;
  border-radius: 12px;
}

footer {
  background:#0f2435;
  color:#cfe0ec;
}
footer a {
  color:#e8f3fb;
}

/* About us carousel */
.about-carousel {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-carousel .carousel-item {
  height: 400px;
}

.about-carousel img {
  object-fit: cover;
  height: 100%;
  width: 100%;
}

/* Galería moderna para proyectos */
.gallery-container {
  position: relative;
  overflow: hidden;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: all 0.4s ease;
  cursor: pointer;
  height: 280px;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-title {
  font-weight: 600;
  margin-bottom: 5px;
}

.gallery-category {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* 🔹 MEJORA 2: Tarjetas de características más pequeñas e interactivas */
.features-section {
  padding: 60px 0;
}

.feature-box {
  text-align: center;
  padding: 25px 15px;
  border-radius: 12px;
  transition: all 0.4s ease;
  height: 100%;
  background: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

.feature-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-mid));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.feature-box:hover::before {
  transform: scaleX(1);
}

.feature-box:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.feature-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-mid));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  transition: all 0.4s ease;
}

.feature-box:hover .feature-icon {
  transform: rotateY(180deg) scale(1.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 🔹 MEJORA 5: Estadísticas animadas mejoradas */
.stats-section {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-mid) 100%);
  color: white;
  padding: 80px 0;
}

.stat-item {
  text-align: center;
  padding: 20px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.stat-item.animated {
  opacity: 1;
  transform: translateY(0);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #fff;
  display: inline-block;
  text-shadow: 0 5px 15px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.stat-label {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Sección de testimonios */
.testimonials-section {
  padding: 80px 0;
}

.testimonial-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin: 15px;
  height: 100%;
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
}

.testimonial-text:before {
  content: "\201C";
  font-size: 4rem;
  color: var(--brand-soft);
  position: absolute;
  top: -20px;
  left: -10px;
  opacity: 0.3;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
}

/* 🔹 MEJORA 4: Proceso de trabajo con iconos más animados */
.process-section {
  padding: 80px 0;
}

.process-step {
  text-align: center;
  padding: 30px 20px;
  position: relative;
}

.process-icon {
  width: 80px;
  height: 80px;
  background: var(--brand-mid);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  transition: all 0.5s ease;
  position: relative;
  overflow: hidden;
}

.process-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.5s ease;
}

.process-step:hover .process-icon {
  transform: scale(1.1) rotate(5deg);
  background: var(--brand-dark);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.process-step:hover .process-icon::before {
  transform: scale(1);
}

.process-step:hover .process-icon i {
  animation: bounce 0.6s ease;
}

.process-number {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: white;
  color: var(--brand-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.process-step:not(:last-child):after {
  content: "";
  position: absolute;
  top: 40px;
  right: -50%;
  width: 100%;
  height: 2px;
  background: var(--brand-soft);
  z-index: -1;
}

@keyframes bounce {
  0%, 20%, 60%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  80% {
    transform: translateY(-5px);
  }
}

/* Sección de llamada a la acción mejorada */
.cta-section {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-mid) 100%);
  color: white;
  padding: 100px 0;
  text-align: center;
}

.cta-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.cta-description {
  font-size: 1.2rem;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Mejoras responsivas */


/* Animación para los números de estadísticas */
@keyframes countUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.count-animation {
  animation: countUp 1s ease-out forwards;
}

/* Animación de conteo para estadísticas */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 0.5s ease-in-out;
}

/* Animación de elevación para números */
@keyframes floatUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.float-up {
  animation: floatUp 1s ease-out forwards;
}

/* Animación para elementos del band */
.animate-band-item {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

/* 🔹 NUEVO: Estilos para la galería de videos individual */
.videos-gallery-section {
  padding: 80px 0;
}

.video-gallery-container {
  margin-top: 40px;
}

.video-gallery-title {
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  color: var(--brand-dark);
}

.video-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.video-gallery-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: all 0.4s ease;
  cursor: pointer;
}

.video-gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* 🔹 CAMBIO 1: La pantalla principal del video es el mismo video */
.video-thumbnail {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.video-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-dark);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.video-gallery-item:hover .video-play-icon {
  background: var(--brand-mid);
  color: white;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
  padding: 20px;
}

.video-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--brand-dark);
}

.video-description {
  font-size: 0.9rem;
  color: var(--brand-gray);
  margin-bottom: 15px;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--brand-gray);
}

.video-category {
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* Modal para videos individuales */
.video-modal .modal-content {
  background: transparent;
  border: none;
}

.video-modal .modal-body {
  padding: 0;
  position: relative;
}

.video-modal .modal-body video {
  width: 100%;
  border-radius: 8px;
}

.video-modal .btn-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: white;
  opacity: 1;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal .modal-header {
  border: none;
  padding: 0;
  position: absolute;
  top: -50px;
  right: 0;
}

.video-modal .modal-title {
  color: white;
  font-weight: 600;
}
