/* Banner de anuncios deslizable */
.anuncios-banner {
    background: linear-gradient(135deg, #2d5f4a 0%, #1a3a2e 100%);
    padding: 2rem 0;
    margin-top: 3rem;
    overflow: visible; /* no recortar contenido vertical */
    position: relative;
    z-index: 1; /* que no quede debajo de otros contenedores */
}

.anuncios-banner h3 {
    text-align: center;
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.anuncios-slider {
    display: flex;
    gap: 1.5rem;
    padding: 0 2rem 2.2rem; /* espacio inferior para evitar recorte de sombras */
    overflow-x: hidden; /* ocultar barra y controlar vía JS */
    flex-wrap: nowrap; /* no permitir salto de línea de tarjetas */
    scroll-behavior: auto; /* control manual */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Ocultar scrollbar en Chrome/Safari */
.anuncios-slider::-webkit-scrollbar {
    display: none;
}

/* Pause animation on hover */
.anuncios-slider.paused {
    animation-play-state: paused !important;
}

.anuncios-banner .anuncio-card {
    flex: 0 0 calc(20% - 1.2rem);
    min-width: 180px;
    max-width: 240px;
    background: #1a2634;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.anuncios-banner .anuncio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.anuncios-banner .anuncio-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.anuncios-banner .anuncio-card-content {
    padding: 1rem;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.anuncios-banner .anuncio-card h4 {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Modal de anuncio */
.anuncio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.anuncio-modal.active {
    display: flex;
}

.anuncio-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.anuncio-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: background 0.2s;
}

.anuncio-modal-close:hover {
    background: rgba(0,0,0,0.8);
}

.anuncio-modal-header {
    position: relative;
}

.anuncio-modal-header img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.anuncio-modal-body {
    padding: 2rem;
}

.anuncio-modal-body h2 {
    margin-top: 0;
    color: #1a3a2e;
}

.anuncio-modal-body .empresa-name {
    color: #2d5f4a;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.anuncio-modal-body .contenido {
    color: #333;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contacto-info {
    background: #f0f4f1;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.contacto-info h3 {
    margin-top: 0;
    color: #1a3a2e;
    font-size: 1.1rem;
}

.contacto-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    color: #333;
}

.contacto-item a {
    color: #2d5f4a;
    text-decoration: none;
    font-weight: 500;
}

.contacto-item a:hover {
    text-decoration: underline;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #25D366;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: background 0.2s;
}

.btn-whatsapp:hover {
    background: #20ba5a;
}

@media (max-width: 768px) {
    .anuncios-slider {
        padding: 0 1rem;
    }
    
    .anuncios-banner .anuncio-card {
        flex: 0 0 140px;
        min-width: 140px;
        max-width: 160px;
    }
    
    .anuncios-banner .anuncio-card-content {
        padding: 0.7rem;
        min-height: 50px;
    }
    
    .anuncios-banner .anuncio-card h4 {
        font-size: 0.9rem;
    }
}
