/* Scroll suave en todo el sitio */
html {
  scroll-behavior: smooth;
}

/* Reset básico */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #1f2933;
  background-color: #f7f9fc;
}

/* Contenedor general */
.container {
  width: 92%;
  max-width: 1180px;
  margin: 0 auto;
}

/* Colores base (adaptados al logo) */
:root {
  --primary: #0a315a;      /* azul oscuro */
  --primary-light: #0f4477;
  --accent: #d4af37;       /* dorado suave opcional */
  --bg-light: #ffffff;
  --bg-section: #eef2f7;
  --text: #1f2933;
  --muted: #6b7280;
}

/* Top bar */
.top-bar {
  background-color: #0b1830;
  color: #e5e7eb;
  font-size: 0.8rem;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  gap: 10px;
  flex-wrap: wrap;
}

.top-bar a {
  color: #e5e7eb;
  text-decoration: underline;
}

/* Header */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 20px;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  height: 85px;   /* tamaño ajustado para que se vea bien */
  width: auto;
  display: block;
}

/* Navegación */
.main-nav {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}

/* Linea bajo link activo / hover */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background: var(--primary);
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.main-nav a:hover {
  color: var(--primary);
}

/* Botón WhatsApp header */
.btn-whatsapp-header {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

/* Efecto de luz suave en hover */
.btn-whatsapp-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.16);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.btn-whatsapp-header:hover::after {
  opacity: 1;
}

.btn-whatsapp-header:hover {
  background-color: var(--primary);
  color: #ffffff;
}

/* Hero con leve parallax */
.hero {
  background: radial-gradient(circle at top left, #e4edf7 0, #f7f9fc 40%, #ffffff 100%);
  background-attachment: fixed;
  padding: 60px 0 50px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 32px;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-text p {
  max-width: 550px;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Botones principales */
.btn-cta,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* Efecto leve de brillo */
.btn-cta::after,
.btn-ghost::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.35), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-cta:hover::after,
.btn-ghost:hover::after {
  opacity: 1;
}

.btn-cta {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-cta:hover {
  background-color: var(--primary-light);
}

.btn-ghost {
  border: 1px solid var(--primary);
  color: var(--primary);
  background-color: transparent;
}

.btn-ghost:hover {
  background-color: #e5edf7;
}

/* Hero side card */
.hero-side {
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
}

.hero-card h2 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-top: 0;
}

.hero-card ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.hero-card li + li {
  margin-top: 8px;
}

.hero-card a {
  color: var(--primary);
  text-decoration: none;
}

/* Secciones generales */
.section {
  padding: 60px 0;
}

.section.light {
  background-color: var(--bg-section);
}

.section.highlight {
  background-color: #0b1830;
  color: #e5e7eb;
}

.section-title {
  font-size: 1.7rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.section.light .section-title {
  color: var(--primary);
}

.section.highlight .section-title {
  color: #ffffff;
}

.section-subtitle {
  margin-top: 0;
  margin-bottom: 22px;
  color: var(--muted);
  max-width: 700px;
}

.section.highlight .section-subtitle {
  color: #cbd5f5;
}

/* Cards / servicios */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  background-color: #ffffff;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  border: 1px solid #e5e7eb;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Hover lifting en cards */
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.12);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Sobre mí */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: 30px;
  align-items: flex-start;
}

.about-text p {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--muted);
}

/* Enfoque empresarial */
.highlight-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  background-color: rgba(148, 163, 255, 0.12);
  color: #e5e7eb;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
}

/* Contacto */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr);
  gap: 30px;
  align-items: flex-start;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-list li + li {
  margin-top: 8px;
}

.contact-list a {
  color: var(--primary);
  text-decoration: none;
}

.contact-form {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
}

.contact-form label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 12px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(15, 118, 210, 0.25);
  border-color: var(--primary);
}

.contact-form button {
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.contact-form button:hover {
  background-color: var(--primary-light);
}

/* Mapa */
.map-wrapper {
  margin-top: 30px;
}

.map-wrapper iframe {
  width: 100%;
  height: 260px;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

/* Footer */
.site-footer {
  background-color: #0b1830;
  color: #e5e7eb;
  padding: 18px 0;
  margin-top: 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.site-footer a {
  color: #c4d0ff;
  text-decoration: none;
}

/* OFFSET para anclas (header sticky + topbar) */
#servicios,
#nosotros,
#empresas,
#contacto {
  scroll-margin-top: 130px;
}

/* Animaciones base */

/* Fade desde abajo */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Fade desde la izquierda */
.fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Fade desde la derecha */
.fade-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Desenfoque que se aclara */
.blur-in {
  opacity: 0;
  filter: blur(10px);
  transition: opacity 0.8s ease-out, filter 0.8s ease-out;
}

/* Línea que se revela bajo el título */
.line-reveal {
  position: relative;
  display: inline-block;
}

.line-reveal::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0%;
  background: var(--primary);
  transition: width 0.8s ease-out;
}

/* Glow premium */
.glow {
  transition: box-shadow 0.8s ease;
}

.glow.visible {
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
}

/* Glass morphism */
.glass {
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Typewriter */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--primary);
  white-space: nowrap;
  animation: type 3s steps(40), blink .8s infinite;
  max-width: 100%;
  font-size: 0.95rem;
  color: var(--primary);
}

@keyframes type {
  from { width: 0 }
  to   { width: 100% }
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* Shine gradient en texto */
.shine {
  background: linear-gradient(90deg, #0a315a, #d4af37, #0a315a);
  background-size: 200%;
  -webkit-background-clip: text;
  color: transparent;
  animation: shine 6s linear infinite;
}

@keyframes shine {
  from { background-position: 0%; }
  to   { background-position: 200%; }
}

/* Underline sweep en links */
.underline-sweep {
  position: relative;
}

.underline-sweep::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: -2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.underline-sweep:hover::after {
  width: 100%;
}

/* Delay por capas */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Estados visibles */
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.blur-in.visible {
  opacity: 1;
  filter: blur(0);
}

.line-reveal.visible::after {
  width: 100%;
}

/* Responsivo */
@media (max-width: 900px) {
  .hero-inner,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-side {
    justify-content: flex-start;
  }

  .main-nav {
    display: none; /* versión simple sin menú móvil todavía */
  }

  .header-inner {
    justify-content: space-between;
  }

  .hero {
    background-attachment: scroll; /* evitar parallax agresivo en mobile */
  }
}

@media (max-width: 600px) {
  .top-bar-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 40px 0 30px;
  }

  .hero-card {
    width: 100%;
  }

  .section {
    padding: 40px 0;
  }
}
