/* ======= ESTILOS ESPECÍFICOS PARA REGIONES ======= */

:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --accent-color: #28a745;
  --background-primary: #1e2736;
  --background-secondary: #243044;
  --background-tertiary: #2a3441;
  --text-primary: #ffffff;
  --text-secondary: #b8c5d1;
  --text-muted: #8a9ba8;
  --text-100: #ffffff;
  --text-70: rgba(255, 255, 255, 0.7);
  --border: rgba(255, 255, 255, 0.1);
  --border-color: rgba(255, 255, 255, 0.2);
  --shadow-light: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-medium: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-heavy: 0 8px 16px rgba(0,0,0,0.2);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* ======= VISTA PRINCIPAL DE REGIONES ======= */
.regions-main {
  background: radial-gradient(900px 400px at 10% 30%, #ffffff10 0%, transparent 60%),
              radial-gradient(1100px 600px at 90% 70%, #ffffff0b 0%, transparent 65%),
              linear-gradient(180deg, #212a38 0%, #243044 35%, #1e2736 100%);
  border-top: 1px solid var(--border);
  padding: 30px 0 60px;
  min-height: 100vh;
}

.regions-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  text-align: center;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  color: var(--text-100);
  margin-bottom: 40px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #007bff, #0056b3);
  border-radius: 2px;
}

/* Últimas Regiones */
.featured-regions {
  margin-bottom: 60px;
}

.featured-regions__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* Tarjetas de Región */
.region-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.region-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.featured-card {
  min-height: 300px;
}

.region-card__image {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 250px;
}

.region-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.region-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 2rem;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.region-card__info {
  flex: 1;
}

.region-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--text-100);
}

.region-card__code {
  font-size: 1rem;
  margin: 0;
  color: rgba(255,255,255,0.9);
}

