/* Stili generali */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrapper {
    flex: 1;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-weight: 600;
}

/* Card */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
    border: none;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,.125);
    padding: 1rem;
}

.card-title {
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

/* Tabelle */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Bottoni */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    margin: 0 0.25rem;
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Stili per i breadcrumb */
.breadcrumb {
    background: rgba(0, 33, 65, 0.7) !important;
    padding: 0.75rem 1rem;
    margin: 0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.breadcrumb-item {
    font-size: 0.9rem;
    color: white !important;
}

.breadcrumb-item a {
    color: white !important;
    transition: color 0.2s, opacity 0.2s;
    opacity: 0.9;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: white !important;
    opacity: 1;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: white !important;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›" !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 1.2rem;
    line-height: 1;
    vertical-align: middle;
}

.breadcrumb-item i {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-right: 0.25rem;
    color: white !important;
}

.breadcrumb-item a i {
    color: white !important;
}

.breadcrumb-item a:hover i {
    color: white !important;
}

/* Stili per il tema scuro - disabilitati per mantenere sempre il tema chiaro */
/* [data-theme="dark"] .breadcrumb {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .breadcrumb-item {
    color: #adb5bd;
}

[data-theme="dark"] .breadcrumb-item a {
    color: #6ea8fe;
}

[data-theme="dark"] .breadcrumb-item a:hover {
    color: #8bb9fe;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: #e9ecef;
}

[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
} */ 

/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background: 
        url('../images/sfondo.jpg'),
        #f8f9fa;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

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

/* Header Styles */
.header {
    background: #002141;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15), 0 2px 6px rgba(0,0,0,0.1);
    border-bottom: 1px solid #ffd700;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section a:hover {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.logo {
    height: 60px;
    width: auto;
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0;
    color: white;
}

.logo-text span {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
    color: white;
}

.department-title {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.department-content {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
}

.department-logo {
    height: 60px;
    width: auto;
}

.header-user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.user-name-display {
    font-size: 0.9rem;
    color: white;
    font-weight: 500;
}

.user-name-display i {
    margin-right: 0.3rem;
    color: #ffd700;
}

.btn-logout-header {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-logout-header:hover {
    background: #c82333;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}



/* Navigation */
.main-nav {
    background: white;
    border-bottom: 3px solid #3498db;
    padding: 1rem 0;
}

.nav-brand h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.nav-brand span {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 400;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

/* Hero Section */
.hero-section {
    padding: 2rem 0;
    margin-bottom: 0.5rem;
}

.hero-content {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 2rem 3rem;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.hero-content h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #002141;
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 0;
    font-weight: 600;
    color: rgb(0, 27, 124);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 400;
}

.feature i {
    font-size: 1.2rem;
}

/* Services Section */
.services-section {
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.services-section h2 {
    text-align: center;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-weight: 600;
}

.services-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    align-items: start;
}

.service-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.card-header i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.card-content {
    padding: 2rem;
}

.card-content h4 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.card-content p {
    color: #5a6c7d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.feature-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #5a6c7d;
}

.feature-list i {
    color: #00b894;
    font-size: 0.9rem;
}

.card-footer {
    padding: 0 2rem 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(29,78,216,0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #3730a3 0%, #4338ca 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #5b21b6 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67,56,202,0.3);
}

/* EDO Info Text (without box) */
.edo-info-text {
    background: rgba(255, 255, 255, 0.3);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* EDO Info Section */
.edo-info-section {
    background: rgba(255, 255, 255, 0.3);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    backdrop-filter: blur(5px);
    text-align: center;
}

/* Info Section */
.info-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

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

.info-card {
    text-align: center;
    padding: 1.5rem;
}

.info-card i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.info-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.info-card p {
    color: #5a6c7d;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #3498db;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #34495e;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #3498db;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 991px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .logo-section {
        justify-content: center;
    }

    .department-title {
        text-align: center;
        width: 100%;
    }

    .department-content {
        justify-content: center;
        flex-wrap: wrap;
    }

    .department-logo {
        height: 50px;
    }

    .logo {
        height: 50px;
    }

    .logo-text h1 {
        font-size: 1.5rem;
    }

    .header-user-section {
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-section {
        padding: 1.5rem 0;
    }

    .hero-content {
        padding: 1.5rem 2rem;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-section {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .card-content {
        padding: 1.5rem;
    }

    .info-section {
        padding: 1.5rem;
    }
}

/* Animazioni */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card {
    animation: fadeInUp 0.6s ease-out;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Focus styles per accessibilità */
.btn:focus,
a:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Cookie Banner */
#cookieBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 9999;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.cookie-text p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

.cookie-text a {
    color: #3498db;
    text-decoration: underline;
}

.cookie-text a:hover {
    color: #5dade2;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: #27ae60;
    color: white;
}

.cookie-btn-accept:hover {
    background: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46,204,113,0.4);
}

.cookie-btn-reject {
    background: #e74c3c;
    color: white;
}

.cookie-btn-reject:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231,76,60,0.4);
}

.cookie-btn-settings {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cookie-btn-settings:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Cookie Settings Modal */
#cookieSettingsModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 1rem;
}

.cookie-modal-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.cookie-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #7f8c8d;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cookie-category-header h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-category-description {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
}

.cookie-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #27ae60;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: #3498db;
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-modal-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #ecf0f1;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Responsive Cookie Banner */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-text {
        min-width: auto;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 90vh;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .btn,
    #cookieBanner,
    #cookieSettingsModal {
        display: none;
    }

    .main-content {
        padding: 0;
    }

    .service-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
