/* ========== VARIABLES Y CONFIGURACIÓN GLOBAL ========== */
:root {
  --accent: #94d2bd;
  --dark: #001219;
  --primary: #005f73;
  --primary-color: #1a73e8;
  --primary-dark: #003d82;
  --secondary: #333;
  --teal-color: #005f73;
  --dark-color: #202124;
  --white: #ffffff;
  --transition: all 0.3s ease;
  --easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-speed: 0.5s;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--white);
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

section {
  scroll-margin-top: 80px;
  padding-top: 30px;
}

#inicio {
  scroll-margin-top: 0;
}

/* ========== TIPOGRAFÍA ========== */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  color: #f8f9fa;
}

h2 {
  font-size: 2rem;
  border-bottom: 2px solid var(--teal-color);
  padding-bottom: 0.5rem;
  color: #212529;
}

h3 {
  font-size: 1.5rem;
  color: var(--dark);
}

h4 {
  font-size: 1.2rem;
  color: var(--teal-color);
}

p {
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
}

a {
  text-decoration: none;
  color: var(--secondary);
  transition: var(--transition);
}

.subtitle {
  font-size: 1.3rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.9);
}

/* ========== COMPONENTES DE NAVEGACIÓN ========== */
/* Barra de navegación */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.5s ease;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0px 0px 40px 40px;  /*  margen de border-inicio */
  height: 80px; 
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  padding: 0.8rem 5%;
}

.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  width: 150px;
  height: auto;
  transition: var(--transition);
}

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

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

.nav-links li {
  margin-left: 1.5rem;
}

.nav-links a {
  color: rgb(51, 50, 50);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
  text-shadow: 1px 1px 3px rgba(250, 247, 247, 0.5);
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: rgb(14, 12, 12);
  bottom: 0;
  left: 0;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1000;
  background: transparent;
  border: none;
}

.hamburger-menu .bar {
  height: 3px;
  width: 100%;
  background-color: #333;
  border-radius: 10px;
  transition: var(--transition);
}

/* ============================================= */
/* BARRA SOCIAL LATERAL */
/* ============================================= */

.social-bar-container {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%) translateX(-30px);
    z-index: 2000;
    opacity: 0;
    animation: fadeSlideInLeft 1s ease-out forwards;
    animation-delay: 0.4s;
}

@keyframes fadeSlideInLeft {
    from {
        transform: translateY(-50%) translateX(-40px);
        opacity: 0;
        filter: blur(5px);
    }

    to {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
        filter: blur(0);
    }
}



.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    position: relative;
    transition: all 0.4s ease;
    text-decoration: none;
}

.social-link i {
    font-size: 20px;
    color: #fff;
    transition: transform 0.3s ease;
}

.social-text {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);

    padding: 5px 10px;
    border-radius: 0 4px 4px 0;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
    margin-left: 55px;
}

.social-link:hover {
    width: 60px;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

.social-link:hover i {
    transform: scale(1.2);
}

.social-link:hover .social-text {
    opacity: 1;
    margin-left: 10px;
}

/* Colores específicos para cada red social */
.social-facebook {
    background-color: #1877f2;
}

.social-tiktok {
    background-color: #000000;
}

.social-twitter {
    background-color: #1da1f2;
}

.social-youtube {
    background-color: #ff0000;
}

.social-web {
    background-color: #4caf50;
}

/* ========== COMPONENTES PRINCIPALES ========== */
/* Hero section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url("../empresa.png") center/cover;
  color: var(--white);
  padding: 180px 20px 100px;
  margin-top: 80px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 91vh; /* agrandar fondo */
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1.8rem;
  color: var(--white);
  line-height: 1.2;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-content p {
  font-size: 1.35rem;
  max-width: 700px;
  margin: 0 auto 3rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 3rem;
}

/* Botones */
.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--primary);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 95, 115, 0.3);
  font-family: inherit;
  font-size: 1rem;
}

.btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 95, 115, 0.4);
  background: var(--teal-color);
  color: white;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(157, 227, 173, 0.4),
    transparent
  );
  transition: 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* Contenedor de características */
.feature-container {
  background: white;
  border-radius: 12px;
  padding: 40px;
  margin: 40px 0;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

.feature-header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--teal-color);
}

.feature-icon {
  font-size: 3rem;
  color: var(--teal-color);
  margin-right: 25px;
  min-width: 60px;
  text-align: center;
}

.feature-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.feature-section {
  margin-bottom: 30px;
}

/* Lista de beneficios */
.benefits-list {
  list-style-type: none;
  padding-left: 0;
}

.benefits-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  font-size: 1.05rem;
  transition: transform 0.2s ease;
}

.benefits-list li:hover {
  transform: translateX(5px);
}

.benefits-list li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--teal-color);
  position: absolute;
  left: 0;
}

/* Ciclo de mejora */
.improvement-cycle {
  display: flex;
  justify-content: space-between;
  margin: 40px 0;
  position: relative;
}

.improvement-cycle::before {
  content: "";
  position: absolute;
  top: 30px;
  left: 50px;
  right: 50px;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  z-index: 1;
}

.cycle-step {
  text-align: center;
  padding: 0 15px;
  position: relative;
  z-index: 2;
  width: 25%;
  transition: transform 0.3s ease;
}

.cycle-step:hover {
  transform: translateY(-5px);
}

.cycle-step-icon {
  background: white;
  color: var(--teal-color);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 1.5rem;
  border: 3px solid var(--teal-color);
  transition: all 0.3s ease;
}

.cycle-step:hover .cycle-step-icon {
  background: var(--teal-color);
  color: white;
  transform: scale(1.1);
}