.region-card__btn {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.region-card__btn:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Sección de Más Regiones */
.regions-section {
  margin-top: 60px;
}

.regions-section__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.regions-section__grid .region-card__image {
  height: 250px;
}

/* Responsive para Más Regiones */
@media (max-width: 1024px) {
  .regions-section__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .regions-section__grid {
    grid-template-columns: 1fr;
  }
}

/* Botón Ver Todas */
.regions-actions {
  text-align: center;
}

.btn-ver-todas {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-ver-todas:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* ======= VISTA DE LISTA DE REGIONES ======= */
.regions-list-view {
  background: radial-gradient(900px 400px at 10% 30%, #ffffff10 0%, transparent 60%),
              radial-gradient(1100px 600px at 90% 70%, #ffffff0b 0%, transparent 65%),
              linear-gradient(180deg, #212a38 0%, #243044 35%, #1e2736 100%);
  border-top: 1px solid var(--border);
  padding: 30px 0 60px;
  min-height: 100vh;
}

.list-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Botón de regreso */
.back-actions {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 20px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-100);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(-2px);
}

.btn-back svg {
  transition: transform 0.3s ease;
}

.btn-back:hover svg {
  transform: translateX(-2px);
}

/* Encabezado de lista */
.list-header {
  margin-bottom: 40px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}

.list-title-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.list-title-content {
  flex: 1;
  text-align: center;
}

.list-title {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  color: var(--text-100);
  margin: 0 0 12px 0;
  letter-spacing: 0.02em;
}

.list-subtitle {
  font-size: 16px;
  color: var(--text-100);
  margin: 0;
  font-weight: 500;
}

/* Controles de Lista */
.list-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.search-controls {
  flex: 1;
  max-width: 400px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-100);
  z-index: 1;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-100);
  font-size: 1rem;
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.1);
}

.filter-controls {
  display: flex;
  gap: 1rem;
}

.filter-select {
  padding: 0.75rem 1rem;
  padding-right: 2.5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-100);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.filter-select:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Estilos para las opciones del select */
.filter-select option {
  background: var(--background-secondary);
  color: var(--text-100);
  padding: 0.75rem 1rem;
  border: none;
}

.filter-select option:hover {
  background: var(--background-tertiary);
}

.filter-select option:checked {
  background: var(--primary-color);
  color: var(--text-100);
}

/* Contenedor de lista */
.regions-list-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Lista de regiones */
.regions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Elemento de lista */
.region-list-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.region-list-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.region-list-item__image {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.region-list-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.region-list-item__content {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.region-list-item__info {
  flex: 1;
}

.region-list-item__name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-100);
  margin: 0 0 0.5rem 0;
}

.region-list-item__details {
  display: flex;
  gap: 2rem;
  color: var(--text-100);
  font-size: 0.9rem;
}

.region-list-item__code {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.region-list-item__communities {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-color);
  font-weight: 600;
}

.region-list-item__btn {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.region-list-item__btn:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* ======= VISTA DETALLADA DE REGIÓN ======= */
.region-detail-view {
  background: radial-gradient(900px 400px at 10% 30%, #ffffff10 0%, transparent 60%),
              radial-gradient(1100px 600px at 90% 70%, #ffffff0b 0%, transparent 65%),
              linear-gradient(180deg, #212a38 0%, #243044 35%, #1e2736 100%);
  border-top: 1px solid var(--border);
  padding: 30px 0 60px;
  min-height: 100vh;
}

.detail-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-title-section {
  flex: 1;
}

.detail-title {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  color: var(--text-100);
  margin: 0 0 12px 0;
  letter-spacing: 0.02em;
}

.detail-code {
  font-size: 16px;
  color: var(--text-100);
  margin: 0;
  font-weight: 500;
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Secciones de Detalle */
.detail-gallery,
.detail-location-section,
.detail-data-section,
.detail-description-section,
.detail-projects-section,
.detail-communities-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-100);
  margin: 0;
}

.btn-edit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-edit-item:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Galería */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.image-viewer-modal {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 84px 24px 48px;
  box-sizing: border-box;
}

.image-viewer-modal.active {
  display: flex;
}

.image-viewer-modal .modal-content {
  width: 100%;
  max-width: 980px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.image-viewer-modal .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 28px;
  background: rgba(15, 23, 42, 0.96);
}

.image-viewer-modal .modal-body {
  padding: 0;
  background: #0f172a;
}

.image-viewer-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  width: 100%;
  box-sizing: border-box;
}

#imageViewerImg {
  width: 100%;
  max-width: calc(100vw - 96px);
  max-height: calc(100vh - 220px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(14, 22, 37, 0.55);
  background: #0f172a;
}

.image-viewer-description {
  color: var(--text-100);
  font-size: 0.95rem;
  text-align: center;
  max-width: 90%;
  line-height: 1.5;
  padding: 0 20px 20px;
  display: none;
}

/* Ubicación */
.location-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.location-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.location-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.location-icon {
  font-size: 1.5rem;
}

.location-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-100);
  margin: 0 0 0.25rem 0;
}

.location-content p {
  color: var(--text-100);
  margin: 0;
}

/* Mapa de la Región */
.region-map-container {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.region-map-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.region-map-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: all 0.3s ease;
}

.region-map-image:hover {
  transform: scale(1.02);
}

/* Datos Generales */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.data-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.data-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.data-icon {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border-radius: 50%;
}

.data-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-100);
  margin: 0 0 0.25rem 0;
}

.data-content p {
  color: var(--text-100);
  margin: 0;
  font-size: 0.9rem;
}

/* Descripción */
.description-content {
  color: var(--text-100);
  line-height: 1.6;
  font-size: 16px;
}

.description-content p {
  color: var(--text-100);
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.description-content p:last-child {
  margin-bottom: 0;
}

/* Proyectos Activos */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.project-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.project-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.project-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-100);
  margin: 0 0 0.25rem 0;
}

.project-info p {
  color: var(--text-100);
  margin: 0;
  font-size: 0.9rem;
}

/* Comunidades de la Región */
.communities-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Overwrite generic styles imported from other modules */
.detail-communities-section .communities-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 420px; /* ~5 tarjetas visibles */
  padding-right: 10px;
  margin-right: -2px;
  overflow-y: auto;
  background: transparent;
}

.detail-communities-section .communities-list::-webkit-scrollbar {
  width: 6px;
}

.detail-communities-section .communities-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.detail-communities-section .communities-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #4A90E2 0%, #2667B2 100%);
  border-radius: 3px;
}

.detail-communities-section .communities-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #2667B2 0%, #1B4E85 100%);
}

.detail-communities-section .community-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 20px;
  min-height: 82px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  cursor: default;
  overflow: hidden;
}

.detail-communities-section .community-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.detail-communities-section .community-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.detail-communities-section .community-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-100);
  margin: 0 0 0.25rem 0;
  line-height: 1.35;
}

