/* ============================================================
   LOGISGRANADA S.A. - Hoja de Estilos Principal
   Paleta corporativa: Azul #081a4c | Rojo #8e050f
   Diseñado por CSI Group | www.csigroup.com.ec
   ============================================================ */

/* ---------- Variables de color ---------- */
:root {
  --azul:       #1b136a;
  --azul-mid:   #0d2a7a;
  --azul-light: #1a3d99;
  --rojo:       #8e050f;
  --rojo-mid:   #b30612;
  --blanco:     #ffffff;
  --gris-claro: #f4f6fb;
  --gris-texto: #444444;
  --gris-borde: #dee2e6;
  --sombra:     rgba(8, 26, 76, 0.15);
}

/* ---------- Reset y base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--gris-texto);
  background: var(--blanco);
  margin: 0;
  padding: 0;
  padding-top: 118px; /* compensa header fijo */
}

a { color: var(--azul-mid); text-decoration: none; transition: color .2s; }
a:hover { color: var(--rojo); }

img { max-width: 100%; height: auto; }

/* ---------- HEADER FIJO ---------- */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1050;
  box-shadow: 0 2px 12px var(--sombra);
}

/* Barra superior de contacto */
.topbar {
  background: var(--azul);
  padding: 10px 0;
  font-size: .82rem;
  color: rgba(255,255,255,.88);
}

.topbar a { color: rgba(255,255,255,.88); }
.topbar a:hover { color: var(--blanco); }

.topbar .topbar-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 20px;
}

.topbar .sep { color: rgba(255,255,255,.3); margin: 0 4px; }

.topbar i { margin-right: 5px; color: var(--blanco-mid); }

.topbar .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  font-size: .78rem;
  transition: background .2s, border-color .2s;
}
.topbar .social-links a:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  color: var(--blanco);
}

.btn-presentacion {
  background: var(--rojo);
  color: var(--blanco) !important;
  border: none;
  padding: 4px 14px;
  border-radius: 3px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .5px;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}
.btn-presentacion:hover {
  background: var(--rojo-mid);
  color: var(--blanco) !important;
  transform: translateY(-1px);
}

/* Barra de navegación */
.navbar-main {
  background: var(--blanco);
  padding: 5px 0;
  border-bottom: 5px solid var(--rojo);
}

.navbar-brand img {
  height: 100px;
  width: auto;
  object-fit: contain;
}

.navbar-nav .nav-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: 1.2px;
  color: var(--azul) !important;
  padding: 8px 14px !important;
  position: relative;
  text-transform: uppercase;
  transition: color .2s;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--rojo);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after { transform: scaleX(1); }
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--rojo) !important; }

.navbar-toggler {
  border-color: var(--azul);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23081a4c' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- CARRUSEL HERO ---------- */
#heroCarousel { background: var(--azul); }

#heroCarousel .carousel-item img {
  width: 100%;
  height: 75vh;
  min-height: 420px;
  max-height: 720px;
  object-fit: cover;
  object-position: center;
  filter: brightness(.75);
}

/* Texto overlay en slides */
#heroCarousel .carousel-caption {
  bottom: 15%;
  text-shadow: 1px 2px 8px rgba(0,0,0,.7);
}
#heroCarousel .carousel-caption h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.4rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--blanco);
  letter-spacing: 1px;
}
#heroCarousel .carousel-caption p {
  font-size: clamp(.85rem, 1.8vw, 1.1rem);
  color: rgba(255,255,255,.9);
}

/* Controles "invisibles" */
.carousel-control-prev,
.carousel-control-next {
  width: 6%;
  opacity: 0;
  transition: opacity .3s;
}
#heroCarousel:hover .carousel-control-prev,
#heroCarousel:hover .carousel-control-next { opacity: .8; }

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(8,26,76,.5);
  border-radius: 50%;
  padding: 18px;
  background-size: 55%;
}

/* Indicadores */
.carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--blanco);
  background-color: transparent;
  transition: background .2s;
}
.carousel-indicators .active { background-color: var(--rojo); }