/* Casos de estudio */
.case-studies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.case-study {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
  border-top: 4px solid var(--accent);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-study:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.case-study h4 {
  color: var(--teal-color);
  margin-top: 0;
}

.case-study-metrics {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.metric {
  text-align: center;
  flex: 1;
}

.metric-value {
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--teal-color);
  margin-bottom: 5px;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--secondary);
}

/* Carrusel */
.carousel-container {
  width: 100%;
  max-width: 1000px;
  margin: 40px auto;
  position: relative;
}

.carousel {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.carousel-inner {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  background-color: var(--dark);
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--transition-speed) var(--easing);
}

.carousel-item.active {
  opacity: 1;
  z-index: 1;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(2px);
  transition: filter 0.7s ease;
}

.carousel-item.active img {
  filter: blur(0);
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  color: white;
  padding: 30px;
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.5s ease, opacity 0.5s ease;
  opacity: 0;
  z-index: 2;
}

.carousel-item.active .carousel-caption {
  transform: translateY(0);
  opacity: 1;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 10;
  opacity: 0.8;
}

.carousel-control:hover {
  background: white;
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
  left: 20px;
}

.carousel-control.next {
  right: 20px;
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  z-index: 10;
}

.indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  opacity: 0.7;
}

.indicator.active {
  background: var(--teal-color);
  transform: scale(1.2);
  opacity: 1;
}

/* Botón volver */
.back-button-container {
  text-align: center;
  margin: 40px 0;
}

.back-button {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  background: var(--teal-color);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 95, 115, 0.3);
  font-family: inherit;
  font-size: 1rem;
}

.back-button i {
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.back-button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 95, 115, 0.4);
  background: #004d5c;
  color: white;
}

.back-button:hover i {
  transform: translateX(-3px);
}

.back-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: 0.5s;
}

.back-button:hover::before {
  left: 100%;
}

.back-button:active {
  transform: translateY(-1px);
}

/* ========== FOOTER ========== */
footer {
  background: var(--dark);
  color: white;
  padding: 60px 0 30px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column {
  flex: 1;
  min-width: 250px;
}

.footer-column h3 {
  color: white;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-column h3:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
}

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

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

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  background-color: rgba(29, 201, 231, 0.2);
  border-radius: 50%;
  color: white;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.social-links a:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
}

/* ========== MEDIA QUERIES ========== */
/* Tablet (992px) */
@media (max-width: 992px) {
  .hero-content h1 {
    font-size: 3rem;
  }

  .hero {
    min-height: 70vh;
  }

  h1 {
    font-size: 2.5rem;
  }

  section {
    padding: 60px 0;
  }

  .feature-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .improvement-cycle {
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
  }

  .improvement-cycle::before {
    display: none;
  }

  .cycle-step {
    width: calc(50% - 30px);
    margin-bottom: 20px;
  }
}

/* Tablet pequeña (768px) */
@media (max-width: 768px) {
  /* Navbar móvil */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.5s ease;
    z-index: 999;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    margin: 1.5rem 0;
  }

  .nav-links a {
    font-size: 1.2rem;
    color: white;
  }

  /* Mostrar menú hamburguesa */
  .hamburger-menu {
    display: flex;
  }

  /* Animación para transformar en X */
  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Hero section móvil */
  .hero {
    padding: 150px 20px 80px;
    min-height: 60vh;
  }

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

  .hero-content p {
    font-size: 1.2rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .feature-container {
    padding: 25px;
  }

  .feature-header {
    flex-direction: column;
    text-align: center;
  }

  .feature-icon {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .cycle-step {
    width: 100%;
  }

  .case-studies {
    grid-template-columns: 1fr;
  }

  .carousel-inner {
    height: 350px;
  }

  /* Barra social responsive para móvil */
  .social-bar-container {
    top: auto;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    animation: fadeSlideInBottom 1s ease-out forwards;
    animation-delay: 0.4s;
  }

  @keyframes fadeSlideInBottom {
    from {
      transform: translateY(100px);
      opacity: 0;
      filter: blur(5px);
    }
    to {
      transform: translateY(0);
      opacity: 1;
      filter: blur(0);
    }
  }

  @keyframes fadeSlideInBottom {
    from {
      transform: translateX(-50%) translateY(120px);
      opacity: 0;
      filter: blur(5px);
    }
    to {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
      filter: blur(0);
    }
  }

  .social-bar {
    flex-direction: row;
    border-radius: 12px 12px 0 0;
    width: max-content;
    max-width: 100vw;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .social-link {
    width: 45px;
    height: 45px;
  }

  .social-link:hover {
    width: 45px;
    height: 55px;
    border-radius: 0;
  }

  .social-text {
    position: fixed;
    left: 50%;
    top: auto;
    bottom: 130px;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-left: 0;
    white-space: nowrap;
    z-index: 2001;
  }

  .social-link:hover .social-text {
    opacity: 1;
    margin-left: 0;
  }

  .footer-content {
    flex-direction: column;
    gap: 30px;
  }

  .footer-column {
    min-width: 100%;
    text-align: center;
  }

  .footer-column h3:after {
    left: 50%;
    transform: translateX(-50%);
  }

  .social-links {
    justify-content: center;
  }
}

/* Móvil (576px) */
@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .logo-img {
    width: 120px;
  }

  .nav-links {
    width: 80%;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .feature-container {
    padding: 20px;
    margin: 20px 0;
  }

  .carousel-inner {
    height: 250px;
  }

  .carousel-caption {
    padding: 15px;
  }

  .carousel-caption h4 {
    font-size: 1rem;
  }

  .carousel-caption p {
    font-size: 0.9rem;
  }

  .case-study-metrics {
    flex-direction: column;
    gap: 15px;
  }
}