.detail-communities-section .community-info p {
  color: var(--text-100);
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.75;
}

/* ======= MODALES ======= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 16, 28, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow: auto;
  padding: 32px 16px;
  pointer-events: none;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  background: #28303D;
  border-radius: 16px;
  padding: 0;
  max-width: 600px;
  width: 100%;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  margin: 0 auto;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-100);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-100);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-100);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-100);
  margin-bottom: 8px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #4A5568;
  border-radius: 8px;
  background: #343D4C;
  color: white;
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #007bff;
  background: #343D4C;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Estilos para placeholders */
.form-input::placeholder,
.form-textarea::placeholder {
  color: #A0AEC0;
  opacity: 1;
}

.form-input::-webkit-input-placeholder,
.form-textarea::-webkit-input-placeholder {
  color: #A0AEC0;
  opacity: 1;
}

.form-input::-moz-placeholder,
.form-textarea::-moz-placeholder {
  color: #A0AEC0;
  opacity: 1;
}

.form-input:-ms-input-placeholder,
.form-textarea:-ms-input-placeholder {
  color: #A0AEC0;
  opacity: 1;
}

/* Estilos para mensajes de estado */
.no-files {
  color: var(--text-100) !important;
  text-align: center;
  margin: 20px 0;
  font-style: italic;
}

.file-upload {
  position: relative;
  display: inline-block;
  width: 100%;
}

.file-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-100);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.file-label:hover {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-100);
}

.file-label svg {
  margin-bottom: 8px;
}

.btn-primary {
  background: #2563EB;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: #4A5568;
  color: white;
  border: 1px solid #4A5568;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #5a6578;
  border-color: #5a6578;
}

.image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.image-preview-empty {
  grid-column: 1 / -1;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px dashed var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
}

.image-preview-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  background: var(--background-secondary);
  padding: 0.75rem;
}

.image-preview-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: calc(var(--border-radius) - 4px);
}

.image-preview-description {
  display: flex;
  flex-direction: column;
}

.image-description-input {
  width: 100%;
  resize: vertical;
  min-height: 52px;
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--border-radius) - 2px);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-100);
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.4;
}

.image-description-input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(17, 138, 178, 0.18);
}

.image-preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-preview-remove:hover {
  background: rgba(220, 53, 69, 0.25);
  transform: scale(1.05);
}

.image-preview-remove:active {
  transform: scale(0.95);
}

.image-preview-remove svg {
  pointer-events: none;
}

.form-helper-text {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ======= ESTILOS PARA SCROLL AUTOMÁTICO ======= */
html { 
  scroll-behavior: smooth; 
}

.scroll-highlight {
  background: rgba(0, 123, 255, 0.1) !important;
  border-color: rgba(0, 123, 255, 0.3) !important;
  box-shadow: 0 0 20px rgba(0, 123, 255, 0.2) !important;
  transform: scale(1.02);
  transition: all 0.3s ease;
}

/* ======= NOTIFICACIONES ======= */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.success-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  z-index: 10000;
  font-weight: 600;
  font-size: 14px;
  animation: slideInRight 0.3s ease;
}

.error-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
  z-index: 10000;
  font-weight: 600;
  font-size: 14px;
  animation: slideInRight 0.3s ease;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
  .regions-container {
    padding: 0 16px;
  }
  
  .featured-regions__container {
    grid-template-columns: 1fr;
  }
  
  .list-header {
    padding: 0 16px;
  }
  
  .list-controls {
    flex-direction: column;
    gap: 1rem;
  }
  
  .search-controls {
    max-width: 100%;
  }
  
  .regions-list-container {
    padding: 0 16px;
  }
  
  .detail-container {
    padding: 0 16px;
  }
  
  .region-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .region-list-item__content {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .region-list-item__details {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .region-map-wrapper {
    height: 250px;
    max-width: 100%;
  }
  
  .region-map-container {
    padding: 15px;
  }
}

/* Archivos de la Región */
.detail-files-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.file-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.file-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.file-info {
  flex: 1;
}

.file-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-100);
  margin: 0 0 0.25rem 0;
}

.file-info p {
  color: var(--text-100);
  margin: 0;
  font-size: 0.9rem;
}

.file-date {
  color: var(--text-100);
  font-size: 0.8rem;
  margin-top: 4px;
}

