/* ========================================
   EVENT CARD STYLES
   Basado en diseño Figma
   ======================================== */

/* ========================================
   CONTAINER STYLES
   ======================================== */

/* Wrapper principal - contenedor de todos los eventos */
#resultFilter {
    width: 100% !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
    display: block !important;
    overflow: hidden !important; /* Alternativa a clearfix */
}

/* Clearfix para el contenedor padre #resultFilter */
#resultFilter::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

/* SOBRESCRIBIR estilos del plugin ds-events - Máxima especificidad */
div#resultFilter div.single-event-container,
#resultFilter div.single-event-container,
div.single-event-container,
.single-event-container {
    width: 49.9% !important;  /* 49.9% en vez de 50% para dar un pequeño margen */
    box-sizing: border-box !important;
    float: left !important;
    padding: 10px !important;
    display: inline-block !important;
    margin: 0 !important;
    max-width: 49.9% !important;
    vertical-align: top !important;
}

/* ========================================
   EVENT FINDER HEADER
   ======================================== */

.event-finder-header {
    background-color: #DEF4DB !important;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    color:#111827 !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    font-size: 24px;
    font-weight: 700 !important;
    border:1px solid #228800;
}

.event-finder-header > * {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.event-finder-header label {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1e1e1e;
    margin: 0;
    white-space: nowrap;
}

.event-finder-header select {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1e1e1e;
    background-color: #FFFFFF;
    border-radius: 8px;
    min-width: 200px;
    height: 48px;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.75rem;
    line-height: 1.4;
    width: 30%;
    font-size:18px;
}

.event-finder-header select:hover {
    border-color: #78b800;
}

.event-finder-header select:focus {
    outline: none;
    border-color: #78b800;
    box-shadow: 0 0 0 3px rgba(120, 184, 0, 0.1);
}

.event-finder-header select option {
    padding: 0.5rem;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    color: #1e1e1e;
}

#citySelectorDiv {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 !important;
    padding: 0 !important;
}

#citySelectorDiv label {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1e1e1e;
    margin: 0;
    white-space: nowrap;
}

#citySelectorDiv select {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1e1e1e;
    background-color: #FFFFFF;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    min-width: 180px;
    height: 48px;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.75rem;
    line-height: 1.4;
}

#citySelectorDiv select:hover {
    border-color: #78b800;
}

#citySelectorDiv select:focus {
    outline: none;
    border-color: #78b800;
    box-shadow: 0 0 0 3px rgba(120, 184, 0, 0.1);
}

/* ========================================
   EVENT CARD
   ======================================== */

.single-event {
    background-color: #FFFFFF;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #E5E5E5;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 !important;
    margin: 0;
}

.single-event:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ========================================
   EVENT IMAGE
   ======================================== */

.single-event-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

.event-image-pr {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 200"><rect width="400" height="200" fill="%23f0f0f0"/><text x="200" y="100" text-anchor="middle" dy=".3em" font-family="Arial, sans-serif" font-size="16" fill="%23666">Imagen del Evento</text></svg>');
}

/* ========================================
   EVENT CONTENT
   ======================================== */

.single-event h5 {
    font-family: 'Nunito', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #1e1e1e;
    margin: 1.5rem 1.5rem 0.5rem 1.5rem;
    line-height: 1.3;
    letter-spacing: -0.32px;
}

.single-event p {
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1e1e1e;
    margin: 0 1.5rem 0.75rem 1.5rem;
    line-height: 1.4;
}

.single-event .shop_name {
    margin-bottom: 1rem !important;
}

.single-event .shop_name a {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1e1e1e;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight:800;
}

.single-event .shop_name a:hover {
    color: #78b800;
    text-decoration: none;
}

/* ========================================
   EVENT DETAILS LIST
   ======================================== */

.single-event ul {
    list-style: none;
    padding-bottom: 20px;
    margin: 0 1.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.single-event li {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1e1e1e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
    margin-bottom: 0 !important;
}

.single-event li svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    position: relative;
    top: 0 !important;
    display: inline-block;
}

.separate-containers .page-header-image{margin-top:0;}
.featured-image.page-header-image img{width:1200px;}

.event-image-t{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/Taller.jpg') !important;
}
.event-image-e{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/evento-estandar.jpg') !important;
}
.event-image-rs{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/Macrorecogida-solidaria.jpg') !important;
}
.event-image-m{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/Mercadillo-solidario.jpg') !important;
}
.event-image-r{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/Regalo.jpg') !important;
}
.event-image-d{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/Desayuno.jpg') !important;
}
.event-image-ti{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/Taller-infantil.jpg') !important;
}
.event-image-f{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/Fiesta.jpg') !important;
}
.event-image-p{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/evento-estandar.jpg') !important;
}
.event-image-de{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/evento-estandar.jpg') !important;
}
.event-image-ms{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/Mercadillo-solidario.jpg') !important;
}
.event-image-ev{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/evento-estandar.jpg') !important;
}
.event-image-pr{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/Protectora.jpg') !important;
}
.event-image-w{
    background:url('https://www.tiendanimal.es/articulos/wp-content/uploads/2024/01/Workshop.jpg') !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 1200px) {
    .single-event-container {
        padding: 0 20px;
    }
    
    .event-finder-header {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .event-finder-header select {
        min-width: 180px;
    }
    
    #citySelectorDiv select {
        min-width: 160px;
    }
    
    .single-event h5 {
        font-size: 16px;
    }
    
    .single-event p,
    .single-event .shop_name a,
    .single-event li {
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* En móvil, mostrar eventos en 1 columna - Máxima especificidad */
    div#resultFilter div.single-event-container,
    #resultFilter div.single-event-container,
    div.single-event-container,
    .single-event-container {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        padding: 10px 0 !important;
        display: block !important;
        margin: 0 0 1rem 0 !important;
    }
    
    #resultFilter {
        padding: 0 16px !important;
    }
    
    .event-finder-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .event-finder-header select {
        min-width: 100%;
        width: 100%;
        margin-top:0 !important;
    }
    
    #citySelectorDiv {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    #citySelectorDiv select {
        min-width: 100%;
        width: 100%;
    }
    
    .single-event-image {
        height: 180px;
    }
    
    .single-event h5 {
        font-size: 16px;
        margin: 1.25rem 1.25rem 0.5rem 1.25rem;
    }
    
    .single-event p,
    .single-event .shop_name {
        margin-left: 1.25rem;
        margin-right: 1.25rem;
    }
    
    .single-event ul {
        margin: 0 1.25rem 1.25rem 1.25rem !important;
    }
    
    .single-event li {
        font-size: 13px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    /* En móvil pequeño, mantener 1 columna - Máxima especificidad */
    div#resultFilter div.single-event-container,
    #resultFilter div.single-event-container,
    div.single-event-container,
    .single-event-container {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        padding: 10px 0 !important;
        display: block !important;
        margin: 0 0 1rem 0 !important;
    }
    
    #resultFilter {
        padding: 0 12px !important;
    }
    
    .single-event-image {
        height: 160px;
    }
    
    .single-event h5 {
        font-size: 15px;
        margin: 1rem 1rem 0.5rem 1rem;
    }
    
    .single-event p,
    .single-event .shop_name {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .single-event ul {
        margin: 0 1rem 1rem 1rem;
    }
    
    .single-event li {
        font-size: 12px;
    }
}