/* PopRail — consultoría en movilidad (estilo limpio tipo OnePage) */
:root {
  --color-primary: #23415f;
  --color-primary-dark: #172f45;
  --color-accent: #67b842;
  --color-accent-alt: #36a9e1;
  --color-accent-hover: #7bc85a;
  --color-text: #444444;
  --color-text-muted: #848484;
  --color-bg: #ffffff;
  --color-bg-alt: #f3f5fa;
  --color-border: #e6e6e6;
  --font-sans: "Raleway", system-ui, -apple-system, sans-serif;
  --font-body: "Open Sans", system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 2px 15px rgba(0, 0, 0, 0.06);
  --radius: 8px;
  --header-h: 72px;
  --max-w: 1140px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

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

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary);
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
}

.site-header__inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}

.logo img {
  height: 44px;
  width: auto;
  max-width: min(220px, 46vw);
  object-fit: contain;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav a {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--color-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: 3.5rem 1.25rem 4rem;
  text-align: center;
}

.hero--image {
  text-align: left;
}

.hero__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.hero__media {
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.hero__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero h1 {
  color: #fff;
  margin-bottom: 0.35em;
}

.hero__lead {
  font-size: 1.1rem;
  max-width: 38rem;
  margin: 0 auto 1.75rem;
  opacity: 0.95;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero--image .hero__lead {
  margin-left: 0;
  margin-right: 0;
}

.hero--image .hero__actions {
  justify-content: flex-start;
}

/* Sections */
.section {
  padding: 3.5rem 1.25rem;
}

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

.section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section__title {
  text-align: center;
  margin-bottom: 0.35rem;
}

.section__subtitle {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  font-size: 0.95rem;
}

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

.card {
  background: #fff;
  padding: 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(55, 81, 126, 0.12);
}

.card h3 {
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(103, 184, 66, 0.15);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.featured-card {
  border-top: 4px solid var(--color-accent);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.media-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.media-card img,
.media-card video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #0f2536;
}

.media-card__embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0f2536;
}

.media-card__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-card__embed--yt:not(.is-playing) iframe {
  visibility: hidden;
}

.media-card__embed--yt .youtube-poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #0f2536;
}

.media-card__embed--yt .youtube-poster img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  display: block;
}

.media-card__embed--yt.is-playing .youtube-poster {
  display: none;
}

.media-card__embed--yt .youtube-poster__icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.media-card__embed--yt .youtube-poster__icon::after {
  content: "";
  position: absolute;
  left: 55%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 0.85rem 0 0.85rem 1.35rem;
  border-color: transparent transparent transparent #fff;
}

.media-card__body {
  padding: 1.25rem;
}

.media-card__body h3 {
  margin-bottom: 0.35rem;
}

.media-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.partner-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.partner-item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
}

.partner-item strong {
  color: var(--color-primary);
  display: block;
  margin-bottom: 0.25rem;
}

/* Service detail list */
.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-list li {
  padding: 0.35rem 0 0.35rem 1.35rem;
  position: relative;
}

.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Two column */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

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

  .hero--image {
    text-align: center;
  }

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

  .hero--image .hero__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero--image .hero__actions {
    justify-content: center;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    display: block;
    padding: 0.85rem;
    border-bottom: 1px solid var(--color-border);
  }
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

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

.contact-box {
  background: #fff;
  padding: 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.contact-box h3 {
  margin-bottom: 1rem;
}

.info-line {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.info-line strong {
  color: var(--color-primary);
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
}

.contact-canvas {
  display: block;
  margin-top: 0.35rem;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

/* Footer */
.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.88);
  padding: 2.5rem 1.25rem;
  margin-top: auto;
}

.site-footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer a {
  color: var(--color-accent-hover);
}

.site-footer a:hover {
  color: #fff;
}

/* Page shell */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page main {
  flex: 1;
}

/* CTA strip */
.cta-strip {
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.cta-strip h2 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.cta-strip p {
  margin-bottom: 1.25rem;
  opacity: 0.95;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

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

.cta-strip .btn--primary:hover {
  background: var(--color-bg-alt);
}
