/* ==========================================================
   ESTILOS PRINCIPALES - Gbit Group
   Archivo: assets/css/main.css
   ========================================================== */

/* ---------------- TOKENS / VARIABLES ---------------- */
:root{
  /* Paleta base */
  --color-primary-dark: #0b3c44;   /* verde petróleo */
  --color-primary:      #1ca5ab;   /* turquesa */
  --color-bg:           #f5f6fa;   /* gris claro */
  --color-white:        #ffffff;

  /* Spacing */
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 20px;
  --spacing-xl: 32px;
  --spacing-xxl: 56px;

  /* Navbar offset (ajustable) */
  --nav-offset: 45px;
}

/* ---------------- GLOBAL ---------------- */
html, body { height: 100%; }

body {
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--color-primary-dark);
  margin: 0;
  padding: 0;
  background: var(--color-bg) url("../img/backgrounds/FONDOWEB.webp") repeat center top fixed;
  background-size: auto; /* conserva el patrón original */
}

/* Espaciado estándar */
.section-pad { padding: var(--spacing-xxl) 0; }
.lead-sm { font-size: 1rem; opacity: .9; }

/* Empuje uniforme bajo el navbar en todas las páginas que usen la plantilla */
.site-main { padding-top: var(--nav-offset); }

/* ---------------- NAVBAR ---------------- */
.navbar { padding-top: 4px; padding-bottom: 4px; }
.navbar-brand img {
  max-height: 40px;
  height: auto; width: auto; display: block;
}
.nav-link {
  font-weight: 500;
  color: var(--color-primary-dark) !important;
  margin-left: var(--spacing-md);
  transition: color .2s ease;
}
.nav-link:hover,
.nav-link.active {
  color: var(--color-primary) !important;
  font-weight: 600;
}

/* ---------------- HERO (actualizado) ---------------- */
#hero {
  min-height: 70vh;
  background-image: url("../img/hero/HERO-1366.webp"); /* default desktop */
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  text-align: left;
  margin-bottom: 0;
  padding-bottom: 36px;
}
#hero .overlay { position: absolute; inset: 0; background: rgba(11,60,68,.62); z-index: 0; }
#hero .hero-content { position: relative; z-index: 1; max-width: 920px; transform: translateY(8%); }
.hero-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: var(--color-white); margin-bottom: var(--spacing-sm); }
.hero-subtitle { font-size: clamp(1rem, 2.2vw, 1.25rem); color: var(--color-white); margin-bottom: var(--spacing-lg); max-width: 680px; }

/* Fallback móvil */
@media (max-width: 991.98px) {
  #hero { background-attachment: scroll; min-height: 64vh; text-align: center; padding-bottom: 28px; }
}
/* móviles */
@media (max-width: 575.98px)   { #hero { background-image: url("../img/hero/HERO-480.webp"); } }
/* tablets */
@media (min-width: 576px) and (max-width: 991.98px) { #hero { background-image: url("../img/hero/HERO-768.webp"); } }
/* pantallas grandes */
@media (min-width: 1400px)     { #hero { background-image: url("../img/hero/HERO-1920.webp"); } }

/* ---------------- SECCIÓN: INFRAESTRUCTURA ---------------- */
#infraestructura {
  padding-top: 64px; padding-bottom: 64px;
  margin-top: -28px; /* elimina franja vacía entre Hero y sección */
  background: var(--color-bg) url("../img/backgrounds/FONDOWEB.webp") repeat center top fixed;
}
#infraestructura h2 {
  color: var(--color-primary-dark);
  font-weight: 800;
  font-size: clamp(2rem, 3.2vw, 2.6rem);
  line-height: 1.15; letter-spacing: -0.2px;
  margin-bottom: 12px;
}
#infraestructura .desc {
  max-width: 620px;
  color: var(--color-primary-dark);
  opacity: .9; line-height: 1.7; font-size: 1rem; margin-bottom: 0;
  text-align: justify; text-justify: inter-word;
}
.infra-visual {
  border-radius: 15px; overflow: hidden;
  box-shadow: 0 14px 28px rgba(0,0,0,.22);
  background: #000; max-width: 420px; margin-left: auto;
}
.infra-visual img { display: block; width: 100%; height: auto; }
#infraestructura .row { row-gap: 24px; }
@media (min-width: 992px) {
  #infraestructura .text-col { padding-right: 24px; }
  #infraestructura .img-col { padding-left: 24px; }
}

