/* Videuro country page mobile layout fixes only */

@media (max-width: 600px) {

    /* Country hero: allow translated/long content to determine height */
    body[data-page="country"] .country-v2-hero,
    body[data-page="country"] .videuro-country-hero-real.crx-final {
        height: auto !important;
        min-height: 580px !important;
        max-height: none !important;
        overflow: visible !important;
    }

    /* Never let country sections exceed viewport */
    body[data-page="country"] .crx-route,
    body[data-page="country"] .crx-route .section,
    body[data-page="country"] .crx-route-grid {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Journey becomes clean single-column layout */
    body[data-page="country"] .crx-route-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    body[data-page="country"] .crx-day {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    body[data-page="country"] .crx-day * {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    body[data-page="country"] .crx-day h3,
    body[data-page="country"] .crx-day p,
    body[data-page="country"] .crx-day span {
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }
}

/* =====================================================
   TOURIST PLACES — MOBILE
   ===================================================== */

@media (max-width: 600px) {

    body[data-page="country"] .crx-map-poi-list {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body[data-page="country"] .crx-map-poi {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        height: auto !important;
        min-height: 0 !important;

        padding: 18px !important;
        box-sizing: border-box !important;
    }

    body[data-page="country"] .crx-map-poi h3,
    body[data-page="country"] .crx-map-poi p,
    body[data-page="country"] .crx-map-poi span,
    body[data-page="country"] .crx-place-region,
    body[data-page="country"] .crx-place-highlights {
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;

        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    body[data-page="country"] .crx-place-highlights {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    body[data-page="country"] .crx-place-bottom {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
    }

    body[data-page="country"] .crx-map-poi button,
    body[data-page="country"] .crx-map-poi a {
        min-height: 42px !important;
    }
}

/* =====================================================
   TOURIST PLACE CARD — FINAL MOBILE WIDTH FIX
   ===================================================== */

@media (max-width: 600px) {

    body[data-page="country"] #crx-map,
    body[data-page="country"] #crx-map .section,
    body[data-page="country"] .crx-map-section,
    body[data-page="country"] .crx-map-poi-list {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    body[data-page="country"] .crx-map-poi-list {
        display: block !important;
        columns: auto !important;
    }

    body[data-page="country"] .crx-map-poi {
        display: block !important;

        width: 100% !important;
        max-width: none !important;
        min-width: 100% !important;

        flex: 0 0 100% !important;
        flex-basis: 100% !important;

        margin: 0 0 14px 0 !important;

        padding: 20px !important;

        height: auto !important;
        min-height: 0 !important;

        box-sizing: border-box !important;
    }

    body[data-page="country"] .crx-map-poi > * {
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body[data-page="country"] .crx-map-poi h3 {
        font-size: 24px !important;
        line-height: 1.08 !important;
        white-space: normal !important;
    }

    body[data-page="country"] .crx-map-poi p {
        white-space: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    body[data-page="country"] .crx-place-bottom {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    body[data-page="country"] .crx-place-bottom button,
    body[data-page="country"] .crx-place-bottom a {
        width: auto !important;
        min-width: 110px !important;
        min-height: 44px !important;
    }
}

/* =====================================================
   TOURIST PLACE CARD — FINAL MOBILE WIDTH FIX
   ===================================================== */

@media (max-width: 600px) {

    body[data-page="country"] #crx-map,
    body[data-page="country"] #crx-map .section,
    body[data-page="country"] .crx-map-section,
    body[data-page="country"] .crx-map-poi-list {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    body[data-page="country"] .crx-map-poi-list {
        display: block !important;
        columns: auto !important;
    }

    body[data-page="country"] .crx-map-poi {
        display: block !important;

        width: 100% !important;
        max-width: none !important;
        min-width: 100% !important;

        flex: 0 0 100% !important;
        flex-basis: 100% !important;

        margin: 0 0 14px 0 !important;

        padding: 20px !important;

        height: auto !important;
        min-height: 0 !important;

        box-sizing: border-box !important;
    }

    body[data-page="country"] .crx-map-poi > * {
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body[data-page="country"] .crx-map-poi h3 {
        font-size: 24px !important;
        line-height: 1.08 !important;
        white-space: normal !important;
    }

    body[data-page="country"] .crx-map-poi p {
        white-space: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    body[data-page="country"] .crx-place-bottom {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    body[data-page="country"] .crx-place-bottom button,
    body[data-page="country"] .crx-place-bottom a {
        width: auto !important;
        min-width: 110px !important;
        min-height: 44px !important;
    }
}

/* ===== TOURIST PLACE BUTTONS - MOBILE FINAL FIX ===== */
@media (max-width: 600px) {

  body[data-page="country"] .crx-map-poi .crx-place-bottom {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  body[data-page="country"] .crx-map-poi .crx-place-bottom a,
  body[data-page="country"] .crx-map-poi .crx-place-bottom button {
    flex: 1 1 0 !important;
    width: calc(50% - 4px) !important;
    min-width: 0 !important;
    max-width: none !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;

    min-height: 36px !important;
    padding: 0 10px !important;

    white-space: nowrap !important;
    line-height: 1 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-align: center !important;
    border-radius: 999px !important;
  }

  body[data-page="country"] .crx-map-poi .crx-place-bottom a span,
  body[data-page="country"] .crx-map-poi .crx-place-bottom button span {
    display: inline !important;
    white-space: nowrap !important;
    line-height: 1 !important;
  }
}
