
/* ==========================================================
   SIRETUR – CSS PRINCIPAL
   ========================================================== */


/* ==========================================================
   2. FUENTES
   ========================================================== */

/* alegreya-sans */
@font-face {
  font-display: swap;
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-weight: 400;
  src: url('/static/fonts/alegreya-sans-v26-latin-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Alegreya Sans';
  font-style: italic;
  font-weight: 400;
  src: url('/static/fonts/alegreya-sans-v26-latin-italic.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-weight: 500;
  src: url('/static/fonts/alegreya-sans-v26-latin-500.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Alegreya Sans';
  font-style: italic;
  font-weight: 500;
  src: url('/static/fonts/alegreya-sans-v26-latin-500italic.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-weight: 700;
  src: url('/static/fonts/alegreya-sans-v26-latin-700.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Alegreya Sans';
  font-style: italic;
  font-weight: 700;
  src: url('/static/fonts/alegreya-sans-v26-latin-700italic.woff2') format('woff2');
}


/* ==========================================================
   3. ESTILOS BASE
   ========================================================== */

body {
  font-family:
    'Alegreya Sans',
    'Segoe UI',
    system-ui,
    -apple-system,
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 12pt;
  background-color: rgb(245, 245, 245);
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  color: var(--color-texto);
}


/* ==========================================================
   4. NAVBAR
   ========================================================== */

.navbar {
  min-height: 10vh;
  align-items: start;
  z-index: 1048;
}

.navbar-bg-custom {
  background-color: rgb(var(--primary-rgb));
}

/* Logo principal */
.navbar-logo {
  display: block;
  height: 48px;          /* desktop */
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Móvil */
@media (max-width: 768px) {
  .navbar-logo {
    height: 36px;
  }
}

/* ==========================================================
   NAVBAR – DROPDOWN ITEMS (PRIMARY SOFT)
   ========================================================== */

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  background-color: var(--primary-soft);
  color: #fff;
}

.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
  background-color: var(--primary-soft);
  color: #fff;
}


/* ==========================================================
   5. CONTENIDO PRINCIPAL
   ========================================================== */

main.main-content {
  margin-top: 10vh; /* altura navbar */
  min-height: calc(100vh - 10vh);
  background-color: #fff;
  overflow-x: hidden;
}


/* ==========================================================
   6. BOTONES
   ========================================================== */

.btn-soft {
  background-color: rgba(var(--primary-rgb), 0.25);
  color: rgb(var(--primary-rgb)); /* FIX: sin comillas */
  border: 1px solid rgba(var(--primary-rgb), 0.45);
}

.btn-soft:hover {
  background-color: rgba(var(--primary-rgb), 0.45);
  color: rgb(var(--primary-rgb));
}

.btn-soft-outline {
  background-color: transparent;
  color: rgb(var(--primary-rgb));
  border: 1px solid rgba(var(--primary-rgb), 0.45);
}

.btn-soft-outline:hover {
  background-color: rgba(var(--primary-rgb), 0.15);
  color: rgb(var(--primary-rgb));
}


/* ==========================================================
   7. BREAKPOINTS PERSONALIZADOS
   ========================================================== */

@media (min-width: var(--breakpoint-compact)) {
  /* aquí irán reglas compact / desktop */
}




/* ==========================================================
   BASE – COLORES UTILITARIOS
   ========================================================== */

.btn-terciary:hover {
  background-color: rgba(var(--terciary-rgb), 0.90); /* más oscuro */
  color: #fff; /* texto negro */
}


.btn-terciary {
  background-color: rgba(var(--terciary-rgb), 0.60);
  color: #fff;
}

.btn-terciary:hover {
  background-color: rgba(var(--terciary-rgb), 0.90); /* más oscuro */
  color: #fff; /* texto negro */
}

.link-highlight {
  color: rgba(var(--terciary-rgb), 1);
  text-decoration: none;
  font-weight: 600;
  transition: 
    background-color 0.2s ease,
    font-weight 0.2s ease;
}

.link-highlight:hover {
  background-color: rgba(var(--terciary-rgb), 0.25);
  font-weight: 700;
}


/* ==========================================================
   BASE – CONTENEDORES
   ========================================================== */


.content-block {
  width: 100%;
  margin: 0 auto 2rem auto;
  padding: 1rem;
  border-radius: 1rem;
  background-color: rgb(var(--secondary-rgb), 0.6);
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, 0.1);
}

/* >= md */
@media (min-width: 768px) {
  .content-block {
    width: min(60vw, 100%);
    max-width: 100%;
  }
}

.content-block-white {
  width: 100%;
  margin: 0 auto 2rem auto;
  padding: 1rem;
  border-radius: 1rem;
  background-color: #fff;
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, 0.1);
}





/* ==========================================================
   BASE – BLOQUES DE CONTENIDO
   ========================================================== */

/* Bloque principal */
.custom-block {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 2rem auto;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  background-color: rgba(var(--secondary-rgb), 0.6);
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Secciones internas del bloque */
.custom-block-section {
  padding: 1rem;
  border-radius: 0.75rem;
  background-color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1rem;
}

.custom-block-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}


/* ==========================================================
   BASE – NORMALIZACIÓN DE FORMULARIOS
   ========================================================== */

.custom-block label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.custom-block select,
.custom-block input {
  width: 100%;
  font-size: 0.9rem;
}



/* ==========================================================
   FILTER BLOCK – Contenedor limpio
   ========================================================== */

.filter-block {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 2rem auto;
}


/* ==========================================================
   Secciones internas del filtro
   ========================================================== */

.filter-block-section {
  padding: 1rem;
  border-radius: 0.75rem;
  background-color: rgba(var(--secondary-rgb), 0.6); /* gris claro Bootstrap */
  margin-bottom: 1rem;
}

.filter-block-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #534957;
}


/* ==========================================================
   Normalización de formularios dentro del filtro
   ========================================================== */

.filter-block label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.filter-block select,
.filter-block input {
  width: 100%;
  font-size: 0.9rem;
}


/* ==========================================================
   BASE – TARJETAS
   ========================================================== */

.custom-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.custom-card-header h6 {
  margin: 0;
  font-weight: 600;
}

.custom-card-body {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #444;
}

.custom-card-status {
  margin-top: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.custom-card-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}


/* ==========================================================
   BASE – MENSAJES FLOTANTES
   ========================================================== */
/* ⚠️ Z-INDEX CRÍTICO: convive con modales y mapas */

.floating-messages {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1080;
  max-width: 600px;
  width: calc(100% - 2rem);
}

.floating-messages .alert {
  margin-bottom: 0.5rem;
}








/* ==========================================================
   EDITOR LIST – CONTROLES DE RANGO
   ========================================================== */

.range-group {
  display: flex;
  gap: 0.5rem;
}

.range-group input {
  flex: 1;
}


/* ==========================================================
   EDITOR LIST – BADGES DE ACCIÓN
   ========================================================== */

.badge-action {
  border: none;
  cursor: pointer;
  font-weight: 500;
  padding: 0.35em 0.6em;
}

.badge-action:hover {
  opacity: 0.85;
}


/* ==========================================================
   EDITOR LIST – BADGES ESPECÍFICOS
   ========================================================== */

.badge-primary-soft {
  background-color: var(--primary-soft);
  color: #fff;
}

.badge-edit {
  background-color: rgba(var(--terciary-rgb), 0.75);
  color: #fff;
}

.badge-edit:hover {
  background-color: rgba(var(--terciary-rgb), 0.9);
  color: #fff;
}

.badge-terciary {
  background-color: rgba(var(--terciary-rgb), 0.75);
  color: #fff;
}



/* ==========================================================
   DETAIL – GENERAL
   ========================================================== */

.custom-title {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
  text-align: center;
}

.custom-subtitle {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 0.5rem;
  margin-bottom: 0;
  line-height: 1.2;
}

.compact-list {
  line-height: 1;
}

.compact-list li {
  padding: 0;
}

.category-header {
  display: flex;
  align-items: center;   /* alinea arriba */
  gap: 0.75rem;              /* espacio entre imagen y texto */
  margin-bottom: .75rem;
  
}

.category-icon img {
  height: 32px;
  object-fit: contain;
  display: block;
}

.category-title {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.2;
}

.section-header {
  display: flex;
  align-items: center;   /* alinea arriba */
  gap: 0.75rem;              /* espacio entre imagen y texto */
  margin-bottom: .75rem;
  
}

.section-icon img {
  height: 32px;
  object-fit: contain;
  display: block;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.2;
}




.symbology-list {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.symbology-item {
  display: flex;
  align-items: center;   /* permite que el texto envuelva correctamente */
  gap: .15rem;
}

.symbology-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;  /* evita que el icono se comprima */
  cursor: pointer;

}

.symbology-label {
  font-size: 0.95rem;
  line-height: 1.25;
  cursor: pointer;
}

/* ==========================================================
   DETAIL – ICONOS GENERALES
   ========================================================== */

.icon-size {
  height: 32px;
}

.media-icon {
  height: 20px;
}

/* ==========================================================
   DETAIL – TEXTO / TRUNCADO MULTILÍNEA
   ========================================================== */

.text-truncate-multiline {
  display: -webkit-box;
  -webkit-line-clamp: 3;        /* número de líneas visibles */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Estado expandido */
.text-truncate-multiline.text-expanded {
  -webkit-line-clamp: unset;
}



/* ==========================================================
   DETAIL – SEGMENTOS
   ========================================================== */

.segments-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

.segment-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segment-item img {
  height: 25px;
  flex-shrink: 0;
  opacity: 0.85;
}


/* ==========================================================
   DETAIL – DISTINCIONES
   ========================================================== */

.distinctions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 16px;
  margin-bottom: 1rem; /* aire antes del bloque siguiente */
}

.distinction-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.distinction-item img {
  height: 20px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  opacity: 0.9;
}


/* ==========================================================
   DETAIL – RATINGS (Google, Tripadvisor, etc.)
   ========================================================== */

.rating-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rating-label {
 font-weight: 500;
}


/* separa bloques de rating */
.rating-item + .rating-item {
  margin-top: 0.75rem;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.rating-value {
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1;
  margin-right: 2px;
  color: #333;
}

.rating-icons {
  display: flex;
  gap: 2px;
}


/* ==========================================================
   DETAIL – TABLA DE INFORMACIÓN
   ========================================================== */

.info-table {
  border-collapse: collapse;
  width: auto;
  max-width: 100%; /* evita desbordes */
}

.info-table td {
  padding: 4px 16px 4px 0;
  vertical-align: baseline;
}

.info-label {
  font-weight: 500;
  white-space: nowrap;
}

.info-value {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Variante que permite salto de línea */
.info-value.wrap {
  white-space: normal;
  max-width: 32rem; /* ancho legible */
}

.info-separator td {
  padding: 6px 0;
}


/* ==========================================================
   DETAIL – LISTAS DE INFORMACIÓN
   ========================================================== */

.info-list {
  margin: 0;
  padding-left: 1rem;
}

.info-list li {
  margin: 0;
  line-height: 1.4;
}


/* ==========================================================
   DETAIL – CARRUSEL / GALERÍA
   ========================================================== */

/* ⚠️ Depende de Bootstrap modal */
#global-gallery-modal .modal-dialog {
  max-width: 40vw;
}

/* Relación 4:3 para imágenes */
.aspect-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%;
  background: black;
  overflow: hidden;
}

.aspect-wrapper img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}


