/* ===========================
   BASE HTML & BODY
   =========================== */
html {
    position: relative;
    min-height: 100%;
    font-size: 16px;
}

body {
    background-color: #0f0f0f;
    color: #333;
}

main {
    background-color: #fff;
}

.table tr {
    transition: background-color 0.2s ease;
}

    .table tr:hover {
        background-color: #f2f2f2;
    }

/* ===========================
   MOBILE ADJUSTMENTS
   =========================== */
@media (min-width: 769px) and (max-width: 991px) {
    .navbar-nav .nav-item:last-child {
        margin-top: 20px;
        width: 100%;
    }

        .navbar-nav .nav-item:last-child .btn-login {
            width: 100%;
            display: flex;
            justify-content: center;
        }
}

@media (max-width: 768px) {

    html {
        font-size: 14px;
    }

    .navbar-nav {
        display: flex;
        flex-direction: column;
    }

        .navbar-nav .nav-link {
            line-height: 1.4;
        }

        .navbar-nav .nav-item:last-child {
            margin-top: 20px;
        }

    .navbar .btn-login {
        width: 100%;
        justify-content: center;
    }

    .nav-link.lang-switch {
        margin: 6px 0 !important; 
        padding: 0 !important;
        display: inline-block !important;
        width: auto !important; 
    }

    .nav-item.lang-item {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .carousel-caption {
        left: 8%;
        bottom: 20%;
        text-align: center;
    }

        .carousel-caption h1 {
            font-size: 1.8rem;
        }

        .carousel-caption p {
            font-size: 1rem;
        }

    .login-card {
        padding: 26px 24px;
        max-width: 90%;
    }

    .login-section {
        padding: 30px 10px;
    }

    .feature-details-title {
        margin-top: 20px;
    }
}

/* ===========================
   NAVBAR BASE
   =========================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: linear-gradient( to bottom, rgba(26,26,26,0.88) 0%, rgba(26,26,26,0.72) 50%, rgba(26,26,26,0.50) 100% );
    backdrop-filter: blur(18px);
    box-shadow: none;
    padding-top: 4px;
    padding-bottom: 4px;
}

/* ===========================
   NAV-LINK
   =========================== */
.navbar-nav .nav-link {
    color: rgba(255,255,255,0.92);
    transition: color 0.25s ease, opacity 0.25s ease;
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 1.2;
}

    .navbar-nav .nav-link:hover {
        color: #fff;
        opacity: 1;
    }

/* ===========================
   LANGUAGE SWITCH
   =========================== */
.active-lang {
    font-weight: 600;
    color: #0d6efd !important; /* blu bootstrap */
    background: none !important;
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 2px; /* per allineare bene */
}

.lang-menu .dropdown-item.active {
    background-color: rgba(0,0,0,0.08) !important;
    color: #000 !important;
    font-weight: 600;
}

.lang-menu {
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background-color: rgba(255,255,255,0.85);
}
.lang-switch {
    padding: 6px 10px;
    border-radius: 8px;
    transition: background-color 0.25s ease, opacity 0.25s ease;
}

    .lang-switch:hover {
        background-color: rgba(255,255,255,0.18);
        backdrop-filter: blur(8px);
        opacity: 0.8;
    }

/* ===========================
   LOGIN BUTTON (BASE)
   =========================== */
.btn-login {
    color: rgba(255,255,255,0.95);
    border-color: rgba(255,255,255,0.7);
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

    .btn-login:hover {
        color: #fff;
        border-color: #fff;
        background-color: rgba(255,255,255,0.12);
    }

/* ===========================
   LOGIN BUTTON IN NAVBAR
   =========================== */
.navbar .btn-login {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    border-width: 1.2px;
}

/* ===========================
   FOCUS STATES
   =========================== */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ===========================
   HERO SLIDER
   =========================== */

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0.15) );
    backdrop-filter: blur(3px);
}

