/* --- Cards principales y extendidas --- */
.section-card,
.card-container-extendida {
    position: fixed;
    left: 25px;
    right: 25px;
    top: 70px;
    bottom: 25px;
    max-width: 1250px;
    margin: auto;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    background: rgba(255,255,255,0.95);
    z-index: 9999;
    padding: 0;
    box-sizing: border-box;
    overflow: auto;
}

/* Section card */
.section-card {
    width: auto;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
}

/* Card extendida (contenedor) */
.card-container-extendida {
    display: flex;
    justify-content: center;
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(.4,0,.2,1), opacity 0.3s;
}
.card-container-extendida.visible {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}
.card-container-extendida.hide-up {
    opacity: 0;
    transform: translateY(-120%) scale(0.95);
}
.card-container-extendida.hide-down {
    opacity: 0;
    bottom: -100%;
    pointer-events: none;
}

/* Card extendida (interior) */
.card-extendida {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    padding: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    transition: box-shadow 0.3s, padding 0.3s;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    position: relative;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
}
.card-extendida.expanded {
    max-height: calc(100vh - 70px - 25px);
}
.card-extendida .content {
    max-height: 340px;
    overflow-y: auto;
    transition: max-height 0.3s;
}
.card-extendida.expanded .content {
    max-height: 540px;
}
.card-container-extendida.visible .card-extendida.expanded {
    max-height: calc(100vh - 70px - 25px);
    height: calc(100vh - 70px - 25px);
    transition: max-height 0.3s, height 0.3s;
}

/* --- Responsive para móvil --- */
@media (max-width: 600px) {
    .section-card,
    .card-container-extendida {
        left: 25px !important;
        right: 25px !important;
        max-width: 98vw !important;
        border-radius: 10px !important;
    }
    .card-extendida,
    .card-extendida.expanded {
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 10px !important;
        width: 100%;
        max-width: none;
    }
    .card-container-extendida.visible .card-extendida.expanded {
        height: 100% !important;
        max-height: 100% !important;
    }
    .section-card {
        top: 70px !important;
        bottom: 5vw !important;
        padding: 10px !important;
    }
}

/* --- Drag handle --- */
.card-drag-handle {
    width: 48px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    cursor: grab;
    position: relative;
    top: 0;
    left: 0;
    user-select: none;
    background: none;
}
.card-drag-handle svg {
    display: block;
}

