/* =======================================
   GYO Empresas — Hoja de Estilos Corporativos
   Basada en Bootstrap 5 + CSS3
   Paleta principal:
     – Azul corporativo: #00334D
     – Acento/amarillo: #FFC000
     – Neutro claro: #F8F9FA
     – Texto neutro: #4E4E4E
     – Fondo oscuro / texto claro: #222222
   ======================================= */

:root {
  --color-primary: #00334D;
  --color-accent: #FFC000;
  --color-bg-light: #F8F9FA;
  --color-text: #4E4E4E;
  --color-dark: #222222;
  /*--font-base: '','Poppins', sans-serif;*/
  --font-base: 'Montserrat','Poppins', sans-serif;
}

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background-color: var(--color-bg-light);
  scroll-behavior: smooth;
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover,
a:focus {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Navbar */
/* === Navbar Invertido (fondo claro, texto azul) === */
.navbar {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar .navbar-brand {
  color: var(--color-primary);
  font-weight: 600;
}

.navbar .navbar-brand span {
  color: var(--color-accent);
}

.navbar .nav-link {
  color: var(--color-primary);
  font-weight: 500;
  transition: color 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--color-accent);
}

.navbar .btn {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.navbar .btn:hover {
  background-color: #e6b800;
  color: #000;
}

.navbar-toggler {
  border-color: var(--color-primary);
}
.navbar-toggler-icon {
  filter: invert(1) brightness(0.5);
}

.navbar .btn:hover {
  background-color: #e6b800; /* tono más oscuro del acento */
}

/* Hero principal */
/* ===== HERO: fondo en capa separada + zoom + parallax ===== */
.hero {
  position: relative;
  width: 100%;
  height: 80vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

/* capa de fondo manejable por JS: ocupa todo y está detrás */
.hero-bg {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  will-change: transform, opacity;
  transform-origin: center center;
  transition: transform 1.6s ease, opacity 1s ease;
  z-index: 0;
}

/* overlay para contraste (mantener encima de hero-bg) */
.hero .overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 51, 77, 0.55);
  z-index: 1;
}

/* contenido del hero por encima de overlay */
.hero .hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1.5rem;
}

/* clase que activa el zoom suave en la capa hero-bg */
.hero-bg.zoom {
  transform: scale(1.06); /* zoom máximo durante la animación */
}

/* transición suave estándar del texto */
.hero h1, .hero p {
  color: #f5f5f5;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* ===== Ajustes responsivos ===== */
@media (max-width: 992px) {
  .hero { height: 80vh; }
}

@media (max-width: 576px) {
  .hero { height: 70vh; }
  .hero .hero-content h1 { font-size: 1.6rem; }
}

/* Buttons generales */
.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: #002a3d;
  border-color: #002a3d;
}
.btn-accent {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-dark);
}
.btn-accent:hover {
  background-color: #e6b800;
  border-color: #e6b800;
}

/* Secciones generales */
section {
  padding: 60px 0;
}
.bg-light {
  background-color: var(--color-bg-light) !important;
}
.text-primary {
  color: var(--color-primary) !important;
}
.text-accent {
  color: var(--color-accent) !important;
}
.bg-dark {
  background-color: var(--color-dark) !important;
  color: #fff !important;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary);
  font-family: var(--font-base);
}
.lead {
  color: var(--color-text);
}

/* Tarjetas / Cards de servicio */
.card {
  border:none;
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}
.card .card-body i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}
.card .card-title {
  font-weight: 600;
}
.card .card-text {
  color: var(--color-text);
}

/* Grayscale (clientes/galería) */
.img-fluid.grayscale {
  filter: grayscale(100%);
  opacity: 0.8;
  transition: filter .3s ease, opacity .3s ease;
}
.img-fluid.grayscale:hover {
  filter: none;
  opacity: 1;
}

/* Formulario de contacto / input */
.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 .2rem rgba(0,51,77,0.25);
}

