/* ==================================================
   Variables y Configuraciones Globales
   ================================================== */
:root {
  --color-principal: #5099cf;
  --color-acento: #a04d69;
  --color-claro: #5a5a5a;
  --color-medio: #93a3ad;
  --color-oscuro: #6c7d96;
  --color-fondo: #8b74b1;
  --color-letra: #000000;
  --color-blanco: #ffffff;
  --color-gris-claro: #f5f5f5;
  --color-gris-oscuro: #333333;
  --espaciado-base: 1.7rem;
  --transicion-rapida: all 0.3s ease-in-out;
  --transicion-lenta: all 0.5s ease-in-out;
}

/* ==================================================
   Reset y Estilos Base
   ================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  font-family: "Nunito Sans", sans-serif;
  font-size: 1.7rem;
  line-height: 1.941;
  color: var(--color-claro);
  background-color: var(--color-fondo);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ==================================================
   Tipografía
   ================================================== */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  color: var(--color-letra);
  text-rendering: optimizeLegibility;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

h1,
.h1 {
  font-size: 3.6rem;
  line-height: 1.25;
  letter-spacing: -.1rem;
}

h2,
.h2 {
  font-size: 3rem;
  line-height: 1.3;
}

h3,
.h3 {
  font-size: 2.4rem;
  line-height: 1.25;
}

h4,
.h4 {
  font-size: 2.1rem;
  line-height: 1.286;
}

h5,
.h5 {
  font-size: 1.8rem;
  line-height: 1.333;
}

h6,
.h6 {
  font-size: 1.6rem;
  line-height: 1.3125;
  text-transform: uppercase;
  letter-spacing: .16rem;
}

p {
  font-size: 1.9rem;
  color: var(--color-claro);
  line-height: 1.6;
  margin-bottom: 3rem;
}

a {
  color: var(--color-principal);
  text-decoration: none;
  transition: var(--transicion-rapida);
}

a:hover,
a:focus,
a:active {
  color: var(--color-acento);
}

/* ==================================================
   Preloader
   ================================================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #151515;
  z-index: 800;
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#loader {
  display: flex;
  gap: 1.5rem;
}

#loader>div {
  width: 6px;
  height: 6px;
  background: var(--color-blanco);
  border-radius: 50%;
  animation: dots-jump 1.2s infinite ease;
}

#loader>div:nth-child(1) {
  animation-delay: 0.4s;
}

#loader>div:nth-child(2) {
  animation-delay: 0.2s;
}

#loader>div:nth-child(3) {
  animation-delay: 0s;
}

@keyframes dots-jump {

  0%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-6px);
  }
}

/* ==================================================
   Header y Navegación
   ================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 5%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  transition: var(--transicion-lenta);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo img {
  height: 50px;
  transition: var(--transicion-rapida);
}

.navbar-center {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.navbar-menu {
  display: flex;
}

.navbar-list {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--color-blanco);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  padding: 0.5rem 1rem;
  transition: var(--transicion-rapida);
}

.nav-link:hover {
  color: var(--color-principal);
}

.navbar-social {
  display: flex;
  gap: 1.5rem;
}

.navbar-social a {
  color: var(--color-blanco);
  font-size: 1.8rem;
  transition: var(--transicion-rapida);
}

.navbar-social a:hover {
  color: var(--color-principal);
  transform: translateY(-3px);
}

/* Estilos cuando está activo el menú */
.navbar-menu.active {
  display: block;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2.8rem;
  cursor: pointer;
}

@media only screen and (max-width: 768px) {
  .navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: 1rem 1.5rem;
  }

  .menu-toggle {
    order: 1;
    flex: 0 0 auto;
  }

  .site-logo {
    order: 2;
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
  }

  .site-logo img {
    height: 36px;
    max-width: 90px;
    display: block;
  }

  .navbar-social {
    order: 3;
    flex: 0 0 auto;
    display: flex;
    gap: 0.8rem;
  }

  .navbar-center {
    display: none;
  }
}