/* --- POI info --- */
.poi-info-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    padding: 12px 18px 10px 18px;
    margin-bottom: 18px;
}
.poi-instagram-section {
    background: #faf9fa;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    padding: 14px 0 10px 0;
    border-top: 2px solid #f1f1f1;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.poi-instagram-section iframe,
.poi-instagram-section blockquote.instagram-media {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box;
    display: block;
}

/* --- Botones y cierres --- */
.toggle-arrow {
    background: none;
    border: none;
    position: absolute;
    right: 32px;
    bottom: 8px;
    font-size: 1.5rem;
    cursor: pointer;
}
.close-x {
    position: absolute;
    top: 10px;
    right: 16px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 0;
}
.close-x:hover {
    color: #b9005b;
}

/* Imagen Instagram responsiva */
.instagram-image {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

/* --- Radio y botones --- */
.radio-input input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
}
.button.radio-visual.instagram-image.info-btn {
  background: #4e484869;
  border-radius: 0.5em;
  box-shadow:
    inset 0px -6px 18px -6px rgba(3, 15, 20, 0),
    inset rgba(54, 69, 75, 0.08) -1px -1px 6px 0px,
    inset 12px 0px 12px -6px rgba(3, 15, 20, 0),
    inset -12px 0px 12px -6px rgba(3, 15, 20, 0),
    rgba(54, 69, 75, 0.08) -1px -1px 6px 0px;
  border: solid 2px #4e484869;
  cursor: pointer;
  font-size: 18px;
  padding: 0.7em 1.7em;
  outline: none;
  transition: all 0.3s;
  user-select: none;
  color: #222;
  font-family: inherit;
  font-weight: 500;
  margin: 0;
  display: inline-block;
}
.button.radio-visual.instagram-image.info-btn:hover {
  box-shadow:
    inset 0px -6px 18px -6px rgba(3, 15, 20, 0.08),
    inset 0px 6px 18px -6px rgba(3, 15, 20, 0.08),
    inset 12px 0px 12px -6px rgba(3, 15, 20, 0),
    inset -12px 0px 12px -6px rgba(3, 15, 20, 0),
    -1px -1px 6px 0px rgba(54, 69, 75, 0.12);
  background: #f3f3f3;
}
.button.radio-visual.instagram-image.info-btn:active {
  box-shadow:
    inset 0px -12px 12px -6px rgba(3, 15, 20, 0.12),
    inset 0px 12px 12px -6px rgba(3, 15, 20, 0.12),
    inset 12px 0px 12px -6px rgba(3, 15, 20, 0.12),
    inset -12px 0px 12px -6px rgba(3, 15, 20, 0.12),
    -1px -1px 6px 0px rgba(54, 69, 75, 0.15);
  background: #e0e7ef;
}
.button .text {
  color: #40a9bf;
  font-weight: 700;
  margin: auto;
  transition: all 0.3s;
  width: fit-content;
  font-size: 1.1em;
}
.button:hover .text {
  transform: scale(0.95);
  color: #007bff;
}
.button:active .text {
  transform: scale(0.9);
  color: #2751cd;
}
.button.radio-visual.instagram-image.info-btn {
    font-size: 16px;
    padding: 0.6em 1em;
    min-width: 120px;
    width: 100%;
    max-width: 100%;
}
.button.radio-visual.instagram-image.info-btn .text {
    font-size: 1em;
}

/* --- Otros estilos y responsive --- */
.item_destination h2 {
    display: inline-block;
    margin: 5px;
    padding: 0;
    border-radius: 0;
    background: none;
    color: #000;
    cursor: pointer;
    transition: color 0.3s ease;
}
.item_destination h2:hover {
    color: #007bff;
}
.item_destination {
    font-size: 1.6rem;
    padding: 18px 20px;
    border-bottom: 1px solid #ddd;
    background-color: #eee;
    display: block;
    color: #007bff;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}
.card {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    display: flex;
    justify-content: center;
}
.card-body {
    padding: 15px;
    text-align: center;
}
a.destination,
.destination {
    display: inline-block !important;
    margin: 5px !important;
    padding: 15px !important;
    border-radius: 5px !important;
    text-align: left !important;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}
a.destination {
    text-decoration: none !important;
    color: #007bff !important;
    font-weight: normal;
}
a.destination:hover {
    color: #0056b3 !important;
}
.destination {
    background-color: #3498db;
    color: white !important;
}
.destination:hover {
    background-color: #2ecc71;
}
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 15px;
    }
    h1 {
        font-size: 24px;
    }
    h3 {
        font-size: 20px;
    }
    .instagram-image {
        max-width: 90%;
    }
}
@media (max-width: 600px) {
    .radio-input label .radio-text {
        display: none !important;
    }
    .radio-input label i {
        display: inline-block !important;
        font-size: 36px !important;
        margin: 0 auto !important;
        color: #40a9bf !important;
    }
    .radio-input.floating-card {
        max-width: 45vw;
        left: 5vw;
        right: 5vw;
    }
}

/* --- Map y layout --- */
.maplibregl-ctrl-bottom-right {
    bottom: 32px !important;
    right: 16px !important;
}
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
}
#map {
    width: 100vw;
    height: 100vh;
}
.justified-text {
    text-align: justify;
}
.card.mb-4.scrolleable-card {
    display: block !important;
    max-height: 70vh;
    overflow-y: auto;
    background: transparent !important;
    box-shadow: none;
}
.radio-input.floating-card {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 10px;
    width: 100vw;
    max-width: 200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    z-index: 998;
    pointer-events: none;
}
.radio-input.floating-card label,
.radio-input.floating-card button {
    width: 100%;
    pointer-events: auto;
}
