/* Stili personalizzati per l'applicazione di analisi SEO */

body {
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.footer {
    background-color: #0d6efd;
    margin-top: 3rem;
    padding: 2rem 0;
    width: 100%;
    position: relative;
    left: 0;
    right: 0;
}

.footer h5 {
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.footer .list-unstyled li {
    margin-bottom: 0.5rem;
}

.footer .list-unstyled a {
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.footer .list-unstyled a:hover {
    opacity: 1;
}

.footer .social-links {
    display: flex;
    gap: 1rem;
}

.footer hr {
    margin: 2rem 0;
    opacity: 0.2;
}

.footer .copyright {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
        background-color: #0d6efd !important;
    }

    .footer h5 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .footer p,
    .footer a {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .footer .col-md-4 {
        margin-bottom: 1.2rem;
    }

    .footer .col-md-4:last-child {
        margin-bottom: 0;
    }

    .footer .list-unstyled li {
        margin-bottom: 0.3rem;
    }

    .footer .social-links {
        gap: 0.8rem;
    }

    .footer .copyright {
        font-size: 0.8rem;
        padding-top: 1rem;
    }

    .footer hr {
        margin: 1rem 0;
    }
}

/* Stile per l'overlay di caricamento */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 20px;
}

/* Stile per le liste di intestazioni */
.max-height-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Stili per i punteggi e metriche */
.progress {
    height: 20px;
    margin-bottom: 10px;
}

.progress-bar {
    text-shadow: 0 0 2px #000;
}

/* Animazioni e transizioni */
.card {
    -webkit-transition: transform 0.3s, box-shadow 0.3s;
    -moz-transition: transform 0.3s, box-shadow 0.3s;
    -o-transition: transform 0.3s, box-shadow 0.3s;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    -o-transform: translateY(-5px);
    transform: translateY(-5px);
    -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Stili per i risultati dell'analisi */
.alert {
    border-radius: 8px;
}

.badge {
    font-weight: 500;
    padding: 6px 10px;
}

/* Stile per i risultati principali */
.display-1,
.display-2,
.display-3,
.display-4 {
    font-weight: 600 !important;
}

/* Stile per documenti stampabili */
@media print {

    .navbar,
    .footer,
    .btn {
        display: none !important;
    }

    body {
        background-color: white !important;
    }

    .card {
        break-inside: avoid;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    .card-header {
        background-color: #f8f9fa !important;
        color: #000 !important;
    }

    .progress {
        border: 1px solid #ddd;
    }

    .progress-bar {
        background-color: #6c757d !important;
        color: #fff !important;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }
}

/* Bottone Installazione WebApp - base */
#install-container {
    display: none;
    transition: all 0.3s ease;
}

/* Solo su dispositivi mobili */
@media (max-width: 768px) {
    #install-container.active {
        display: block !important;
        margin-bottom: 1rem !important;
    }
}

#install-button {
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 30px;
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #ffffff;
    border: none;
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#install-button:hover {
    background: linear-gradient(135deg, #6610f2, #0d6efd);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

#install-button:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.5);
}

/* Effetto FadeIn elegante */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.animate-install {
    animation: fadeInUp 0.8s ease forwards;
}

/* nasconde il menu “meno” se siamo nell’app */
html.is-pwa .nav-item.d-lg-none {
    display: none !important;
}

/* rende visibile il pulsante “Torna all’App” */
.back-to-app {
    display: none;
}

html.is-pwa .back-to-app {
    display: block;
}

/* ─── Footer PWA vs Browser ─────────────────────────── */

/* default: browser mostra il footer completo, nasconde quello minimale */
footer.not-pwa {
    display: block;
}

footer.pwa-footer {
    display: none;
}

/* in standalone PWA: html ha classe .is-pwa */
html.is-pwa footer.not-pwa {
    display: none !important;
}

html.is-pwa footer.pwa-footer {
    display: block !important;
}