/* ==========================================================
   DETAIL – LISTAS EN COLUMNAS RESPONSIVAS
   ========================================================== */

.list-columns-responsive {
  column-count: 1;
  column-gap: 1.5rem;
  list-style-type: disc;
  padding-left: 1.5rem;
}

.list-columns-responsive li {
  break-inside: avoid;
  margin-bottom: 0;
}

@media (min-width: 576px) {
  .list-columns-responsive {
    column-count: 2;
  }
}

@media (min-width: 992px) {
  .list-columns-responsive {
    column-count: 3;
  }
}



/* ==========================================================
   ACCORDIONS (NO MAPA)
   ========================================================== */

.accordion-button.btn-soft.collapsed {
  background-color: rgba(var(--primary-rgb), 0.25);
  color: rgb(var(--primary-rgb));
  border: 1px solid rgba(var(--primary-rgb), 0.45);
}


.accordion-button.btn-soft:not(.collapsed) {
  background-color: rgba(var(--primary-rgb), 0.35);
  color: rgb(var(--primary-rgb));
  border: 1px solid rgba(var(--primary-rgb), 0.6);
  box-shadow: none; /* opcional: quita glow azul */
}






/* ==========================================================
   CARD GRID
   ========================================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Card base */
.card-resource {
  display: flex;
  flex-direction: column;

  border: 1px solid #ccc;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;

  transition: transform 0.2s ease, box-shadow 0.2s ease;

  min-height: 420px; /* altura visual uniforme */
}

