/* ===================================
   COMPONENTI AGGIUNTIVI
   =================================== */

/* ===== ACCORDION ===== */
.accordion {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.accordion-item {
    border-bottom: 1px solid var(--grigio-perla);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    transition: background var(--transition-fast);
}

.accordion-header:hover {
    background: var(--bianco-lino);
}

.accordion-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--blu-notte);
    margin: 0;
}

.accordion-icon {
    font-size: 1.5rem;
    color: var(--oro);
    transition: transform var(--transition-fast);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.accordion-item.active .accordion-content {
    max-height: 2000px;
}

.accordion-body {
    padding: 0 1.5rem 1.5rem;
    color: var(--testo-chiaro);
    line-height: 1.8;
}

/* ===== TABS ===== */
.tabs-container {
    margin: 2rem 0;
}

.tabs-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--grigio-perla);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-button {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--testo-chiaro);
    transition: all var(--transition-fast);
}

.tab-button:hover {
    color: var(--oro);
}

.tab-button.active {
    color: var(--oro);
    border-bottom-color: var(--oro);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s ease-out;
}

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

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid var(--grigio-perla);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.75rem;
    color: var(--blu-notte);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--testo-chiaro);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--bordeaux);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--grigio-perla);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--blu-notte);
}

.form-label .required {
    color: var(--bordeaux);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--grigio-perla);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
    transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--oro);
    outline: none;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    color: var(--bordeaux);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-help {
    color: var(--testo-chiaro);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-checkbox,
.form-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.form-checkbox input,
.form-radio input {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

/* ===== GALLERY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    transform: translateY(100%);
    transition: transform var(--transition-medium);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.gallery-description {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ===== FILTERS ===== */
.filter-bar {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: var(--blu-notte);
    margin-bottom: 0.5rem;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--bianco-lino);
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--oro);
}

.filter-btn.active {
    background: var(--oro);
    color: white;
    border-color: var(--oro);
}

/* ===== VIDEO PLAYER ===== */
.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-player video {
    width: 100%;
    height: 100%;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.video-play-btn {
    background: var(--oro);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.video-progress {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    cursor: pointer;
}

.video-progress-bar {
    height: 100%;
    background: var(--oro);
    border-radius: 5px;
    width: 0%;
    transition: width 0.1s;
}

.video-time {
    color: white;
    font-size: 0.875rem;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.pagination-btn {
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid var(--grigio-perla);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--blu-notte);
    transition: all var(--transition-fast);
}

.pagination-btn:hover {
    border-color: var(--oro);
    color: var(--oro);
}

.pagination-btn.active {
    background: var(--oro);
    border-color: var(--oro);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    padding: 1rem 0;
    font-size: 0.875rem;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item::after {
    content: '/';
    color: var(--testo-chiaro);
}

.breadcrumb-item:last-child::after {
    content: none;
}

.breadcrumb-item a {
    color: var(--testo-chiaro);
}

.breadcrumb-item a:hover {
    color: var(--oro);
}

.breadcrumb-item.active {
    color: var(--blu-notte);
    font-weight: 600;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--oro);
    color: white;
}

.badge-secondary {
    background: var(--grigio-perla);
    color: var(--blu-notte);
}

.badge-success {
    background: var(--verde-olivo);
    color: white;
}

.badge-danger {
    background: var(--bordeaux);
    color: white;
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-icon {
    font-size: 1.5rem;
}

.alert-success {
    background: rgba(107, 142, 35, 0.1);
    border-left: 4px solid var(--verde-olivo);
    color: var(--verde-olivo);
}

.alert-warning {
    background: rgba(204, 85, 0, 0.1);
    border-left: 4px solid var(--arancio-terra);
    color: var(--arancio-terra);
}

.alert-error {
    background: rgba(139, 21, 56, 0.1);
    border-left: 4px solid var(--bordeaux);
    color: var(--bordeaux);
}

.alert-info {
    background: rgba(212, 175, 55, 0.1);
    border-left: 4px solid var(--oro);
    color: #996515;
}

/* ===== LOADING ===== */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--grigio-perla);
    border-top-color: var(--oro);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
}

/* ===== TOOLTIP ===== */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    background: var(--blu-notte);
    color: white;
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    font-size: 0.875rem;
    white-space: nowrap;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--grigio-perla);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--oro), var(--bordeaux));
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ===== RATING STARS ===== */
.rating {
    display: flex;
    gap: 0.25rem;
    font-size: 1.25rem;
    color: var(--oro);
}

.rating-star {
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.rating-star:hover {
    transform: scale(1.2);
}

.rating-star.filled {
    color: var(--oro);
}

.rating-star.empty {
    color: var(--grigio-perla);
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--blu-notte);
    color: white;
    padding: 1.5rem;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    display: none;
}

.cookie-banner.active {
    display: block;
    animation: slideUp 0.4s ease-out;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-text {
    flex: 1;
}

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

/* ===== ACCESSIBILITY TOGGLE ===== */
.accessibility-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9000;
}

.accessibility-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--oro);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
}

.accessibility-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.accessibility-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    display: none;
}

.accessibility-menu.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.accessibility-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background var(--transition-fast);
}

.accessibility-option:hover {
    background: var(--bianco-lino);
}

/* ===== SOCIAL SHARE ===== */
.social-share {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.share-btn.facebook {
    background: #1877F2;
    color: white;
}

.share-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.share-btn.email {
    background: var(--grigio-perla);
    color: var(--blu-notte);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .social-share {
        flex-wrap: wrap;
    }
    
    .tabs-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
}
