:root {
  --primary-red: #990d24;
  --dark-black: #0a0a0a;
  --silver: #c0c0c0;
  --silver-light: #e0e0e0;
  --white: #ffffff;
  --overlay-red: rgba(149, 5, 29, 0.79);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  color: var(--dark-black);
  line-height: 1.6;
  background: var(--white);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-red {
  color: var(--primary-red);
}

/* ==========================================
   FONDO DE VIDEO
   ========================================== */
.video-bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 75vh;
  z-index: -1;
  overflow: hidden;
}
.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at center,
      rgba(0, 0, 0, 0.45) 1.35px,
      transparent 25px
    ),
    linear-gradient(rgba(100, 0, 0, 0.75), rgba(80, 0, 0, 0.85));

  background-size:
    8px 8px,
    cover;
}

/* ==========================================
   TIPOGRAFÍA GENERAL
   ========================================== */
.section-title {
  text-align: center;
  font-size: 2.2rem;
  color: var(--dark-black);
  margin-bottom: 40px;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}
.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-red);
  margin: 15px auto 0;
}
.section-title.light {
  color: var(--white);
}
.section-subtitle {
  text-align: center;
  color: var(--silver);
  margin-bottom: 40px;
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ==========================================
   ENCABEZADO Y NAVEGACIÓN
   ========================================== */
.header {
  background: transparent;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition:
    background 0.4s ease,
    box-shadow 0.4s ease;
}
.header.scrolled {
  background: #000000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  transition: padding 0.4s ease;
}
.header.scrolled .navbar {
  padding: 12px 20px;
}
.logo-link {
  display: inline-block;
  text-decoration: none;
}
.logo-img {
  height: 50px;
  width: auto;
  transition: transform 0.3s ease;
}
.logo-img:hover {
  transform: scale(1.05);
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}
.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-red);
  transition: width 0.3s ease;
}
.nav-links a:hover::after {
  width: 100%;
}
.nav-links a:hover {
  color: var(--white);
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--white);
  transition: all 0.3s ease;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  position: relative;
  padding: 120px 20px 80px;
}
.hero-content {
  max-width: 800px;
  z-index: 1;
}
.hero-subtitle {
  font-size: 1rem;
  letter-spacing: 3px;
  margin-bottom: 20px;
  color: var(--silver-light);
  font-weight: 600;
}
.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  letter-spacing: 4px;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}
.hero-tagline {
  font-size: 1.2rem;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: var(--silver-light);
}
.btn-primary {
  display: inline-block;
  padding: 12px 30px;
  background: transparent;
  color: var(--white);
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: var(--transition);
  letter-spacing: 1px;
  border: 2px solid var(--white);
}
.btn-primary:hover {
  background: var(--white);
  color: var(--primary-red);
  transform: translateY(-3px);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}
.scroll-indicator span {
  display: block;
  width: 30px;
  height: 50px;
  border: 2px solid var(--white);
  border-radius: 20px;
  position: relative;
}
.scroll-indicator span::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--white);
  border-radius: 50%;
  animation: scroll 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes scroll {
  0% {
    opacity: 1;
    top: 8px;
  }
  100% {
    opacity: 0;
    top: 25px;
  }
}

/* ==========================================
   ACERCA DE NOSOTROS
   ========================================== */
.about {
  padding: 100px 0;
  background: var(--white);
  position: relative;
  z-index: 1;
}
.about-content {
  max-width: 800px;
  margin: 0 auto 50px;
  text-align: center;
  font-size: 1.1rem;
  color: #444;
}
.about-content p {
  margin-bottom: 20px;
}
/* ==========================================
   STATS GRID - DISEÑO ÉPICO
   ========================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  text-align: center;
  padding: 40px 0;
  perspective: 1000px;
}

/* Tarjeta principal */
.stat-card {
  position: relative;
  background: rgba(10, 10, 10, 0.95);
  border-radius: 20px;
  padding: 40px 30px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Efecto de brillo que sigue al cursor */
.stat-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(153, 13, 36, 0.15) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.stat-card:hover .stat-glow {
  opacity: 1;
}

/* Borde animado con gradiente */
.stat-border {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-red),
    transparent
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.3;
  transition: opacity 0.4s ease;
  animation: borderRotate 3s linear infinite;
  background-size: 200% 100%;
}

