/* Estilos personalizados para la curva compleja */
.hero-curve {
  background-color: #8a1538;
  position: relative;
  z-index: 20;
}

/* En escritorio, hacemos la curva convexa grande hacia la derecha */
@media (min-width: 1024px) {
  .hero-curve {
    border-bottom-right-radius: 50% 100%;
    width: 65%;
    min-height: 650px;
    box-shadow: 10px 0 20px -5px rgba(0, 0, 0, 0.3);
  }
}

/* En móvil, la curva es totalmente RECTA (sin radio) */
@media (max-width: 1023px) {
  .hero-curve {
    width: 100%;
    border-radius: 0;
    padding-bottom: 0rem;
  }
}

.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(197, 155, 109, 0.4);
}

/* Animación suave para el menú drawer */
#main-menu {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scrollbar del menú */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #6a102b;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #c59b6d;
  border-radius: 3px;
}

/* Scrollbar personalizada */
.custom-scrollbar-sub::-webkit-scrollbar {
  height: 4px;
  width: 4px;
}

/* Altura reducida para subnav */
.custom-scrollbar-sub::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}

.custom-scrollbar-sub::-webkit-scrollbar-thumb {
  background: rgba(27, 94, 32, 0.3);
  border-radius: 10px;
}

.custom-scrollbar-sub::-webkit-scrollbar-thumb:hover {
  background: rgba(27, 94, 32, 0.5);
}

/* Hover effect para tarjetas de noticias */
.news-card-hover:hover .news-image {
  transform: scale(1.05);
}

/* Ocultar scrollbar en el carrusel de eventos pero permitir scroll */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* ANIMACIÓN CARRUSEL INFINITO */
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-scroll {
  display: flex;
  width: max-content;
  animation: scroll 40s linear infinite;
}

.animate-scroll:hover {
  animation-play-state: paused;
}

/* Estilos para el Carousel de Obras (Fade) */
.obra-slide {
  transition: opacity 1s ease-in-out;
}
.obra-slide.active {
  opacity: 1;
  z-index: 10;
}
.obra-slide:not(.active) {
  opacity: 0;
  z-index: 0;
}

/* Animación de barra de progreso */
@keyframes progress {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}
.progress-bar.active {
  animation: progress 5s linear;
}

/* Efecto de parpadeo para el cursor */
.cursor-blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%,
  100% {
    border-color: transparent;
  }
  50% {
    border-color: white;
  }
}

/* News!!! */
/* --- Estilos Específicos para Página de Noticias --- */

/* Card Hover Effect Suave */
.news-card {
  transition: all 0.3s ease;
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(138, 21, 56, 0.15);
}
.news-card .news-image {
  transition: transform 0.5s ease;
}
.news-card:hover .news-image {
  transform: scale(1.05);
}

/* Filtros Activos */
.filter-btn.active {
  background-color: #8a1538;
  color: white;
  border-color: #8a1538;
}

/* Animación de entrada para las cards */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-up {
  animation: fadeUp 0.6s ease-out forwards;
}

/* Barra de Progreso de Lectura */
#reading-progress-container {
  position: fixed;
  top: 80px;
  /* Justo debajo del navbar */
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 40;
}

#reading-progress-bar {
  height: 100%;
  background: #c59b6d;
  /* Gold */
  width: 0%;
  transition: width 0.1s;
}

/* Tipografía del Artículo */
.article-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-size: 1.125rem;
  /* 18px */
  color: #374151;
}

