* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 2vh;
    overflow: auto;
}

.container {
    max-width: 95vw;
    margin: 0 auto;
    padding: 2vh 2vw;
    height: 96vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 3vh;
    flex-shrink: 0;
}

.header h1 {
    color: #003B7A;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    margin-bottom: 1vh;
    letter-spacing: -0.02em;
}

.header p {
    color: #666;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3vh 3vw;
    flex-grow: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 2vh;
    padding: 3.6vh 2.7vw;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0.5vh 2vh rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 31.5vh;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.5vh;
    background: #003B7A;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-0.5vh);
    box-shadow: 0 1vh 3vh rgba(0, 59, 122, 0.15);
    border-color: #003B7A;
}

.dashboard-card:hover::before {
    transform: scaleX(1);
}

.dashboard-card:hover .card-icon {
    background: #0056b3;
    transform: scale(1.05);
}

/* Weather Card Specific Styles */
.weather-card {
    padding: 0;
    background: #102c53;
    border-color: #102c53;
    overflow: hidden;
    position: relative;
    display: block;
    min-height: 31.5vh;
}

.weather-widget-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-card .weatherwidget-io {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.weather-card .weatherwidget-io iframe {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border: 0 !important;
    display: block !important;
}

.weather-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 10;
    cursor: default;
    display: block;
}

.weather-card:hover {
    border-color: #0056b3;
}

.card-icon {
    width: 9vh;
    height: 9vh;
    background: #003B7A;
    border-radius: 1vh;
    margin-bottom: 3vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.card-icon img {
    width: 4.5vh;
    height: 4.5vh;
    filter: brightness(0) invert(1);
}

.card-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 500;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2vh;
    letter-spacing: -0.01em;
}

.card-description {
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: #6c757d;
    text-align: center;
    line-height: 1.5;
    max-width: 90%;
}

.placeholder-icon {
    width: 4.5vh;
    height: 4.5vh;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0.5vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 3vh, 2rem);
    color: #003B7A;
    font-weight: bold;
}

/* Living Lab Logo */
.living-lab-logo {
    width: 100%;
    height: auto;
    max-height: 8vh;
    display: block;
    margin-bottom: 2vh;
    object-fit: contain;
}

/* Politecnico di Milano logo */
.polimi-logo {
    position: fixed;
    bottom: 2vh;
    right: 2vw;
    width: 12vw;
    max-width: 150px;
    min-width: 80px;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.polimi-logo:hover {
    opacity: 1;
}

.polimi-logo img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0.5vh 1vh rgba(0, 0, 0, 0.1));
}

/* Loading animation */
.dashboard-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(2vh);
}

.dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile/Small screen adjustments */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 2vh;
    }
    
    .dashboard-card {
        min-height: 18vh;
        padding: 2.7vh 3.6vw;
    }
    
    .polimi-logo {
        width: 15vw;
        bottom: 1vh;
        right: 2vw;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    body {
        padding: 1vh;
    }
    
    .container {
        padding: 1vh 2vw;
    }
    
    .header {
        margin-bottom: 2vh;
    }
    
    .dashboard-card {
        padding: 1.8vh 2.7vw;
        min-height: 16.2vh;
    }
    
    .card-icon {
        width: 7.2vh;
        height: 7.2vh;
        margin-bottom: 2vh;
    }
    
    .card-icon img {
        width: 3.6vh;
        height: 3.6vh;
    }
    
    .placeholder-icon {
        width: 3.6vh;
        height: 3.6vh;
    }
} 