/* Event Images CSS - Sistema Padronizado de Imagens */

/* ===========================================
   VARIÁVEIS E CONFIGURAÇÕES GLOBAIS
   =========================================== */
:root {
    --event-image-aspect-ratio: 16/9;
    --event-image-height-card: 250px;
    --event-image-height-hero: 60vh;
    --event-image-min-height-hero: 400px;
    --event-image-border-radius: 0.75rem;
    --event-image-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --event-image-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --event-image-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* ===========================================
   CONTAINER DE IMAGEM PADRÃO
   =========================================== */
.event-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--event-image-border-radius);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: var(--event-image-shadow);
    transition: var(--event-image-transition);
}

.event-image-container:hover {
    box-shadow: var(--event-image-shadow-hover);
    transform: translateY(-2px);
}

/* ===========================================
   IMAGEM PADRÃO DOS EVENTOS
   =========================================== */
.event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--event-image-transition);
    background-color: #f8f9fa;
    background-image: url('../images/default-event-hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.event-image-container:hover .event-image {
    transform: scale(1.05);
}

/* ===========================================
   VARIAÇÕES DE TAMANHO
   =========================================== */

/* Imagem para Cards de Eventos */
.event-image-card {
    height: var(--event-image-height-card);
    aspect-ratio: var(--event-image-aspect-ratio);
}

/* Imagem para Hero Section */
.event-image-hero {
    height: var(--event-image-height-hero);
    min-height: var(--event-image-min-height-hero);
    aspect-ratio: var(--event-image-aspect-ratio);
}

/* Imagem para Lista de Eventos */
.event-image-list {
    height: 200px;
    aspect-ratio: var(--event-image-aspect-ratio);
}

/* Imagem para Grid Compacto */
.event-image-compact {
    height: 150px;
    aspect-ratio: var(--event-image-aspect-ratio);
}

/* Imagem para Thumbnail */
.event-image-thumbnail {
    height: 100px;
    aspect-ratio: var(--event-image-aspect-ratio);
    border-radius: 0.5rem;
}

/* ===========================================
   OVERLAY E EFEITOS
   =========================================== */
.event-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    opacity: 0;
    transition: var(--event-image-transition);
    z-index: 1;
}

.event-image-container:hover .event-image-overlay {
    opacity: 1;
}

/* Overlay para Hero Section */
.event-image-overlay-hero {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    z-index: 1;
}

/* ===========================================
   BADGES E ELEMENTOS SOBREPOSTOS
   =========================================== */
.event-date-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-red);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
    transition: var(--event-image-transition);
}

.event-date-badge .day {
    display: block;
    font-size: 1.25rem;
    line-height: 1;
}

.event-date-badge .month {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-image-container:hover .event-date-badge {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Badge de Status */
.event-status-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    transition: var(--event-image-transition);
}

.event-status-badge.status-future {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.event-status-badge.status-past {
    background: rgba(108, 117, 125, 0.9);
    color: white;
}

.event-status-badge.status-ongoing {
    background: rgba(255, 193, 7, 0.9);
    color: #212529;
}

/* ===========================================
   LOADING E FALLBACK
   =========================================== */
.event-image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

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

.event-image-error {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

.event-image-error::before {
    content: "📷";
    font-size: 2rem;
    margin-right: 0.5rem;
}

/* ===========================================
   RESPONSIVIDADE
   =========================================== */
@media (max-width: 768px) {
    :root {
        --event-image-height-card: 200px;
        --event-image-height-hero: 50vh;
        --event-image-min-height-hero: 300px;
    }
    
    .event-image-list {
        height: 180px;
    }
    
    .event-image-compact {
        height: 120px;
    }
    
    .event-date-badge {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .event-date-badge .day {
        font-size: 1rem;
    }
    
    .event-date-badge .month {
        font-size: 0.625rem;
    }
    
    .event-status-badge {
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.625rem;
    }
}

@media (max-width: 576px) {
    :root {
        --event-image-height-card: 180px;
        --event-image-height-hero: 40vh;
        --event-image-min-height-hero: 250px;
    }
    
    .event-image-list {
        height: 160px;
    }
    
    .event-image-compact {
        height: 100px;
    }
    
    .event-image-thumbnail {
        height: 80px;
    }
}

/* ===========================================
   UTILITÁRIOS
   =========================================== */
.event-image-rounded {
    border-radius: 50%;
    aspect-ratio: 1/1;
}

.event-image-square {
    aspect-ratio: 1/1;
}

.event-image-wide {
    aspect-ratio: 21/9;
}

.event-image-tall {
    aspect-ratio: 3/4;
}

/* ===========================================
   ANIMAÇÕES ESPECIAIS
   =========================================== */
.event-image-fade-in {
    animation: fadeInImage 0.6s ease-out;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.event-image-slide-up {
    animation: slideUpImage 0.6s ease-out;
}

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

/* ===========================================
   ACESSIBILIDADE
   =========================================== */
.event-image-container:focus-within {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

.event-image-container[role="button"] {
    cursor: pointer;
}

.event-image-container[role="button"]:hover {
    transform: translateY(-2px);
}

.event-image-container[role="button"]:active {
    transform: translateY(0);
}

/* ===========================================
   PRINT STYLES
   =========================================== */
@media print {
    .event-image-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .event-image-overlay,
    .event-image-overlay-hero {
        display: none;
    }
    
    .event-date-badge,
    .event-status-badge {
        background: white !important;
        color: black !important;
        border: 1px solid #ddd;
    }
}