/**
 * Eventos Listing Widget Styles
 * 
 * @package AMW_Widgets
 * @since 1.0.0
 */

/* Main Container */
.eventos-listing-widget {
    position: relative;
    width: 100%;
    min-height: 400px;
}

/* Skeleton Loader Styles */
.skeleton-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.eventos-listing-widget.loaded .skeleton-container {
    opacity: 0;
    pointer-events: none;
}

.skeleton-eventos-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skeleton-evento-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    opacity: 0.7;
}

.skeleton-evento-image {
    /* Default size - will be overridden by Elementor controls */
    width: 280px;
    height: 200px;
    background: linear-gradient(90deg, #f8f9fa 25%, #e9ecef 50%, #f8f9fa 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.skeleton-evento-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 5px;
}

.skeleton-title,
.skeleton-excerpt,
.skeleton-date {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-title {
    height: 20px;
    width: 100%;
}

.skeleton-title.short {
    width: 70%;
}

.skeleton-excerpt {
    height: 14px;
    width: 100%;
}

.skeleton-excerpt.short {
    width: 60%;
}

.skeleton-date {
    height: 12px;
    width: 120px;
    margin-top: 5px;
}

.skeleton-divider {
    height: 1px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    margin: 10px 0;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Main Content Container */
.eventos-container {
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease 0.2s;
}

.eventos-listing-widget.loaded .eventos-container {
    opacity: 1;
}

/* Individual Event Item */
.evento-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 20px;
    border-radius: 12px;
    margin: -20px; /* Negative margin to offset padding for click area */
    position: relative;
    overflow: hidden;
}

.evento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 67, 136, 0.05);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.evento-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 67, 136, 0.15);
}

.evento-item:hover::before {
    opacity: 1;
}

.evento-link {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

/* Event Image */
.evento-image {
    width: 280px;
    height: 200px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.evento-item:hover .evento-image {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 67, 136, 0.15);
    border-color: rgba(0, 67, 136, 0.2);
}

/* Lazy loading placeholder */
.evento-image[data-src] {
    background-color: #f8f9fa; /* Match the contain background */
    background-image: linear-gradient(45deg, #e9ecef 25%, transparent 25%), 
                      linear-gradient(-45deg, #e9ecef 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #e9ecef 75%), 
                      linear-gradient(-45deg, transparent 75%, #e9ecef 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Event Content */
.evento-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 5px;
    position: relative;
    z-index: 2;
}

.evento-title {
    font-family: 'Host Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff !important;
    margin: 0;
    transition: color 0.2s ease;
    text-transform: uppercase;
}

.evento-title a {
    color: #ffffff !important;
    text-decoration: none;
}

.evento-item:hover .evento-title {
    color: #ffffff !important;
}

.evento-item:hover .evento-title a {
    color: #ffffff !important;
}

.evento-excerpt {
    font-family: 'Host Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: #ffffff !important;
    margin: 0;
}

.evento-date {
    font-family: 'Host Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

/* Ver Evento Button - Minimalist Style */
.ver-evento-btn {
    font-family: 'Host Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
    display: inline-block;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.evento-item:hover .ver-evento-btn {
    opacity: 1;
    transform: translateX(4px);
}

/* Line Divider */
.line-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(
        to right, 
        transparent 0%, 
        #e0e0e0 20%, 
        #e0e0e0 80%, 
        transparent 100%
    );
    margin: 20px 0;
}


/* Responsive Design */
@media (max-width: 768px) {
    .eventos-container {
        gap: 2rem; /* More space between event items */
    }
    
    .evento-item {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 1.5rem; /* Additional space between items */
    }
    
    .evento-link {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Let Elementor responsive controls handle image sizing in mobile */
    .evento-image {
        max-width: 100%; /* Ensure it doesn't overflow */
        order: 1; /* Image first in mobile */
    }
    
    .evento-content {
        padding-top: 0;
        order: 2; /* Content second in mobile */
    }
    
    .skeleton-eventos-container {
        gap: 2rem; /* Match the main container gap */
    }
    
    .skeleton-evento-item {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 1.5rem; /* Additional space between skeleton items */
    }
    
    /* Let Elementor responsive controls handle skeleton sizing in mobile */
    .skeleton-evento-image {
        max-width: 100%; /* Ensure it doesn't overflow */
        order: 1; /* Image first in mobile */
    }
    
    .skeleton-evento-content {
        order: 2; /* Content second in mobile */
    }
    
    .line-divider {
        margin: 1.5rem 0; /* More space around dividers */
    }
}

@media (max-width: 480px) {
    .eventos-container {
        gap: 2.5rem; /* Even more space on very small screens */
    }
    
    .evento-item {
        margin-bottom: 2rem; /* More space between items on small screens */
    }
    
    .evento-title {
        font-size: 14px;
    }
    
    .evento-excerpt {
        font-size: 12px;
    }
    
    .evento-date {
        font-size: 11px;
    }
    
    .line-divider {
        margin: 2rem 0; /* More space around dividers on small screens */
    }
}