/* ==========================================
   ESTILOS GLOBALES
=========================================== */
body {
  margin: 0;
  background-color: black;
  color: white;
}

/* ==========================================
   1. NAVBAR Y TRANSICIONES
=========================================== */
.transition-navbar {
  background-color: transparent;
  padding-top: 20px;
  padding-bottom: 20px;
  transition: all 0.4s ease;
}

.nav-logo {
  height: 55px;
  transition: height 0.4s ease;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: #27bd4b;
}

.transition-navbar.scrolled {
  background-color: rgba(15, 15, 15, 0.95);
  padding-top: 10px;
  padding-bottom: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.transition-navbar.scrolled .nav-logo {
  height: 40px;
}

/* --- AJUSTES NAVBAR EN MÓVILES --- */
@media (max-width: 991px) {

  /* Separar el botón de hamburguesa de la orilla de la pantalla */
  .navbar-toggler {
    margin-right: 10px;
  }

  /* Fondo oscuro para el menú desplegable para que no choque con el texto */
  .navbar-collapse {
    background-color: rgba(15, 15, 15, 0.98);
    /* Gris súper oscuro, casi negro */
    padding: 15px 20px;
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    /* Sombrita para que resalte */
  }

  /* (Opcional) Centrar los enlaces en móvil se ve mucho más limpio */
  .navbar-collapse .navbar-nav {
    text-align: center;
  }
}

/* ==========================================
   2. HERO / SLIDER PRINCIPAL
=========================================== */
.hero-img {
  object-fit: cover;
  height: 80vh;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.8) 100%);
  z-index: 1;
}

.carousel-caption {
  z-index: 2;
  bottom: 0;
  left: 10%;
  right: 10%;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.carousel-caption h1 {
  font-size: 3.5rem;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
  margin-bottom: 15px;
}

.carousel-caption p {
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
  max-width: 600px;
}

.carousel-control-prev,
.carousel-control-next {
  z-index: 3;
  filter: none !important;

  width: 60px;
  height: 60px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.carousel-control-prev {
  left: 2%;
}

.carousel-control-next {
  right: 2%;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .hero-img {
    height: 70vh;
  }

  .carousel-caption h1 {
    font-size: 2rem;
  }

  .carousel-caption p {
    font-size: 1rem;
  }
}

/* ==========================================
   3. SECCIÓN: EMPRESA
=========================================== */
.empresa-menu-item {
  color: #555;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.empresa-menu-item:hover {
  color: #27bd4b;
  background-color: rgba(39, 189, 75, 0.1);
}

.nav-pills .nav-link.active.empresa-menu-item {
  background-color: #27bd4b;
  color: white;
  box-shadow: 0 4px 15px rgba(39, 189, 75, 0.4);
}

.animate-tab {
  animation: slideUpFade 0.5s ease forwards;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   4. SECCIÓN: SERVICIOS
=========================================== */
.servicios-section {
  background-image: url('../img/servicios.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
}

.servicios-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 15, 10, 0.85);
}

.servicio-item {
  background: rgba(19, 32, 12, 0.5);
  border: 1px solid rgba(39, 189, 75, 0.2);
  backdrop-filter: blur(8px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
}

.servicio-item:hover {
  transform: translateY(-12px);
  border-color: #27bd4b;
  box-shadow: 0 15px 30px rgba(39, 189, 75, 0.2) !important;
}

.check-icon {
  color: #27bd4b;
  margin-right: 8px;
}

.icono {
  width: 65px;
  height: auto;
  transition: transform 0.3s ease;
}

.servicio-item:hover .icono {
  transform: scale(1.1);
}

/* ==========================================
   5. SECCIÓN: PORTAFOLIO
=========================================== */
.portafolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  grid-auto-rows: 250px;
}

.portafolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background-color: #ffffff;
}

.portafolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
}

.portafolio-item:hover img {
  filter: grayscale(100%);
  transform: scale(1.15);
}

.portafolio-item .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  color: #fff;
  padding: 15px;
}

.portafolio-item:hover .overlay {
  opacity: 1;
}

.overlay-title {
  font-size: 1.15rem;
  margin-bottom: 8px;
  text-align: center;
}

.overlay-title strong {
  color: #27bd4b !important;
}

.overlay-list {
  font-size: 0.9rem;
  line-height: 1.5;
  list-style-type: disc;
  padding-left: 20px;
  margin: 0;
}

@media (max-width: 1200px) {
  .portafolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .portafolio-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 240px;
  }
}

@media (max-width: 576px) {
  .portafolio-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }
}

/* ==========================================
   6. SECCIÓN: CLIENTES
=========================================== */
.clientes-section {
  border-top: 1px solid #eee;
}

.logo-slider {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 20px 0;
}

.slider-track {
  display: flex;
  align-items: center;
  width: calc(250px * 18);
  animation: scrollInfinito 40s linear infinite;
}

.logo-slider:hover .slider-track {
  animation-play-state: paused;
}

.logo-item {
  width: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 30px;
}

.logo-item img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.6);
  transition: all 0.3s ease;
}

.logo-item img:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.05);
}

@keyframes scrollInfinito {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-250px * 9));
  }
}

@media (max-width: 768px) {
  .logo-item {
    width: 150px;
    padding: 0 15px;
  }

  .slider-track {
    width: calc(150px * 18);
    animation-duration: 30s;
  }

  .logo-item img {
    max-height: 60px;
  }
}

/* ==========================================
   7. SECCIÓN: CONTACTO
=========================================== */
.contact-info {
  font-size: 1.1rem;
  line-height: 1.6;
}

.transition-all {
  transition: all 0.3s ease;
}

.hover-success:hover {
  color: #27bd4b !important;
  transform: translateX(5px);
  display: inline-block;
}

.map-container {
  background-color: #222;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================
   8. FOOTER
=========================================== */
.hover-white:hover {
  color: #fff !important;
}

.hover-up {
  display: inline-block;
}

.hover-up:hover {
  color: #27bd4b !important;
  transform: translateY(-4px);
}

/* ==========================================
   PÁGINA: PROYECTOS
=========================================== */
.hover-zoom {
  transition: transform 0.4s ease;
}

.hover-zoom:hover {
  transform: scale(1.1);
}