/* Stili per la gestione dei dropdown nel menu di navigazione */
.dropdown:hover > .dropdown-menu,
.dropdown:focus-within > .dropdown-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}
.dropdown-menu {
    display: none;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    margin-top: 0 !important;
    min-width: 100% !important;
    left: 0 !important;
}
.dropdown {
    position: relative;
}
.dropdown-menu {
    left: 0;
    top: 100%;
}
.dropdown-menu li {
    white-space: nowrap;
}
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        min-width: 100%;
    }
}
.dropdown > a {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.dropdown-menu .dropdown {
    position: relative;
}
.dropdown-menu .dropdown-menu {
    top: 0 !important;
    left: 100% !important;
    margin-left: 0 !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    min-width: 100% !important;
}
.dropdown-menu .dropdown:hover > .dropdown-menu,
.dropdown-menu .dropdown:focus-within > .dropdown-menu {
    display: block !important;
}

/* Palette aggiornata per un look più professionale ed elegante */
:root {
    --primary: #142035;         /* Navy Blue Scuro */
    --primary-dark: #0d1524;    /* Ancora più scuro */
    --secondary: #b22234;       /* Rosso elegante */
    --accent: #bfa76a;          /* Oro spento */
    --accent-dark: #8c7a4f;     /* Oro più scuro */
    --background: #e9ecf3;      /* Grigio/blu molto chiaro */
    --surface: #f7f8fa;         /* Bianco sporco */
    --text-main: #1a2233;
    --text-muted: #6b7280;
    --border: #d1d5db;
    --success: #227a5e;
    --warning: #bfa76a;
    --danger: #b00020;
}

body {
    background-color: var(--background);
    color: var(--text-main);
}

/* Header */
header {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
}

header img {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(20,32,53,0.08);
}

/* Navigation */
nav {
    background: linear-gradient(90deg, var(--surface) 60%, var(--background) 100%);
    border-bottom: 2px solid var(--accent);
}

nav .dropdown-menu {
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 4px 24px 0 rgba(20,32,53,0.08);
}

nav .dropdown > a,
nav .dropdown-menu a {
    color: var(--primary-dark);
    font-weight: 500;
}

nav .dropdown > a:hover,
nav .dropdown-menu a:hover {
    background: var(--accent);
    color: #fff !important;
}

nav .dropdown > a.active {
    color: var(--accent-dark);
}

/* Main Content */
main {
    background: var(--surface);
    border-radius: 1rem;
    box-shadow: 0 4px 32px 0 rgba(20,32,53,0.08);
    border: 1px solid var(--background);
}

/* Headings */
h1, h2, h3 {
    color: var(--primary-dark);
}

h1::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    /*background: var(--accent);*/
    border-radius: 2px;
    margin-top: 8px;
}
h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin-top: 8px;
}


/* Buttons */
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}
.btn-primary:hover {
    background: var(--accent-dark);
}
.btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent-dark);
    background: var(--surface);
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}
.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}
.accent-icon {
    color: var(--accent);
}

/* Footer: sfondo chiaro e testo scuro per leggibilità */
footer, .bg-\[\#03303c\], .bg-\[\#02232b\] {
    background: var(--surface) !important;
    color: var(--primary-dark) !important;
}

footer .font-serif,
footer .font-normal,
footer a,
footer .text-\[\#b2dbe6\],
footer .hover\:text-\[\#b2dbe6\] {
    color: var(--primary-dark) !important;
}

footer .font-serif {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: bold;
}

footer .font-normal {
    color: var(--secondary) !important;
}

footer .text-\[\#b2dbe6\] {
    color: var(--secondary) !important;
}

footer .font-bold,
footer .font-medium {
    color: var(--primary-dark) !important;
}

footer .hover\:underline:hover {
    color: var(--accent) !important;
}

footer .bg-\[\#02232b\] {
    background: var(--background) !important;
    color: var(--secondary) !important;
}