.card-resource:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}


/* ==========================================================
   CARD GRID - IMAGE WRAPPER (proporción catálogo)
   ========================================================== */

.card-image-wrapper {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

/* Perfil (imagen completa) */
.image-profile {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-profile img {
  max-height: 90%;
  max-width: 90%;
  object-fit: contain;
}

/* Galería (recorte elegante) */
.image-gallery {
  width: 100%;
  height: 100%;
}

.image-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Logo placeholder */
.image-logo {
  width: 100%;
  height: 100%;
  background-color: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-logo img {
  max-height: 80%;
  max-width: 80%;
  object-fit: contain;
  opacity: 0.9;
}




/* ==========================================================
   RESOURCES CARD GRID
   ========================================================== */

.resources-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1; 
  padding: 1rem;
}

/* Título (máx 2 líneas) */
.resources-card .card-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Ubicación */
.resources-card .card-location {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.5rem;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Descripción (máx 2 líneas) */
.resources-card .card-text {
  font-size: 0.85rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================
   RESOURCES CARD GRID - ACTIONS
   ========================================================== */

.resources-card .card-actions-primary {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.resources-card .card-actions-secondary {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  min-height: 28px;
}

/* ==========================================================
   RESOURCES CARD GRID - UTILITIES
   ========================================================== */  

.resources-card .no-border {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0.25rem;
  line-height: 1;
}

.resources-card .no-border:hover {
  background-color: rgba(var(--primary-rgb), 0.1);
  border-radius: 6px;
}