.hero-content {
    position: absolute;
    top: 25%;
    left: 5%;
    color: #fff;
}

.hero-slide-img {
    height: 450px;
    object-fit: cover;
    filter: brightness(60%);
    border-bottom: 0;
}

.carousel-caption {
    bottom: 32%;
    left: 15%;
    text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

    .carousel-caption h1,
    .carousel-caption p {
        color: #fff;
        text-shadow: 0 2px 10px rgba(0,0,0,0.7);
    }

/* ===========================
   BUTTONS
   =========================== */
.btn-primary:hover {
    background-color: #0b5ed7;
    box-shadow: 0 0 10px rgba(13,110,253,0.5);
}

/* ===========================
   FOOTER
   =========================== */
.footer-modern {
    background: #0f0f0f;
    color: #fff;
}

    .footer-modern a {
        color: #ddd;
        text-decoration: none;
        transition: opacity .2s ease;
    }

        .footer-modern a:hover {
            opacity: .7;
        }

    .footer-modern h6 {
        letter-spacing: .5px;
    }

    .footer-modern input {
        background: rgba(255,255,255,0.08);
        border: 1px solid rgba(255,255,255,0.15);
        color: #fff;
    }

        .footer-modern input::placeholder {
            color: rgba(255,255,255,0.5);
        }


/* ===========================
   CARDS
   =========================== */
.card {
    border-radius: 14px;
}

.glass-card {
    background: linear-gradient( to bottom right, rgba(255,255,255,0.22), rgba(255,255,255,0.14) );
    backdrop-filter: blur(14px);
    border: 1px solid rgba(0,0,0,0.12);
    margin-top: 4px;
    border-radius: 14px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .glass-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 22px rgba(0,0,0,0.35);
    }

    .glass-card .card-body {
        text-align: center;
    }

    .glass-card .app-header {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 12px;
    }

    .glass-card .btn {
        margin-top: 8px;
    }

.app-logo {
    width: 32px;
    height: 32px;
    opacity: 0.95;
}

.feature-icon {
    width: 64px;
    height: 64px;
    opacity: 0.95;
}

/* ===========================
   NEWS
   =========================== */
.news-title-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.25s ease;
}

    .news-title-link:hover {
        opacity: 0.7;
    }

.news-item {
    cursor: pointer;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .news-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.14);
    }

    .news-item a {
        display: block;
        width: 100%;
        height: 100%;
        color: #222;
        text-decoration: none;
        font-weight: 500;
        padding: 12px 16px;
    }

.news-edit-link {
    color: #222;
    text-decoration: none;
    font-weight: 500;
}

    .news-edit-link:hover {
        opacity: 0.7;
    }

.admin-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer; /* 🔥 fondamentale */
    transition: all 0.25s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

    .admin-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }

/* ===========================
   PHRASE
   =========================== */
.phrase-section {
    padding: 50px 20px;
    padding-bottom: 4rem !important;
}

    .phrase-section blockquote {
        font-size: 1.4rem;
        font-style: italic;
        color: #444;
        margin-bottom: 20px;
    }

    .phrase-section .blockquote-footer {
        color: #666;
        font-size: 1rem;
    }

/* ===========================
   LOGIN PAGE
   =========================== */

.login-section {
    min-height: calc(100vh - 120px);
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Card login dedicata (non tocca le altre glass-card del sito) */
.login-card {
    background: linear-gradient(to bottom right, rgba(255,255,255,0.22), rgba(255,255,255,0.14));
    backdrop-filter: blur(14px);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 16px;
    padding: 32px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

    /* Titolo */
    .login-card h2 {
        text-align: center;
        margin-bottom: 28px;
        color: #222;
        font-weight: 600;
    }

/* Input */
.login-input {
    background: rgba(255,255,255,0.85);
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,0.15);
    transition: all .25s ease;
}

    .login-input:focus {
        background: #fff;
        border-color: #0d6efd;
        box-shadow: 0 0 0 0.15rem rgba(13,110,253,.25);
    }

/* Bottone */
.login-btn {
    padding: 12px;
    font-size: 1.05rem;
    border-radius: 10px;
}

/* Link password dimenticata */
.forgot-link {
    color: #333;
    opacity: .8;
    text-decoration: none;
    transition: opacity .25s ease;
}

    .forgot-link:hover {
        opacity: .55;
    }

/* ===========================
   PRODUCT PAGES
   =========================== */
.img-glass {
    border-radius: 16px;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.25);
    padding: 8px;
}

