/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #0e0e0e;
  color: #f0f0f0;
  line-height: 1.6;
}

.container {
  max-width: 2200px;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  background: #1c1c1c;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffdd57;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: #f0f0f0;
  text-decoration: none;
  transition: color 0.3s;
}

.nav a:hover,
.nav .cta {
  color: #ffdd57;
  font-weight: bold;
}

.hero {
  padding: 1rem 2rem;
  text-align: center;
  background: linear-gradient(#1c1c1c, #0e0e0e);
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #ffdd57;
}

.intro-mobile {
  font-size: 1.2rem;
}

.btn-download {
  background-color: #ffdd57;
  color: #1c1c1c;
  padding: 0.8rem 1.6rem;
  border: none;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: background 0.3s;
  display: inline-block;
  margin-top: 1rem;
}

.btn-download:hover {
  background-color: #ffd633;
}

section {
  scroll-margin-top: 80px;
  /* Ajustá este valor según el alto real del header fijo */
}

.lore {
  padding: 2rem;
}

.lore .narrativa {
  max-width: 800px;
  margin: 0 auto;
  white-space: pre-line;
}

.lore h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.compendio .camaras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.camara-card {
  display: flex;
  flex-direction: column;
  background-color: #1f1f1f;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: #f0f0f0;
  transition: border 0.3s;
  border: 2px solid transparent;
}

.camara-card:hover {
  border: 2px solid #ffdd57;
  cursor: pointer;
}

.card-img {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
}

.card-text {
  padding: 1rem;
  text-align: center;
}

.card-text h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: #ffdd57;
}

.card-text p {
  font-size: 0.95rem;
  color: #ccc;
}

.ecos .ranking-placeholder {
  margin-top: 1.5rem;
  height: 400px;
  background-color: #222;
  border: 1px dashed #444;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}

.cta-final {
  padding: 2rem;
  text-align: center;
  border-radius: 6px;
  background-color: #1c1c1c;
}

.cta-final h2 {
  margin-bottom: 1rem;
}

footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: #666;
  background-color: #0e0e0e;
}

@media (max-width: 980px) {
  .nav ul {
    flex-direction: column;
    gap: 0.8rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .btn-download {
    font-size: 1rem;
  }

  .nav {
    display: none;
    /* Se puede activar como menú hamburguesa en el futuro */
  }
}

.btn-mobile-fixed {
  display: none;
  position: fixed;
  top: 0.5rem;
  right: 1rem;
  background-color: #ffdd57;
  color: #1c1c1c;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  z-index: 999;
  transition: opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}

.btn-mobile-fixed.visible {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.intro-panels {
  position: relative;
  width: 100%;
  height: 70vh;
  overflow: hidden;
}

.intro-panels .panel {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  transition: left 1s ease-in-out;
  z-index: 0;
}

.intro-panels .panel.active {
  left: 0;
  z-index: 1;
}

.panel-text {
  background: rgba(0, 0, 0, 0.6);
  color: #ffdd57;
  font-size: 1.8rem;
  text-align: center;
  padding: 2rem;
  border-radius: 8px;
  max-width: 90%;
  font-weight: bold;
}

.intro-panels .panel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0;
  z-index: 2;
  pointer-events: none;
  /* evita que bloquee clics al panel */
}

.intro-panels .panel-controls button {
  pointer-events: auto;
  /* reactiva clics en los botones */
  background: rgba(255, 221, 87, 0.9);
  border: none;
  padding: 0.8rem 1.2rem;
  font-size: 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  color: #1c1c1c;
}

.intro-panels .panel-indicators {
  position: absolute;
  bottom: 1rem;
  width: 100%;
  text-align: center;
  z-index: 2;
}

.intro-panels .panel-indicators span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 5px;
  background: #888;
  border-radius: 50%;
  transition: background 0.3s;
}

.intro-panels .panel-indicators .active {
  background: #ffdd57;
}


@media (max-width: 980px) {

  .intro-panels {
    position: relative;
    width: 100%;
    height: 50vh;
    overflow: hidden;
  }

  .btn-mobile-fixed {
    display: block;
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: #ffdd57;
    color: #1c1c1c;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    z-index: 1500;
  }

  .panel-text {
    font-size: 1.2rem;
    padding: 1.5rem;
  }

  .intro-panels .panel-controls button {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
  }

  .intro-panels .panel-indicators span {
    width: 8px;
    height: 8px;
  }
}

