/* ============================================================
   KIRP CLEAN – Global Styles
   Brand: Grupo KIRP · División CLEAN
   Manual de Identidad v2 – Poppins · Azul Institucional
   ============================================================ */

/* ---- CSS Custom Properties (Brand Tokens – Kirp Clean) ---- */
:root {
  /* Colores corporativos KIRP CLEAN */
  --kirp-dark:          #0A0E1A;
  --kirp-navy:          #1A2744;
  --kirp-blue:          #3A5BA0;      /* Azul Institucional CLEAN */
  --kirp-blue-bright:   #4169E1;      /* Azul Brillante CLEAN */
  --kirp-blue-light:    #5A7DC0;      /* Hover / highlight */
  --kirp-silver:        #8B9BB4;      /* Gris Acero */
  --kirp-light:         #E8EDF5;      /* Gris Claro corporativo */
  --kirp-gray-dark:     #3E4A5C;      /* Gris Oscuro */
  --kirp-white:         #FFFFFF;

  /* Gradiente oficial KIRP CLEAN (azul institucional → azul brillante) */
  --gradient-clean: linear-gradient(90deg, #3A5BA0 0%, #4169E1 100%);
  --gradient-dark:  linear-gradient(180deg, #1A2744 0%, #0A0E1A 100%);
}

/* ---- Base Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--kirp-dark);
  color: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Typography – Poppins (Kirp Clean identity) ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;   /* Medium – per brand manual */
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 3rem); line-height: 1.2; }
h2 { font-size: clamp(2rem, 4vw, 2.25rem); line-height: 1.25; }
h3 { font-size: 1.5rem; line-height: 1.3; }
p  { font-size: 1rem; line-height: 1.5; }

.gradient-text {
  background: var(--gradient-clean);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Navbar ---- */
#navbar {
  background: transparent;
}
#navbar.scrolled {
  background: rgba(10, 14, 26, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(58, 91, 160, 0.18);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* Nav links */
.nav-link {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--kirp-silver);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--kirp-blue-bright); }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--gradient-clean);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #4169E1 0%, #3A5BA0 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary > * { position: relative; z-index: 1; }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(58, 91, 160, 0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-primary.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
  border-radius: 14px;
}
.btn-primary.btn-xl {
  padding: 1.1rem 2.5rem;
  font-size: 1.1rem;
  border-radius: 16px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--kirp-silver);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1.5px solid rgba(139, 155, 180, 0.35);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-outline:hover {
  color: #fff;
  border-color: var(--kirp-blue-bright);
  background: rgba(65, 105, 225, 0.08);
  transform: translateY(-2px);
}
.btn-outline.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
  border-radius: 14px;
}

/* ---- Section Badge ---- */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(58, 91, 160, 0.12);
  border: 1px solid rgba(58, 91, 160, 0.3);
  border-radius: 999px;
  color: var(--kirp-blue-bright);
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}
@keyframes particle-float {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.15; }
  100% { transform: translateY(-80vh) translateX(50px) scale(0.3); opacity: 0; }
}

.animate-fade-in      { animation: fadeIn 0.8s ease forwards; }
.animate-slide-up     { animation: slideUp 0.8s ease 0.1s forwards; opacity: 0; }
.animate-slide-up-delay   { animation: slideUp 0.8s ease 0.25s forwards; opacity: 0; }
.animate-slide-up-delay-2 { animation: slideUp 0.8s ease 0.4s forwards; opacity: 0; }
.animate-slide-up-delay-3 { animation: slideUp 0.8s ease 0.55s forwards; opacity: 0; }

/* Intersection Observer reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---- Particles ---- */
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--kirp-blue-bright);
  animation: particle-float linear infinite;
  pointer-events: none;
}

/* ---- Stats ---- */
.stat-item {
  position: relative;
  padding: 1rem;
}
.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(255,255,255,0.08);
}
@media (max-width: 1023px) {
  .stat-item + .stat-item::before { display: none; }
}

/* ---- Step Cards ---- */
.step-card {
  position: relative;
  background: rgba(26, 39, 68, 0.4);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.4s ease;
  overflow: hidden;
}
.step-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(58,91,160,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.step-card:hover::before { opacity: 1; }
.step-card:hover {
  border-color: rgba(58, 91, 160, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(58,91,160,0.12);
}

.step-number {
  font-family: 'Poppins', sans-serif;
  font-size: 3.5rem;
  font-weight: 500;
  color: rgba(58, 91, 160, 0.14);
  line-height: 1;
  margin-bottom: 0.75rem;
  letter-spacing: -0.04em;
}

.step-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(58, 91, 160, 0.12);
  border: 1px solid rgba(58, 91, 160, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--kirp-blue-bright);
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}
.step-card:hover .step-icon {
  background: rgba(58, 91, 160, 0.22);
  transform: scale(1.1);
}

/* ---- Service Cards ---- */
.service-card {
  background: rgba(26, 39, 68, 0.32);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  border-color: rgba(58, 91, 160, 0.28);
  transform: translateY(-6px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(58,91,160,0.12);
}

.service-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.service-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.service-card:hover .service-img { transform: scale(1.05); }

.service-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(10, 14, 26, 0.85) 100%);
}

