/* Global Styles */
:root {
    --primary-color: #4e73df;
    --secondary-color: #1cc88a;
    --dark-color: #5a5c69;
    --light-color: #f8f9fc;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Navbar Styles */
#mainNav {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

#mainNav .navbar-brand {
    font-weight: 700;
    color: var(--primary-color);
}

#mainNav .navbar-nav .nav-item .nav-link {
    color: #6c757d;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.75rem 0;
    margin: 0 1rem;
    transition: all 0.3s;
}

#mainNav .navbar-nav .nav-item .nav-link:hover,
#mainNav .navbar-nav .nav-item .nav-link:active,
#mainNav .navbar-nav .nav-item .nav-link.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../img/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    height: 100vh;
    min-height: 500px;
    padding-top: 8rem;
    padding-bottom: 8rem;
}

/* Fallback se l'immagine non si trova nella directory img */
.hero-section.no-bg-img {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://source.unsplash.com/random/1920x1080/?digital') no-repeat center center;
    background-size: cover;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Feature Icons */
.feature {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 4rem;
    width: 4rem;
    font-size: 2rem;
}

/* Card Hover Effect */
.card {
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: white;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

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

.card .card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Testimonials */
.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    min-height: 100px;
}

/* Social Icons */
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

/* Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-outline-light:hover {
    color: var(--primary-color);
}

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

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

/* Admin Dashboard Styles */
.sidebar {
    min-height: 100vh;
    width: 250px;
    background-color: #4e73df;
    background-image: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    background-size: cover;
}

.sidebar-brand {
    height: 4.375rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    padding: 1.5rem 1rem;
    text-align: center;
    letter-spacing: 0.05rem;
}

.sidebar-brand span {
    font-size: 1.2rem;
}

.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 0 1rem 1rem;
}

.nav-item .nav-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.nav-item .nav-link:hover {
    color: #fff;
}

.nav-item .nav-link i {
    margin-right: 0.25rem;
}

.nav-item.active .nav-link {
    font-weight: 700;
    color: #fff;
}

.content {
    flex: 1 0 auto;
}

/* Card Border Styles */
.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--secondary-color) !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

/* Weekly Calendar */
.weekly-header {
    margin-bottom: 15px;
    text-align: center;
}

.weekly-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.weekly-dates {
    font-size: 0.9rem;
    color: #666;
}

.weekly-grid {
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    gap: 5px;
}

.weekly-day-header {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    background-color: #f8f9fc;
    border-radius: 5px;
}

.weekly-time-slot {
    text-align: right;
    padding: 10px;
    font-weight: bold;
}

.weekly-appointment-slot {
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    font-size: 0.8rem;
}

.weekly-appointment-slot.booked {
    background-color: #e74a3b;
    color: white;
}

.weekly-appointment-slot.available {
    background-color: #1cc88a;
    color: white;
}

/* Event Cards */
.event-card {
    padding: 12px;
    border-radius: 5px;
    background-color: #f8f9fc;
    border-left: 4px solid #4e73df;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.15rem 0.5rem 0 rgba(58, 59, 69, 0.15);
}

.event-date {
    font-weight: bold;
    color: #4e73df;
    margin-bottom: 3px;
}

.event-time {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.event-client {
    font-weight: bold;
    margin-bottom: 3px;
}

.event-service {
    font-size: 0.85rem;
    color: #666;
}

/* Appointment Calendar */
.calendar-container {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    cursor: default;
    font-weight: 500;
    transition: all 0.2s;
}

.calendar-day.empty {
    background-color: transparent;
}

.calendar-day.selectable {
    cursor: pointer;
    background-color: #f8f9fa;
}

.calendar-day.selectable:hover {
    background-color: #e9ecef;
}

.calendar-day.today {
    background-color: #e9ecef;
    font-weight: bold;
}

.calendar-day.selected {
    background-color: #0d6efd;
    color: white;
}

.calendar-day.past {
    color: #adb5bd;
    background-color: #f8f9fa;
}

.calendar-day.active {
    background-color: var(--primary-color);
    color: white;
}

.calendar-day.disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

/* Time Slots - Supporto entrambi i layout */
.time-slots {
    margin-top: 1rem;
}

/* Stile a griglia per visualizzazione multipla */
.time-slots.grid-style {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

/* Stile a colonna per visualizzazione dettagliata */
.time-slots.column-style {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.time-slot {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.time-slot:hover {
    background-color: #e9ecef;
}

.time-slot.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.time-slot.selected .badge {
    background-color: white !important;
    color: var(--primary-color) !important;
}

.time-slot.available:hover {
    border-color: var(--primary-color);
}

.time-slot.booked {
    cursor: not-allowed;
    opacity: 0.7;
}

.time-slot.disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

/* Appointment Form */
.appointment-form {
    margin-top: 2rem;
}

/* Weekly Calendar Table Styles */
.table-responsive {
    border-radius: 0.25rem;
}

.table-bordered {
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 0.9rem;
    vertical-align: middle;
    text-align: center;
}

.table thead th:first-child {
    width: 80px;
}

.table td {
    text-align: center;
    vertical-align: middle;
    font-size: 0.9rem;
    height: 50px;
}

.table .fw-bold {
    text-align: right;
    padding-right: 15px;
}

.text-danger {
    font-weight: 500;
}

.text-success {
    font-weight: 500;
}

/* Blog Post Cards */
.blog-post-card {
    margin-bottom: 2rem;
}

.blog-post-card .card-img-top {
    height: 240px;
}

.blog-post-date {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Portfolio Filters */
.portfolio-filters {
    margin-bottom: 2rem;
}

.portfolio-filters .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 50px;
    padding: 0.375rem 1.5rem;
}

/* Contact Info */
.contact-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.contact-info-item i {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    margin-right: 1rem;
    font-size: 1.25rem;
}

/* Skills Section */
.skill-item {
    margin-bottom: 1.5rem;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-bar {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
}

/* Services Details */
.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-detail {
    margin-bottom: 3rem;
}

/* Portfolio Details */
.portfolio-detail-img {
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.portfolio-detail-img img {
    width: 100%;
    height: auto;
}

.portfolio-info {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.portfolio-info-item {
    display: flex;
    margin-bottom: 0.75rem;
}

.portfolio-info-label {
    font-weight: 700;
    min-width: 120px;
}

/* Blog Detail */
.blog-detail-img {
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.blog-detail-img img {
    width: 100%;
    height: auto;
}

.blog-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: #6c757d;
}

.blog-meta-item {
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
}

.blog-meta-item i {
    margin-right: 0.5rem;
}

.blog-content {
    line-height: 1.8;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content h2,
.blog-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

/* Comments */
.comment {
    display: flex;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.comment-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 700;
}

.comment-date {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Pagination */
.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link {
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: #212529;
    color: white;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    #mainNav .navbar-nav .nav-item .nav-link {
        margin: 0 0.5rem;
    }
    
    .sidebar {
        width: 6rem;
    }
    
    .sidebar .nav-item {
        text-align: center;
    }
    
    .sidebar .nav-item .nav-link span {
        display: none;
    }
    
    .sidebar .sidebar-brand {
        padding: 1rem;
    }
    
    .sidebar .sidebar-brand span {
        display: none;
    }
    
    .content {
        margin-left: 6rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: auto;
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        min-height: 0;
    }
    
    .content {
        margin-left: 0;
    }
    
    .d-flex {
        flex-direction: column;
    }
    
    .table-responsive {
        max-height: 500px;
    }
    
    .table-responsive table th,
    .table-responsive table td {
        white-space: nowrap;
        padding: 0.5rem;
    }
}

/* Dark Theme (for admin panel) */
body.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-theme .card {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

body.dark-theme .card-header {
    background-color: #2a2a2a;
    border-color: #333;
}

body.dark-theme .table {
    color: #e0e0e0;
}

body.dark-theme .table-light th {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border-color: #333;
}

body.dark-theme .table td {
    border-color: #333;
}

body.dark-theme .modal-content {
    background-color: #1e1e1e;
    color: #e0e0e0;
}









/* Stili migliorati per il calendario */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: default;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-day.selectable {
    cursor: pointer;
    background-color: #f8f9fa;
}

.calendar-day.selectable:hover {
    background-color: #e9ecef;
    transform: scale(1.1);
}

.calendar-day.selected {
    background-color: #0d6efd;
    color: white;
    font-weight: bold;
}

.calendar-day.today {
    border: 2px solid #0d6efd;
}

.calendar-day.past {
    color: #adb5bd;
}

.calendar-day.empty {
    background-color: transparent;
}

/* Badge per indicare giorni con appuntamenti */
.calendar-day.has-appointments::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 5px;
    height: 5px;
    background-color: #dc3545;
    border-radius: 50%;
}

/* Miglioramenti per gli slot orari */
.time-slot {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-slot.available {
    background-color: #f8f9fa;
    border-left: 4px solid #28a745;
}

.time-slot.available:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.time-slot.booked {
    background-color: #f8f9fa;
    border-left: 4px solid #dc3545;
    opacity: 0.7;
}

.time-slot.selected {
    background-color: #e7f5ff;
    border-left: 4px solid #0d6efd;
    font-weight: bold;
}

/* Animazioni per il form di prenotazione */
#appointmentForm {
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#appointmentForm.visible {
    max-height: 1000px;
    opacity: 1;
}

/* Stili per la tabella settimanale */
.table-responsive table {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table-responsive th, 
.table-responsive td {
    vertical-align: middle;
    text-align: center;
}

/* Indicatori di stato più chiari */
td.text-success {
    background-color: rgba(40, 167, 69, 0.1);
}

td.text-danger {
    background-color: rgba(220, 53, 69, 0.1);
}

.feature.bg-primary {
    width: 45px;
    height: 45px;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stili per il selettore di lingua */

/* Dropdown lingua */
.dropdown-item.language-option {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
}

.dropdown-item.language-option img {
    margin-right: 0.5rem;
    width: 20px;
    height: auto;
    border-radius: 2px;
}

.dropdown-item.language-option.active {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

/* Icona globo nel dropdown */
#languageDropdown {
    display: flex;
    align-items: center;
}

.language-flag {
    width: 20px;
    height: auto;
    margin-right: 5px;
    border-radius: 2px;
}

/* Stile per il dropdown su dispositivi mobili */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        position: absolute;
    }
}