/* =========================
   Imports Generales
========================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Montserrat:wght@400;500;700&display=swap');

/* Bootstrap CSS */
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css');

/* Bootstrap Icons */
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css');

/* Swiper CSS */
@import url('https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.css');

/* Font Awesome */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

/* =========================
   Clases para las fuentes
========================= */
.ft-montserrat {
    font-family: 'Montserrat', sans-serif;
}

.ft-josefin {
    font-family: 'Josefin Sans', sans-serif;
}


html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* altura de tu navbar */
}




/* =========================
   Navbar
========================= */

.navbar {
  position: sticky;
  top: 0;
  background-color: #333;
  color: white;
  z-index: 1000;
  padding: 1rem;
}

.navbar-custom {
  background-color: #000000;
  height: 70px;
  padding-top: 0;
  padding-bottom: 0;
}

.navbar-brand img {
  max-height: 50px;
  width: auto;
}

/* Links y botón */
.navbar-custom .nav-link {
  color: #ffffff;
  font-weight: 500;
}

.navbar-custom .nav-link:hover {
  color: #a5001f;
}

.btn-cta {
  background-color: #a5001f;
  color: #ffffff;
  font-weight: 500;
  border-radius: 0.25rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
}

.btn-cta:hover {
  background-color: #7d0015;
  color: #ffffff!important;
}

/* Centrado vertical de links y botón */
.navbar-nav {
  display: flex;
  align-items: center;
}

/* =========================
   Hero Split
========================= */
.hero-split {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 70px); /* 100% de la ventana menos navbar */
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/img/hero/hero-bg.jpg') center/cover no-repeat;
  filter: brightness(0.2);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  color: #fff;
  padding: 3rem 1rem;
}

.hero-text h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

.hero-text p {
  font-size: 1.1rem;
  margin: 1rem 0;
}

/* Tiles hero */
.hero-tiles .tiles-container {
  padding-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 200px;
  gap: 1rem;
}

.hero-tiles .tile {
  position: relative;
  border-radius: 0.5rem;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  cursor: pointer;
}

.hero-tiles .tile-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: background-color 0.4s ease, opacity 0.4s ease;
  text-align: center;
}

.hero-tiles .tile-overlay h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.hero-tiles .tile:hover .tile-overlay {
  background-color: rgba(0,0,0,0.6);
  opacity: 1;
}

/* Fade-in tiles hero (entrada automática) */
.fade-in-tile {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
}