/* ==================================================
   Hero Section - Home
   ================================================== */
.s-home {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  color: white;
}

.intro-texto {
  flex: 1 1 50%;
  padding-right: 5%;
  text-align: left;
}

.intro-texto h1 {
  font-size: 6rem;
  margin-bottom: 2rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  color: white;
}

.intro-texto h3 {
  font-size: 2.2rem;
  font-weight: 300;
  margin-bottom: 3rem;
  color: var(--color-principal);
}

.hero-video {
  flex: 1 1 45%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.video-background {
  width: 100%;
  height: auto;
  display: block;
}

/* Benefits Grid */
.benefits-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 5rem auto 0;
  padding: 0 5%;
}

.benefit-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 3rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.benefit-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.benefit-card i {
  font-size: 3.5rem;
  color: var(--color-principal);
  margin-bottom: 2rem;
}

.benefit-card h4 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--color-oscuro);
}

.benefit-card p {
  font-size: 1.6rem;
  color: var(--color-claro);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    padding-top: 10rem;
  }

  .intro-texto {
    padding-right: 0;
    margin-bottom: 5rem;
  }

  .hero-video {
    margin-bottom: 5rem;
  }

  .benefits-grid {
    margin-top: 2rem;
    position: static;
  }
}

@media (max-width: 600px) {
  .intro-texto h1 {
    font-size: 3.5rem;
  }

  .intro-texto h3 {
    font-size: 1.8rem;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }
}


/* ==================================================
   About Section
   ================================================== */
.s-about {
  padding: 10rem 5%;
  background-color: #f9f9f9;
  position: relative;
}

.about-content {
  max-width: 1200px;
  margin: 6rem auto 0;
}

.about-mission-vision {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 4rem;
  margin-bottom: 6rem;
}