/* ---------------- SECCIÓN: BENEFICIOS ---------------- */
#beneficios {
  text-align: center;
  background: var(--color-bg) url("../img/backgrounds/FONDOWEB.webp") repeat center top fixed;
  padding: 10px 0;
}
#beneficios h2 {
  color: var(--color-primary-dark);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
}
.benefit { max-width: 360px; margin: 0 auto; }
.benefit img { width: 130px; height: auto; margin-bottom: 12px; }
.benefit h4 {
  font-weight: 700; font-size: 1.125rem; margin-bottom: 6px;
  color: var(--color-primary-dark);
}
.benefit p { font-size: 0.95rem; max-width: 300px; margin: 0 auto; opacity: .85; }

/* ---------------- FRASE DESTACADA ---------------- */
#quote {
  text-align: center;
  background: var(--color-bg) url("../img/backgrounds/FONDOWEB.webp") repeat center top fixed;
  padding: 64px 0;
}
#quote .quote-text {
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  font-weight: 600;
  color: var(--color-primary-dark);
  max-width: 980px; margin: 0 auto; line-height: 1.6;
}
#quote .quote-text::before { content: "“"; font-weight: 700; }
#quote .quote-text::after  { content: "”"; font-weight: 700; }

/* ---------------- FOOTER (UNIFORME CON HOME) ---------------- */
footer{
  border-top: 1px solid rgba(11,60,68,.1);
  background: var(--color-bg) url("../img/backgrounds/FONDOWEB.webp") repeat center top fixed;
}

/* Fuerza colores de texto y enlaces en TODO el footer */
footer, 
footer *:not(img):not(svg){
  color: var(--color-primary-dark, #0b3c44) !important;
}

/* Normaliza utilidades de Bootstrap que cambian color */
footer .text-white,
footer .link-light,
footer .text-light,
footer .text-muted,
footer .text-body-secondary { 
  color: var(--color-primary-dark, #0b3c44) !important;
}

/* Títulos */
footer h6 {
  font-size: 0.95rem; font-weight: 700; margin-bottom: var(--spacing-sm);
}

/* Enlaces */
footer a, footer .nav-link {
  text-decoration: none; opacity: .9; font-weight: 500;
}
footer a:hover, footer .nav-link:hover {
  color: var(--color-primary) !important; opacity: 1;
}

/* Contenedor inferior */
.footer-brand {
  display: flex; align-items: center; justify-content: center;
  padding-top: 16px; border-top: 1px solid rgba(11,60,68,.1);
}

/* Logo */
.footer-logo { display: flex; align-items: flex-start; justify-content: center; }
@media (min-width: 768px) { .footer-logo { justify-content: flex-start; } }
.footer-logo img { height: 70px; width: auto; }

/* Redes */
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 45px; height: 45px; border-radius: 50%;
  margin-right: 14px; transition: transform .15s ease, background .2s ease;
}
.footer-social a:last-child { margin-right: 0; }
.footer-social a:hover { background: rgba(28,165,171,.18); transform: translateY(-1px); }
.footer-social img { width: 40px; height: 40px; }

/* responsive footer */
@media (max-width: 992px) {
  .footer-brand { flex-direction: column; gap: var(--spacing-md); }
}

/* ====== SECCIÓN: NOSOTROS ====== */
/* Fuente consistente (por si algún bloque hereda otra cosa) */
.about-cell, .about-title, .about-text {
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Cuadrante sin espacios entre celdas */
.about-quad { --bs-gutter-x: 0; --bs-gutter-y: 0; }
.about-quad > [class*="col-"] { padding: 0 !important; }

/* Celdas base */
.about-cell{
  padding: 26px 28px; min-height: 260px;
  display: flex; flex-direction: column; gap: 14px;
  background: transparent; border-radius: 0; box-shadow: none;
}

/* Checkerboard */
.about-cell--dark{ background:#0b3c44; color:#ffffff; }
.about-cell--light{ background:transparent; color:#314247; }

/* Títulos */
.about-title{
  margin: 0; text-transform: uppercase; font-weight: 800; letter-spacing: .06em;
  text-align: center; color:#0b3c44;
}
.about-title--dark{ color:#ffffff; }

/* Texto */
.about-text{ line-height: 1.7; font-weight: 400; color: inherit; }

/* Galería equipo */
.team-gallery .frame{ border-radius:.75rem; overflow:hidden; background:#fff; box-shadow:0 10px 24px rgba(0,0,0,.08); transition:transform .25s ease; }
.team-gallery .frame:hover{ transform:translateY(-4px); }
.team-gallery img { border-radius: 12px; display:block; width:100%; height:auto; }
.team-caption{ font-size:.8rem; color:#5a6a6e; margin-top:.35rem; text-align:center; }

/* Responsive */
@media (max-width: 991.98px){
  .about-cell{ min-height: unset; }
}


/* ===== Ajuste de uniformidad para imágenes de servicios ===== */
#servicios img {
  width: 100%;
  height: 320px;              /* altura uniforme */
  object-fit: cover;          /* recorta suavemente sin deformar */
  border-radius: 12px;
  transition: transform .4s ease, box-shadow .3s ease;
}

#servicios img:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

/* ==========================================================
   BLOG - ESTILOS DE UNIFORMIDAD Y HOVER
   ========================================================== */

/* 🔹 Contenedor general del grid */
#blog .card {
  border-radius: 12px;
  transition: all 0.35s ease;
  overflow: hidden;
  background-color: #ffffff;
}

/* 🔹 Hover sobre la tarjeta completa */
#blog .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 🔹 Imagen del post */
#blog .thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* 🔹 Efecto zoom leve al pasar el mouse sobre la imagen */
#blog .card:hover .thumb img {
  transform: scale(1.05);
}

/* 🔹 Títulos de los posts */
#blog .card-body h3 {
  color: #0b3c44;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.4;
  min-height: 3em;
}

/* 🔹 Texto descriptivo */
#blog .card-body p {
  color: #0b3c44;
  opacity: 0.85;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* 🔹 Botón “Conoce más” */
#blog .card-body .btn {
  background-color: #1ca5ab;
  border: none;
  border-radius: 50px;
  color: #fff;
  font-weight: 600;
  padding: 6px 16px;
  transition: all 0.3s ease;
}

#blog .card-body .btn:hover {
  background-color: #0b3c44;
  color: #fff;
  transform: scale(1.05);
}

/* 🔹 Banner superior del blog */
.hero-blog .hero-cover {
  min-height: 429px; /* igual al alto real de la imagen */
  background-size: contain; /* o cover si prefieres recorte */
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0b3c44; /* color del sitio */
}

.hero-blog h1 {
  color: #fff;
  font-size: 2rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* 🔹 Responsividad */
@media (max-width: 768px) {
  #blog .thumb img {
    height: 180px;
  }

  .hero-blog h1 {
    font-size: 1.6rem;
  }
}

/* ==========================================================
   BOTONES GLOBALES - ESTILO UNIFICADO
   ========================================================== */

.btn,
#blog .card-body .btn {
  background-color: #1ca5ab;   /* color base */
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  padding: 6px 18px;
  transition: all 0.3s ease;
}

