/* Colores y tamaños personalizables con variables CSS: ver gs-card.css */

/* Cabecera con imagen de fondo; la imagen llega en la variable --gs-image (style de la sección) */
.gs-section-wide {
    width: 100%;
    height: var(--urbanodo-hero-height, 500px);
    background-image: linear-gradient(var(--urbanodo-overlay, rgba(0, 0, 0, 0.5)), var(--urbanodo-overlay, rgba(0, 0, 0, 0.5))), var(--gs-image, none);
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: white;
  }

  .gs-section-wide-content {
    text-align: center;
  }
  
  .gs-section-wide-title {
    font-size: var(--urbanodo-hero-title-size, 48px);
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
  }
  
  .gs-section-wide-description {
    font-size: 24px;
    color: white;
  }

  .gs-panorama-container {
    width: 100%;
    height: var(--urbanodo-panorama-height, 500px);
  }

  .gs-poi-map iframe {
    display: block;
    width: 100%;
    border: 1px solid black;
  }
  .gs-date {
    font-weight: bold;
    color: var(--urbanodo-color, #ab163e);
  }

  /* !important: temas como Divi ponen viñetas y relleno a las listas con selectores de id (#left-area ul) */
  .gs-contact {
    list-style: none !important;
    padding-left: 0 !important;
  }

  .gs-contact li {
    list-style: none !important;
  }

  .gs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1em;
  }

  .gs-tag {
    background-color: var(--urbanodo-color, #ab163e);
    color: white;
    border-radius: 12px;
    padding: 2px 12px;
    font-size: 14px;
    text-decoration: none;
  }

  .gs-tag:hover {
    color: white;
    opacity: 0.85;
  }

  .gs-video {
    margin: 0 0 1.5em;
  }

  .gs-video video {
    width: 100%;
    max-height: 500px;
    background-color: black;
  }

  .gs-video figcaption {
    font-size: 14px;
    text-align: center;
  }

  /* Desplegables (<details>) de información y elaboración */
  .gs-accordion {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1em;
  }

  .gs-accordion-item + .gs-accordion-item {
    border-top: 1px solid #dee2e6;
  }

  .gs-accordion-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    padding: 1em 1.25em;
    cursor: pointer;
    list-style: none;
  }

  .gs-accordion-title::-webkit-details-marker {
    display: none;
  }

  .gs-accordion-title::after {
    content: "";
    flex-shrink: 0;
    width: 0.6em;
    height: 0.6em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s;
  }

  .gs-accordion-item[open] > .gs-accordion-title {
    color: var(--urbanodo-color, #ab163e);
    background-color: color-mix(in srgb, var(--urbanodo-color, #ab163e) 8%, transparent);
  }

  .gs-accordion-item[open] > .gs-accordion-title::after {
    transform: rotate(-135deg);
  }

  .gs-accordion-body {
    padding: 1em 1.25em;
  }

  /* Aviso en lugar de un shortcode vacío, solo en el editor visual */
  .gs-placeholder {
    padding: 1em;
    border: 2px dashed var(--urbanodo-color, #ab163e);
    border-radius: 6px;
    background-color: color-mix(in srgb, var(--urbanodo-color, #ab163e) 5%, transparent);
    font-size: 14px;
  }

  .gs-placeholder small {
    display: block;
    margin-top: 0.25em;
    opacity: 0.75;
  }

  /* Imagen principal suelta ([urbanodo-poi-image]…) */
  .gs-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
  }

  /* Mapa interactivo ([urbanodo-map] y rutas) */
  .gs-map {
    width: 100%;
    margin: 1em 0;
    border-radius: 8px;
    z-index: 0;
  }

  .gs-map-popup {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 180px;
  }

  .gs-map-popup img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
  }

  .gs-map-popup a {
    color: var(--urbanodo-color, #ab163e);
  }

  /* Datos técnicos de una ruta */
  .gs-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin: 1em 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .gs-stats li {
    display: flex;
    flex-direction: column;
    padding: 12px;
    list-style: none !important;
    border-radius: 8px;
    background-color: color-mix(in srgb, var(--urbanodo-color, #ab163e) 8%, transparent);
  }

  .gs-stat-label {
    font-size: 13px;
    opacity: 0.75;
  }

  .gs-stat-value {
    font-size: 20px;
    color: var(--urbanodo-color, #ab163e);
  }

  .gs-mide {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1em;
  }

  .gs-mide-title {
    font-weight: bold;
  }

  .gs-mide ul {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .gs-mide li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    list-style: none !important;
  }

  .gs-mide-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--urbanodo-color, #ab163e);
    color: white;
    font-weight: bold;
  }

  /* Archivos para descargar */
  .gs-files {
    margin: 0 0 1em !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .gs-files li {
    list-style: none !important;
    padding: 6px 0;
  }

  .gs-files a::before {
    content: "⬇ ";
  }

  .gs-file-type {
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.08);
  }

  /* Avisos municipales ([urbanodo-alerts]) */
  .gs-alerts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 1em 0;
  }

  .gs-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-left: 6px solid var(--gs-alert-color);
    border-radius: 6px;
    background-color: color-mix(in srgb, var(--gs-alert-color) 12%, white);
    color: #1d2327;
  }

  .gs-alert[hidden] {
    display: none;
  }

  .gs-alert-emergency { --gs-alert-color: #7a0019; }
  .gs-alert-danger { --gs-alert-color: #d63638; }
  .gs-alert-warning { --gs-alert-color: #dba617; }
  .gs-alert-info { --gs-alert-color: #2271b1; }

  .gs-alert-emergency {
    background-color: #7a0019;
    color: white;
  }

  .gs-alert-emergency a {
    color: white;
  }

  .gs-alert-body {
    flex: 1;
  }

  .gs-alert-date {
    display: block;
    opacity: 0.7;
  }

  .gs-alert-close {
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
  }

  /* El tiempo ([urbanodo-weather]) */
  .gs-weather {
    margin: 1em 0;
  }

  .gs-weather-now {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .gs-weather .gs-weather-now .gs-weather-icon {
    width: 96px;
    height: 96px;
  }

  .gs-weather-temp {
    display: block;
    font-size: 40px;
    font-weight: bold;
    line-height: 1.1;
  }

  .gs-weather-forecast {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .gs-weather-forecast li {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
    padding: 8px;
    list-style: none !important;
    border-radius: 8px;
    background-color: color-mix(in srgb, var(--urbanodo-color, #ab163e) 6%, transparent);
    font-size: 14px;
  }

  .gs-weather .gs-weather-forecast .gs-weather-icon {
    width: 48px;
    height: 48px;
  }

  .gs-weather-day {
    text-transform: capitalize;
  }

  /* Ofertas de empleo ([urbanodo-jobs]) */
  .gs-jobs {
    margin: 1em 0;
  }

  .gs-job {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .gs-job summary {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    cursor: pointer;
    list-style: none;
  }

  .gs-job summary::-webkit-details-marker {
    display: none;
  }

  .gs-job-title {
    font-weight: bold;
    font-size: 18px;
  }

  .gs-job[open] .gs-job-title,
  .gs-job summary:hover .gs-job-title {
    color: var(--urbanodo-color, #ab163e);
  }

  .gs-job-meta {
    font-size: 14px;
    opacity: 0.75;
  }

  .gs-job-description {
    padding-bottom: 12px;
  }

  /* Buscador de puntos de interés ([urbanodo-search]) */
  .gs-search {
    display: flex;
    gap: 8px;
    margin: 1em 0;
  }

  .gs-search input[type=search] {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    font-size: 16px;
  }

  .gs-search button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background-color: var(--urbanodo-color, #ab163e);
    color: white;
    font-size: 16px;
    cursor: pointer;
  }

  .gs-search-count {
    opacity: 0.75;
  }

  /* Aviso de idioma del navegador (js/gs-language.js) */
  .gs-language {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 560px;
    margin: 0 auto;
    padding: 12px 16px;
    border-radius: 8px;
    background: #1d2327;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    font-size: 15px;
  }

  .gs-language span {
    flex: 1;
  }

  .gs-language a {
    color: white;
    font-weight: bold;
    white-space: nowrap;
  }

  .gs-language-close {
    border: none;
    background: none;
    color: white;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

  /* Receta: tiempo de elaboración e ingredientes */
  .gs-recipe-time {
    display: inline-block;
    margin-bottom: 1em;
    padding: 6px 14px;
    border-radius: 20px;
    background-color: color-mix(in srgb, var(--urbanodo-color, #ab163e) 10%, transparent);
  }

  .gs-ingredients {
    margin: 0 0 1em 1.2em !important;
    padding: 0 !important;
  }

  .gs-ingredients li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .gs-ingredients li::marker {
    color: var(--urbanodo-color, #ab163e);
    font-weight: bold;
  }

  /* Banner de avisos que rota (rotate): uno cada vez, con puntos para cambiar */
  .gs-alerts[hidden] {
    display: none;
  }

  .gs-alerts-rotating {
    position: relative;
  }

  .gs-alerts-rotating .gs-alert:not(.is-active) {
    display: none;
  }

  .gs-alerts-rotating .gs-alert.is-active {
    animation: gs-alert-in 0.4s ease;
  }

  @keyframes gs-alert-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    .gs-alerts-rotating .gs-alert.is-active {
      animation: none;
    }
  }

  .gs-alerts-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
  }

  .gs-alerts-dots[hidden] {
    display: none;
  }

  .gs-alerts-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
  }

  .gs-alerts-dot[aria-current="true"] {
    background: var(--urbanodo-color, #ab163e);
  }
