@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;600;800;900&display=swap');

:root {
  /* Paleta Ecoilution x DISANORTE */
  --color-primary: #00A859;
  /* Verde Industrial DISANORTE */
  --color-primary-hover: #008244;
  --color-navy: #071A2C;
  /* Fondo oscuro premium */
  --color-navy-dark: #04101d;
  --color-navy-light: #122B43;
  --color-light-bg: #F4F6F8;
  --color-white: #FFFFFF;
  --color-text-body: #667085;
  --color-text-heading: #071A2C;
  --color-border: #E5E7EB;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --spacing-section: 100px;
  --spacing-card: 40px;
  --border-radius: 4px;
  --transition: all 0.3s ease;
  --shadow-card: 0 10px 30px rgba(7, 26, 44, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-light-bg);
  color: var(--color-text-body);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-text-heading);
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* SECTION TAGS (> SECTION NAME) */
.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.section-tag::before {
  content: "// ";
  color: var(--color-primary);
}

/* --- HEADER & TOPBAR --- */
.topbar {
  background-color: var(--color-navy-dark);
  color: var(--color-white);
  padding: 10px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-info span {
  margin-right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar-info i {
  color: var(--color-primary);
}

.navbar {
  background-color: var(--color-navy);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-logo {
  height: 45px;
  width: auto;
  object-fit: contain;
  display: block;
  mix-blend-mode: screen; /* Hace transparente el fondo negro */
}

.navbar-brand span {
  color: var(--color-primary);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--color-white);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--color-primary);
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 12px 28px;
  font-family: var(--font-heading);
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: var(--border-radius);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: var(--color-navy);
  transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: -1;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-primary:hover::before {
  width: 100%;
}

.btn-primary i {
  transition: transform 0.3s;
}

.btn-primary:hover i {
  transform: translateX(5px);
}

/* --- CONTAINERS --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-navy);
}

.hero-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.hero-bg.bg-1 {
  background-image: url('Equipo 1.webp');
  z-index: 1;
  background-position: center top;
  transform-origin: center top;
  animation: kenBurns 20s ease-in-out infinite alternate, fade-1 24s infinite;
}

.hero-bg.bg-2 {
  background-image: url('Equipo 11.webp');
  z-index: 2;
  background-position: center top;
  transform-origin: center top;
  animation: kenBurns 20s ease-in-out infinite alternate, fade-2 24s infinite;
}

.hero-bg.bg-3 {
  background-image: url('cemento 11.webp');
  z-index: 3;
  animation: kenBurns 20s ease-in-out infinite alternate, fade-3 24s infinite;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(7, 26, 44, 0.85) 0%, rgba(7, 26, 44, 0.4) 100%);
  z-index: 4;
}

@keyframes kenBurns {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.1);
  }
}

@keyframes fade-1 {

  0%,
  25% {
    opacity: 1;
  }

  33.33%,
  91.66% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fade-2 {

  0%,
  25% {
    opacity: 0;
  }

  33.33%,
  58.33% {
    opacity: 1;
  }

  66.66%,
  100% {
    opacity: 0;
  }
}

@keyframes fade-3 {

  0%,
  58.33% {
    opacity: 0;
  }

  66.66%,
  91.66% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.hero .container {
  z-index: 5;
  position: relative;
  width: 100%;
}

.hero-content {
  max-width: 600px;
  color: var(--color-white);
  z-index: 2;
  position: relative;
}

.hero-content h1 {
  color: var(--color-white);
  font-size: 4.5rem;
  margin-bottom: 25px;
}

.hero-content p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-badge {
  position: absolute;
  right: -50px;
  top: 100px;
  background: #E71D36; /* Rojo industrial premium */
  color: var(--color-white);
  padding: 30px;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.5rem;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  z-index: 3;
}

/* --- ABOUT SECTION --- */
.about {
  padding: var(--spacing-section) 0;
  background-color: var(--color-white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 {
  font-size: 2.8rem;
  margin-bottom: 30px;
}

.about-features {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.feature {
  display: flex;
  gap: 15px;
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: var(--color-light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.feature h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
}

.experience-box {
  position: absolute;
  bottom: -30px;
  left: -30px;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 40px;
  border-top: 4px solid var(--color-primary);
}

.experience-box h3 {
  color: var(--color-primary);
  font-size: 3rem;
  margin-bottom: 5px;
}

/* --- SERVICES SECTION (PHYSICS ENABLED) --- */
.services {
  padding: var(--spacing-section) 0;
  background-color: var(--color-navy-dark);
  position: relative;
}

.services-header {
  text-align: center;
  margin-bottom: 60px;
}

.services-header .section-tag {
  background: rgba(0, 168, 89, 0.12);
  border: 1px solid rgba(0, 168, 89, 0.3);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.75rem;
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.services-header .section-tag::before {
  content: "";
}

.services-header h2 {
  font-size: 2.8rem;
  color: var(--color-white);
  position: relative;
  display: inline-block;
  width: 100%;
}

.services-header h2 span {
  color: var(--color-primary);
}

.services-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--color-primary);
  margin: 15px auto 0;
  border-radius: 2px;
}

.services-subtitle {
  color: rgba(255, 255, 255, 0.6);
  max-width: 600px;
  margin: 10px auto 0;
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 400;
}

.services-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
  min-height: 450px;
  /* Space for physics */
}

.service-card {
  background: var(--color-white);
  padding: 40px 30px;
  border-radius: var(--border-radius);
  border-top: 4px solid var(--color-primary);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: grab;
  /* FLIP variables calculated in JS */
  will-change: transform;
}

.service-card:active {
  cursor: grabbing;
}

.service-card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.service-icon {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 25px;
}

.service-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.service-card p {
  font-size: 0.95rem;
  margin-bottom: 25px;
}

.read-more {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-navy);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  transition: var(--transition);
}

.read-more:hover {
  color: var(--color-primary);
}

.read-more i {
  transition: transform 0.3s;
}

.read-more:hover i {
  transform: translateX(5px);
}

#srv-wood {
  background-image: linear-gradient(rgba(7, 26, 44, 0.7), rgba(7, 26, 44, 0.7)), url('workman.webp');
  background-size: cover;
  background-position: center;
  color: var(--color-white);
}

#srv-wood h3 {
  color: var(--color-white);
}