.btn:hover,
#blog .card-body .btn:hover {
  background-color: #0f8784;   /* color al pasar el mouse */
  color: #fff;
  transform: scale(1.05);
}

/* ===== Banner Blog ===== */
.hero-banner {
  display: block;
  width: 100%;
}

.hero-banner-img {
  display: block;
  width: 100%;
  height: clamp(260px, 32vw, 460px);
  object-fit: cover;
  object-position: 2.5% 5%;  /* 🔹 mueve el recorte hacia abajo */
}

/* En pantallas pequeñas, centra un poco más alto */
@media (max-width: 768px) {
  .hero-banner-img {
    object-position: 50% 50%;
    height: clamp(220px, 45vw, 400px);
  }
}

/* ==========================================================
   FIX NAVBAR MOVIL - Gbit Group
   ========================================================== */

/* 🔹 Asegura que el navbar quede siempre encima del hero u overlays */
.navbar.fixed-top {
  z-index: 1090;
}

/* 🔹 Evita que el menú colapsable se recorte al desplegarse */
header {
  overflow: visible;
}

/* 🔹 Si hay capas con overlay (como el hero), que no bloqueen clics */
#hero .overlay,
.hero-overlay {
  pointer-events: none;
}

/* 🔹 Fallback visual para el menú colapsado en móvil */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: #ffffff;
    border-top: 1px solid rgba(11, 60, 68, 0.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
  }

  /* Si el menú es largo, que sea scrollable */
  .navbar-collapse.show {
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* 🔹 Fallback del icono hamburguesa (por si Bootstrap CSS se sobrescribe) */
.navbar-light .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='rgba(11,60,68, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
/* ==========================================================
   FIX FOOTER - CENTRAR REDES EN MOVIL
   ========================================================== */

@media (max-width: 991.98px) {
  .footer-social {
    display: flex;
    justify-content: center !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
  }

  /* Centra también el bloque de marca si tiene redes dentro */
  .footer-brand {
    flex-direction: column;
    text-align: center;
  }

  /* Asegura que los iconos no se alineen en fila pegada */
  .footer-social a {
    margin-right: 0;
  }
}
