:root {
    --primary: #1b5e20; /* Verde Laguna */
    --accent: #ffd600;  /* Giallo Dati */
    --bg: #f4f7f6;
    --text: #333;
}

body { font-family: 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); margin: 0; position: relative; }

nav { background: var(--primary); padding: 1rem; display: flex; justify-content: center; gap: 20px; }

nav a { color: white; text-decoration: none; font-weight: bold; font-size: 0.9rem; text-transform: uppercase; }
nav a.nav-import-link { margin-left: 28px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,0.45); }
nav a:hover { 
    text-decoration: underline;
    background: rgba(255,255,255,0.15);
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.header-navbar-wrap {
    max-width: 1540px;
    margin: 20px auto 0 auto;
    border-radius: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}
.header-navbar-wrap header {
    margin: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: none;
    background: linear-gradient(to bottom, #e8f1f6 0%, #dce8f0 100%);
}
.header-navbar-wrap nav {
    border-radius: 0 0 22px 22px;
    margin: 0;
}

header { 
    padding: 15px 30px; 
    background: linear-gradient(to bottom, #e8f1f6 0%, #dce8f0 100%); 
    border-bottom: 2px solid #b3d9f2; 
    box-shadow: 0 2px 8px rgba(15, 76, 117, 0.08); 
    border-radius: 22px;
    margin: 0;
    max-width: 1540px;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 40px; 
}
header .logo { 
    width: 85px; 
    height: 85px; 
    flex-shrink: 0;
}
header .site-title { 
    text-align: left; 
    display: flex;
    align-items: center;
}
header h1 { 
    margin: 0; 
    color: var(--primary); 
    font-size: 4rem; 
    font-weight: 700; 
    letter-spacing: -0.5px; 
}
header h1 .brand-tight-gap {
    margin-left: 0.04em;
}
header .site-info {
    border-left: 3px solid #0f4c75;
    padding-left: 15px;
    margin-left: 35px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
header .subtitle { 
    color: #0f4c75; 
    margin: 0;
    font-size: 1.05rem; 
    font-weight: 400; 
}
header .author-info { 
    color: #0f4c75; 
    margin: 3px 0 0 0; 
    font-size: 0.95rem; 
    font-style: italic; 
}
header .author-info.archive-info {
    margin-top: 8px;
}
header .author-info time { 
    font-style: normal; 
    color: #0f4c75; 
}

.container { max-width: 1100px; margin: 20px auto; padding: 0 20px; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    border-top: 5px solid var(--primary);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0,0,0,0.15); }

.card-header { padding: 15px; background: #f9f9f9; font-weight: bold; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 10px; }

.card-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }

.card-footer { 
    padding: 8px 16px; 
    background: #2e5a27; 
    font-size: 0.85rem; 
    text-align: center; 
    color: white; 
    font-weight: 600; 
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 15px;
    display: inline-block;
    width: calc(100% - 30px);
    box-sizing: border-box;
    cursor: pointer;
}

.card:hover .card-footer { 
    background: #1f3d1a; 
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

h3 { margin-top: 0; font-size: 1.2rem; color: var(--primary); }
p { font-size: 0.9rem; line-height: 1.5; color: #555; }

/* Responsive Design */
@media (max-width: 1024px) {
    header {
        padding: 12px 25px;
        gap: 20px;
    }
    header .logo { width: 90px; height: 90px; }
    header h1 { font-size: 2rem; }
    header .subtitle { font-size: 0.9rem; }
    header .author-info { font-size: 0.8rem; }
    .container { max-width: 100%; padding: 0 15px; }
}

@media (max-width: 768px) {
    .header-navbar-wrap {
        margin-top: 14px;
        border-radius: 18px;
    }
    .header-navbar-wrap header { border-radius: 18px 18px 0 0; }
    .header-navbar-wrap nav { border-radius: 0 0 18px 18px; }
    header {
        flex-wrap: wrap;
        padding: 10px 14px;
        gap: 12px;
    }
    header .logo { width: 72px; height: 72px; }
    header .site-title { flex-basis: 100%; }
    header .site-info {
        flex-basis: 100%;
        border-left: none;
        border-top: 2px solid #ddd;
        padding-left: 0;
        padding-top: 10px;
        margin-top: 8px;
        text-align: left;
    }
    header h1 { font-size: 1.65rem; }
    header .subtitle { font-size: 0.86rem; line-height: 1.3; }
    header .author-info { font-size: 0.78rem; line-height: 1.3; }
    nav { padding: 8px 12px; gap: 8px 10px; flex-wrap: wrap; }
    nav a { font-size: 0.8rem; padding: 0.35rem 0.6rem; }
    nav a.nav-import-link { margin-left: 0; padding-left: 0.7rem; border-left: none; }
    .container { padding: 0 12px; margin: 15px auto; }
    .dashboard-grid { gap: 15px; }
}

@media (max-width: 480px) {
    .header-navbar-wrap {
        margin-top: 8px;
        border-radius: 16px;
    }
    .header-navbar-wrap header { border-radius: 16px 16px 0 0; }
    .header-navbar-wrap nav { border-radius: 0 0 16px 16px; }
    header {
        flex-direction: column;
        padding: 8px 10px;
        gap: 8px;
        text-align: center;
    }
    header .site-title { 
        text-align: center;
        flex-basis: 100%;
        justify-content: center;
    }
    header .site-info { 
        flex-basis: 100%;
        border-left: none;
        border-top: 2px solid #ddd;
        padding-left: 0;
        padding-top: 8px;
        margin-top: 6px;
        text-align: center;
    }
    header .logo { width: 58px; height: 58px; }
    header h1 { font-size: 1.28rem; }
    header .subtitle { font-size: 0.78rem; line-height: 1.25; }
    header .author-info { font-size: 0.7rem; line-height: 1.25; }
    nav { padding: 6px 8px; gap: 6px 8px; }
    nav a { font-size: 0.7rem; padding: 0.28rem 0.5rem; }
    nav a.nav-import-link { margin-left: 0; padding-left: 0.6rem; border-left: none; }
    .container { padding: 0 10px; margin: 15px auto; }
    .dashboard-grid { grid-template-columns: 1fr; gap: 12px; }
    .card { border-top: 4px solid var(--primary); }
    .card-footer { margin: 12px; width: calc(100% - 24px); }
    h3 { font-size: 1rem; }
    p { font-size: 0.85rem; }
}