.stat-card:hover .stat-border {
  opacity: 1;
  animation: borderRotate 2s linear infinite;
}

@keyframes borderRotate {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Contenido de la tarjeta - SIEMPRE CENTRADO */
.stat-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Icono - Inicialmente con altura 0 (no ocupa espacio) */
.stat-icon {
  width: 70px;
  height: 0;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.stat-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(153, 13, 36, 0.1);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Al hacer hover, el icono crece y empuja el texto hacia abajo */
.stat-card:hover .stat-icon {
  height: 70px;
  opacity: 1;
  margin-bottom: 20px;
}

.stat-card:hover .stat-icon::before {
  transform: scale(1);
}

.stat-icon svg {
  width: 45px;
  height: 45px;
  color: var(--primary-red);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  flex-shrink: 0;
}

.stat-card:hover .stat-icon svg {
  stroke-dashoffset: 0;
  transform: rotate(360deg) scale(1.1);
  filter: drop-shadow(0 0 10px rgba(153, 13, 36, 0.5));
}

/* Título principal */
.stat-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-red);
  margin: 0;
  letter-spacing: 3px;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  transition: all 0.4s ease;
}

.stat-card:hover .stat-title {
  letter-spacing: 5px;
  text-shadow: 0 0 20px rgba(153, 13, 36, 0.5);
}

/* Subtítulo */
.stat-subtitle {
  font-size: 0.95rem;
  color: var(--silver);
  margin: 10px 0 0 0;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Línea decorativa animada */
.stat-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
  margin: 20px auto 0;
  position: relative;
  overflow: hidden;
}

.stat-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--white), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Partículas flotantes */
.stat-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.stat-particles::before,
.stat-particles::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-red);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover .stat-particles::before {
  opacity: 0.6;
  animation: float1 3s ease-in-out infinite;
}

.stat-card:hover .stat-particles::after {
  opacity: 0.6;
  animation: float2 3s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% {
    top: 20%;
    left: 20%;
    transform: translate(0, 0);
  }
  50% {
    top: 60%;
    left: 80%;
    transform: translate(10px, -10px);
  }
}

@keyframes float2 {
  0%, 100% {
    top: 80%;
    left: 80%;
    transform: translate(0, 0);
  }
  50% {
    top: 20%;
    left: 20%;
    transform: translate(-10px, 10px);
  }
}

/* Tarjeta destacada (la del centro) */
.stat-card.featured {
  background: rgba(10, 10, 10, 0.95);
  transform: scale(1.05);
  border: 1px solid rgba(153, 13, 36, 0.3);
}

.stat-card.featured:hover {
  transform: scale(1.08) translateY(-5px);
}

.stat-card.featured .stat-icon {
  width: 60px;
}

.stat-card.featured .stat-icon svg {
  width: 40px;
  height: 40px;
}

.stat-card.featured .stat-title {
  font-size: 2.2rem;
}

.stat-card.featured:hover .stat-icon {
  height: 60px;
}

/* Animación de entrada */
.stat-card {
  opacity: 0;
  transform: translateY(50px);
  animation: slideUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.2s; }
.stat-card:nth-child(2) { animation-delay: 0.4s; }
.stat-card:nth-child(3) { animation-delay: 0.6s; }

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Efecto de onda al hacer click */
.stat-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(153, 13, 36, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  pointer-events: none;
}

.stat-card:active::after {
  width: 300px;
  height: 300px;
}

/* Responsive */
@media (max-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  
  .stat-card.featured {
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .stat-card {
    min-height: 260px;
    padding: 35px 25px;
  }
  
  .stat-title {
    font-size: 1.8rem;
  }
  
  .stat-icon {
    width: 60px;
  }
  
  .stat-icon svg {
    width: 40px;
    height: 40px;
  }
  
  .stat-card.featured .stat-title {
    font-size: 2rem;
  }
  
  .stat-card.featured:hover .stat-icon {
    height: 70px;
  }
}

/* ==========================================
   FILOSOFÍA
   ========================================== */
.philosophy {
  padding: 100px 0;
  background: var(--silver-light);
  position: relative;
  z-index: 1;
}
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.philosophy-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 8px;
  border-left: 5px solid var(--primary-red);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
}
.philosophy-card:hover {
  transform: translateY(-10px) scale(1.02);
}
.philosophy-card h3 {
  color: var(--dark-black);
  margin-bottom: 15px;
  font-size: 1.5rem;
}

