/**
 * PAMatch - CSS personalizzato
 */

/* Header Bootstrap Italia */
/* NOTA: Non sovrascrivere position - Bootstrap Italia gestisce sticky header automaticamente */
/*.it-header-wrapper {
    position: relative;
}*/

/* Main content adjustment */
main {
    padding-top: 0;
}

/* Breadcrumb Bootstrap Italia - Stili personalizzati */
.breadcrumb-container {
    background-color: #f8f9fa;
    padding: 1rem 0;
    margin-bottom: 0;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb-container .breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

/* Enhanced card hover effects */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Dashboard statistics cards */
.stats-card {
    border: none;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

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

/* Profile status chip */
.chip.chip-simple {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.chip.chip-simple .chip-label {
    color: white;
    font-weight: 500;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .stats-card .card-body {
        padding: 1rem;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column !important;
    }
}

/* Accessibility enhancements */
.nav-link:focus,
.btn:focus,
.dropdown-toggle:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Loading state for dynamic content */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Improved icon alignment */
.icon + span {
    vertical-align: middle;
}

/* Dashboard welcome section */
.bg-primary {
    background: linear-gradient(135deg, #0066cc 0%, #004d99 100%) !important;
}

/* Navigation active states */
.nav-link[aria-current="page"] {
    font-weight: 600;
    color: #0066cc !important;
    background-color: rgba(0, 102, 204, 0.1);
    border-radius: 4px;
}

/* Dropdown improvements */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0066cc;
}

/* PA Match Logo Styling */
.it-brand-wrapper img.icon,
.it-footer img.icon {
    filter: brightness(0) invert(1); /* Rende il logo bianco in header e footer scuri */
}

.lightgrey-bg-a1 img {
    filter: none; /* Logo normale nel megamenu */
}

.etichetta img.icon {
    filter: brightness(0); /* Logo nero nelle etichette */
}

/* Animazioni Dashboard */

/* Progress Ring per Match */
.progress-ring {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.progress-circle {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(
        #28a745 0deg calc(var(--percentage) * 3.6deg),
        #e9ecef calc(var(--percentage) * 3.6deg) 360deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-circle::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
}

.progress-text {
    position: relative;
    z-index: 1;
    font-weight: bold;
    color: #28a745;
    font-size: 1.1rem;
}

/* Card hover migliorata per dashboard */
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease;
}

/* Badge circolari per profilo */
.badge.rounded-circle {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Callout specifici */
.callout-success {
    border-left: 4px solid #28a745;
    background-color: #d4edda;
}

.callout-info {
    border-left: 4px solid #17a2b8;
    background-color: #d1ecf1;
}

/* Bando Dettaglio - Stili personalizzati */
.it-card-header.bg-primary {
    background: linear-gradient(135deg, #0066cc 0%, #004d99 100%) !important;
    padding: 1.5rem;
}

.it-card-header.bg-primary h1 {
    line-height: 1.4;
}

/* Badge personalizzati per bandi */
.badge.fs-6 {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.badge .icon {
    vertical-align: text-bottom;
}

/* Callout ente richiedente */
.callout.callout-highlight {
    border-left: 4px solid #0066cc;
    background-color: #f0f6ff;
}

.callout-title {
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

/* Card profili ricercati */
.card.border-start.border-3 {
    transition: all 0.2s ease;
}

.card.border-start.border-3:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15) !important;
}

.card.border-start.border-primary {
    border-color: #0066cc !important;
}

/* Badge outline personalizzati */
.badge.bg-light.border {
    background-color: #f8f9fa !important;
    font-weight: 500;
}

.badge.bg-light.text-primary {
    color: #0066cc !important;
}

.badge.bg-light.border-primary {
    border-color: #0066cc !important;
}

/* Alert scadenza */
.alert-warning .icon-warning {
    flex-shrink: 0;
}

/* Sidebar sticky su desktop */
@media (min-width: 992px) {
    .col-lg-4 .it-card:first-child {
        position: sticky;
        top: 20px;
    }
}

/* CTA Buttons migliorati */
.btn-lg {
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.btn-primary:hover,
.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    transition: all 0.2s ease;
}

/* Link list personalizzato */
.link-list .list-item.left-icon {
    padding: 0.75rem 1rem;
    transition: background-color 0.2s ease;
}

.link-list .list-item.left-icon:hover {
    background-color: #f8f9fa;
    border-radius: 4px;
}

.link-list .list-item .icon-primary {
    color: #0066cc;
}

/* Allegati list styling */
.link-list .list-item.left-icon span {
    flex-grow: 1;
    margin-left: 0.5rem;
    word-break: break-word;
}

.link-list .list-item.left-icon .ms-auto {
    flex-shrink: 0;
    margin-left: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.link-list .list-item.left-icon:hover .ms-auto {
    opacity: 1;
    transform: translateX(3px);
}

/* Card allegati evidenziata */
.it-card:has(.link-list .icon-primary[href*="it-clip"]) .it-card-header {
    background-color: #f0f6ff !important;
    border-bottom: 2px solid #0066cc;
}

.it-card:has(.link-list .icon-primary[href*="it-file-pdf"]) {
    border-left: 3px solid #0066cc;
}

/* Icona PDF personalizzata */
.icon-primary[href*="it-file-pdf"] {
    color: #dc3545 !important;
}

/* Date importanti evidenziate */
dl.row dt {
    color: #6c757d;
    font-weight: 500;
}

dl.row dd strong {
    font-weight: 600;
}

dl.row dd .text-danger {
    color: #dc3545 !important;
}

dl.row dd .text-primary {
    color: #0066cc !important;
}

/* Code tag migliorato */
code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.875em;
    color: #e83e8c;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .it-card-header.bg-primary {
        padding: 1rem;
    }
    
    .it-card-header h1 {
        font-size: 1.5rem !important;
    }
    
    .badge.fs-6 {
        font-size: 0.875rem !important;
        padding: 0.375rem 0.75rem;
    }
}

/* Print styles */
@media print {
    .it-header-wrapper,
    .breadcrumb-container,
    .it-footer,
    .it-card:has(.link-list-wrapper) {
        display: none !important;
    }
    
    main {
        padding-top: 0 !important;
    }
    
    .btn,
    .alert {
        display: none !important;
    }
    
    .col-lg-4 {
        page-break-before: always;
    }
}





















/* 
 * Stylesheet Homepage PAmatch
 * Layout Full-Width con Header Slim Sticky
 * Colori Dashboard
 */

/* Header Slim Sticky */
.it-header-wrapper.it-header-sticky {
    z-index: 1030;
}

.it-header-slim-wrapper {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Logo nell'header slim */
.it-header-slim-wrapper .navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    color: hsl(210, 33%, 28%) !important;
    font-weight: 600;
}

.it-header-slim-wrapper .navbar-brand strong {
    color: hsl(210, 33%, 28%) !important;
}

.it-header-slim-wrapper .navbar-brand:hover {
    color: hsl(210, 33%, 20%) !important;
}

.it-header-slim-wrapper .navbar-brand:hover strong {
    color: hsl(210, 33%, 20%) !important;
}

/* Logo icon colore primary tramite filtro CSS */
.it-header-slim-wrapper .navbar-brand img.icon {
    /* Converti in primary hsl(210, 33%, 28%) che equivale a circa #3d5266 */
    filter: brightness(0) saturate(100%) invert(26%) sepia(12%) saturate(1095%) hue-rotate(177deg) brightness(94%) contrast(91%);
}

.it-header-slim-wrapper .navbar-brand:hover img.icon {
    filter: brightness(0) saturate(100%) invert(20%) sepia(12%) saturate(1095%) hue-rotate(177deg) brightness(94%) contrast(91%);
}

/* Menu navigazione orizzontale desktop */
.link-list-horizontal {
    list-style: none;
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0;
}

.link-list-horizontal .list-item {
    padding: 0.5rem 1rem;
    color: #17324d;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.link-list-horizontal .list-item:hover {
    color: hsl(210, 33%, 28%);
    text-decoration: none;
}

/* Menu navigazione mobile */
.it-header-slim-wrapper .link-list .list-item,
.it-header-slim-wrapper .link-list .dropdown-item {
    color: #17324d !important;
    font-weight: 500;
}

.it-header-slim-wrapper .link-list .list-item:hover,
.it-header-slim-wrapper .link-list .dropdown-item:hover {
    color: hsl(210, 33%, 28%) !important;
}

.it-header-slim-wrapper .link-list .list-item.active {
    color: hsl(210, 33%, 28%) !important;
    font-weight: 600;
}

/* Pulsanti header slim */
.it-header-slim-right-zone .it-access-top-wrapper {
    display: inline-block;
}

.it-header-slim-right-zone .btn {
    white-space: nowrap;
}

/* Hero section con gradiente personalizzato */
.hero-home.bg-primary {
    background: hsl(210, 33%, 28%) !important;
    min-height: 600px;
    display: flex;
    align-items: center;
}

/* Generale bg-primary override */
.bg-primary {
    background-color: hsl(210, 33%, 28%) !important;
    background-image: none !important;
}

/* CTA Final Section - colore solido senza gradiente */
section.bg-primary {
    background: hsl(210, 33%, 28%) !important;
    background-image: none !important;
}

/* Colori primari custom (come dashboard) */
.text-primary {
    color: hsl(210, 33%, 28%) !important;
}

.icon-primary {
    color: hsl(210, 33%, 28%) !important;
}

.btn-primary {
    background: hsl(210, 33%, 28%) !important;
    border-color: hsl(210, 33%, 28%) !important;
}

.btn-primary:hover {
    background: hsl(210, 33%, 23%) !important;
    border-color: hsl(210, 33%, 23%) !important;
}

.btn-outline-primary {
    color: hsl(210, 33%, 28%) !important;
    border-color: hsl(210, 33%, 28%) !important;
}

.btn-outline-primary:hover {
    background-color: hsl(210, 33%, 28%) !important;
    border-color: hsl(210, 33%, 28%) !important;
    color: white !important;
}

.border-primary {
    border-color: hsl(210, 33%, 28%) !important;
}

.it-card-border-top-primary {
    border-top-color: hsl(210, 33%, 28%) !important;
}

/* Pulsanti header slim full-responsive */
.it-header-slim-wrapper .btn-full {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Smooth transitions per card */
.it-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.it-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 102, 204, 0.15) !important;
}

/* Stats box nel hero */
.stats-box {
    max-width: 300px;
}

/* Bordi colorati laterali */
.border-start.border-primary.border-4 {
    border-left-color: #0066cc !important;
}

.border-start.border-warning.border-4 {
    border-left-color: #FFB600 !important;
}

.border-start.border-success.border-4 {
    border-left-color: #00875A !important;
}

.border-start.border-danger.border-4 {
    border-left-color: #D9364F !important;
}

/* Container fluid spacing */
.container-fluid {
    padding-left: 2rem;
    padding-right: 2rem;
}

@media (max-width: 991px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Responsive hero */
@media (max-width: 991px) {
    .hero-home {
        min-height: 500px;
    }
    
    .display-4 {
        font-size: 2.5rem !important;
    }
    
    .display-5 {
        font-size: 2rem !important;
    }
    
    .display-6 {
        font-size: 1.75rem !important;
    }
}

@media (max-width: 767px) {
    .hero-home {
        min-height: 400px;
    }
    
    .display-4 {
        font-size: 2rem !important;
    }
    
    .display-5 {
        font-size: 1.75rem !important;
    }
    
    .display-6 {
        font-size: 1.5rem !important;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Offset per smooth scroll con sticky header */
section[id] {
    scroll-margin-top: 80px;
}
