/* --- style.css CORRETTO --- */

/* 1. Header Personalizzato */
.custom-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-shadow: 0px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 0;
    padding: 3rem 1rem;
}

/* 2. Transizioni Fluide per Dark Mode */
body, .bg-dark, .bg-light, .card, .navbar, footer, .project-img {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 3. Layout Generale */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.main-content {
    flex-grow: 1;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* 4. Card e Immagini */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
}

.fakeimg {
    height: 200px;
    background: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 5px;
}

/* 5. Stili Specifici per Pagina Progetti */
.project-img {
    height: 200px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card {
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.tech-badge {
    font-size: 0.75rem;
    margin-right: 4px;
    margin-bottom: 6px;
    font-weight: 500;
}

/* 6. Footer */
footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 2rem 0;
    margin-top: auto;
}

/* Dark Mode Overrides */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .card {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode footer {
    background-color: #1e1e1e;
    border-color: #333;
    color: #adb5bd;
}

body.dark-mode .navbar-light {
    background-color: #1e1e1e !important;
}

body.dark-mode .navbar-light .navbar-brand,
body.dark-mode .navbar-light .nav-link {
    color: #e0e0e0;
}

body.dark-mode .navbar-light .nav-link.active {
    color: #fff !important;
    font-weight: bold;
}