/* ==========================================
   SERVICIOS
   ========================================== */
.services {
  padding: 100px 0;
  background: linear-gradient(180deg, #090909 0%, #111111 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.services::before {
  content: "";
  position: absolute;
  top: 15%;
  right: -10%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(153, 13, 36, 0.12);
  filter: blur(50px);
  pointer-events: none;
}

.services::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.services .section-title {
  color: var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  align-items: stretch;
}

/* Contenedor de la tarjeta con perspectiva 3D */
.service-card {
  perspective: 1200px;
  position: relative;
  min-height: 350px;
  height: 100%;
}

/* Contenedor interno que rota */
.service-card-inner {
  width: 100%;
  height: 100%;
  min-height: 350px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s ease;
}

.service-card:hover .service-card-inner {
  transform: rotateY(180deg);
}

/* Caras de la tarjeta (frente y reverso) */
.service-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 35px 30px 30px;
  display: flex;
  flex-direction: column;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-sizing: border-box;
}

/* Cara trasera */
.service-card-face.service-card-back {
  transform: rotateY(180deg);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Número (01, 02, 03...) - Posicionado absolutamente */
.service-card h4 {
  position: absolute;
  top: 20px;
  right: 25px;
  width: 50px;
  height: 50px;
  margin: 0;
  border-radius: 50%;
  background: rgba(153, 13, 36, 0.16);
  color: var(--primary-red);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Título de la tarjeta */
.service-card-face h3 {
  color: var(--white);
  margin: 0 0 15px 0;
  padding-right: 60px; /* Espacio para que no choque con el número */
  font-size: 1.45rem;
  line-height: 1.25;
  flex-shrink: 0;
}

.service-card-face h3::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  margin-top: 16px;
  border-radius: 999px;
  background: var(--primary-red);
}

/* Descripción */
.service-card-face p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
  margin: 0;
  flex-grow: 1; /* Ocupa todo el espacio disponible */
}

/* Link "Ver detalles" - Siempre al fondo */
.service-card .action-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 25px;
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
  flex-shrink: 0;
  align-self: flex-start;
}

.service-card .action-link svg,
.service-card .action-link span {
  transition: transform 0.3s ease;
}

.service-card:hover .action-link {
  color: var(--primary-red);
}

.service-card:hover .action-link svg,
.service-card:hover .action-link span {
  transform: translateX(4px);
}

/* ==========================================
   RESPONSIVE SERVICIOS
   ========================================== */
@media (max-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .service-card,
  .service-card-inner {
    min-height: 380px;
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .service-card,
  .service-card-inner {
    min-height: 360px;
  }
  
  .service-card h4 {
    top: 15px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 0.9rem;
  }
  
  .service-card-face h3 {
    font-size: 1.3rem;
    padding-right: 55px;
  }
  
  .service-card-face {
    padding: 30px 25px 25px;
  }
}
/* ==========================================
   ÚLTIMOS PROYECTOS - CARRUSEL DESLIZANTE
   ========================================== */
.recent-projects {
  padding: 100px 0;
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.recent-projects .section-title {
  margin-bottom: 50px;
  color: var(--dark-black);
}
.projects-carousel-full {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 20px 0;
}

/* ✅ CORREGIDO: Los botones ahora mantienen su centrado vertical en hover */
.projects-carousel-full .carousel-btn {
  position: absolute;
  z-index: 10;
  top: 50%;
  transform: translateY(-50%);
}
.projects-carousel-full .carousel-btn.prev {
  left: 15px;
}
.projects-carousel-full .carousel-btn.next {
  right: 15px;
}

.projects-carousel {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 100%;
  padding: 0 70px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.projects-carousel::-webkit-scrollbar {
  display: none;
}
.carousel-item {
  flex: 0 0 400px;
  height: 340px;
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.carousel-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(153, 13, 36, 0.4);
}
.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ✅ CORREGIDO: Botón base */
.carousel-btn {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border: 2px solid var(--primary-red);
  background: rgba(153, 13, 36, 0.1);
  color: var(--primary-red);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ✅ CORREGIDO: Hover combina translateY(-50%) con scale(1.1) */
.carousel-btn:hover {
  background: var(--primary-red);
  color: var(--white);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  order: -1;
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}
.dot.active {
  background: var(--primary-red);
  width: 36px;
  border-radius: 6px;
}

/* ==========================================
   PROYECTOS - GALERÍA COLLAGE (FONDO BLANCO)
   ========================================== */
.projects {
  padding: 100px 0;
  background: var(--white);
  position: relative;
  z-index: 1;
}

.projects .section-title {
  color: var(--dark-black);
}

.projects-filters {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--dark-black);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 10px 0;
  position: relative;
  transition: all 0.3s ease;
}

.filter-btn::after {
  content: "";
  position: absolute;
  bottom: -21px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-red);
  transition: width 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--primary-red);
}
.filter-btn.active::after {
  width: 100%;
}

/* Grid Collage */
.projects-collage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 250px;
  gap: 15px;
}