.article-content h2 {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  color: #1a1a1a;
  font-size: 1.8rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.article-content h3 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  color: #8a1538;
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

/* Cita Destacada (Blockquote) */
.article-quote {
  border-left: 4px solid #c59b6d;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-family: "Merriweather", serif;
  font-style: italic;
  font-size: 1.25rem;
  color: #4a0b1e;
  background: #fff9f2;
  /* Fondo muy sutil */
  padding: 1.5rem;
  border-radius: 0 1rem 1rem 0;
}

/* Botones Sociales Sticky */
.sticky-share {
  position: sticky;
  top: 120px;
}

/* News Card Mini (Relacionadas) */
.news-card-mini:hover img {
  transform: scale(1.05);
}

/* --- Estilos Específicos Evento --- */
/* Sticky Layout para 3 Columnas */
.sticky-element {
  position: sticky;
  top: 100px;
  /* Ajuste para que no choque con el navbar */
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  /* Scrollbar limpio para el elemento sticky si es muy alto */
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}

/* Botón Calendario Dropdown */
.calendar-btn:focus + .calendar-dropdown,
.calendar-dropdown:hover {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.calendar-dropdown {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.2s ease;
}

/* Timeline Itinerario Corregido */
.timeline-container {
  position: relative;
  padding-left: 1rem;
}

.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  /* Espacio reservado para línea y punto */
  padding-bottom: 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

/* El punto (dot) */
.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  /* Alineado ópticamente con el texto de la hora */
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c59b6d;
  border: 3px solid white;
  box-shadow: 0 0 0 2px #c59b6d;
  z-index: 10;
}

/* La línea conectora */
.timeline-line {
  position: absolute;
  left: 7px;
  /* Centrado respecto al punto de 16px (16/2 - 2/2 = 7) */
  top: 21px;
  /* Empieza debajo del punto */
  bottom: -5px;
  /* Llega hasta el siguiente punto */
  width: 2px;
  background: #e5e7eb;
  z-index: 0;
}

.timeline-item:last-child .timeline-line {
  display: none;
}

/* --- Galería Grid --- */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  cursor: pointer;
}

.gallery-item img {
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* --- Barra de Progreso Circular (Concepto) --- */
.progress-ring__circle {
  transition: stroke-dashoffset 0.35s;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

/* Estilos para contenido oficial BOLETINES */
.boletin-body .article-content p {
  margin-bottom: 1.2rem;
  line-height: 1.8;
  font-size: 1.125rem;
  color: #374151;
}
.boletin-body .article-content h2 {
  font-family: "Inter", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  border-left: 4px solid #8a1538;
  padding-left: 1rem;
}
.boletin-body .article-content ul {
  list-style-type: none;
  margin-bottom: 1.5rem;
  padding-left: 0;
}
.boletin-body .article-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}
.boletin-body .article-content ul li::before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  color: #8a1538;
}

/* Caja de Alerta */
.alert-box {
  background-color: #fef2f2;
  border-left: 4px solid #dc2626;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 0 0.5rem 0.5rem 0;
}

/* Boletines */

/* Animación Hover Tarjeta */
.bulletin-card {
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}
.bulletin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Variantes de Borde por Tipo */
.card-alert {
  border-left-color: #dc2626;
}
.card-info {
  border-left-color: #0d47a1;
}
.card-success {
  border-left-color: #1b5e20;
}
.card-neutral {
  border-left-color: #9ca3af;
}

.profile-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

html {
  scroll-behavior: smooth;
}

/* Animación Modal */
.modal-enter {
  opacity: 0;
  transform: scale(0.95);
}