.mission-card,
.vision-card {
  background: white;
  border-radius: 12px;
  padding: 4rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mission-card:hover,
.vision-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.mission-card {
  border-top: 4px solid var(--color-principal);
}

.vision-card {
  border-top: 4px solid var(--color-acento);
}

.card-icon {
  font-size: 3.5rem;
  margin-bottom: 2rem;
  color: var(--color-principal);
}

.vision-card .card-icon {
  color: var(--color-acento);
}

.card-content h3 {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: var(--color-oscuro);
}

.card-content p {
  font-size: 1.7rem;
  line-height: 1.8;
  color: var(--color-claro);
}

/* Values Section */
.about-values {
  text-align: center;
  margin-top: 8rem;
}

.about-values h3 {
  font-size: 2rem;
  margin-bottom: 5rem;
  color: var(--color-oscuro);
  text-transform: uppercase;
  letter-spacing: 0.2rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.value-item {
  padding: 3rem 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: var(--transicion-rapida);
}

.value-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.value-item i {
  font-size: 3rem;
  color: var(--color-principal);
  margin-bottom: 2rem;
}

.value-item

/* ==================================================
   Sección Servicios - Versión Mejorada
   ================================================== */
.s-services {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url('../images/fondo_equipo.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 10rem 0;
  color: var(--color-blanco);
}

.section-header {
  text-align: center;
  margin-bottom: 6rem;
}

.subhead {
  font-size: 7rem;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  color: var(--color-principal);
  margin-bottom: 1.5rem;
  display: inline-block;
  font-weight: 700;
}

.display-1 {
  font-size: 3rem;
  line-height: 1.3;
  margin-bottom: 2.5rem;
  color: #53336e;
  font-weight: 700;
  text-align: center;
}

.lead {
  font-size: 2rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  color: var(--color-acento);
  font-weight: 300;
}

/* Proceso de Transformación Digital - Versión Mejorada */
.digital-transformation-process {
  max-width: 1200px;
  margin: 8rem auto 0;
  padding: 0 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 4rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.digital-transformation-process h3 {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 5rem;
  color: var(--color-acento);
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  font-weight: 600;
}

.process-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: 4rem;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 30px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  z-index: 1;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 0 1rem;
}

.step-icon {
  width: 70px;
  height: 70px;
  background: var(--color-oscuro);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: white;
  font-size: 2.4rem;
  transition: all 0.4s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.step.active .step-icon {
  background: var(--color-acento);
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(160, 77, 105, 0.4);
}

.step h4 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--color-acento);
  font-weight: 600;
}

.step p {
  font-size: 1.6rem;
  color: (--color-acento);
  max-width: 200px;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 900px) {
  .display-1 {
    font-size: 3.5rem;
  }

  .lead {
    font-size: 1.8rem;
  }

  .process-steps {
    flex-wrap: wrap;
  }

  .step {
    flex: 0 0 50%;
    margin-bottom: 4rem;
  }

  .process-steps::before {
    display: none;
  }
}

@media (max-width: 600px) {
  .display-1 {
    font-size: 2.8rem;
  }

  .subhead {
    font-size: 1.4rem;
  }

  .step {
    flex: 0 0 100%;
  }

  .digital-transformation-process {
    padding: 3rem 1.5rem;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .display-1 {
    font-size: 3.6rem;
  }

  .process-steps {
    flex-direction: column;
    align-items: center;
  }

  .process-steps::before {
    display: none;
  }

  .step {
    margin-bottom: 4rem;
    max-width: 250px;
  }

  .step:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .display-1 {
    font-size: 2.8rem;
  }

  .lead {
    font-size: 1.8rem;
  }
}


/* Responsive */
@media (max-width: 768px) {
  .dashboard-filters {
    flex-direction: column;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .modern-dashboard {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .modern-dashboard {
    padding: 1.5rem;
  }

  .metric-value {
    font-size: 2.4rem;
  }

  .chart-wrapper {
    height: 250px;
  }
}

/* ==================================================
   Sección Trabajos - MASONRY optimizado
   ================================================== */
.s-works {
  background-color: var(--color-oscuro);
  padding: 6rem 0;
  /* Reduje el padding vertical */
}

.masonry-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  /* Reduje el padding horizontal */
}

.masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  /* Espacio uniforme entre elementos */
  padding: 0;
}

.masonry__brick {
  transition: all 0.3s ease;
  margin-bottom: 0;
  /* Eliminé el margen inferior */
  break-inside: avoid;
  /* Evita que los elementos se corten */
}

.item-folio__thumb {
  position: relative;
  overflow: hidden;
  border-radius: 0.8rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  /* Sombra más sutil */
  margin: 0;
  /* Asegura que no hay margen */
}

.item-folio__thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.item-folio__thumb a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.masonry__brick:hover .item-folio__thumb a::before {
  opacity: 1;
}

.masonry__brick:hover .item-folio__thumb img {
  transform: scale(1.03);
  /* Efecto más sutil */
}

/* Responsive */
@media (max-width: 768px) {
  .masonry {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.8rem;
  }

  .s-works {
    padding: 4rem 0;
  }
}

@media (max-width: 480px) {
  .masonry {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* ==================================================
   Sección Contacto
   ================================================== */
.s-contact {
  background-color: var(--color-principal);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.contact-main {
  max-width: 800px;
  margin: 0 auto;
}

.contact-email a {
  font-size: 3.6rem;
  font-weight: 700;
  color: var(--color-blanco);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  transition: var(--transicion-rapida);
}

.contact-email a:hover {
  border-bottom-color: var(--color-blanco);
}

.contact-address,
.contact-numbers {
  margin: 2rem 0;
  font-size: 1.8rem;
  color: var(--color-blanco);
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 4rem;
  list-style: none;
}

.contact-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-blanco);
  font-size: 2rem;
  transition: var(--transicion-rapida);
}

.contact-social a:hover {
  background: var(--color-blanco);
  color: var(--color-principal);
  transform: translateY(-5px);
}

/* ==================================================
   Footer
   ================================================== */
footer {
  padding: 6rem 5% 3rem;
  background-color: var(--color-principal);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  position: relative;
}

.ss-copyright {
  font-size: 1.4rem;
  color: var(--color-blanco);
  margin-bottom: 3rem;
}

.ss-go-top {
  position: relative;
  top: -2.5rem;
  display: flex;
  /*left: 50%;*/
  /*transform: translateX(-50%);*/
  justify-content: center;
}

.ss-go-top a {
  /*isplay: inline-block;
  background-color: var(--color-acento);
  color: var(--color-blanco);
  padding: 1rem 2rem;
  border-radius: 5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  transition: var(--transicion-rapida);*/
  background-color: #a34d5e;
  padding: 1rem 2rem;
  border-radius: 30px;
  color: white;
  text-decoration: none;
}

.ss-go-top a:hover {
  background-color: var(--color-blanco);
  color: var(--color-acento);
}

/* ==================================================
   Contador de Palabras
   ================================================== */
.text-counter {
  max-width: 700px;
  margin: 6rem auto;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  color: var(--color-blanco);
}

.text-counter h2 {
  margin-bottom: 2rem;
  color: var(--color-blanco);
}

#text-input {
  width: 100%;
  min-height: 15rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #bf3160;
  border-radius: 0.5rem;
  resize: vertical;
  margin-bottom: 2rem;
}

.counter-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  text-align: left;
}

.counter-stats p {
  margin: 0;
  font-size: 1.6rem;
}

.counter-stats strong {
  font-size: 2rem;
  color: var(--color-blanco);
}

/* ==================================================
   WhatsApp Button
   ================================================== */
#WABoton {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
}

/* ==================================================
   Responsive Design
   ================================================== */
@media only screen and (max-width: 1200px) {
  .intro-texto h1 {
    font-size: 4.5rem;
  }

  .intro-texto h3 {
    font-size: 2.2rem;
  }

  .contact-email a {
    font-size: 3rem;
  }
}

@media only screen and (max-width: 900px) {
  .navbar-center {
    gap: 2rem;
  }

  .intro-texto h1 {
    font-size: 4rem;
  }

  .inicio-layout {
    flex-direction: column;
  }

  .col-inicio,
  .video-container {
    flex: 1 1 100%;
  }

  .masonry {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media only screen and (max-width: 768px) {
  html {
    font-size: 58%;
  }

  .navbar {
    padding: 1.5rem 5%;
  }

  .navbar-list {
    display: none;
    /* Menú hamburguesa debería manejarse con JS */
  }

  .intro-texto h1 {
    font-size: 3.5rem;
  }

  .display-1 {
    font-size: 3rem;
  }

  .contact-email a {
    font-size: 2.4rem;
  }
}

@media only screen and (max-width: 480px) {
  .intro-texto h1 {
    font-size: 3rem;
    letter-spacing: 0.3rem;
  }

  .intro-texto h3 {
    font-size: 1.8rem;
  }

  .subhead {
    font-size: 1.4rem;
  }

  .contact-email a {
    font-size: 2rem;
  }

  .contact-social a {
    width: 4rem;
    height: 4rem;
    font-size: 1.6rem;
  }
}

@media only screen and (max-width: 768px) {
  .navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    padding: 1rem 2rem;
  }

  .menu-toggle {
    order: 1;
  }

  .site-logo {
    order: 2;
    margin: 0 auto;
    text-align: center;
  }

  .navbar-social {
    order: 3;
    display: flex;
    gap: 1rem;
  }

  .navbar-center {
    display: none;
    /* ocultamos menú en línea para móvil */
  }

  .navbar-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    width: 100%;
    padding: 2rem 0;
    z-index: 999;
  }

  .navbar-list {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .navbar-list li a {
    font-size: 2rem;
  }
}