
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f4f8;
    color: #333;
    align-items: center;
    align-self: center;
    display: flex;
    justify-content: center;
}
.navbar {
    position: fixed;
    top: 0; /* Fissa la barra in cima alla finestra */
    width: 100%; /* Occupa tutta la larghezza */
    max-width: 400px;
    align-self: center;
    z-index: 10; /* Assicura che la barra sia sopra gli altri contenuti */
    height: 60px; /* Altezza della barra */
    background-color: #1c75bc; /* Colore di sfondo della barra */
}

.container {
    max-width: 400px;
    /*margin: 20px auto;*/
    background-color: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

/* Header dietro l'immagine */
.header {
    background-color: #1c75bc;
    height: 150px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1; /* Si posiziona dietro all'immagine */
}

/* Pulsante indietro */
.back-icon {
    background-color: white;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1c75bc;
    font-size: 30px;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 12; /* Posizionato sopra l'header */
    cursor: pointer;
}

.share-icon {
    background-color: white;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1c75bc;
    font-size: 30px;
    position: absolute;
    top: 10px;
    right: 10px; /* Cambiato da left a right */
    z-index: 12;
    cursor: pointer;
}

.image-container {
    text-align: center;
    position: relative;
    margin-top: 60px;
}

.main-image {
    width: 95%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    position: relative;
    z-index: 2; /* Sopra l'header */
    cursor: pointer;
}

.tag {
    position: absolute;
    bottom: -12px;
    right: 20px;
    background-color: #003399;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    border: 3px solid white;
    z-index: 3;
}

.content {
    padding: 20px;
}

h1 {
    text-align: center;
    color: #333;
    font-size: 24px;
    margin-top: 10px;
}

.context {
    display: inline-flex;
    align-items: center;
    background-color: rgba(28, 117, 188, 0.1);
    padding: 5px;
    border-radius: 10px;
    margin-top: 20px;
    width: 95%;
    margin-left: auto;
    margin-right: auto;
}

.context-icon {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 50%;
}

.context-title {
    font-size: 18px;
    font-weight: bold;
    color: #0078d7;
}

.text-content {
    margin-top: 10px;
    line-height: 1.6;
    font-size: 16px;
}

/* Stile del pulsante in fondo */
.app-button {
    background-color: #1c75bc;
    color: white;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    margin: 0px auto;
    cursor: pointer;
    display: block;
    max-width: 90%;
    text-decoration: none;
}

.app-button:hover {
    background-color: #155a92;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    padding: 20px;
    z-index: 1000;
}
.popup.active {
    display: block;
}
.popup button {
    margin: 5px;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
}
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 500;
}
.overlay.active {
    display: block;
}

.image {
    width: 100%;
    height: 200px;
    border-radius: 15px;
    object-fit: cover; /* Per mantenere il rapporto d'aspetto */
}

.video-container {
    position: relative;
    width: 100%;
    height: 200px;
}

.preview, video {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    object-fit: cover;
    cursor: pointer;
}

.preview-box {
    background-color: #f0f0f0; /* grigio chiaro */
    border-radius: 15px;
    padding: 20px;
    max-width: 400px;
    margin: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.preview-text {
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
}

.download-section {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.preview-box-popup {
    background-color: #f0f0f0; /* grigio chiaro */
    border-radius: 15px;
    padding: 20px;
    max-width: 400px;
    margin: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none; /* Nasconde il popup inizialmente */
    z-index: 1000; /* Assicurati che sia sopra gli altri elementi */
}

.preview-box-popup.active {
    display: block; /* Mostra il popup */
}

.popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Sfondo semi-trasparente */
    display: none;
    z-index: 999; /* Assicurati che sia sotto il popup */
}

.popup-backdrop.active {
    display: block;
}


.app-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background-color: #ddd; /* Placeholder colore per l'icona */
    background-size: cover;
    background-position: center;
    flex-shrink: 0; /* Impedisce alla dimensione di cambiare */
}

.download-button {
    flex-grow: 1;
    background-color: #1c75bc;
    color: #fff;
    font-weight: bold;
    text-align: center;
    border-radius: 10px;
    text-decoration: none;
    height: 50px; /* Altezza identica all'icona */
    display: flex; /* Per centrare il testo */
    align-items: center; /* Centra verticalmente il testo */
    justify-content: center; /* Centra orizzontalmente il testo */
    padding: 0 15px; /* Rimuove il padding verticale */
}

.download-button:hover {
    background-color: #155b8c; /* Colore più scuro al passaggio del mouse */
}

@media (max-width: 768px) { /* Dispositivi con schermi piccoli */
    .preview-box-popup {
        width: 85%; /* Larghezza pari al 95% dello schermo */
        max-width: none; /* Disabilita qualsiasi limite massimo */
    }
}

.custom-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 600px;
    border-radius: 15px;
    background-color: white;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
}

.popup-header {
    background-color: #1c75bc;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
}

.popup-title {
    color: white;
    font-weight: bold;
    font-size: 20px;
    font-family: 'Montserrat', sans-serif;
}

.popup-body {
    padding: 20px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

#popup-text {
    margin: 20px 0;
    font-size: 16px;
    color: #333;
    font-family: 'Montserrat', sans-serif;
}

.popup-button {
    background-color: #1c75bc;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}

.popup-button:hover {
    background-color: #155a92;
}

.custom-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

img.clickable {
    cursor: pointer;
}

.like-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: #1c75bc;
    border-radius: 50px; /* Bordi completamente arrotondati */
    padding: 10px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    cursor: pointer;
    gap: 10px;
    float: right; /* Allinea il pulsante a destra */
    margin-right: 10px; /* Spazio dal bordo destro */
}

.like-icon {
    background-color: white;
    color: #1c75bc;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.like-text {
    font-size: 16px;
    color: #1c75bc;
}

.blurred {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
    position: relative;
    overflow: hidden;
    color: transparent; /* importante su Firefox */
    text-shadow: 0 0 10px rgba(0,0,0,0.5); /* rende il blur più uniforme */
}

