/* Variables y diseño corporativo SID / Conconcreto */
:root {
  --primary-color: #1a5d1a;       /* Verde corporativo SID (contraste alto para fondo blanco) */
  --primary-light: #2c8c2c;       /* Verde secundario */
  --primary-dark: #113e11;        /* Verde oscuro */
  --accent-color: #b45309;        /* Amarillo/Ámbar oscuro para legibilidad en fondo blanco */
  --text-dark-title: #111827;     /* Título de tarjeta (Gris muy oscuro) */
  --text-dark-body: #374151;      /* Cuerpo de tarjeta (Gris de buen contraste) */
  --font-family-body: 'Inter', sans-serif;
  --font-family-title: 'Montserrat', sans-serif;
}

/* Reset y Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-family-body);
  /* Superposición oscura del 50% para contrastar los textos blancos sobre las nubes claras del fondo de SID */
  background-image: linear-gradient(rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.55)), url('../images/bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #0c0c0e; /* Fallback oscuro */
  color: #ffffff;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Canvas para Partículas en Background */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Header */
header {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.logo-container {
  display: block;
  text-decoration: none;
}

.logo-img {
  height: 3.8rem;
  width: auto;
  display: block;
}

/* Contenido Principal */
main {
  flex: 1;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem 1.5rem;
}

.hero-section {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.hero-tag {
  display: inline-block;
  background: rgba(0, 0, 0, 0.5); /* Fondo oscuro semitransparente para que resalte en las nubes */
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.45rem 1.2rem;
  border-radius: 50px;
  margin-bottom: 1.2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-title {
  font-family: var(--font-family-title);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.6rem;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); /* Sombra de texto para alta legibilidad */
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #ffffff;
  max-width: 650px;
  margin: 0 auto;
  font-weight: 400; /* Mayor peso de fuente para contrastar */
  line-height: 1.5;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85); /* Sombra fuerte y difusa */
}

/* Grid de Secciones */
.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  width: 100%;
  align-items: stretch;
}

/* Tarjeta / Fichas Blancas */
.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.card-link:nth-child(1) {
  animation-delay: 0.15s;
}
.card-link:nth-child(2) {
  animation-delay: 0.3s;
}

.landing-card {
  width: 100%;
  background: #ffffff; /* Fichas completamente blancas para máxima legibilidad */
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35); /* Sombra ligeramente más marcada */
  display: flex;
  flex-direction: column;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

/* Efecto de brillo de fondo al pasar mouse */
.landing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(26, 93, 26, 0.05), transparent 40%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.landing-card:hover::before {
  opacity: 1;
}

.landing-card:hover {
  transform: translateY(-8px);
  border-color: rgba(26, 93, 26, 0.25);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

/* Contenedor de Imagen adaptado para que quepa el personaje completo */
.card-image-wrapper {
  width: 100%;
  height: 240px;
  overflow: hidden;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ajustes de imagen para contener al personaje entero sin recortes */
.card-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* Ajusta la imagen dentro de la caja sin recortarla */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-card:hover .card-image {
  transform: scale(1.05);
}

.card-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-color);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  z-index: 2;
}

.card-title {
  font-family: var(--font-family-title);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.25;
  color: var(--text-dark-title);
  z-index: 2;
  transition: color 0.3s ease;
}

.landing-card:hover .card-title {
  color: var(--primary-color); /* Cambia al verde oficial al pasar el cursor */
}

.card-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-dark-body);
  margin-bottom: 2rem;
  flex: 1;
  font-weight: 400; /* Regular para mejor legibilidad */
  z-index: 2;
}

/* Resaltados en verde corporativo */
.card-description strong {
  color: var(--primary-color);
  font-weight: 700;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary-color); /* Enlace verde */
  transition: all 0.3s ease;
  z-index: 2;
  margin-top: auto;
}

.card-footer i {
  transition: transform 0.3s ease;
}

.landing-card:hover .card-footer {
  color: var(--primary-dark);
}

.landing-card:hover .card-footer i {
  transform: translateX(6px);
  color: var(--primary-color);
}

/* Footer de página */
footer.page-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7); /* Más visible sobre el fondo oscurecido */
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Animaciones Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Media Queries para Responsividad (1366px Optimizations) */
@media (max-width: 1024px) {
  .grid-container {
    gap: 1.5rem;
  }
  
  .landing-card {
    padding: 2rem;
  }
  
  .card-image-wrapper {
    height: 200px;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  header {
    justify-content: center;
    padding: 1.5rem;
  }
  
  .grid-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .card-image-wrapper {
    height: 220px;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
}