.modal-enter-active {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-exit {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Directorio de Áreas y Funcionarios */
/* Estilos para ocultar/mostrar según dispositivo */
@media (max-width: 768px) {
  .desktop-table {
    display: none;
  }

  .mobile-cards {
    display: grid;
  }
}

@media (min-width: 769px) {
  .desktop-table {
    display: table;
  }

  .mobile-cards {
    display: none;
  }
}

.search-input:focus-within {
  box-shadow: 0 0 0 4px rgba(197, 155, 109, 0.2);
  border-color: #c59b6d;
}

/* Estilos Tipográficos para Contenido Rico */
.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-size: 1.125rem;
  color: #374151;
}

.prose h2 {
  font-family: "Inter", sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.prose h3 {
  font-family: "Inter", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* Cita Destacada */
.prose blockquote {
  border-left: 4px solid #c59b6d;
  padding-left: 1.5rem;
  font-style: italic;
  color: #4b5563;
  margin: 2rem 0;
  font-family: "Merriweather", serif;
  background: #f9fafb;
  padding: 1.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
}

/* Listas Personalizadas */
.prose ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

.prose ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose ul li::before {
  content: "\f00c";
  /* Check icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  color: #8a1538;
  top: 4px;
}

/* Navegación Lateral Activa */
.nav-link-active {
  background-color: #fef2f2;
  color: #8a1538;
  border-right: 3px solid #8a1538;
  font-weight: 600;
}

/* Sticky Share Position adjustment */
.sticky-share {
  position: sticky;
  top: 8rem;
  /* Adjust based on navbar height */
}

/* Evaluaciones */

/* Estilos para estado Activo en Sidebar Desktop (Inspirado en Explora Cunduacán) */
.nav-link-base {
  transition: all 0.2s ease-in-out;
}

.nav-link-active {
  background-color: #fef2f2;
  color: #8a1538;
  border-right: 3px solid #8a1538;
  font-weight: 700;
}

.nav-link-inactive {
  color: #4b5563;
}

.nav-link-inactive:hover {
  background-color: #f9fafb;
  color: #8a1538;
}

/* Estilos Mobile Pills (Inspirado en Gastronomía/Turismo) */
.mob-pill {
  transition: all 0.2s;
  white-space: nowrap;
}

.mob-pill.active {
  background-color: #8a1538;
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mob-pill:not(.active) {
  background-color: #f3f4f6;
  color: #4b5563;
}

.mob-pill:not(.active):hover {
  background-color: #e5e7eb;
}

/* Animación de entrada de contenido */
.content-section {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden-content {
  display: none;
}

/* FLORES */
/* Animaciones sutiles */
.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

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

/* Efecto de imagen en tarjetas */
.flor-card:hover .flor-image {
  transform: scale(1.1);
}

.flor-card:hover .flor-overlay {
  opacity: 1;
  background: linear-gradient(
    to top,
    rgba(74, 11, 30, 0.95) 0%,
    rgba(138, 21, 56, 0.5) 60%,
    transparent 100%
  );
}

/* Contenido siempre visible pero animado levemente */
.flor-content {
  transform: translateY(0);
  transition: transform 0.4s ease;
}

.flor-card:hover .flor-content {
  transform: translateY(-5px);
}

/* Loading animation for infinite scroll */
.loader-dots div {
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.loader-dots div:nth-child(1) {
  left: 8px;
  animation: loader-dots1 0.6s infinite;
}

.loader-dots div:nth-child(2) {
  left: 8px;
  animation: loader-dots2 0.6s infinite;
}

.loader-dots div:nth-child(3) {
  left: 32px;
  animation: loader-dots2 0.6s infinite;
}

.loader-dots div:nth-child(4) {
  left: 56px;
  animation: loader-dots3 0.6s infinite;
}

@keyframes loader-dots1 {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes loader-dots3 {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(0);
  }
}

@keyframes loader-dots2 {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(24px, 0);
  }
}

/* ------- TRANSPARENCIA ------- */
/* Estilo para el sub-menu activo */
.sub-nav-link.active {
  color: #1b5e20;
  border-bottom: 2px solid #1b5e20;
  background-color: rgba(27, 94, 32, 0.05);
}

.category-card {
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card:hover .icon-wrapper {
  background-color: #1b5e20;
  color: white;
  transform: scale(1.1);
}

/* Estilos Tarjetas Grid */
.admin-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.admin-card:hover {
  transform: translateY(-5px);
  border-color: #1b5e20; /* cunduacan-green */
}
.admin-card:hover .icon-box {
  background-color: #1b5e20;
  color: white;
  transform: scale(1.1) rotate(5deg);
}

/* Active State para Sidebar de Dependencias */
.dept-link.active {
  background-color: #1b5e20;
  color: white;
  border-left-color: #c59b6d; /* Gold accent */
  padding-left: 1.5rem;
}

/* Estilos de Formulario */
.form-input:focus ~ label,
.form-input:not(:placeholder-shown) ~ label {
  top: -0.5rem;
  font-size: 0.75rem;
  color: #8a1538;
  background-color: white;
  padding: 0 0.25rem;
}

/* Estilo para contenido Rich Text dentro del modal */
.rich-text ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.rich-text h4 {
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.rich-text p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #4b5563;
}

/* Sidebar Link Active State */
.cat-link.active {
  background-color: #8a1538;
  color: white;
  border-right: 4px solid #c59b6d;
}
