/* ==================== ESTILOS LEYES ==================== */

/* Hero Section - Optimizado */
.hero-leyes {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-leyes::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-leyes h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  animation: fadeInDown 0.8s ease;
}

.hero-leyes p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* Content Section - Optimizado */
.seccion-contenido {
  padding: 3rem 0;
  background: linear-gradient(to bottom, #f8f9fa 0%, white 100%);
}

.contenido-principal {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.leyes-container {
  background: white;
  padding: 2.5rem;
  border-radius: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Intro Section */
.intro-section {
  background: linear-gradient(135deg, #f8f9ff 0%, white 100%);
  padding: 1.75rem 2rem;
  border-radius: 1rem;
  margin-bottom: 2.5rem;
  border-left: 4px solid var(--primary);
}

.intro-section p {
  font-size: 1.125rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin: 0;
}

/* Leyes List - Optimizado para aprovechar espacio */
.leyes-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 0;
}

.ley-item {
  background: white;
  padding: 1.75rem;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-left: 4px solid var(--primary);
  transition: all 0.3s ease;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

.ley-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
}

.ley-item:hover::before {
  transform: scaleY(1);
}

.ley-item:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  border-left-width: 6px;
}

.ley-numero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 1.25rem 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 0.875rem;
  color: white;
  text-align: center;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.ley-item:hover .ley-numero {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

.ley-numero .numero {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  line-height: 1.2;
}

.ley-numero .año {
  display: block;
  font-size: 0.938rem;
  font-weight: 600;
  opacity: 0.95;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  width: 100%;
}

.ley-contenido {
  flex: 1;
  min-width: 0;
}

.ley-contenido h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.ley-contenido p {
  font-size: 0.938rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.btn-descargar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--primary);
  color: white;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.938rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-descargar:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(46, 125, 50, 0.3);
}

.btn-descargar::after {
  content: "↓";
  font-size: 1.125rem;
  transition: transform 0.3s ease;
}

.btn-descargar:hover::after {
  transform: translateY(2px);
}

/* Normatividad Relacionada */
.normatividad-relacionada {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, #f8f9ff 0%, white 100%);
  border-radius: 1rem;
  border-left: 4px solid var(--primary);
}

.normatividad-relacionada h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.normatividad-relacionada p {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.links-relacionados {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.link-item {
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.938rem;
  transition: all 0.3s ease;
}

.link-item:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive */
@media (max-width: 1200px) {
  .leyes-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-leyes {
    padding: 3rem 0 2.5rem;
  }

  .seccion-contenido {
    padding: 2.5rem 0;
  }

  .hero-leyes h1 {
    font-size: 2.25rem;
  }

  .hero-leyes p {
    font-size: 1.125rem;
  }

  .contenido-principal {
    padding: 0 1rem;
  }

  .leyes-container {
    padding: 2rem 1.5rem;
  }

  .ley-item {
    flex-direction: column;
    padding: 1.5rem;
  }

  .ley-numero {
    min-width: 100%;
    flex-direction: row;
    justify-content: space-around;
    padding: 1rem;
  }

  .ley-numero .numero {
    margin-bottom: 0;
    margin-right: 1rem;
  }

  .ley-numero .año {
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 0;
    padding-left: 1rem;
    width: auto;
  }

  .links-relacionados {
    flex-direction: column;
  }

  .link-item {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-leyes h1 {
    font-size: 1.875rem;
  }

  .leyes-container {
    padding: 1.5rem 1rem;
  }

  .ley-item {
    padding: 1.25rem;
  }

  .intro-section {
    padding: 1.5rem;
  }

  .normatividad-relacionada {
    padding: 1.5rem;
  }
}

/* Optimización para pantallas grandes */
@media (min-width: 1600px) {
  .leyes-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .ley-item {
    padding: 2rem;
  }
}

/* Asegurar que el hero content tenga el container correcto */
.hero-leyes .hero-content.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