.collage-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.collage-item:hover {
  box-shadow: 0 8px 25px rgba(200, 16, 46, 0.3);
}

.collage-item.hide {
  display: none;
}

/* Tamaños de tarjetas */
.collage-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.collage-item.wide {
  grid-column: span 2;
  grid-row: span 1;
}

.collage-item.tall {
  grid-column: span 1;
  grid-row: span 2;
}

.collage-item.normal {
  grid-column: span 1;
  grid-row: span 1;
}

.collage-image {
  position: relative;
  width: 100%;
  height: 100%;
}

.collage-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.collage-item:hover .collage-image img {
  transform: scale(1.1);
}

.collage-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 40%,
    rgba(0, 0, 0, 0.85) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  transition: background 0.3s ease;
}

.collage-item:hover .collage-overlay {
  background: linear-gradient(
    180deg,
    rgba(153, 13, 36, 0.5) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.9) 100%
  );
}

.category-tag {
  align-self: flex-end;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.collage-info {
  color: var(--white);
}

.collage-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.collage-info p {
  font-size: 0.9rem;
  color: var(--silver-light);
  line-height: 1.5;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Tarjetas grandes tienen texto más grande */
.collage-item.large .collage-info h3 {
  font-size: 1.8rem;
}

.collage-item.large .collage-info p {
  font-size: 1.05rem;
  max-width: 80%;
}

/* ==========================================
   MAQUINARIA
   ========================================== */
.equipment {
  padding: 100px 0;
  background: var(--silver-light);
  position: relative;
  z-index: 1;
}
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  margin-bottom: 60px;
}
.equip-item {
  background: var(--white);
  padding: 15px 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  color: var(--dark-black);
  font-weight: 500;
  transition: all 0.3s ease;
}
.equip-item:hover {
  transform: translateX(10px);
  background: var(--primary-red);
  color: var(--white);
}
.equip-item:hover span {
  background: var(--white);
  color: var(--primary-red);
}
.equip-item span {
  background: var(--primary-red);
  color: var(--white);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.special-services {
  background: var(--dark-black);
  padding: 50px;
  border-radius: 12px;
  color: var(--white);
  border: 1px solid var(--silver);
}
.special-title {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-red);
  letter-spacing: 1px;
}
.special-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
.special-card h4 {
  color: var(--primary-red);
  margin-bottom: 10px;
  font-size: 1.3rem;
}
.special-card p {
  color: var(--silver);
}

/* ==========================================
   CALL TO ACTION
   ========================================== */
.cta-section {
  background: var(--primary-red);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.cta-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, transparent 100%);
}
.cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-content h2 {
  color: var(--white);
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}
.cta-content p {
  color: var(--white);
  font-size: 1.1rem;
  margin: 10px 0 0;
  opacity: 0.9;
}
.btn-white {
  display: inline-block;
  padding: 18px 40px;
  background: var(--white);
  color: var(--primary-red);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.btn-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: var(--dark-black);
  color: var(--white);
}

/* ==========================================
   FOOTER ALINEADO A LA IZQUIERDA
   ========================================== */
.footer {
  background: var(--dark-black);
  color: var(--silver);
  padding: 80px 0 30px;
  position: relative;
  z-index: 1;
}

.footer-grid-left {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 60px;
  text-align: left;
}