/* ---------- SECCIONES GENERALES ---------- */
.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--azul);
  text-align: center;
  margin-bottom: .5rem;
}
.section-title-bar {
  display: block;
  width: 60px;
  height: 4px;
  background: var(--rojo);
  border-radius: 2px;
  margin: 0 auto 2.5rem;
}

section { padding: 64px 0; }
section:nth-child(even) { background: var(--gris-claro); }

/* ---------- SECCIÓN ABOUT (2 columnas) ---------- */
.about-img-wrap {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 32px var(--sombra);
}
.about-img-wrap img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}
.about-img-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(8,26,76,.82));
  padding: 40px 24px 28px;
  color: var(--blanco);
}
.about-img-overlay h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.about-img-overlay p { font-size: .9rem; margin: 0; opacity: .9; }

/* Columna derecha - bloques de info */
.info-block {
  padding: 20px 0;
  border-bottom: 1px solid var(--gris-borde);
}
.info-block:last-child { border-bottom: none; }

.info-block h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--azul);
  margin-bottom: 6px;
}
.info-block p { font-size: .92rem; color: var(--gris-texto); margin-bottom: 6px; }
.info-block a {
  font-size: .85rem;
  font-weight: 600;
  color: var(--rojo);
  text-decoration: underline;
}
.info-block a:hover { color: var(--azul); }

/* ---------- CARRUSEL CLIENTES ---------- */
#clientes { background: var(--azul); padding: 48px 0; }
#clientes .section-title { color: var(--blanco); }
#clientes .section-title-bar { background: var(--rojo-mid); }

.clientes-track {
  display: flex;
  gap: 20px;
  overflow: hidden;
}
.clientes-slide {
  display: flex;
  gap: 20px;
  animation: scrollClientes 18s linear infinite;
  flex-shrink: 0;
}
.clientes-slide img {
  height: 84px;
  width: auto;
  /*filter: brightness(0) invert(1);*/
  opacity: .9;
  transition: opacity .3s;
  flex-shrink: 0;
}
.clientes-slide img:hover { opacity: 1; }

@keyframes scrollClientes {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- FORMULARIO CONTACTO (HOME) ---------- */
.contact-home { background: var(--gris-claro); }

.form-control, .form-select {
  border: 1.5px solid var(--gris-borde);
  border-radius: 3px;
  font-size: .92rem;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
  border-color: var(--azul-mid);
  box-shadow: 0 0 0 3px rgba(13,42,122,.12);
  outline: none;
}

.btn-primary-lg {
  background: var(--rojo);
  color: var(--blanco);
  border: none;
  padding: 12px 36px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: 1px;
  border-radius: 3px;
  transition: background .2s, transform .1s;
}
.btn-primary-lg:hover {
  background: var(--azul);
  transform: translateY(-2px);
  color: var(--blanco);
}

/* ---------- WHATSAPP FLOTANTE ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 58px;
  height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.5);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,.6);
}
.whatsapp-float svg { width: 32px; height: 32px; fill: var(--blanco); }

/* ---------- FOOTER ---------- */
footer {
  background: var(--azul);
  color: rgba(255,255,255,.85);
  padding: 48px 0 0;
}

footer h5 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--blanco);
  font-size: .95rem;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--rojo);
  display: inline-block;
}

.footer-contact li {
  list-style: none;
  padding: 6px 0;
  font-size: .88rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.footer-contact li i {
  color: var(--rojo-mid);
  font-size: .95rem;
  margin-top: 2px;
  flex-shrink: 0;
}
.footer-contact a { color: rgba(255,255,255,.85); }
.footer-contact a:hover { color: var(--blanco); }

.footer-bottom {
  background: rgba(0,0,0,.25);
  padding: 14px 0;
  margin-top: 40px;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.6);
}
.footer-bottom a { color: rgba(255,255,255,.8); font-weight: 600; }
.footer-bottom a:hover { color: var(--blanco); }

