/* Stili di base */
body {
    font-family: Arial, sans-serif;
    color: #333333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styles */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background-color: #fff;
    line-height: 1.5;
    overscroll-behavior: none; /* Disable scroll bounce/rubber band effect */
}

/* Header container */
header {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #198754;
    z-index: 100;
}

/* Header image */
.header-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

/* Header overlay */
.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 2rem 2rem 20%;
    z-index: 2;
    pointer-events: none; /* Allow clicks to pass through the overlay */
    background: rgba(0, 0, 0, 0.3);
}

/* Allow pointer events on button inside header overlay */
.header-overlay .header-button {
    pointer-events: auto;
}

/* Navigation bar */
nav.navbar {
    position: relative;
    z-index: 1000; /* Higher than header overlay */
}

/* Ensure navigation links are clickable */
.navbar-nav .nav-link {
    position: relative;
    z-index: 1001;
    display: flex;
    align-items: center;
}

/* Style for shopping cart icon */
.navbar .bi-cart {
    color: white !important;
    font-size: 1.25rem;
    margin-right: 0.25rem;
    display: inline-flex;
    align-items: center;
}

/* Align navigation items */
.navbar-nav {
    align-items: center;
}

/* Vertical alignment for nav items */
.nav-item {
    display: flex;
    align-items: center;
}

/* Remove focus outline from dropdown toggles */
.navbar .nav-link:focus,
.navbar .dropdown-toggle:focus,
.navbar .dropdown-toggle:active,
.navbar .dropdown-toggle:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.header-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
}

