:root {
  /* Color Palette (Slate + Sky + Emerald) */
  --color-primary: #0ea5e9;
  /* Sky 500 */
  --color-primary-hover: #0284c7;
  /* Sky 600 */
  --color-accent: #10b981;
  /* Emerald 500 - Seguridad */
  --color-accent-hover: #059669;
  /* Emerald 600 */
  --color-heading: #0f172a;
  /* Slate 900 */
  --color-text: #475569;
  /* Slate 600 */
  --color-text-light: #64748b;
  /* Slate 500 */
  --color-bg-light: #f8fafc;
  /* Slate 50 */
  --color-cream: #f1f5f9;
  /* Slate 100 */
  --color-white: #ffffff;
  --color-hero-overlay: rgba(15, 23, 42, 0.75);
  --color-whatsapp: #25d366;
  --color-whatsapp-hover: #1ebe57;

  /* Typography */
  --font-heading: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Dimensions */
  --container-max: 1200px;
  --hero-min-height: 550px;
  --nav-height: 76px;

  /* Shadow Tiers */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 12px 30px -10px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 20px 40px -12px rgba(15, 23, 42, 0.12);

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-heading);
  text-decoration: none;
  transition: color var(--transition);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.25;
}

.container {
  width: min(100% - 2.5rem, var(--container-max));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1.5rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--color-heading);
  color: var(--color-white);
  border-radius: 0 0 6px 6px;
  font-weight: 500;
}

.skip-link:focus {
  top: 0;
}

/* Sections Global Styling */
.section {
  padding: 5.5rem 0;
}

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

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

.section-subtitle {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section__title {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
}

.section__title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-accent);
  margin: 1rem auto 0;
  border-radius: 2px;
}

.section__title--left {
  text-align: left;
}

.section__title--left::after {
  margin: 1rem 0 0;
}

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  transition: background var(--transition);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.site-nav__brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--color-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav__brand::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--color-accent);
  border-radius: 50%;
}

.site-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.site-nav__toggle-bar,
.site-nav__toggle-bar::before,
.site-nav__toggle-bar::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-heading);
  border-radius: 1px;
  transition: var(--transition);
}

.site-nav__toggle-bar {
  position: relative;
}

.site-nav__toggle-bar::before,
.site-nav__toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.site-nav__toggle-bar::before {
  top: -6px;
}

.site-nav__toggle-bar::after {
  top: 6px;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar {
  background: transparent;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar::before {
  top: 0;
  transform: rotate(45deg);
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}

.site-nav__links a {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text);
  padding: 0.5rem 0;
  position: relative;
}

.site-nav__links a:not(.btn-nav)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition);
}

.site-nav__links a:not(.btn-nav):hover {
  color: var(--color-heading);
}

.site-nav__links a:not(.btn-nav):hover::after {
  width: 100%;
}

/* Nav Button CTA */
.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.75rem !important;
  background: var(--color-heading);
  color: var(--color-white) !important;
  border-radius: 30px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition) !important;
}

.btn-nav:hover {
  background: var(--color-primary);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--hero-min-height);
  background-color: var(--color-heading);
  background-image: url("assets/hero-cpr.jpg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-hero-overlay) 60%, rgba(14, 165, 233, 0.45));
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
  text-align: center;
  color: var(--color-white);
}

.hero__title {
  color: var(--color-white);
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  text-wrap: balance;
}

.hero__subtitle {
  max-width: 44rem;
  margin: 0 auto 2.5rem;
  font-size: clamp(1.125rem, 2.8vw, 1.375rem);
  line-height: 1.6;
  opacity: 0.92;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1rem 2rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition);
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn--secondary {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
}

.btn--secondary:hover {
  background: var(--color-white);
  color: var(--color-heading);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn--whatsapp:hover {
  background: var(--color-whatsapp-hover);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

.btn--phone {
  background: var(--color-heading);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.btn--phone:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

.btn__icon {
  flex-shrink: 0;
}

/* Quiénes somos - 2 Columns */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.about-prose p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text);
}

.about-prose p+p {
  margin-top: 1.5rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background: var(--color-bg-light);
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: var(--border-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.stat-card:hover {
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.15);
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-heading);
  line-height: 1.4;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.25rem;
}

.service-card {
  padding: 2.5rem;
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15, 23, 42, 0.02);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(14, 165, 233, 0.12);
}

.service-card__icon {
  width: 32px;
  height: 32px;
}

.service-card__icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(14, 165, 233, 0.08);
  border-radius: 50%;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
  transition: all var(--transition);
}

.service-card:hover .service-card__icon-wrapper {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Custom SVG icon tint matching wrapper state */
.service-card:hover .service-card__icon {
  filter: brightness(0) invert(1);
}

.service-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 1rem;
}

.service-card__text {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text);
}

/* Gallery (Capacitaciones) */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.gallery__item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--border-radius);
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-sm);
  position: relative;
  background: var(--color-heading);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.7), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.gallery__item:hover img {
  transform: scale(1.08);
}

.gallery__item:hover::after {
  opacity: 1;
}

/* Contact Card Section */
.contact-card {
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: var(--shadow-card-hover);
  border: 1px solid rgba(15, 23, 42, 0.04);
  overflow: hidden;
  max-width: var(--container-max);
  margin: 0 auto;
}

.contact-card__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
}

.contact-card__info {
  background: #0f172a;
  /* Custom dark theme for left card side */
  padding: 3.5rem;
  color: var(--color-white);
}

.contact-card__info .section-subtitle {
  color: var(--color-primary);
}

.contact-card__title {
  color: var(--color-white);
  font-size: 2.25rem;
  margin-bottom: 2rem;
  position: relative;
}

.contact-card__title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-primary);
  margin-top: 0.75rem;
}

.contact-card__name {
  color: var(--color-white);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.contact-card__roles {
  list-style: none;
  margin-bottom: 2.5rem;
}

.contact-card__roles li {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-card__roles li::before {
  content: "✓";
  color: var(--color-primary);
  font-weight: 700;
}

.contact-card__detail {
  font-size: 0.9375rem;
  margin-top: 1rem;
}

.detail-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.25rem;
}

.detail-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--color-primary);
  transition: color var(--transition);
}

.detail-link:hover {
  color: var(--color-white);
}

.detail-text {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.contact-card__actions {
  padding: 3.5rem;
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.actions-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 1rem;
}

.contact-card__lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: 2.25rem;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  background: #0b0f19;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Responsive */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-card__grid {
    grid-template-columns: 1fr;
  }

  .contact-card__info {
    padding: 3rem 2.5rem 2rem;
  }

  .contact-card__actions {
    padding: 2.5rem;
  }
}

@media (max-width: 767px) {
  .site-nav__toggle {
    display: flex;
  }

  .site-nav__links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 0;
    background: var(--color-white);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }

  .site-nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav__links li {
    text-align: center;
  }

  .site-nav__links a {
    display: block;
    padding: 0.875rem 1.5rem;
    font-size: 1.0625rem;
  }

  .site-nav__links a:not(.btn-nav):hover::after {
    display: none;
  }

  .btn-nav {
    margin: 0.5rem 1.5rem;
    border-radius: var(--border-radius);
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 4rem 0;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }
}