.service-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(58, 91, 160, 0.1);
  border: 1px solid rgba(58, 91, 160, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--kirp-blue-bright);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}
.service-card:hover .service-icon-wrap {
  background: rgba(58, 91, 160, 0.2);
}

/* ---- About / Nosotros ---- */
.about-img-container {
  border-radius: 24px;
  overflow: hidden;
  height: 480px;
  position: relative;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.about-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(58,91,160,0.08) 0%, transparent 60%);
}

.value-item {
  background: rgba(26, 39, 68, 0.4);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 1.25rem;
  transition: all 0.3s ease;
}
.value-item:hover {
  border-color: rgba(58, 91, 160, 0.25);
  background: rgba(58, 91, 160, 0.06);
  transform: translateY(-2px);
}

/* ---- WhatsApp Float ---- */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.45);
  transition: all 0.3s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.12) translateY(-3px);
  box-shadow: 0 15px 40px rgba(37, 211, 102, 0.5);
}

.whatsapp-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10,14,26,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
}
.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--kirp-dark); }
::-webkit-scrollbar-thumb {
  background: var(--kirp-navy);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--kirp-blue);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .whatsapp-float {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
  }
  .whatsapp-tooltip { display: none; }
  .about-img-container { height: 320px; }
}

/* ---- Mobile Nav – todos los items con color garantizado ---- */
#mobileMenu {
  background: rgba(10, 14, 26, 0.98) !important;
}
#mobileMenu,
#mobileMenu * {
  color: #8B9BB4;
}
#mobileMenu a:not(.btn-primary),
#mobileMenu button:not(.btn-primary) {
  color: #8B9BB4 !important;
  background: transparent;
  text-decoration: none;
}
#mobileMenu a:not(.btn-primary):hover,
#mobileMenu button:not(.btn-primary):hover {
  color: #ffffff !important;
  background: rgba(255,255,255,0.08) !important;
}
/* Botón CTA – gradiente azul Kirp Clean */
#mobileMenu .btn-primary {
  background: linear-gradient(90deg, #3A5BA0 0%, #4169E1 100%) !important;
  color: #ffffff !important;
}
#mobileMenu .btn-primary:hover {
  background: linear-gradient(90deg, #4169E1 0%, #3A5BA0 100%) !important;
  color: #ffffff !important;
}
/* El botón de Divisiones y su texto */
#mobileDiv,
#mobileDiv span {
  color: #8B9BB4 !important;
}
#mobileDiv:hover,
#mobileDiv:hover span {
  color: #ffffff !important;
}
/* Submenu Divisiones */
#mobileDivMenu a,
#mobileDivMenu a span {
  color: #8B9BB4 !important;
}
#mobileDivMenu a:hover,
#mobileDivMenu a:hover span {
  color: #ffffff !important;
}
/* Kirp Logistics (deshabilitado) */
#mobileDivMenu > div,
#mobileDivMenu > div > span:first-child {
  color: rgba(139,155,180,0.5) !important;
}
/* Los iconos de colores no se tocan */
#mobileMenu .fa-building  { color: #4169E1 !important; }
#mobileMenu .fa-car       { color: #4169E1 !important; }
#mobileMenu .fa-chart-line{ color: #10B981 !important; }
#mobileMenu .fa-truck     { color: rgba(245,158,11,0.5) !important; }
/* Badge Próximamente */
#mobileDivMenu > div > span.rounded-full { color: #F59E0B !important; }

/* ---- Selection ---- */
::selection {
  background: rgba(58, 91, 160, 0.35);
  color: #fff;
}

/* ---- Focus visible ---- */
:focus-visible {
  outline: 2px solid var(--kirp-blue-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Pulse animation for CTA ---- */
@keyframes pulse-cta {
  0%, 100% { box-shadow: 0 0 0 0 rgba(58,91,160,0.45); }
  50%       { box-shadow: 0 0 0 14px rgba(58,91,160,0); }
}
.btn-primary.pulse {
  animation: pulse-cta 2.5s ease infinite;
}

/* ---- Tab Content ---- */
.tab-content { display: block; }
.tab-content.hidden { display: none; }

/* ---- Mobile Menu – items siempre visibles cuando el menú está abierto ---- */
#mobileMenu .mobile-nav-link,
#mobileMenu #mobileDiv,
#mobileMenu .pt-2 {
  opacity: 1;
  transform: translateX(0);
}

/* Hover elegante en links del menú móvil */
#mobileMenu .mobile-nav-link {
  position: relative;
  overflow: hidden;
}
#mobileMenu .mobile-nav-link::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #3A5BA0, #4169E1);
  border-radius: 0 2px 2px 0;
  transform: scaleY(0);
  transition: transform 0.2s ease;
}
#mobileMenu .mobile-nav-link:hover::before { transform: scaleY(1); }