.file-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.file-download-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-100);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.file-download-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.file-edit-btn {
  background: rgba(17, 138, 178, 0.12);
  color: #47c2ff;
  border: 1px solid rgba(17, 138, 178, 0.4);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.file-edit-btn:hover {
  background: rgba(17, 138, 178, 0.2);
  border-color: rgba(17, 138, 178, 0.6);
}

.file-delete-btn {
  background: rgba(255, 99, 132, 0.12);
  color: #ff6b6b;
  border: 1px solid rgba(255, 99, 132, 0.4);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.file-delete-btn:hover {
  background: rgba(255, 99, 132, 0.2);
  border-color: rgba(255, 99, 132, 0.6);
}

@media (max-width: 640px) {
  .file-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 12px;
  }

  .file-actions {
    width: 100%;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
  }

  .file-actions .file-download-btn,
  .file-actions .file-edit-btn,
  .file-actions .file-delete-btn {
    width: 100%;
    justify-content: center;
  }
}

.file-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.file-preview-item {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 2px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  text-align: center;
}

.file-preview-item .file-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  font-size: 12px;
}

.file-preview-item .file-name {
  font-size: 0.8rem;
  color: var(--text-100);
  font-weight: 600;
  margin: 0;
  word-break: break-word;
}

.file-preview-remove {
  margin-top: 12px;
  background: rgba(255, 99, 132, 0.12);
  color: #ff6b6b;
  border: 1px solid rgba(255, 99, 132, 0.4);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
}

.file-preview-remove:hover {
  background: rgba(255, 99, 132, 0.2);
  border-color: rgba(255, 99, 132, 0.6);
}

/* ======= ESTILOS PARA BOTONES DE ELIMINACIÓN ======= */
.btn-remove-item {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 8px;
  right: 8px;
}

.btn-remove-item:hover {
  background: rgba(220, 53, 69, 0.2);
  border-color: #dc3545;
  transform: scale(1.05);
}

.btn-remove-item:active {
  transform: scale(0.95);
}

.gallery-item {
  position: relative;
}

.gallery-item:hover .btn-remove-item {
  opacity: 1;
  visibility: visible;
}

.gallery-item .btn-remove-item {
  position: absolute;
  top: 8px;
  right: 8px;
}

.gallery-item .btn-remove-item:hover {
  background: rgba(220, 53, 69, 0.9);
  border-color: #dc3545;
}

.file-item {
  position: relative;
}

/* Los archivos NO tendrán botones X, solo las imágenes */

/* ======= ESTILOS PARA MODALES DE SELECCIÓN ======= */
.selection-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.selection-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-100);
}

.selection-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.selection-item.selected {
  background: rgba(220, 53, 69, 0.1);
  border-color: #dc3545;
}

.selection-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #dc3545;
  cursor: pointer;
}

/* ======= ESTILOS PARA MODAL DE CONFIRMACIÓN ======= */
.confirm-modal .modal-content {
  max-width: 400px;
  text-align: center;
}

.confirm-message {
  padding: 20px 0;
}

.confirm-message p {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: var(--text-100);
}

.confirm-warning {
  font-size: 14px;
  color: var(--text-100);
  font-style: italic;
}

.btn-danger {
  background: #dc3545;
  color: white;
  border: 1px solid #dc3545;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-danger:hover {
  background: #c82333;
  border-color: #bd2130;
  transform: translateY(-1px);
}

.btn-danger:active {
  transform: translateY(0);
}

/* ======= ESTILOS PARA BOTONES DE SECCIÓN ======= */
.section-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-remove-section {
  background: #dc3545;
  color: white;
  border: 1px solid #dc3545;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-remove-section:hover {
  background: #c82333;
  border-color: #bd2130;
  transform: translateY(-1px);
}

.btn-remove-section:active {
  transform: translateY(0);
}

/* ======= RESPONSIVE ADICIONAL PARA BOTONES DE ELIMINACIÓN ======= */
@media (max-width: 768px) {
  .section-actions {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-remove-section,
  .btn-edit-item {
    width: 100%;
    justify-content: center;
  }
  
          /* Hacer botones de eliminación siempre visibles en mobile (solo para imágenes) */
          .gallery-item .btn-remove-item {
            opacity: 1 !important;
            visibility: visible !important;
            background: rgba(220, 53, 69, 0.9) !important;
            color: white !important;
          }
          
          .gallery-item:hover .btn-remove-item {
            opacity: 1 !important;
            background: #dc3545 !important;
          }
}
