/* Variabili Colori e Font */
:root {
    --primary-color: #0056a6; /* Blu Unipa/Istituzionale */
    --secondary-color: #cf142b; /* Rosso accento (opzionale) */
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --card-bg: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

body {
    font-family: 'Segoe UI', Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    min-height: 100Vh;
    display: flex;
    flex-direction: column;
}

/* --- Header e Brand --- */
header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 0.5rem 0;
    margin-bottom: 1rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    /* border-bottom: 1px solid #eaeaea; */
    margin-bottom: 0.5rem;
}

/* Gestione Loghi Responsive */
.brand-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    justify-content: space-between;
}

.logo-img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.brand-text {
    text-align: center;
    flex-grow: 1;
}

.site-title {
    font-weight: 700;
    font-size: 1.8rem;
    color: #0056ae;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.sub-title {
    color: #0056ae;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Navbar Bootstrap Customization --- */
.navbar-custom {
    background-color: #0056ae;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--card-bg) !important;
}

.navbar-custom .nav-link {
    color: #fff !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.2s, background-color 0.2s;
    border-radius: 5px;
}

/* .navbar-custom .nav-link:hover, 
.navbar-custom {
    color: var(--primary-color);
    background-color: #fff;
} */

.nav-link.active{
    color: var(--primary-color);
    background-color: #013e89;
}

/* --- Hero & Cards --- */
.hero-section {
    margin-bottom: 2rem;
}

.custom-card {
    background: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    transition: transform 0.2s ease;
}

.custom-card h3 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--secondary-color);
    padding-left: 1rem;
}

/* --- Accordion Styling --- */
.accordion-item {
    border: none;
    border-radius: var(--radius) !important;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    overflow: hidden;
}

.accordion-button {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    background-color: #fff;
    padding: 1.25rem;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: #eef6ff;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,.125);
}

.accordion-body {
    background-color: #fff;
    padding: 1.5rem 2rem;
}

/* Liste dentro l'accordion */
.accordion-body ul {
    list-style: none;
    padding-left: 0;
}

.accordion-body ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.accordion-body ul li::before {
    content: "•";
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2em;
    line-height: 1;
}

/* Sottotitoli nelle liste */
.list-category {
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* --- Footer --- */
footer {
    margin-top: auto;
    padding: 2rem 0;
    background-color: var(--primary-color);
    color: #ccc;
    font-size: 0.9rem;
}

footer strong {
    color: #fff;
    display: block;
    margin-bottom: 0.5rem;
}

footer a {
    color: #fff;
    text-decoration: underline;
    opacity: 0.8;
}

footer a:hover {
    opacity: 1;
}

/* --- Media Queries --- */
@media (max-width: 992px) {
    .site-title { font-size: 1.4rem; }
    .logo-img { height: 50px; }
}

@media (max-width: 768px) {
    .brand-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .site-title { font-size: 1.5rem; }
    
    .header-top {
        border-bottom: none;
    }
    
    /* Su mobile il menu diventa standard bootstrap collapsed */
    .navbar-custom {
        padding: 0.5rem;
    }
}