/* ---------- PÁGINA: NOSOTROS ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--azul) 60%, var(--azul-mid) 100%);
  padding: 64px 0 48px;
  color: var(--blanco);
  text-align: center;
}
.page-hero h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--blanco);
}
.page-hero .hero-bar {
  width: 70px;
  height: 4px;
  background: var(--rojo);
  border-radius: 2px;
  margin: 12px auto 0;
}

.mvp-card {
  background: var(--blanco);
  border-left: 4px solid var(--rojo);
  border-radius: 0 4px 4px 0;
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: 0 4px 18px var(--sombra);
}
.mvp-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--azul);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 12px;
}
.mvp-card p { font-size: .93rem; line-height: 1.7; margin: 0; }

.quienes-somos { background: var(--gris-claro); }

.cert-list {
  padding-left: 0;
  list-style: none;
}
.cert-list li {
  padding: 10px 0 10px 32px;
  position: relative;
  border-bottom: 1px solid var(--gris-borde);
  font-size: .92rem;
}
.cert-list li:last-child { border-bottom: none; }
.cert-list li::before {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--rojo);
  position: absolute;
  left: 0;
  top: 10px;
  font-size: 1rem;
}

/* ---------- PÁGINA: SERVICIOS ---------- */
.servicio-item {
  padding: 48px 0;
  border-bottom: 1px solid var(--gris-borde);
}
.servicio-item:last-child { border-bottom: none; }

.servicio-img {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 6px 24px var(--sombra);
}
.servicio-img img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform .4s ease;
}
.servicio-img:hover img { transform: scale(1.04); }

.servicio-text h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--azul);
  margin-bottom: 14px;
}
.servicio-text p { font-size: .93rem; line-height: 1.75; color: var(--gris-texto); }

.servicio-badge {
  display: inline-block;
  background: var(--rojo);
  color: var(--blanco);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 2px;
  margin-bottom: 12px;
}

/* ---------- PÁGINA: EQUIPOS (GALERÍA) ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 3px 12px var(--sombra);
  aspect-ratio: 4/3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.08); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8,26,76,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay i { font-size: 2rem; color: var(--blanco); }

/* Modal lightbox */
#lightboxModal .modal-dialog { max-width: 90vw; }
#lightboxModal .modal-content {
  background: var(--azul);
  border: none;
  border-radius: 6px;
}
#lightboxModal .modal-header {
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding: 10px 16px;
}
#lightboxModal .btn-close { filter: invert(1); }
#lightboxModal .modal-body { padding: 8px; }
#lightboxModal img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

/* ---------- PÁGINA: CONTÁCTENOS ---------- */
.contact-card {
  background: var(--blanco);
  border-radius: 4px;
  box-shadow: 0 4px 20px var(--sombra);
  padding: 36px;
}
.contact-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--azul);
  margin-bottom: 24px;
}

.map-wrapper {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--sombra);
  height: 380px;
}
.map-wrapper img,
.map-wrapper iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  display: block;
}

/* ---------- PÁGINA: POLÍTICA DE DATOS ---------- */
.politica-content {
  max-width: 860px;
  margin: 0 auto;
  font-size: .95rem;
  line-height: 1.8;
}
.politica-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--azul);
  margin-top: 32px;
  margin-bottom: 10px;
}

/* ---------- ALERT MESSAGES ---------- */
.alert-success-custom {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 3px;
  padding: 12px 18px;
  display: none;
  font-size: .9rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
  body { padding-top: 104px; }
  .topbar .topbar-inner { justify-content: center; font-size: .78rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  body { padding-top: 96px; }
  #heroCarousel .carousel-item img { height: 52vw; min-height: 260px; }
  .about-img-wrap img { height: 300px; }
  .section-title { font-size: 1.4rem; }
  section { padding: 44px 0; }
  .topbar .topbar-inner { font-size: .74rem; gap: 0 12px; }
  .contact-card { padding: 24px 18px; }
  .whatsapp-float { bottom: 18px; right: 18px; width: 50px; height: 50px; }
}

@media (max-width: 575px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .topbar { display: none; }
  body { padding-top: 72px; }
  .servicio-img img { height: 200px; }
}

/* ---------- ANIMACIONES ENTRADA ---------- */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }
