/* Stili base della pagina */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #333;
}

/* Header */
header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}


/* Sezione descrizione */
.poi-description-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.poi-description-container h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #4CAF50;
}

/* Stile articolo POI */
article {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    height: 100%;
}

/* Container immagini e carosello */
.carousel-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    height: 360px;
    flex-grow: 0;
    margin-bottom: 0;
}

.carousel-container.no-images {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    background-blend-mode: darken;
}

.no-images-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.no-images-content {
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 400px;
}

.no-images-content svg {
    margin-bottom: 1rem;
    stroke: white;
}

.no-images-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.no-images-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.5;
    opacity: 0.9;
}

.no-images-content .upload-photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.no-images-content .upload-photo-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.carousel-slide {
    display: none;
    width: 100%;
    height: 360px;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.carousel-slide.active {
    display: block;
    opacity: 1;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Controlli carosello */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* Indicatori carosello */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* Scheda informativa */
.poi-info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 20px;
}

.poi-type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 20px;
}

.poi-type-badge.passes {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.poi-type-badge.roads {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

/* Stili per il badge dell'autore */
.contributor-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    transition: transform 0.2s;
    max-width: 100%;
    width: auto;
}

.contributor-badge:hover {
    transform: translateY(-1px);
}

.contributor-badge-content {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    justify-content: space-between;
    width: auto;
    color: #6b7280;
}

.contributor-info {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.contributor-name {
    font-weight: 600;
    color: #4CAF50;
}

.contributor-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background-color: #e6f7e6;
    border-radius: 50%;
    color: #4CAF50;
}

.contributor-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75em;
    overflow: hidden;
    flex-shrink: 0;
}

.contributor-avatar img {
    width: 100%;
    height: 100%;
        padding: 2px 4px 2px 0;
        gap: 4px;
}

/* Pulsante segnala strada */
.share-road-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.share-road-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.share-road-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(76, 175, 80, 0.4);
}

.share-road-btn:hover::before {
    left: 100%;
}

.share-road-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.mini-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #4CAF50;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9em;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.mini-add-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.mini-add-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* Sezione promozione planner */
.planner-promo {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 20px;
    height: fit-content;
}

.planner-promo h3 {
    color: #4CAF50;
    font-size: 1.4em;
    margin: 0 0 15px 0;
}

.planner-promo img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.planner-promo p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.planner-promo .features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.planner-promo .features-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #333;
}

.planner-promo .features-list li svg {
    color: #4CAF50;
    flex-shrink: 0;
}

.try-planner-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    width: 100%;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.try-planner-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Pulsante carica foto */
.upload-photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(76, 175, 80, 0.9);
    color: white;
    border: none;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 0.95em;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    text-decoration: none;
    position: absolute;
    left: 20px;
    bottom: 20px;
    z-index: 3;
}

.upload-photo-btn svg {
    width: 18px;
    height: 18px;
}

.upload-photo-btn .upload-text {
    white-space: nowrap;
}

.upload-photo-btn:hover {
    background: rgba(76, 175, 80, 1);
    transform: translateY(-2px);
}

/* Stile descrizione */
.poi-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    margin-top: 0;
}

/* Mappa */
.poi-map-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 20px;
    display: flex;

    .upload-photo-btn {
        padding: 10px;
        gap: 0;
        border-radius: 50%;
        width: 42px;
        height: 42px;
        justify-content: center;
    }

    .upload-photo-btn .upload-text {
        display: none;
    }
    flex-direction: column;
    height: auto;
}

.poi-map-container h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #4CAF50;
}

.poi-map {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.poi-map-popup-link {
    display: inline-block;
    color: #1f2330;
    font-weight: 600;
    text-decoration: none;
}

.poi-map-popup-link:hover {
    color: #A63DB8;
    text-decoration: underline;
}

.poi-central-marker-wrapper {
    background: transparent;
    border: none;
}

.poi-central-marker {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #A63DB8;
    border: 2px solid #ffffff;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.16);
}

.poi-central-marker.passes {
    background: #28752B;
}

.poi-central-marker.roads {
    background: #2196F3;
}

.poi-central-marker.generic {
    background: #A63DB8;
}

.poi-central-marker__icon {
    color: #ffffff;
    font-size: 13px;
    line-height: 1;
}

.poi-nearby-marker-wrapper {
    background: transparent;
}

.poi-nearby-marker {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
    background: #A63DB8;
}

.poi-nearby-marker.passes {
    background: #28752B;
}

.poi-nearby-marker.roads {
    background: #2196F3;
}

.poi-nearby-marker.generic {
    background: #A63DB8;
}

.poi-nearby-marker__icon {
    color: #ffffff;
    font-size: 10px;
    line-height: 1;
}

/* Sezione commenti */
.poi-comments {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 20px;
}

.poi-comments h2 {
    color: #4CAF50;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.comment-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: #4CAF50;
}

.comment-date {
    color: #666;
    font-size: 0.9em;
}

.comment-text {
    line-height: 1.5;
}

/* Form commenti */
.add-comment-form {
    margin-top: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.add-comment-form h3 {
    color: #333;
    font-size: 1.2em;
    margin: 0 0 15px 0;
}

.comment-form-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-form-row {
    display: flex;
    gap: 15px;
}

.comment-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.comment-input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    outline: none;
}

.comment-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    resize: vertical;
    transition: all 0.3s ease;
}