.header-slogan {
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header-subslogan {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header-button {
    background-color: #198754;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    transition: background-color 0.3s;
    width: fit-content;
}

.header-button:hover {
    background-color: #146c43;
    color: white;
    text-decoration: none;
}

.header-text {
    color: #ffffff;
}

/* Footer */
.footer {
    background-color: #198754;
    color: white;
    padding: 20px 0;
    flex-shrink: 0;
}

/* Menu */
.nav-link {
    color: #ffffff !important;
}

.nav-link:hover {
    color: #f0f0f0 !important;
}

/* Navbar */
.navbar {
    background-color: #198754;
    transition: all 0.3s ease;
    width: 100%;
}

.navbar-fixed-top {
    position: fixed !important;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Smooth transition for navbar */
.navbar {
    transition: all 0.3s ease;
}

.navbar .container {
    width: 74%;
    max-width: none;
}

.navbar-nav {
    margin-left: auto;
    margin-right: auto;
}

.navbar-nav .nav-link {
            text-transform: uppercase;
        }

/* Pulsanti */
.btn-primary {
    background-color: #198754;
    border-color: #198754;
}

.btn-primary:hover {
    background-color: #146c43;
    border-color: #146c43;
}

/* Paginazione - Override Bootstrap */
.pagination .page-link {
    color: #198754 !important;
    border-color: #dee2e6 !important;
}

.pagination .page-link:hover {
    color: #146c43 !important;
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
}

.pagination .page-link:focus {
    color: #146c43 !important;
    background-color: #e9ecef !important;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25) !important;
}

.pagination .page-item.active .page-link {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #ffffff !important;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d !important;
    background-color: #fff !important;
    border-color: #dee2e6 !important;
}

/* Link */
a {
    color: #333333;
}

a:hover {
    color: #0056b3;
}

/* Layout */
main {
    flex: 1 0 auto;
}

.content-wrapper {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.activation-link-alert {
    background: #f1f9ff;
    border: 1px solid #b6d8ff;
    color: #0f365d;
}

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

.activation-link-label {
    font-size: 0.95rem;
}

.activation-link-hint {
    font-size: 0.85rem;
    color: #0f365d;
}

.activation-link-body {
    margin-top: 0.75rem;
    background: #fff;
    border-radius: 6px;
    padding: 0.75rem;
    border: 1px solid #d9e8ff;
    overflow-x: auto;
}

.activation-link-text {
    display: block;
    width: 100%;
    font-size: 0.85rem;
    word-break: break-all;
    white-space: normal;
    color: #0f365d;
}

.copy-link-btn {
    white-space: nowrap;
}

.registration-course-alert {
    background-color: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #0f5132;
}

/* Stili personalizzati per migliorare l'aspetto con Bootstrap */
.container {
    max-width: 1500px;
}

.form-control-color {
    width: 100%;
    height: 38px;
}

textarea.form-control {
    min-height: 100px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

.text-end {
    text-align: right !important;
}

.category-name {
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
}

.category-name:hover,
.category-name:visited,
.category-name:active {
    color: #000;
    text-decoration: none;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Classi per le immagini degli eventi */
.event-img {
    object-fit: contain !important;
    height: 250px;
}

.event-detail-img {
    object-fit: contain !important;
    height: 400px;
}

.text-muted {
    color: rgba(30, 29, 29, 0.537) !important;
}

/* Cookie policy */
.cookie-policy {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.cookie-policy-title {
    color: #009c02;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.cookie-policy-subtitle {
    text-align: center;
    margin-bottom: 30px;
}

.cookie-section {
    margin-bottom: 24px;
}

.cookie-section h3 {
    color: #009c02;
    margin-bottom: 12px;
}

.cookie-section p,
.cookie-section li {
    text-align: justify;
}

.cookie-section ul,
.cookie-section ol {
    margin-left: 20px;
}

.cookie-highlight-box {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    margin-top: 12px;
}

.cookie-contact {
    font-weight: 600;
    color: #009c02;
}

.legal-document {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.legal-document-title {
    color: #009c02;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.legal-section {
    margin-bottom: 24px;
}

.legal-section h3,
.legal-section h4 {
    color: #009c02;
    margin-bottom: 12px;
}

.legal-section p,
.legal-section li {
    text-align: justify;
}

.legal-section ul,
.legal-section ol {
    margin-left: 20px;
}

.legal-contact {
    font-weight: 600;
    color: #009c02;
}

/* Classi per immagini */
.img-max-width-200 {
    max-width: 200px;
}

/* Stili per la sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    background-color: #000000; 
    color: #ffffff; 
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #ffffff; 
}

.sidebar .nav-link:hover {
    color: #007bff; 
}

.sidebar-icon {
    margin-right: 4px;
    color: #ffffff; 
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: .5rem 1rem;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.1); 
}

/* Adatta il contenuto principale quando la sidebar è presente */
@media (min-width: 768px) {
    .main-content {
        margin-left: 16.66667%; 
    }
}

/* Classi per la pagina contattaci */
.contact-icon {
    color: #28a745;
}

.contact-card {
    transition: transform 0.2s;
    border: none;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.contact-card:hover {
    transform: translateY(-5px);
}

/* Classi per il catalogo corsi */
.date-badge {
    width: 70px;
    height: 90px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    margin-bottom: 5px;
    border-radius: 8px;
    padding: 5px;
}

.date-badge .day {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.date-badge .month {
    font-size: 14px;
    text-transform: uppercase;
    margin: 2px 0;
}

.date-badge .status {
    font-size: 10px;
    text-align: center;
    line-height: 1;
}

.category-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.category-placeholder {
    width: 40px;
    height: 40px;
}

.course-img-top {
    height: 200px;
    object-fit: cover;
}

.course-img-placeholder {
    height: 200px;
}

.date-badge-container {
    z-index: 2;
}

.date-badge-small {
    min-width: 60px; 
    background-color: #e8f5e9; 
    color: #000;
}

/* Stili per i form dell'amministrazione */
.admin-form .form-control {
    margin-bottom: 1rem;
}

.admin-form label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.admin-form .form-select {
    max-width: 200px;
}

.admin-form .form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #6c757d;
}

.admin-form .input-group-text {
    min-width: 80px;
}

/* Stili per i campi di input con validazione */
.admin-form input:required + .invalid-feedback,
.admin-form select:required + .invalid-feedback,
.admin-form textarea:required + .invalid-feedback {
    display: block;
    color: #dc3545;
    margin-top: 0.25rem;
    font-size: 0.875em;
}

/* Stili per i pulsanti */
.admin-form .btn {
    margin-right: 0.5rem;
    margin-top: 1rem;
}

/* Stili per i campi di testo */
.admin-form textarea {
    min-height: 100px;
}

/* Stili per il form di modifica del codice corso */
.ore-input-group {
    max-width: 200px;
}

.scadenza-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scadenza-select {
    max-width: 200px;
}

.scadenza-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scadenza-input {
    width: 100px;
}

/* Stile per il campo di input della scadenza */
.scadenza-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scadenza-field[data-visible="false"] {
    display: none !important;
}

/* Stili per i campi di input e select */
.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.admin-form input[type="text"]:focus,
.admin-form input[type="number"]:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Stili per i menu a tendina */
.admin-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23343a40' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.25rem;
}

/* Stili per i campi obbligatori */
.admin-form .required-field::after {
    content: " *";
    color: #dc3545;
}

/* Stili per i messaggi di errore */
.admin-form .error-message {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
}

/* Classi per dettaglio corso */
.course-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.course-date-badge {
    min-width: 80px; 
    text-align: center; 
    background-color: #e8f5e9; 
    color: #000;
}

.course-date-day {
    font-size: 2rem; 
    font-weight: bold;
}

.course-date-month {
    font-size: 0.9rem; 
    text-transform: uppercase;
}

.course-date-tbd-day {
    font-size: 1.5rem; 
    font-weight: bold;
}

.course-status-badge {
    font-size: 0.9rem; 
    background-color: #e8f5e9;
}

.course-type-badge {
    background-color: #e8f5e9; 
    color: #000;
}

.course-type-text {
    font-size: 1rem;
}

.course-price-box {
    background-color: #e8f5e9; 
    border-radius: 4px;
}

.quantity-input-small {
    width: 80px;
}

/* Classi per carrello */
.cart-quantity-input {
    width: 80px;
}

/* Classi per template amministrazione */
.admin-btn {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.admin-action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* Badge personalizzato per il numero di corsi nelle categorie */
.badge-green {
    background-color: #198754 !important;
    color: white !important;
}

/* Stile per il menu di sinistra nella pagina selfcare */
.selfcare-menu .list-group-item.active,
.selfcare-menu .list-group-item.active:hover,
.selfcare-menu .list-group-item.active:focus {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: white !important;
    z-index: 2 !important;
}

.selfcare-menu .list-group-item-action:hover, 
.selfcare-menu .list-group-item-action:focus {
    background-color: rgba(25, 135, 84, 0.1) !important;
    color: #333333 !important;
}

/* Rimuovi il checkmark dai link visitati nel menu dropdown */
.mega-menu-item:visited::after,
.mega-menu-item:visited::before,
.dropdown-item:visited::after,
.dropdown-item:visited::before,
.dropdown-menu a:visited::after,
.dropdown-menu a:visited::before,
.mega-menu-item::after,
.mega-menu-item::before,
.dropdown-item::after,
.dropdown-item::before,
.dropdown-menu a::after,
.dropdown-menu a::before {
    content: none !important;
    display: none !important;
}

.mega-menu-item:visited,
.dropdown-item:visited,
.dropdown-menu a:visited,
.mega-menu-item,
.dropdown-item,
.dropdown-menu a {
    background-image: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
}

/* Forza la rimozione dei checkmark su tutti gli elementi del menu */
.dropdown-menu li,
.dropdown-menu a,
.mega-menu-item {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
}

/* Assicurati che non ci siano altri elementi che possano mostrare checkmark */
.mega-menu-item,
.dropdown-item,
.dropdown-menu a {
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Blocco statistiche */
.stats-block {
    background-color: #198754;
    color: white;
}

/* Link chiaro sottolineato per blocchi informativi */
.link-light-underline {
    color: #fff !important;
    text-decoration: underline;
}

/* Link nero sottolineato per blocchi informativi */
.link-dark-underline {
    color: #111 !important;
    text-decoration: underline;
}

/* Colonna verde per blocco donazione */
.green-block {
    background-color: #198754;
    color: #fff;
    border-radius: 10px;
    padding: 2rem 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.green-block a,
.green-block .donation-note {
    color: #fff !important;
}

/* Centra contenuti orizzontalmente e verticalmente */
.center-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Testo piccolo per note donazione */
.donation-note {
    font-size: 0.95em;
}

.stats-block .display-4 {
    font-weight: bold;
}

.stats-block .text-uppercase {
    font-size: 1rem;
}

/* === INIZIO MODIFICA REVERSIBILE: Black & White badges/corsisti_plugin SOLO admin_corsisti_standard === */
.corsisti-admin-wrapper .badge.bg-success,
.corsisti-admin-wrapper .badge.bg-warning,
.corsisti-admin-wrapper .badge.bg-info,
.corsisti-admin-wrapper .badge.bg-primary,
.corsisti-admin-wrapper .badge.border-success,
.corsisti-admin-wrapper .badge.border-info,
.corsisti-admin-wrapper .badge.border-warning,
.corsisti-admin-wrapper .badge.border-primary,
.corsisti-admin-wrapper .badge.text-success,
.corsisti-admin-wrapper .badge.text-info,
.corsisti-admin-wrapper .badge.text-warning,
.corsisti-admin-wrapper .badge.text-primary {
    background: #fff !important;
    color: #222 !important;
    border: 1px solid #222 !important;
    box-shadow: none !important;
}

.corsisti-admin-wrapper .badge.bw-badge {
    background: #fff !important;
    color: #222 !important;
    border: 1.5px solid #222 !important;
    border-radius: 0.35rem !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

.corsisti-admin-wrapper .card i.fas, .corsisti-admin-wrapper .card i.far, .corsisti-admin-wrapper .card i.fa, .corsisti-admin-wrapper .fa, .corsisti-admin-wrapper .fas, .corsisti-admin-wrapper .far {
    color: #222 !important;
    filter: grayscale(100%) !important;
}

.corsisti-admin-wrapper .card-header.bg-success,
.corsisti-admin-wrapper .card-header.bg-warning,
.corsisti-admin-wrapper .card-header.bg-info,
.corsisti-admin-wrapper .card-header.bg-primary {
    background: #fff !important;
    color: #222 !important;
    border-bottom: 1px solid #222 !important;
}

.corsisti-admin-wrapper .btn.bg-success,
.corsisti-admin-wrapper .btn.bg-warning,
.corsisti-admin-wrapper .btn.bg-info,
.corsisti-admin-wrapper .btn.bg-primary,
.corsisti-admin-wrapper .btn.btn-success,
.corsisti-admin-wrapper .btn.btn-warning,
.corsisti-admin-wrapper .btn.btn-info,
.corsisti-admin-wrapper .btn.btn-primary {
    background: #fff !important;
    color: #222 !important;
    border: 1.5px solid #222 !important;
    box-shadow: none !important;
}
/* === FINE MODIFICA REVERSIBILE: Black & White badges/corsisti_plugin SOLO admin_corsisti_standard === */


/* === INIZIO MODIFICA REVERSIBILE: Black & White filter bar SOLO admin_corsisti_standard === */
.corsisti-admin-wrapper .btn-group .btn.btn-outline-primary,
.corsisti-admin-wrapper .btn-group .btn.btn-outline-primary:focus,
.corsisti-admin-wrapper .btn-group .btn.btn-outline-primary:active,
.corsisti-admin-wrapper .btn-group .btn.btn-outline-primary.active,
.corsisti-admin-wrapper .btn-group .btn.btn-outline-primary:visited {
    background: #fff !important;
    color: #222 !important;
    border: 1.5px solid #222 !important;
    box-shadow: none !important;
}
.corsisti-admin-wrapper .btn-group .btn.btn-outline-primary:hover {
    background: #eee !important;
    color: #000 !important;
    border: 1.5px solid #222 !important;
}
.corsisti-admin-wrapper .btn-group .btn-check:checked + .btn.btn-outline-primary,
.corsisti-admin-wrapper .btn-group .btn.btn-outline-primary.active {
    background: #222 !important;
    color: #fff !important;
    border: 1.5px solid #222 !important;
}
/* === FINE MODIFICA REVERSIBILE: Black & White filter bar SOLO admin_corsisti_standard === */

/* === INIZIO STILI PLUGIN ATTESTATI === */
.word-icon {
    color: #2951A3;
}
/* === FINE STILI PLUGIN ATTESTATI === */