/* ============================================
   ANNUNCI.CSS - Stili specifici pagina Annunci
   ============================================ */

/* Page Title */
.page-title {
    background: var(--background-color);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-title h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* Filtri */
.filtri {
    background: var(--background-color);
    padding: 2rem 0;
}

.filtri-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filtri select {
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    background: white;
}

.filtri select:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Griglia Annunci */
.annunci-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.annuncio-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.annuncio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.annuncio-info {
    padding: 1.5rem;
}

.annuncio-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.annuncio-info p {
    margin: 0.5rem 0;
}

.anno, .km {
    color: #666;
    font-size: 0.95rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Modal Gallery */
.modal-gallery {
    margin: 2rem 0;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-thumbs .placeholder-img {
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
}

.gallery-thumbs .placeholder-img:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

/* Modal Details */
.modal-details {
    margin-top: 2rem;
}

.modal-details h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.price-large {
    font-size: 2.5rem;
    color: var(--secondary-color);
    font-weight: bold;
    margin: 1rem 0;
}

.specs {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 5px;
}

.specs span {
    font-size: 1rem;
}

.specs strong {
    color: var(--primary-color);
}

/* Caratteristiche List */
.caratteristiche-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0;
}

.caratteristiche-list li {
    padding: 0.5rem;
    background: var(--light-gray);
    border-radius: 5px;
}

.caratteristiche-list li:before {
    content: "✓ ";
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 150px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .page-title h1 {
        font-size: 2rem;
    }
    
    .annunci-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1.5rem;
    }
    
    .gallery-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .specs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .price-large {
        font-size: 2rem;
    }
    
    .caratteristiche-list {
        grid-template-columns: 1fr;
    }
}