.comment-textarea:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    outline: none;
}

.submit-comment-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.submit-comment-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

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

/* Overlay buttons e credits */
.image-overlay-buttons {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    z-index: 2;
    background: none;
    backdrop-filter: none;
}

.overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(76, 175, 80, 0.9);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    text-decoration: none;
}

.overlay-btn:hover {
    background: rgba(76, 175, 80, 1);
    transform: translateY(-2px);
}


.photo-credit-badge {
    background: #ffffff;
    color: #111827;
    padding: 2px 8px 2px 4px;
    border-radius: 999px;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: none;
    transition: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    pointer-events: auto;
}

.photo-credit-badge * {
    cursor: pointer;
}

.photo-credit-text {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s ease, max-width 0.2s ease;
    color: inherit;
    text-decoration: none;
    pointer-events: auto;
}

.photo-credit-text:hover {
    text-decoration: underline;
}

.photo-credit-badge.is-open .photo-credit-text {
    opacity: 1;
    max-width: 240px;
    pointer-events: auto;
}

.photo-credit-badge:hover .photo-credit-text,
.photo-credit-badge:focus-visible .photo-credit-text {
    opacity: 1;
    max-width: 220px;
}

.photo-credit-badge .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #d1d5db;
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75em;
    overflow: hidden;
    flex-shrink: 0;
}

.photo-credit-badge .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Miglioramenti di accessibilità */
.carousel-btn:focus,
.indicator:focus,
.upload-photo-btn:focus,
.open-in-planner:focus,
.mini-add-btn:focus,
.try-planner-btn:focus,
.submit-comment-btn:focus,
.route-selection-button:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Coordinate */
.coordinates {
    display: inline-block;
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: monospace;
    margin-top: 10px;
}

/* Pulsante aggiungi al percorso */
.add-to-route {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.add-to-route:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.add-to-route svg {
    width: 20px;
    height: 20px;
}

/* Container info POI */
.poi-info-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-top: 20px;
}

.poi-info-left {
    flex: 1;
}

.poi-info-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* Pulsante apri nel planner */
.open-in-planner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.open-in-planner:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.open-in-planner svg {
    width: 20px;
    height: 20px;
}

/* Dialog di selezione */
.route-selection-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 1001;
    width: 90%;
    max-width: 400px;
}

.route-selection-dialog h3 {
    color: #4CAF50;
    font-size: 1.4em;
    margin: 0 0 16px 0;
}

.route-selection-dialog p {
    color: #666;
    margin-bottom: 20px;
}

.route-selection-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.route-selection-button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f5f5f5;
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-selection-button:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.route-selection-button.primary {
    background: #4CAF50;
    color: white;
}

.route-selection-button.primary:hover {
    background: #45a049;
}

.route-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

/* Stili per il captcha matematico */
.math-captcha-container {
    margin-bottom: 15px;
    background: none;
    padding: 0;
    border-radius: 0;
    border-left: none;
}

.math-captcha-question {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.math-captcha-question label {
    font-weight: normal;
    color: #666;
    margin-right: 10px;
    font-size: 0.95em;
}

.math-captcha-input {
    width: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.math-captcha-input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    outline: none;
}

@media (max-width: 480px) {
    .math-captcha-question {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .math-captcha-input {
        width: 100%;
        max-width: none;
        padding: 10px;
        font-size: 0.9em;
    }
} 
/* Allineamento layout con itinerario-template */
body {
    background-color: #f2f2f2;
    color: #374151;
}

main {
    max-width: none;
    margin: 0;
    padding: 0;
    padding-bottom: 40px;
}

.container-custom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.poi-header {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 25px 30px;
    margin-top: 15px;
    margin-bottom: 25px;
}

/* Breadcrumbs: allineati a itinerario-template */
.breadcrumbs {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: #6b7280;
    flex-wrap: wrap;
    justify-content: space-between;
}

.breadcrumbs-path {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #3d9140;
    text-decoration: underline;
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: #9ca3af;
}

.breadcrumbs .current {
    font-weight: 500;
    color: #374151;
}

.poi-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.poi-content.no-photos {
    grid-template-columns: 1fr;
}

.poi-photos-container,
.poi-map-container,
.poi-description-box,
.poi-comments,
.planner-promo {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.poi-photos-container,
.poi-map-container {
    padding: 15px;
}

.poi-photos-container h2,
.poi-map-container h2,
.poi-description-box h2,
.poi-comments h2,
.planner-promo h3 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #4CAF50;
}

.poi-description-box {
    padding: 25px;
    margin-bottom: 25px;
}

.poi-popular-box {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 25px;
}

.popular-poi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.popular-poi-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #4CAF50;
}

.popular-poi-controls {
    display: flex;
    gap: 10px;
}

.popular-scroll-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.popular-scroll-btn:hover {
    background: #4CAF50;
    color: #ffffff;
}

.popular-scroll-btn:focus-visible {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

.popular-scroll-btn:disabled {
    background: rgba(156, 163, 175, 0.25);
    color: rgba(107, 114, 128, 0.8);
    cursor: not-allowed;
}

.popular-scroll-btn--hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.popular-scroll-btn svg {
    width: 18px;
    height: 18px;
}

.popular-poi-carousel {
    position: relative;
}

.popular-poi-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin: 0;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    align-items: stretch;
    -ms-overflow-style: none;
}

.popular-poi-grid::-webkit-scrollbar {
    display: none;
}

.popular-poi-grid {
    scrollbar-width: none;
}

.popular-poi-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex: 0 0 260px;
    min-width: 260px;
    scroll-snap-align: start;
    display: flex;
}

.popular-poi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

.popular-poi-card__link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    height: 100%;
    flex: 1;
}

.popular-poi-card__image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.popular-poi-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popular-poi-card:hover .popular-poi-card__image img {
    transform: scale(1.05);
}

.popular-poi-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9999px;
    background: rgba(76, 175, 80, 0.9);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.popular-poi-card__badge.passes {
    background: rgba(76, 175, 80, 0.9);
}

.popular-poi-card__badge.roads {
    background: rgba(166, 61, 184, 0.9);
}

.popular-poi-card__badge.generic {
    background: rgba(64, 64, 64, 0.85);
}

.popular-poi-card__body {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.popular-poi-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
}

.popular-poi-card__distance {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.popular-poi-placeholder,
.popular-poi-empty {
    text-align: center;
    padding: 24px;
    color: #6b7280;
    font-size: 0.95rem;
}

.popular-poi-placeholder {
    flex: 1 0 100%;
}

.popular-poi-empty[hidden] {
    display: none;
}

.poi-bottom {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 25px;
    margin-bottom: 30px;
}

.carousel-container {
    height: 450px;
    border-radius: 8px;
}

.poi-content.no-photos .poi-map {
    height: 520px;
}

.poi-map {
    position: relative;
    height: 450px;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.map-actions {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    padding: 0 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 1000;
    pointer-events: auto;
}

.map-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #4CAF50;
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.map-action-btn__text {
    display: inline-flex;
    align-items: center;
}

.map-action-btn:hover {
    background-color: #3d9140;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(76, 175, 80, 0.25);
}

.map-action-btn svg {
    width: 16px;
    height: 16px;
}

.no-photos-card .carousel-container {
    margin: 0;
}

.poi-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #4B5563;
}

@media (max-width: 1024px) {
    .poi-bottom {
        grid-template-columns: 3fr 2fr;
    }
}

@media (max-width: 768px) {
    .poi-header {
        padding: 20px;
        margin-bottom: 20px;
    }

    .poi-title {
        font-size: 1.8rem;
    }

    .poi-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }

    .poi-photos-container,
    .poi-map-container {
        padding: 15px;
    }

    .poi-description-box,
    .poi-comments,
    .planner-promo {
        padding: 20px;
    }

    .poi-popular-box {
        padding: 20px;
    }

    .popular-poi-grid {
        gap: 14px;
    }

    .popular-poi-card {
        flex: 0 0 220px;
        min-width: 200px;
    }

    .poi-bottom {
        grid-template-columns: 1fr;
    }

    .carousel-container {
        height: 300px;
    }

    .poi-map {
        height: 520px;
    }

    .poi-content.no-photos .poi-map {
        height: 560px;
    }

    .comment-form-row {
        flex-direction: column;
    }

    .map-action-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .poi-header {
        padding: 15px;
        margin-bottom: 15px;
    }

    .poi-title {
        font-size: 1.5rem;
    }

    .carousel-container {
        height: 250px;
    }

    .poi-map {
        height: 460px;
    }

    .poi-content.no-photos .poi-map {
        height: 520px;
    }

    .poi-photos-container,
    .poi-map-container,
    .poi-description-box,
    .poi-popular-box,
    .poi-comments,
    .planner-promo {
        padding: 15px;
    }

    .poi-bottom {
        gap: 15px;
    }

    .popular-poi-grid {
        gap: 12px;
    }

    .popular-poi-controls {
        display: none;
    }

    .popular-poi-card {
        flex: 0 0 200px;
    }

    .map-actions {
        padding: 0 10px;
        bottom: 12px;
    }

    .map-action-btn {
        font-size: 0.95rem;
        padding: 10px 14px;
    }
}

@media (max-width: 359px) {
    .poi-title {
        font-size: 1.3rem;
    }

    .carousel-container {
        height: 220px;
    }

    .poi-map {
        height: 420px;
    }

    .poi-content.no-photos .poi-map {
        height: 480px;
    }

    .map-action-btn {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}

/* Ensure POI title matches itinerario-template: size, weight and color */
.poi-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #4CAF50 !important;
}