#srv-wood p {
  color: rgba(255, 255, 255, 0.8);
}

#srv-wood .service-icon {
  color: var(--color-primary);
}

#srv-wood .read-more {
  color: var(--color-primary);
}

#srv-wood .read-more:hover {
  color: var(--color-white);
}

#srv-civil {
  background-image: linear-gradient(rgba(7, 26, 44, 0.7), rgba(7, 26, 44, 0.7)), url('construccion.webp');
  background-size: cover;
  background-position: center;
  color: var(--color-white);
}

#srv-civil h3 {
  color: var(--color-white);
}

#srv-civil p {
  color: rgba(255, 255, 255, 0.8);
}

#srv-civil .service-icon {
  color: var(--color-primary);
}

#srv-civil .read-more {
  color: var(--color-primary);
}

#srv-civil .read-more:hover {
  color: var(--color-white);
}

#srv-metal {
  background-image: linear-gradient(rgba(7, 26, 44, 0.7), rgba(7, 26, 44, 0.7)), url('machine.webp');
  background-size: cover;
  background-position: center;
  color: var(--color-white);
}

#srv-metal h3 {
  color: var(--color-white);
}

#srv-metal p {
  color: rgba(255, 255, 255, 0.8);
}

#srv-metal .service-icon {
  color: var(--color-primary);
}

#srv-metal .read-more {
  color: var(--color-primary);
}

#srv-metal .read-more:hover {
  color: var(--color-white);
}

#srv-mant {
  background-image: linear-gradient(rgba(7, 26, 44, 0.7), rgba(7, 26, 44, 0.7)), url('matenimiento.jpg');
  background-size: cover;
  background-position: center;
  color: var(--color-white);
}

#srv-mant h3 {
  color: var(--color-white);
}

#srv-mant p {
  color: rgba(255, 255, 255, 0.8);
}

#srv-mant .service-icon {
  color: var(--color-primary);
}

#srv-mant .read-more {
  color: var(--color-primary);
}

#srv-mant .read-more:hover {
  color: var(--color-white);
}

/* --- CLIENTS SECTION --- */
.clients {
  padding: var(--spacing-section) 0;
  background-color: var(--color-navy-dark);
  color: var(--color-white);
}