/* ===== Tarjetas diagonales imagen + texto ===== */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* 50% imagen / 50% texto */
  grid-template-areas: "media content";
  gap: 0;
  align-items: stretch;
  background: #151515;
  border-radius: 16px;
  overflow: hidden;
  margin: 2rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  /* height: 50vh; */
  max-height: 70vh;
  /* la tarjeta no supera 50% de alto de pantalla */
  min-height: 320px;
  /* evita que quede muy baja */
}

.feature .feature-media {
  grid-area: media;
}

.feature .feature-content {
  grid-area: content;
}

.feature .feature-media,
.feature .feature-content {
  height: 100%;
  /* los dos paneles ocupan toda la altura */
}

/* alterna: texto a la izquierda, imagen a la derecha */
.feature.alt {
  grid-template-columns: 1fr 1fr;
  /* también 50/50 en la variante */
  grid-template-areas: "content media";
  /* invierte lados */
}

.feature-media {
  position: relative;
  display: flex;
}

.feature-media img {
  width: 100%;
  height: 100%;
  max-height: 70vh;
  /* ← clave: llena la altura total de la tarjeta */
  display: block;
  object-fit: cover;
  /* recorta si la proporción no coincide */
}

/* En mobile mantenemos “cover” para que llene bien */
@media (max-width: 980px) {
  .feature-media img {
    height: auto;
    max-height: none;
    object-fit: cover;
    width: 100%;
  }
}

/* corte diagonal hacia el contenido */
.feature .feature-media::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 0;
  bottom: 0;
  width: clamp(80px, 8vw, 300px);
  /* ← escala con ANCHO de pantalla */
  background: linear-gradient(135deg, transparent 50%, #151515 50%);
  pointer-events: none;
}

/* en .alt el corte va al otro lado */
.feature.alt .feature-media::after {
  left: -1px;
  right: auto;
  width: clamp(80px, 8vw, 300px);
  /* ← igual que arriba */
  background: linear-gradient(225deg, transparent 50%, #151515 50%);
}

.feature-content {
  padding: 2rem 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.feature-content h2 {
  color: #ffdd57;
  font-size: 1.8rem;
  margin-bottom: .75rem;
  text-align: left;
}

.feature-content p {
  color: #ddd;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 60ch;
  text-align: left;
}

/* Reutilizamos tu .btn-download como CTA dentro de la tarjeta */
.feature .btn-download {
  align-self: center;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 980px) {

  .feature,
  .feature.alt {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "content";
    max-height: none;
    /* en mobile no limitamos altura */
    /* imagen arriba, texto abajo para ambos */
  }

  .feature .feature-media::after,
  .feature.alt .feature-media::after {
    display: none;
    /* sin diagonal en mobile */
  }

  .feature-content {
    padding: 1.25rem 1rem 1.5rem;
  }

  .feature-content h2 {
    font-size: 1.4rem;
  }

  .feature-content p {
    font-size: 1rem;
  }
}

.target {
  scroll-margin-top: 80px;
  /* o el valor que uses */
  /* height: 20px; */
}

.community-cta {
  padding: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  text-align: center;
  /* permite que los botones bajen a la siguiente línea */
  justify-content: center;
  /* centra los botones en pantallas grandes y chicas */

}

.community-cta a {
  margin: 0.5rem;
  flex: 0 1 auto;
  /* no se estiran más allá de su ancho natural */
  text-align: center;
  min-width: unset;
  /* opcional, si querés que el ancho dependa del texto */
}

.btn-community {
  background-color: #5757ff;
  color: #1c1c1c;
  padding: 0.8rem 1.6rem;
  border: none;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
  transition: background 0.3s;
  display: inline-block;
  margin-top: 1rem;
}

.btn-community:hover {
  background-color: #3336ff;
}


@media (max-width: 980px) {
  .community-cta a {
    flex: 1 1 70%;
    /* cada botón ocupa aprox. 40% del ancho en móviles, bajando si no entra */
    min-width: 150px;
  }
}