/* ===========================
   GLASS DROPDOWN MENU
   =========================== */
.user-switch {
    padding: 6px 10px;
    border-radius: 8px;
    background: none !important;
    backdrop-filter: none !important;
    transition: color 0.25s ease;
}

    .user-switch:hover {
        background: none !important;
        color: #0d6efd !important; /* blu bootstrap */
    }

/* Dropdown menu glass chiaro */
.user-menu {
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background-color: rgba(255,255,255,0.85);
}

    .user-menu .dropdown-item {
        color: #0d6efd !important; /* blu bootstrap */
    }

        .user-menu .dropdown-item:hover {
            background-color: rgba(233,236,239); /* blu bootstrap */
            backdrop-filter: blur(8px);
            opacity: 0.8;
            color: black !important;
        }

.user-switch:hover {
    background-color: rgba(13,110,253,0.18); /* blu bootstrap */
    backdrop-filter: blur(8px);
    opacity: 0.85;
}

.user-switch svg {
    width: 16px;
    height: 16px;
    margin-left: -2px;
}

/* ===========================
   NEWS PAGES
   =========================== */
.news-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
}

.news-meta {
    color: #555;
    font-size: 0.95rem;
}

.news-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
}

.news-nav {
    font-weight: 500;
    color: #0d6efd;
    text-decoration: none;
}

    .news-nav:hover {
        opacity: 0.7;
    }

.related-card {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .related-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }

    .related-card h5 {
        font-size: 1.05rem;
        font-weight: 600;
        color: #222;
        white-space: nowrap;
        overflow: hidden; /* nasconde il resto */
        text-overflow: ellipsis; /* aggiunge i tre puntini */
    }


    .related-card small {
        color: #555;
    }

.news-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center; 
}

    .news-nav-row .col {
        flex: 1;
    }

.lang-section {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(0,0,0,0.1);
}


/* ===========================
   PHRASES OF THE MONTH
   =========================== */
.admin-card {
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 14px;
    transition: all 0.25s ease;
}

    .admin-card:hover {
        background: rgba(255,255,255,0.25);
    }

    .admin-card h4 {
        font-weight: 600;
    }

    .admin-card .form-control {
        border-radius: 10px;
    }

    .admin-card .form-label {
        margin-bottom: 6px;
    }

.phrases-intro {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--bs-secondary-color);
    border-left: 3px solid var(--bs-primary);
    padding-left: 1rem;
    margin-top: 1.5rem;
    max-width: 900px;
}

/* ===========================
   NEWS ARCHIVE
   =========================== */

.news-list-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .news-list-card:hover {
        transform: translateY(-4px);
    }

.news-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.news-list-card .card-body {
    gap: 8px;
}

.news-list-card .card-title {
    line-height: 1.4;
}

.news-list-card .card-text {
    line-height: 1.6;
}

.news-content img {
    max-width: 100%;
    height: auto;
}

/* ===========================
   GUIDES
   =========================== */

.guide-content img {
    max-width: 100%;
    height: auto;
}

.newsletter-table {
    width: 100%;
    table-layout: fixed;
}

/* ===========================
   ADMIN NEWSLETTER
   =========================== */
.newsletter-table {
    width: 100%;
    table-layout: fixed;
}

.newsletter-cell-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}