:root {
  --lh-navy: #1e3a5f;
  --lh-yellow: #f5c518;
  --lh-blue: #0d6efd;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #212529;
}

section[id] {
  scroll-margin-top: 100px;
}

/* Navbar */
.navbar {
  background: #fdfdfd;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.navbar-brand img {
  height: 80px;
  max-width: 100%;
  object-fit: contain;
}
@media (max-width: 575.98px) {
  .navbar-brand img {
    height: 50px;
  }
}
.navbar .nav-link {
  color: var(--lh-navy);
  font-weight: 500;
}
.navbar .nav-link:hover {
  color: var(--lh-blue);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--lh-navy) 0%, #0a1e36 100%);
  color: #fff;
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: var(--lh-yellow);
  opacity: .12;
  border-radius: 50%;
  pointer-events: none;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
}
.hero .lead {
  font-size: 1.25rem;
  opacity: .9;
  max-width: 540px;
}
.btn-lh-yellow {
  background: var(--lh-yellow);
  color: var(--lh-navy);
  font-weight: 600;
  border: none;
  padding: .65rem 1.8rem;
  border-radius: .375rem;
}
.btn-lh-yellow:hover {
  background: #e0b200;
  color: var(--lh-navy);
}

/* Services */
.services {
  padding: 5rem 0;
}
.services .icon-box {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.icon-navy  { background: rgba(30,58,95,.1); color: var(--lh-navy); }
.icon-yellow { background: rgba(245,197,24,.15); color: #b8920c; }
.icon-blue  { background: rgba(13,110,253,.1); color: var(--lh-blue); }

/* Projects */
.projects {
  background: #f8f9fa;
  padding: 5rem 0;
}
.project-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  transition: transform .2s;
  scroll-margin-top: 100px;
}
.project-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
}
.project-card .card-header {
  background: var(--lh-navy);
  color: #fff;
  font-weight: 600;
  padding: 1rem 1.25rem;
  border: none;
}
.project-card .badge-tech {
  background: rgba(13,110,253,.1);
  color: var(--lh-blue);
  font-weight: 500;
  font-size: .8rem;
  padding: .35em .7em;
  border-radius: 6px;
}
.btn-tech-toggle {
  background: #fff;
  color: var(--lh-navy);
  border: none;
  border-radius: 6px;
  padding: .25rem .65rem;
  font-size: .8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: background .2s, transform .15s;
  white-space: nowrap;
  margin-left: auto;
  order: 99;
}
.btn-tech-toggle:hover {
  background: #e9ecef;
  transform: translateY(-1px);
}
.tech-view h6 {
  color: var(--lh-navy);
}
.tech-view code {
  background: rgba(13,110,253,.08);
  color: var(--lh-navy);
  padding: .1em .35em;
  border-radius: 4px;
  font-size: .85em;
}
.tech-view ul {
  padding-left: 1.2rem;
}
.tech-view ul li {
  margin-bottom: .25rem;
}

/* Process */
.process-step {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--lh-yellow);
  color: var(--lh-navy);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Service cards */
.service-card {
  padding: 2rem 1.5rem;
  border-radius: 12px;
  transition: background .5s ease, box-shadow .5s ease, opacity .6s ease, transform .6s ease;
}
.service-card.visible {
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* CTA */
.cta {
  background: var(--lh-navy);
  color: #fff;
  padding: 4rem 0;
}

/* Footer */
footer {
  background: #0a1e36;
  color: rgba(255,255,255,.6);
  padding: 2rem 0;
  font-size: .9rem;
}
footer a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
}
footer a:hover { color: var(--lh-yellow); }

/* Contact form */
#contactForm .form-control {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
}
#contactForm .form-control::placeholder {
  color: rgba(255,255,255,.5);
}
#contactForm .form-control:focus {
  background: rgba(255,255,255,.15);
  border-color: var(--lh-yellow);
  color: #fff;
  box-shadow: 0 0 0 .2rem rgba(245,197,24,.25);
}

.section-title {
  font-weight: 700;
  color: var(--lh-navy);
  margin-bottom: .5rem;
}
.section-subtitle {
  color: #6c757d;
  max-width: 560px;
  margin: 0 auto 3rem;
}
.section-subtitle.is-wide {
  max-width: min(960px, 92%);
}

/* Experiencia — hero compacto */
.hero-compact {
  padding: 4rem 0 3.5rem;
}
.hero-compact h1 {
  font-size: 2.4rem;
}

/* Experiencia — separación bajo el título cuando no hay subtítulo */
.heading-block {
  margin-bottom: 3rem;
}
.heading-block .section-title {
  margin-bottom: 0;
}

/* Experiencia — lista simple de capacidades */
.capabilities-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: .85rem 1.5rem;
}
.capabilities-list li {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: 1.05rem;
  color: #343a40;
  padding: .35rem 0;
}
.capabilities-list li i {
  color: var(--lh-yellow);
  font-size: 1.35rem;
  flex-shrink: 0;
}

/* Experiencia — sub-card de Capacitación dentro de Capacidades */
.formation-card {
  margin-top: 2rem;
  background: rgba(30,58,95,.04);
  border-radius: 8px;
  padding: 1.25rem 1.25rem 1.1rem;
  text-align: center;
}
.formation-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--lh-navy);
  margin-bottom: .9rem;
}
.formation-label i {
  font-size: 1rem;
  color: var(--lh-yellow);
}
.formation-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem 1.5rem;
  justify-items: start;
  max-width: 720px;
  margin: 0 auto;
}
.formation-items span {
  font-size: .9rem;
  color: #495057;
  text-align: left;
  position: relative;
  padding-left: 1rem;
}
.formation-items span::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--lh-yellow);
  font-weight: 700;
}
.formation-more {
  margin-top: .9rem;
  text-align: center;
  font-size: .85rem;
  color: #6c757d;
  font-style: italic;
}
@media (max-width: 767.98px) {
  .formation-items {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .formation-items {
    grid-template-columns: 1fr;
  }
}

/* Experiencia — historia (prosa) */
.story-text p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #495057;
  margin-bottom: 1.25rem;
}
.story-text p:last-child {
  margin-bottom: 0;
}

/* Experiencia — capabilities */
.capability-block {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,.05);
  transition: box-shadow .2s, transform .2s;
  border-top: 3px solid var(--lh-yellow);
}
.capability-block:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,.1);
  transform: translateY(-2px);
}
.capability-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(30,58,95,.08);
  color: var(--lh-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: .85rem;
}
.capability-block h6 {
  color: var(--lh-navy);
  margin-bottom: .5rem;
}

/* Experiencia — stack grid */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.stack-category {
  background: #fff;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.stack-label {
  color: var(--lh-navy);
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .75rem;
}
.stack-note {
  margin: .7rem 0 0;
  font-size: .8rem;
  color: #6c757d;
  font-style: italic;
  line-height: 1.4;
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--lh-navy);
  border-radius: 6px;
  overflow: hidden;
  margin-left: 1rem;
  flex-shrink: 0;
  width: fit-content;
}
.lang-toggle > * {
  border: none;
  background: transparent;
  padding: .3rem .6rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--lh-navy);
  cursor: pointer;
  transition: background .2s, color .2s;
  width: 2.2rem;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  line-height: 1.5;
}
.lang-toggle > .active {
  background: var(--lh-navy);
  color: #fff;
}
.lang-toggle > a:hover {
  background: rgba(30,58,95,.1);
}