.footer-col {
  text-align: left;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.footer-col.visible {
  opacity: 1;
  transform: translateY(0);
}

.footer-logo-left {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  justify-content: flex-start;
}

.logo-square {
  background: var(--primary-red);
  color: var(--white);
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 4px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 2px;
}

.footer-desc-left {
  color: var(--silver);
  line-height: 1.8;
  margin-bottom: 30px;
  font-size: 0.95rem;
  text-align: left;
}

.footer-contact-left {
  margin-bottom: 25px;
}

.contact-item-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
  font-size: 0.95rem;
  color: var(--silver);
  text-align: left;
  justify-content: flex-start;
}

.contact-item-left .icon {
  width: 18px;
  height: 18px;
  color: var(--primary-red);
  flex-shrink: 0;
  margin-top: 3px;
}

.contact-item-left a {
  color: var(--silver);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item-left a:hover {
  color: var(--primary-red);
}

.phones {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-social-left {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-link svg {
  width: 18px;
  height: 18px;
  color: var(--silver);
  transition: color 0.3s ease;
}

.social-link:hover {
  background: var(--primary-red);
  transform: translateY(-3px);
}

.social-link:hover svg {
  color: var(--white);
}

.footer-title {
  color: var(--primary-red);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(200, 16, 46, 0.3);
  text-align: left;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.footer-list li {
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--silver);
  position: relative;
  padding-left: 15px;
  text-align: left;
}

.footer-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--primary-red);
  font-weight: 700;
  font-size: 1.2rem;
}

.footer-list a {
  color: var(--silver);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-list a:hover {
  color: var(--primary-red);
  padding-left: 5px;
}

.footer-hours-left {
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: 8px;
  margin-top: 30px;
  border-left: 3px solid var(--primary-red);
  text-align: left;
}

.footer-hours-left h5 {
  color: var(--primary-red);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.footer-hours-left p {
  color: var(--silver);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.footer-bottom-left {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: left;
}

.footer-bottom-left p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin: 5px 0;
}

.gracias {
  color: var(--primary-red);
  font-size: 0.9rem;
  margin-top: 15px;
  font-weight: 600;
}

/* ==========================================
   BOTÓN WHATSAPP FLOTANTE (CORREGIDO)
   ========================================== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary-red);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  transition:
    transform 0.3s ease,
    background 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background: #25d366;
}

.whatsapp-float svg {
  width: 35px;
  height: 35px;
  fill: var(--white);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1200px) {
  .projects-collage {
    grid-template-columns: repeat(3, 1fr);
  }
  .collage-item.large {
    grid-column: span 2;
    grid-row: span 2;
  }
}

@media (max-width: 992px) {
  .projects-collage {
    grid-template-columns: repeat(2, 1fr);
  }
  .collage-item.large,
  .collage-item.wide {
    grid-column: span 2;
  }
  .collage-item.tall {
    grid-column: span 1;
    grid-row: span 2;
  }
  .footer-grid-left {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .projects-filters {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--dark-black);
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    display: none;
    border-top: 1px solid var(--primary-red);
  }
  .nav-links.active {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }
  .hero-tagline {
    font-size: 1rem;
  }
  .section-title {
    font-size: 1.8rem;
  }

  .projects-collage {
    grid-template-columns: 1fr;
    grid-auto-rows: 280px;
  }
  .collage-item.large,
  .collage-item.wide,
  .collage-item.tall {
    grid-column: span 1;
    grid-row: span 1;
  }
  .collage-item.large .collage-info h3 {
    font-size: 1.3rem;
  }

  .footer-grid-left {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-col,
  .footer-logo-left,
  .footer-desc-left,
  .footer-contact-left,
  .footer-social-left,
  .footer-title,
  .footer-list,
  .footer-hours-left,
  .footer-hours-left h5,
  .footer-hours-left p,
  .contact-item-left,
  .footer-bottom-left {
    text-align: center;
    justify-content: center;
    align-items: center;
  }

  .footer-list li {
    padding-left: 0;
  }
  .footer-list li::before {
    display: none;
  }
  .projects-filters {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .cta-content {
    flex-direction: column;
    text-align: center;
  }
  .cta-content h2 {
    font-size: 1.8rem;
  }

  .special-services {
    padding: 30px 20px;
  }
  .logo-img {
    height: 40px;
  }
}

/* ==========================================
   MODAL/CARRUSEL DE IMÁGENES
   ========================================== */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}

.image-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  font-weight: 300;
  color: var(--white);
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
  background: var(--primary-red);
  transform: rotate(90deg);
}

.modal-prev,
.modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(153, 13, 36, 0.8);
  color: var(--white);
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 30px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-prev:hover,
.modal-next:hover {
  background: var(--primary-red);
  transform: translateY(-50%) scale(1.1);
}

.modal-prev {
  left: 20px;
}
.modal-next {
  right: 20px;
}

.modal-image-container {
  width: 100%;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  overflow: hidden;
}

.modal-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  animation: zoomIn 0.5s ease;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-info {
  padding: 20px 30px;
  background: #1a1a1a;
  border-top: 2px solid var(--primary-red);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-info h3 {
  color: var(--white);
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.modal-counter {
  color: var(--silver);
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-counter span {
  color: var(--primary-red);
}

/* Thumbnails */
.modal-thumbnails {
  display: flex;
  gap: 10px;
  padding: 15px 30px;
  background: #0a0a0a;
  overflow-x: auto;
  max-height: 100px;
}

.modal-thumbnails::-webkit-scrollbar {
  height: 8px;
}

.modal-thumbnails::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.modal-thumbnails::-webkit-scrollbar-thumb {
  background: var(--primary-red);
  border-radius: 4px;
}

.thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.thumbnail:hover,
.thumbnail.active {
  border-color: var(--primary-red);
  opacity: 1;
  transform: scale(1.05);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive Modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .modal-image-container {
    height: 50vh;
  }

  .modal-prev,
  .modal-next {
    width: 45px;
    height: 45px;
    font-size: 24px;
  }

  .modal-prev {
    left: 10px;
  }
  .modal-next {
    right: 10px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 30px;
  }

  .modal-info {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .thumbnail {
    width: 60px;
    height: 60px;
  }
}

/* ==========================================
   ACTUALIZACIÓN COLLAGE EXISTENTE
   ========================================== */
.collage-item {
  cursor: pointer;
}

.collage-item::after {
  content: "Click para ver galería";
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(153, 13, 36, 0.9);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 5;
  pointer-events: none;
}

.collage-item:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================
   CARRUSEL COVERFLOW 3D (MISIÓN, VISIÓN, VALORES)
   ========================================== */
.coverflow-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 40px auto 0;
    padding: 0 60px;
    height: 450px;
}

.coverflow-container {
    position: relative;
    width: 100%;
    max-width: 820px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Base de todas las tarjetas */
.philosophy-card {
    position: absolute;
    width: 320px;
    height: 380px;
    background: var(--bg-light);
    padding: 30px 30px;
    border-radius: 8px;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.5s ease, 
                z-index 0.5s step-end,
                filter 0.5s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

/* --- ESTADO CENTRAL (La de enfrente: Más grande y nítida) --- */
.philosophy-card.active {
    transform: translateX(0) scale(1.15);
    opacity: 1;
    z-index: 10;
    pointer-events: auto;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    filter: brightness(100%);
}

/* --- ESTADO IZQUIERDO (Se desplaza y se encoge) --- */
.philosophy-card.prev-card {
    transform: translateX(-360px) scale(0.9);
    opacity: 0.7;
    z-index: 5;
    filter: brightness(80%);
}

/* --- ESTADO DERECHO (Se desplaza y se encoge) --- */
.philosophy-card.next-card {
    transform: translateX(360px) scale(0.9);
    opacity: 0.7;
    z-index: 5;
    filter: brightness(80%);
}

/* Botones de Navegación */
.coverflow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.coverflow-btn.prev {
    left: -60px;
}

.coverflow-btn.next {
    right: -60px;
}

.coverflow-btn:hover {
    background: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

/* Ajuste responsivo básico */
@media (max-width: 768px) {
    /* Reducimos la perspectiva para pantallas pequeñas */
    .philosophy-coverflow {
        perspective: 600px;
        height: 350px; /* Un poco más bajo para pantallas chicas */
    }

    .philosophy-card {
        width: 280px; /* Tarjeta más angosta en móvil */
        height: 100%;
        padding: 20px;
    }

    /* Reducimos el desplazamiento drásticamente para que no se salgan de la pantalla */
    .philosophy-card.prev-card { 
        transform: translateX(-70px) translateZ(-100px) rotateY(45deg); 
        opacity: 0.4; 
    }
    .philosophy-card.next-card { 
        transform: translateX(70px) translateZ(-100px) rotateY(-45deg); 
        opacity: 0.4; 
    }

    /* Las flechas laterales se vuelven un peligro de UX en móvil, mejor bajarlas o achicarlas */
    .coverflow-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    .coverflow-btn.prev { left: -10px; }
    .coverflow-btn.next { right: -10px; }
}

@media (max-width: 480px) {
    /* En celulares ultra compactos, eliminamos las tarjetas de los lados y dejamos solo la activa */
    .philosophy-card.prev-card,
    .philosophy-card.next-card {
        display: none; 
    }
    .philosophy-card.active-card {
        transform: none;
        width: 90%; /* Ocupa casi toda la pantalla del cel */
    }
    .coverflow-btn {
        background: rgba(153, 13, 36, 0.8); /* Tu rojo principal con transparencia */
    }
}

/*-------------------------------------*/
.footer-bottom-center {
    text-align: center;          
    padding: 15px;               
    color: #fff;                
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.footer-bottom-center .gracias {
    margin-top: 5px;
    font-weight: bold;
    color:rgba(153, 13, 36, 0.9);     
}
/* ==========================================================================
    MEDIA QUERIES (RESPONSIVE DESIGN)
   ========================================================================== */

/* 1. Celulares grandes y Tablets en vertical (Menos de 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 15px; /* Margen más pequeño para ganar espacio */
    }

    /* Tu menú móvil ya se activa aquí gracias a tu JS, asegúrate de que ocupe el 100% */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark-black);
        display: none; /* Se muestra con la clase .active desde JS */
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
    }
    
    .nav-links.active {
        display: flex;
    }

    /* Si usas Grid o Flexbox para servicios/productos, pásalos a 1 sola columna */
    .servicios-grid, .proyectos-grid {
        grid-template-columns: 1fr; 
        gap: 20px;
    }

    /* Ajuste para tu sección de filosofía/coverflow */
    .philosophy-card.prev-card { transform: translateX(-100px) scale(0.85); opacity: 0.2; }
    .philosophy-card.next-card { transform: translateX(100px) scale(0.85); opacity: 0.2; }
}

/* 2. Celulares muy pequeños (Menos de 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem; /* Reducir textos grandes para que no se corten */
    }
    h2 {
        font-size: 1.5rem;
    }
    
    /* CAMBIO AQUÍ: Subimos de 60vh a 88vh para que el video sea más alargado y quepa la bolita */
    .video-bg-container {
        height: 88vh;
    }
    
    /* Forzar a que los botones o elementos se apilen */
    .hero-buttons {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
}

/* 3. Pantallas Gigantes / Monitores 4K (Más de 1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px; /* Permite que el diseño se expanda elegantemente en pantallas enormes */
    }
    body {
        font-size: 18px; /* Un pelo más grande para mejorar legibilidad */
    }
}
/* Por defecto en escritorio (Muestras 3 tarjetas) */
.carousel-item {
    flex: 0 0 calc(33.33% - 20px);
    margin: 10px;
}

/* En tablets (Muestras 2 tarjetas) */
@media (max-width: 992px) {
    .carousel-item {
        flex: 0 0 calc(50% - 20px);
    }
}

/* En celulares (Muestras 1 sola tarjeta completa) */
@media (max-width: 576px) {
    .carousel-item {
        flex: 0 0 100%;
        margin: 10px 0;
    }
}
.bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esto es magia pura: corta los bordes excedentes pero mantiene la proporción */
    position: absolute;
    top: 0;
    left: 0;
}img {
    max-width: 100%;
    height: auto;
    display: block;
}
.carousel-btn {
    z-index: 10 !important; /* Fuerza a los botones a estar siempre por encima de las fotos */
    cursor: pointer;
}
.projects-carousel {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px; /* El espacio entre tarjetas */
}
/* Oculta la barra de scroll horrible por defecto en navegadores */
.projects-carousel::-webkit-scrollbar {
    display: none;
}