/* ========================================
   GERIATRIKO 2025 - STYLE.CSS OTTIMIZZATO
   Stili specifici non coperti dai moduli CSS
   ======================================== */

/* Override Bootstrap container - specifico per questo progetto */
.container,
.container-fluid,
.container-lg,
.container-md,
.container-sm,
.container-xl,
.container-xxl {
    width: 99% !important;
    max-width: 99% !important;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

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

.navbar-brand img {
    max-height: 50px;
}

/* Footer specifico */
.footer {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive Adjustments per navbar */
@media (max-width: 768px) {
    .navbar-brand img {
        max-height: 40px;
    }
}

/* ========================================
   NAVIGATION STYLES
   ======================================== */

/* Primary Navigation Bar (nav-bar.php) */
.navbar .btn-primary:hover {
    background-color: #4d004d !important;
    border-color: #4d004d !important;
}

.navbar .btn[style*="ff8200"]:hover {
    background-color: #cc6800 !important;
}

.navbar .btn[style*="00bfbf"]:hover {
    background-color: #009999 !important;
}

.navbar .btn {
    transition: all 0.3s ease;
}

/* Secondary Navigation Bar (nav-bar-2.php) */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
    white-space: nowrap;
    background-color: transparent !important;
    border-radius: 0.25rem;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.25rem;
}

/* Fix per pulsanti attivi navbar-2 */
.navbar-dark .navbar-nav .nav-link.active.fw-bold {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 0.25rem !important;
    font-weight: bold !important;
    position: relative;
}

.navbar-dark .navbar-nav .nav-link.active.fw-bold::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 80%;
    height: 2px;
    background-color: #ffffff;
    transform: translateX(-50%);
}
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.navbar-dark .navbar-toggler {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-toggler:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Navigation */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .nav-link {
        padding: 0.5rem 1rem !important;
        border-radius: 0.25rem;
    }
    
    .navbar-collapse {
        margin-top: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand img {
        height: 30px;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .btn i {
        margin-right: 0 !important;
    }
    
    .btn span {
        display: none;
    }
}

/* Mobile layout specifico per schermi sotto 480px */
@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
        align-items: center;
        padding: 0.5rem 0;
    }
    
    .navbar .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0 1rem;
    }
    
    .navbar-brand {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .navbar .d-flex {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
    }
    
    .navbar .d-flex .btn {
        flex: 1;
        text-align: center;
        font-size: 0.8rem;
        padding: 0.5rem 0.25rem;
    }
    
    .navbar .d-flex .btn i {
        margin-right: 0.25rem;
    }
    
    .navbar .d-flex .btn span {
        display: inline;
        font-size: 0.75rem;
    }
    
    /* Dropdown specifico per mobile */
    .navbar .dropdown .btn {
        flex: none;
        width: auto;
        min-width: 120px;
    }
}

/* ========================================
   SEARCH SYSTEM STYLES
   ======================================== */

/* Form di ricerca */
.search-form {
    border-radius: 15px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.search-form:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.search-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.search-form .form-select,
.search-form .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.search-form .form-select:focus,
.search-form .form-control:focus {
    border-color: #5a0059;
    box-shadow: 0 0 0 0.2rem rgba(90, 0, 89, 0.25);
}

.search-form .btn-primary {
    background: linear-gradient(135deg, #5a0059 0%, #ff8200 100%);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(90, 0, 89, 0.3);
}

/* Cards risultati */
.result-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15) !important;
}

.result-card .card-img-top {
    border-radius: 15px 15px 0 0;
}

.result-card .card-body {
    padding: 1.5rem;
}

.result-card .card-title a {
    color: #5a0059;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.result-card .card-title a:hover {
    color: #ff8200;
}

/* Badge personalizzati */
.badge-featured {
    background: linear-gradient(135deg, #5a0059 0%, #ff8200 100%);
    color: white;
    font-weight: 600;
}

.badge-tipologia {
    background-color: #6c757d;
    color: white;
}

/* Paginazione personalizzata */
.pagination .page-link {
    color: #5a0059;
    border-color: #dee2e6;
    border-radius: 8px;
    margin: 0 2px;
    font-weight: 500;
}

.pagination .page-link:hover {
    color: #ff8200;
    background-color: #f8f9fa;
    border-color: #ff8200;
}

.pagination .page-item.active .page-link {
    background-color: #5a0059 !important;
    border-color: #5a0059 !important;
    color: white !important;
}

/* Filtri attivi */
.active-filters {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.filter-tag {
    background-color: #5a0059;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    display: inline-block;
}

/* Loading state */
.loading-province {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive per search */
@media (max-width: 768px) {
    .search-form {
        border-radius: 10px;
    }
    
    .result-card {
        border-radius: 10px;
    }
    
    .result-card .card-body {
        padding: 1rem;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Stati hover per migliorare UX */
.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Icone colorate */
.text-primary-custom {
    color: #5a0059 !important;
}

.text-secondary-custom {
    color: #ff8200 !important;
}

/* Miglioramenti accessibilità */
.form-select:focus,
.form-control:focus {
    outline: none;
}

.btn:focus {
    outline: 2px solid #5a0059;
    outline-offset: 2px;
}

/* Stili per il messaggio "nessun risultato" */
.no-results {
    color: #6c757d;
    font-size: 1.1rem;
}

.no-results .display-1 {
    opacity: 0.3;
}

/* Miglioramenti per le info struttura */
.structure-info {
    font-size: 0.9rem;
    color: #6c757d;
}

.structure-info i {
    width: 16px;
    text-align: center;
}

/* Badge per posti letto disponibili */
.beds-available {
    color: #198754;
    font-weight: 600;
}

.beds-total {
    color: #6c757d;
}