/* Home > "Casos reales" (#proyectos-reales): Apple / Shopify-style redesign.
   Every rule is scoped to this section. No external fonts, no site-class dependency. */

#proyectos-reales {
  --pr-bg: #f5f5f7;
  --pr-card: #ffffff;
  --pr-text: #1d1d1f;
  --pr-muted: #6e6e73;
  --pr-line: rgba(0, 0, 0, 0.08);
  --pr-accent: #0071e3;
  --pr-accent-hover: #0077ed;
  --pr-radius: 22px;
  --pr-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -16px rgba(0, 0, 0, 0.14);
  --pr-shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.04), 0 24px 48px -20px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
  margin: 0;
  background: var(--pr-bg);
  background-image: none;
  color: var(--pr-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  padding: clamp(80px, 10vw, 128px) 0;
}

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

#proyectos-reales .container {
  width: min(1120px, calc(100% - 48px));
  max-width: 1120px;
  margin-inline: auto;
  padding: 0;
}

#proyectos-reales .hm-proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

/* Heading, lead and list join the section grid without an extra wrapper box. */
#proyectos-reales .hm-proof > div:first-child { display: contents; }

#proyectos-reales .section-kicker,
#proyectos-reales h2,
#proyectos-reales .lead {
  justify-self: center;
  width: min(100%, 40rem);
  margin-inline: auto;
  text-align: center;
}

/* Image sits between the intro and the cards, even though it follows the list in the markup. */
#proyectos-reales .section-kicker { grid-row: 1; }
#proyectos-reales h2 { grid-row: 2; }
#proyectos-reales .lead { grid-row: 3; }
#proyectos-reales .hm-proof-media { grid-row: 4; }
#proyectos-reales .hm-stores { grid-row: 5; }

#proyectos-reales .section-kicker {
  display: block;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pr-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

#proyectos-reales h2 {
  margin: 0 auto 18px;
  color: var(--pr-text);
  font-family: inherit;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

#proyectos-reales .lead {
  width: min(100%, 54rem);
  margin: 0 auto clamp(36px, 5vw, 52px);
  color: var(--pr-muted);
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  font-weight: 400;
  line-height: 1.45;
  text-wrap: balance;
}

/* The photo is already a device shot, so the card frames it without a second browser chrome. */
#proyectos-reales .hm-proof-media {
  width: 100%;
  margin: 0 0 clamp(28px, 4vw, 40px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--pr-line);
  border-radius: 28px;
  background: #0e0e10;
  box-shadow: var(--pr-shadow-lift);
}

#proyectos-reales .hm-proof-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1553 / 1006;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 0;
  background: #0e0e10;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

#proyectos-reales .hm-proof-media:hover img { transform: scale(1.02); }

#proyectos-reales .hm-stores {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

#proyectos-reales .hm-stores > li {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 26px 26px 22px;
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-radius);
  background: var(--pr-card);
  box-shadow: var(--pr-shadow);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

/* Five stores: 3 on the first row, 2 centered beneath them. */
#proyectos-reales .hm-stores > li:nth-child(4):nth-last-child(2) { grid-column: 2 / span 2; }
#proyectos-reales .hm-stores > li:nth-child(5):nth-last-child(1) { grid-column: 4 / span 2; }

#proyectos-reales .hm-stores > li:hover,
#proyectos-reales .hm-stores > li:focus-within {
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: var(--pr-shadow-lift);
  transform: translateY(-4px);
}

#proyectos-reales .hm-stores strong {
  display: block;
  width: 100%;
  color: var(--pr-text);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

#proyectos-reales .hm-stores strong a {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
  overflow-wrap: break-word;
}

#proyectos-reales .hm-stores strong a::after {
  content: "\2197";
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  margin-top: -2px;
  border-radius: 999px;
  background: var(--pr-bg);
  color: var(--pr-text);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#proyectos-reales .hm-stores strong a:hover { color: var(--pr-accent); }

#proyectos-reales .hm-stores strong a:hover::after {
  background: var(--pr-accent);
  color: #ffffff;
}

#proyectos-reales .hm-stores p {
  margin: 0;
  color: var(--pr-muted);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
}

#proyectos-reales .hm-stores .hm-store-secondary {
  margin-top: auto;
  padding-top: 8px;
}

#proyectos-reales .hm-stores .hm-store-secondary a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--pr-accent);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

#proyectos-reales .hm-stores .hm-store-secondary a::after { content: " \203A"; }

#proyectos-reales .hm-stores .hm-store-secondary a:hover {
  color: var(--pr-accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#proyectos-reales a:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.55);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (max-width: 900px) {
  #proyectos-reales .hm-stores { grid-template-columns: 1fr 1fr; }
  #proyectos-reales .hm-stores > li,
  #proyectos-reales .hm-stores > li:nth-child(4):nth-last-child(2),
  #proyectos-reales .hm-stores > li:nth-child(5):nth-last-child(1) { grid-column: auto; }
}

@media (max-width: 640px) {
  #proyectos-reales { --pr-radius: 18px; padding: 64px 0; }
  #proyectos-reales .container { width: min(1120px, calc(100% - 32px)); }
  #proyectos-reales h2 { font-size: 2.125rem; }
  #proyectos-reales .hm-proof-media { border-radius: 20px; }
  #proyectos-reales .hm-stores { grid-template-columns: 1fr; gap: 14px; }
  #proyectos-reales .hm-stores > li { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  #proyectos-reales *,
  #proyectos-reales *::before,
  #proyectos-reales *::after { transition: none !important; }
  #proyectos-reales .hm-proof-media:hover img,
  #proyectos-reales .hm-stores > li:hover,
  #proyectos-reales .hm-stores > li:focus-within { transform: none; }
}

@media (forced-colors: active) {
  #proyectos-reales .hm-stores > li,
  #proyectos-reales .hm-proof-media { border: 1px solid CanvasText; }
}

/* home-flagship.css marks this section as ink and sets white type with !important. */
#proyectos-reales .section-kicker {
  display: block !important;
  color: var(--pr-accent) !important;
  -webkit-text-fill-color: var(--pr-accent) !important;
  background: none !important;
  letter-spacing: 0.08em !important;
}

#proyectos-reales h2 {
  color: var(--pr-text) !important;
  -webkit-text-fill-color: var(--pr-text) !important;
  font-family: inherit !important;
}

#proyectos-reales .lead,
#proyectos-reales .hm-stores p {
  color: var(--pr-muted) !important;
  -webkit-text-fill-color: var(--pr-muted) !important;
}

#proyectos-reales .hm-stores strong,
#proyectos-reales .hm-stores strong a {
  color: var(--pr-text) !important;
  -webkit-text-fill-color: var(--pr-text) !important;
}

#proyectos-reales .hm-stores strong a:hover,
#proyectos-reales .hm-stores .hm-store-secondary a {
  color: var(--pr-accent) !important;
  -webkit-text-fill-color: var(--pr-accent) !important;
}

#proyectos-reales .hm-stores .hm-store-secondary a:hover {
  color: var(--pr-accent-hover) !important;
  -webkit-text-fill-color: var(--pr-accent-hover) !important;
}