.clients-banner {
  display: flex;
  background: var(--color-navy-light);
  border-radius: 100px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.clients-text-col {
  width: 35%;
  padding: 20px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(135deg, var(--color-navy-light) 0%, var(--color-navy) 100%);
}

.clients-text-col .section-tag {
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-bottom: 12px;
  display: block;
}

.clients-text-col h3 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.35;
  margin: 0;
}

.clients-text-col p {
  color: var(--color-gray-light);
  font-size: 0.95rem;
  margin-top: 15px;
  line-height: 1.6;
  opacity: 0.85;
}

.clients-carousel-col {
  width: 65%;
  background: #ffffff;
  padding: 10px 0;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

/* Efecto de desvanecimiento premium en los bordes del carrusel */
.clients-carousel-col::before,
.clients-carousel-col::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.clients-carousel-col::before {
  left: 0;
  background: linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.clients-carousel-col::after {
  right: 0;
  background: linear-gradient(to left, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.logos-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: marquee 35s linear infinite;
  will-change: transform;
}

.logos-track img {
  height: 115px; /* Altura incrementada sin cambiar tamaño del contenedor */
  width: auto;
  object-fit: contain;
  padding: 0 45px; /* Espacio generoso entre logos */
}

@keyframes marquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* Adaptabilidad responsive */
@media (max-width: 991px) {
  .clients-banner {
    flex-direction: column;
    border-radius: 40px;
  }
  
  .clients-text-col {
    width: 100%;
    padding: 40px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
  }
  
  .clients-carousel-col {
    width: 100%;
    padding: 20px 0;
  }
  
  .clients-carousel-col::before,
  .clients-carousel-col::after {
    width: 50px;
  }
  
  .logos-track img {
    height: 80px; /* Altura responsiva incrementada sin cambiar contenedor */
    padding: 0 30px;
  }
}

/* --- CONTACT SECTION --- */
.contact {
  padding: var(--spacing-section) 0;
  background-color: var(--color-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-form {
  background: var(--color-light-bg);
  padding: 50px;
  border-radius: var(--border-radius);
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px 20px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 168, 89, 0.1);
}

.contact-info {
  padding: 50px 0;
}

.contact-info h2 {
  font-size: 2.8rem;
  margin-bottom: 30px;
}

.info-item {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.info-item-icon {
  width: 60px;
  height: 60px;
  background: var(--color-navy);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: var(--border-radius);
}

.info-item h4 {
  margin-bottom: 5px;
  font-size: 1.2rem;
}

/* --- FOOTER --- */
footer {
  background: var(--color-navy-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 30px;
  border-top: 4px solid var(--color-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h2 {
  color: var(--color-white);
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.footer-brand span {
  color: var(--color-primary);
}

.footer-links h4 {
  color: var(--color-white);
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}



/* Modos FLIP */
.physical-mode {
  position: absolute !important;
  margin: 0 !important;
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .services-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 3.5rem;
  }

  .hero-badge {
    display: none;
  }
}

@media (max-width: 768px) {
  .topbar {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .services-container {
    grid-template-columns: 1fr;
    min-height: auto !important;
    gap: 20px;
  }

  .service-card {
    position: static !important;
    transform: none !important;
    cursor: default !important;
    pointer-events: auto !important;
    width: 100% !important;
    height: auto !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: 1rem;
    margin-bottom: 25px;
  }
}

/* --- FLOATING VIDEO --- */
.floating-video-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 295px; /* Ampliado 30% desde 225px */
  border-radius: 12px;
  overflow: hidden;
  z-index: 9999;
  opacity: 0.9; /* Subida la opacidad base de 0.8 a 0.9 para que sea más claro y visible */
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: 16/9;
  background-color: transparent; /* Fondo transparente */
  border: none; /* Sin bordes */
  box-shadow: none; /* Sin sombras cuadradas */
}

.floating-video-container:hover {
  opacity: 1; /* Completamente opaco al pasar el cursor */
  transform: translateY(-4px) scale(1.02);
}

.floating-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(1.2) contrast(1.05); /* Filtro para hacer el video un 20% más claro e iluminado */
}

.close-video-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 13px;
  font-weight: bold;
  line-height: 20px;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.close-video-btn:hover {
  background: #E71D36; /* Rojo premium al hacer hover en cerrar */
  transform: scale(1.1);
  border-color: transparent;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
  .floating-video-container {
    width: 215px; /* Ampliado 30% desde 165px */
    bottom: 15px;
    right: 15px;
    opacity: 0.95; /* Subido en móviles a 0.95 */
  }
}