/* Eambiente - Home Page Custom Style */

body {
    background-color: rgb(18, 18, 18);
    color: #e0e0e0;
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Navbar Top Right */
.top-nav {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 2rem;
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    z-index: 10;
}

.top-nav .btn-profile {
    color: #fff;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    transition: all 0.3s ease;
}

.top-nav .btn-profile:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

/* Central Block */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem 4rem;
}

.logo-container {
    margin-bottom: 8rem;
    text-align: center;
}

.logo-main {
    max-width: 165px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.5));
}

.dropdown-toggle::after {
    margin-left: 1.5em;
}

/* Navigation Cards Grid */
.nav-cards-grid {
    display: grid;
    /* Adatta la griglia per accogliere quadrati più grandi */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 8rem;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-card {
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    /* Rendi le card perfettamente quadrate */
    aspect-ratio: 1 / 1;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.807); 
    text-decoration: none;
    display: block;
}

.nav-card:hover {
    transform: translateY(-4px); /* Semplice elevazione stile material/Thingsboard */
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    background-color: white;
    z-index: 2;
    text-decoration: none;
}

/* Gradient overlay to make text readable */
.nav-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0; /* Testo nascosto di default */
    transition: opacity 0.3s ease;
}

.nav-card:hover .nav-card-overlay {
    opacity: 1; /* Appare la scritta all'hover */
}

.nav-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.nav-card:hover .nav-card-bg {
    opacity: 0.5;
}

.nav-card-title {
    font-family: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
    color: #222222;
    font-size: 2.3rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

/* Footer */
footer {
    text-align: right;
    padding: 1.5rem 3rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

footer strong {
    color: rgba(255, 255, 255, 0.7);
}