/* Footer */
footer {
  background-color: var(--color-dark);
  color: #fff;
}
footer a {
  color: #ccc;
}
footer a:hover {
  color: var(--color-accent);
}

/* Responsividad: ajuste pequeño para móviles */
@media (max-width: 576px) {
  .hero .display-4 {
    font-size: 2.5rem;
  }
  .hero .lead {
    font-size: 1.1rem;
  }
}

/* Accesibilidad / contraste mínimo */
body, .card-text, .lead {
  /* aseguramos buena legibilidad */
  line-height: 1.6;
}

/* ===== Hero Dinámico ===== */
.hero {
  position: relative;
  width: 100%;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  transition: background-image 0.2s ease-in-out;
  color: #fff;
}

.hero .overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 51, 77, 0.55); /* capa azul translúcida */
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1, .hero p {
  color: #f5f5f5;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* ===== Hero Página Interna ===== */
.page-hero {
  position: relative;
  height: 50vh;
  background-image: url('../img/hero_proyectos.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-hero .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 40, 60, 0.6);
  z-index: 1;
}
.page-hero .container {
  position: relative;
  z-index: 2;
}

/* ===== Tarjetas de Proyectos ===== */
.project-card {
  border: none;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 0.75rem;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.project-img {
  background-size: cover;
  background-position: center;
  height: 230px;
  transition: transform 0.5s ease;
}
.project-card:hover .project-img {
  transform: scale(1.1);
}


/* ===== Swiper modal ===== */
.swiper {
  width: 100%;
  height: 450px;
}
.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* Transición modal */
.modal-content {
  border-radius: 15px;
  animation: fadeInUp 0.4s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === CONTADOR ANIMADO === */
.bg-accent {
  background: linear-gradient(135deg, #003366, #005580);
}

.counter {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
  font-weight: 700;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.counter:hover {
  transform: scale(1.1);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
}

.counter + p {
  color: #e0e0e0;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.counter-section {
  background: linear-gradient(135deg, #004466, #0077aa);
  padding: 4rem 0;
  color: #fff;
}

@media (max-width: 768px) {
  .counter {
    font-size: 2.5rem;
  }
  .counter + p {
    font-size: 1rem;
  }
}

/* === CONTADOR ANIMADO PROFESIONAL GYO === */
.counter-section {
  background: linear-gradient(135deg, #003366, #005580);
  padding: 5rem 0;
  color: #fff;
}

.counter-box {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.counter-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.counter {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  font-weight: 700;
  margin-bottom: 0.5rem;
  transition: transform 0.4s ease, text-shadow 0.4s ease;
}

.counter:hover {
  transform: scale(1.08);
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.7);
}

.counter-box p {
  font-size: 1.1rem;
  color: #e0e0e0;
  letter-spacing: 0.5px;
}

.icono {
  color: #f8f9fa;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease, color 0.3s ease;
}

.counter-box:hover .icono {
  transform: scale(1.15);
  color: #ffcc00;
}

@media (max-width: 768px) {
  .counter {
    font-size: 2.5rem;
  }
  .counter-box p {
    font-size: 1rem;
  }
  .icono {
    font-size: 2.2rem;
  }
}

.mapa-container iframe {
  width: 100%;
  height: 400px;
  border: none;
  filter: grayscale(25%) brightness(95%);
  transition: transform 0.5s ease;
}

.mapa-container iframe:hover {
  transform: scale(1.02);
}

/* ===== Organigrama Flexible con Líneas ===== */
.organigrama {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  position: relative;
}

.nivel {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  position: relative;
  width: 100%;
}

.card-org {
  background: #fff;
  border: 2px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  width: 260px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.card-org:hover {
  transform: translateY(-5px);
  border-color: #007bff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card-org .cargo {
  font-weight: 600;
  color: #007bff;
  margin-bottom: 0.5rem;
}

.card-org .nombre {
  font-size: 0.95rem;
  color: #333;
}

/* === Líneas verticales entre niveles === */
.linea-vertical {
  width: 2px;
  height: 40px;
  background-color: #ccc;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* === Líneas horizontales entre tarjetas === */
.nivel-2::before,
.nivel-3::before {
  content: "";
  position: absolute;
  top: -25px;
  left: 10%;
  right: 10%;
  height: 2px;
  background-color: #ccc;
  z-index: 0;
}

/* Ajuste visual para pantallas pequeñas */
@media (max-width: 768px) {
  .nivel {
    flex-direction: column;
    align-items: center;
  }

  .nivel::before {
    content: none;
  }

  .linea-vertical {
    height: 25px;
  }

  .card-org {
    width: 100%;
    max-width: 320px;
  }
}

/* Ocultar organigrama en móviles */
@media (max-width: 767.98px) {
  #organigrama {
    display: none !important;
  }
}
/* ==== FORMULARIO DE CONTACTO ==== */
.contact-form {
  background: #ffffff;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.form-floating > label {
  color: #00334D;
  font-weight: 500;
}

.form-control:focus {
  border-color: #FFC000;
  box-shadow: 0 0 0 0.2rem rgba(255, 192, 0, 0.25);
}

.btn-accent {
  background-color: #FFC000;
  border: none;
  color: #00334D;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-accent:hover {
  background-color: #e6b800;
  transform: translateY(-2px);
}

.contact-form i {
  color: #FFC000;
}

/* Ajustes responsivos */
@media (max-width: 768px) {
  .contact-form {
    margin-top: 2rem;
  }
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.25);
    z-index: 9999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0px 6px 18px rgba(0,0,0,0.35);
}

/* Tooltip del botón */
.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    bottom: 50%;
    transform: translateY(50%);
    background: #222;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
    box-shadow: 0px 3px 10px rgba(0,0,0,0.25);
}

/* Flecha del tooltip */
.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 6px solid #222;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

/* Mostrar tooltip al pasar el mouse */
.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(50%) translateX(-3px);
}

/* versión móvil — tooltip más pequeño */
@media (max-width: 480px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 30px;
        bottom: 18px;
        right: 18px;
    }

    .whatsapp-tooltip {
        font-size: 12px;
        padding: 6px 10px;
        right: 60px;
    }
}

/* ===== SECCIÓN DE ESTADÍSTICAS ===== */
.stats-section {
    background: linear-gradient(135deg, #ffffff, #f4f4f4);
}

.stat-box {
    background: #fff;
    padding: 35px 20px;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 50px;
    color: #0076BE;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.stat-label {
    font-size: 18px;
    color: #555;
    margin: 0;
}

/* Mobile optimizado */
@media (max-width: 576px) {
    .stat-icon {
        font-size: 40px;
    }
    .stat-number {
        font-size: 36px;
    }
}

/* Estadísticas Premium */
#estadisticas {
  margin-top: -70px;
  position: relative;
  z-index: 3;
}

.stats-wrapper {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 20px 20px;
  max-width: 900px;
  box-shadow: 0 8px 10px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.3);
}

.stat-box {
  padding: 20px;
}

.stat-icon {
  font-size: 45px;
  color: #0076BE;
  margin-bottom: 15px;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
}

.stat-number {
  font-size: 42px;
  font-weight: 800;
  color: #222;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 16px;
  font-weight: 500;
  color: #444;
}

.icono-red img {
  width: 50px;
  border-radius: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.icono-red img:hover {
  transform: scale(1.2) rotate(5deg);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  cursor: pointer;
}

/* ================================
   FOOTER – LOGO RESPONSIVE
================================ */

.footer-logo {
  max-width: 400px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Ajuste específico mobile */
@media (max-width: 576px) {
  .footer-logo {
    max-width: 260px;
  }
}

/* AOS: estado inicial oculto */
[data-aos] {
  opacity: 0;
  transition-property: transform, opacity;
}

/* AOS: cuando está visible */
[data-aos].aos-animate {
  opacity: 1;
}
