/* ==================== ESTILOS DIRECTORIO INSTITUCIONAL ==================== */
/* Diseño PREMIUM - Mejores prácticas UI/UX */

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

.hero-directorio::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.hero-directorio::after {
  content: "";
  position: absolute;
  bottom: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(30px, 30px) rotate(180deg);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-directorio h1 {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.hero-directorio p {
  font-size: 1.75rem;
  font-weight: 300;
  opacity: 0.95;
  margin-bottom: 2rem;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease 0.2s both;
}

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

/* Sección de Contenido */
.seccion-contenido {
  padding: 5rem 0;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

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

.directorio-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Búsqueda Premium */
.busqueda-directorio {
  background: white;
  padding: 2.5rem;
  border-radius: 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  margin-bottom: 4rem;
  border-top: 5px solid var(--primary);
  position: relative;
}

.busqueda-directorio::before {
  content: "🔍";
  position: absolute;
  left: 3.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  pointer-events: none;
  z-index: 2;
}

.busqueda-input {
  width: 100%;
  padding: 1.25rem 1.5rem 1.25rem 3.5rem;
  border: 2px solid var(--gray-200);
  border-radius: 2rem;
  font-size: 1.125rem;
  font-family: var(--font-primary);
  color: var(--gray-900);
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  position: relative;
}

.busqueda-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.15);
  background: white;
  transform: translateY(-2px);
}

.busqueda-input::placeholder {
  color: var(--gray-500);
}

/* Áreas Sección Premium */
.areas-seccion {
  margin-bottom: 5rem;
}

.areas-seccion > h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

.areas-seccion > h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 3px;
}

.area-item {
  background: white;
  padding: 3rem;
  border-radius: 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
  border-top: 5px solid var(--primary);
  transition: all 0.3s ease;
}

.area-item:hover {
  box-shadow: 0 15px 50px rgba(46, 125, 50, 0.15);
  transform: translateY(-5px);
}

.area-item h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f3f4f6;
}

.contacto-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  padding: 2.5rem;
  border-radius: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.contacto-item:last-child {
  margin-bottom: 0;
}

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

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

.contacto-item:hover {
  transform: translateX(12px);
  box-shadow: 0 12px 40px rgba(46, 125, 50, 0.2);
}

.cargo {
  margin-bottom: 1.5rem;
}

.cargo h4 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.contacto-item:hover .cargo h4 {
  color: var(--primary);
}

.cargo p {
  font-size: 1.125rem;
  color: var(--gray-700);
  font-weight: 500;
}

.datos-contacto {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.datos-contacto p {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.8;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.datos-contacto p::before {
  content: "✓";
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.datos-contacto strong {
  color: var(--gray-900);
  font-weight: 700;
  margin-right: 0.5rem;
}

.datos-contacto a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.datos-contacto a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Municipios Sección Premium */
.municipios-section {
  background: white;
  padding: 4rem 3rem;
  border-radius: 2rem;
  margin-bottom: 5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-top: 5px solid var(--primary);
}

.municipios-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

.municipios-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 3px;
}

.municipios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.municipio-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  padding: 2.5rem 2rem;
  border-radius: 1.5rem;
  border-left: 5px solid var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  text-align: center;
}

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

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

.municipio-item:hover {
  transform: translateX(12px);
  box-shadow: 0 12px 40px rgba(46, 125, 50, 0.2);
}

.municipio-item h4 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.municipio-item:hover h4 {
  color: var(--primary);
}

.municipio-item p {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.municipio-item p:last-child {
  margin-bottom: 0;
}

.municipio-item p strong {
  color: var(--gray-900);
  font-weight: 600;
}

/* Llamadas Rápidas Premium */
.llamadas-rapidas {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 4rem 3rem;
  border-radius: 2rem;
  color: white;
  box-shadow: 0 15px 50px rgba(46, 125, 50, 0.3);
  position: relative;
  overflow: hidden;
}

.llamadas-rapidas::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.llamadas-rapidas h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

.llamadas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.llamada-item {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-decoration: none;
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.llamada-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.llamada-item:hover::before {
  transform: scaleX(1);
}

.llamada-item:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.llamada-item .icon {
  font-size: 3rem;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.llamada-item:hover .icon {
  transform: scale(1.2) rotate(5deg);
}

.llamada-item span:not(.icon) {
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1600px) {
  .container {
    max-width: 1200px;
  }
}

@media (max-width: 1200px) {
  .municipios-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .llamadas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .hero-directorio {
    padding: 6rem 0 5rem;
  }

  .hero-directorio h1 {
    font-size: 3rem;
  }

  .hero-directorio p {
    font-size: 1.5rem;
  }

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

  .area-item {
    padding: 2.5rem 2rem;
  }

  .contacto-item {
    padding: 2rem 1.5rem;
  }

  .municipios-section {
    padding: 3rem 2rem;
  }

  .municipios-section h2 {
    font-size: 2rem;
  }

  .llamadas-rapidas {
    padding: 3rem 2rem;
  }

  .llamadas-rapidas h2 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-directorio {
    padding: 5rem 0 4rem;
  }

  .hero-directorio h1 {
    font-size: 2.5rem;
  }

  .hero-directorio p {
    font-size: 1.25rem;
  }

  .busqueda-directorio {
    padding: 2rem;
  }

  .busqueda-input {
    padding: 1rem 1.5rem 1rem 3rem;
    font-size: 1rem;
  }

  .areas-seccion > h2 {
    font-size: 2rem;
  }

  .area-item {
    padding: 2rem 1.5rem;
  }

  .area-item h3 {
    font-size: 1.75rem;
  }

  .contacto-item {
    padding: 1.5rem;
  }

  .cargo h4 {
    font-size: 1.25rem;
  }

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

  .municipio-item {
    padding: 2rem 1.5rem;
  }

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

  .llamada-item {
    padding: 1.5rem;
  }

  .municipios-section {
    padding: 2.5rem 1.5rem;
  }

  .municipios-section h2 {
    font-size: 1.75rem;
  }

  .llamadas-rapidas {
    padding: 2.5rem 1.5rem;
  }

  .llamadas-rapidas h2 {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-directorio h1 {
    font-size: 2rem;
  }

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

  .busqueda-directorio {
    padding: 1.5rem;
  }

  .busqueda-input {
    padding: 0.875rem 1.25rem 0.875rem 2.5rem;
    font-size: 0.938rem;
  }

  .areas-seccion > h2 {
    font-size: 1.75rem;
  }

  .area-item {
    padding: 1.5rem;
  }

  .area-item h3 {
    font-size: 1.5rem;
  }

  .contacto-item {
    padding: 1.25rem;
  }

  .cargo h4 {
    font-size: 1.125rem;
  }

  .cargo p {
    font-size: 1rem;
  }

  .datos-contacto p {
    font-size: 0.938rem;
  }

  .municipio-item {
    padding: 1.5rem;
  }

  .municipio-item h4 {
    font-size: 1.25rem;
  }

  .municipio-item p {
    font-size: 0.938rem;
  }

  .llamada-item {
    padding: 1.25rem;
  }

  .llamada-item .icon {
    font-size: 2.5rem;
  }

  .llamada-item span:not(.icon) {
    font-size: 1rem;
  }

  .municipios-section h2 {
    font-size: 1.5rem;
  }

  .llamadas-rapidas h2 {
    font-size: 1.5rem;
  }
}