.fade-in-tile.delay-1 { animation-delay: 0s; }
.fade-in-tile.delay-2 { animation-delay: 0.2s; }
.fade-in-tile.delay-3 { animation-delay: 0.4s; }
.fade-in-tile.delay-4 { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   Responsive Hero
========================= */
@media (max-width: 992px) {
  .hero-text, .hero-tiles {
    text-align: center;
  }
}

@media (max-width: 576px) {
  .hero-split {
    flex-direction: column;
    min-height: auto;
  }
  .hero-tiles .tiles-container {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================
   Sección Nosotros
========================= */
.nosotros {
  background: linear-gradient(120deg, #f5f5f5, #ffffff);
}

.nosotros h1, .nosotros h4 {
  color: #111;
}

.nosotros-intro {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Tarjetas Misión, Visión, Valores */
.nosotros-card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background-color: #fff;
  transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
}

.nosotros-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
  background-color: #fafafa;
}

.nosotros-card .card-title {
  color: #a5001f;
  margin-bottom: 1rem;
}

.nosotros-card .card-text {
  color: #333;
  font-size: 1rem;
  line-height: 1.5;
}

/* Animación al hacer scroll */
.animate-on-scroll.show {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Delays para animación de izquierda a derecha */
.animate-on-scroll.delay-1 { transition-delay: 0s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.4s; }


/* Clientes */
/* Slider clientes moderno con loop suave */
.clientes-slider {
  overflow: hidden;
  width: 100%;
  position: relative;
}

/* Contenedor de todos los logos duplicados */
.slider-track {
  display: flex;
  width: calc(200%);
  animation: scroll 30s linear infinite;
  animation-play-state: running; /* se asegura de que corra por defecto */
}

/* Pausar al pasar el mouse */
.clientes-slider:hover .slider-track {
  animation-play-state: paused;
}

.slider-track .slide {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 3rem;
}

/* Logos de clientes */
.cliente-logo {
  max-width: 300px;   /* un poco más grande */
  max-height: 200px;  /* ligeramente más alto */
  filter: grayscale(100%);
  transition: filter 0.5s ease, transform 0.3s ease;
  cursor: pointer;
}

.cliente-logo:hover {
  filter: grayscale(0%);
  transform: scale(1.1);
}

/* Animación scroll */
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Responsive */
@media (max-width: 1200px) {
  .cliente-logo { max-width: 160px; max-height: 110px; }
}

@media (max-width: 992px) {
  .cliente-logo { max-width: 140px; max-height: 90px; }
}

@media (max-width: 576px) {
  .cliente-logo { max-width: 100px; max-height: 70px; }
}
/* Sección Video Institucional */
.video-institucional {
  background: #f8f8f8;
}

.video-institucional h1, 
.video-institucional h4 {
  color: #111;
}

.video-intro {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  text-align: center;
}

/* Reproductor responsive */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-institucional {
  background-color: #f0f0f5; /* gris claro */
  padding: 4rem 1rem;
  text-align: center;
  position: relative;
}

.video-institucional iframe {
  max-width: 800px;
  width: 100%;
  height: 450px;
  border-radius: 0.75rem;
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-institucional iframe:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 32px rgba(0,0,0,0.25);
}
.video-institucional h2 {
  font-size: 2rem;
  color: #111;
  margin-bottom: 0.5rem;
}

.video-institucional p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 2rem;
}


/* Floating social buttons */
.social-floating {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1050;
  padding-left: 10px;
  opacity: 0;             /* invisible al inicio */
  pointer-events: none;    /* no interfiere mientras invisible */
  transition: opacity 0.5s ease; /* fade suave */
}

.social-floating.show {
  opacity: 1;              /* visible con fade */
  pointer-events: auto;    /* interactuable cuando visible */
}

/* Flotante moderno redes sociales */
.social-floating {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  opacity: 0; /* invisible al inicio */
  pointer-events: none; /* no interfiere cuando invisible */
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1050;
  padding-left: 8px;
  transition: opacity 1s ease, transform 1s ease;
}

.social-floating.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0); /* aparece suavemente desde la izquierda */
}

/* Estilo de íconos elegantes */
.social-floating a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #a5001f, #7d0015); /* degradado elegante */
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  text-decoration: none;
  font-size: 1.4rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.social-floating a:hover {
  transform: scale(1.15);
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  filter: brightness(1.1);
}
/* =========================
   Portafolio / Servicios
========================= */
.portafolio-intro {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

.portafolio-card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.portafolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.18);
}

/* =========================
   Testimonios
========================= */
.testimonios-intro {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

.testimonios .carousel-inner {
  min-height: 220px; /* altura mínima para que no se vea vacío */
}

.testimonios .carousel-item p {
  font-size: 1rem;
  color: #333;
  max-width: 600px;
}

.testimonios .carousel-item h6 {
  margin-top: 0.5rem;
  color: #a5001f;
}

.testimonios .carousel-item small {
  color: #555;
}

.testimonial-text {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.5;
}

.carousel-item {
  transition: transform 1s ease, opacity 1s ease !important;
}

.carousel-inner .carousel-item > div {
  background-color: #fff;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.footer {
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.footer a {
  color: #fff;
  text-decoration: none;
}

.footer a:hover {
  color: #a5001f;
}


@media (max-width: 768px) {
  .social-floating {
    display: none;
  }
}
.social-mobile {
  display: none; /* oculto por defecto */
}

@media (max-width: 768px) {
  .social-mobile {
    display: flex;
  }
  
  .social-mobile a {
    font-size: 1.5rem; /* tamaño de iconos */
    color: #a5001f;
    transition: color 0.3s ease;
  }

  .social-mobile a:hover {
    color: #7d0015;
  }
}
/* Ocultar la barra de redes en pantallas medianas y grandes */
@media (min-width: 769px) {
  .social-mobile {
    display: none !important;
  }
}

/* Mostrar la barra de redes en móviles */
@media (max-width: 768px) {
  .social-mobile {
    display: flex !important;
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.show {
  opacity: 1;
  transform: translateY(0);
}

/* Retrasos secuenciales */
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }
.delay-4 { transition-delay: 0.8s; }


/*STATS*/

.chart-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
}

#stats canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 2rem;
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 768px) {
  .chart-wrapper {
    width: 120px;
    height: 120px;
  }
  .chart-center {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .chart-wrapper {
    width: 100px;
    height: 100px;
  }
  .chart-center {
    font-size: 1.2rem;
  }
}






