/* Scoped Events CSS - Configured to Match Reference Exactly */

/* === TABS DE ANOS (Pills) === */
.nav-pills .nav-link {
    color: var(--porto-blue);
    background-color: white;
    border: 1px solid rgba(10, 77, 83, 0.1);
    transition: all 0.3s ease;
    margin-left: 5px;
}

.nav-pills .nav-link:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

.nav-pills .nav-link.active {
    background-color: var(--porto-blue) !important;
    color: white !important;
    border-color: var(--porto-blue) !important;
    box-shadow: 0 4px 10px rgba(10, 77, 83, 0.3);
}

/* === CARD DO EVENTO === */
.event-card {
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08) !important;
}

.bg-surface {
    background-color: white;
}

/* Cartaz (Poster) */
.event-poster {
    width: 140px;
    height: 200px;
    background-size: cover;
    background-position: center top;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
    cursor: zoom-in;
    transition: transform 0.3s;
}

.event-poster:hover {
    transform: scale(1.02);
}

/* === GRID DE AÇÕES (BOTOES 2x2) === */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 240px;
}

.btn-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 10px 5px;
    height: 85px;
    transition: all 0.2s;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
}

.btn-action:hover:not(.disabled) {
    background-color: white;
    border-color: var(--porto-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    color: var(--porto-blue);
}

/* Estilos Especiais para botões ativos */
.btn-action.active-result {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
}

.btn-action.active-photo {
    background-color: rgba(138, 79, 255, 0.1);
    border-color: rgba(138, 79, 255, 0.3);
}

/* CTA Principal */
.btn-porto-green {
    background-color: var(--porto-green);
    border-color: var(--porto-green);
    color: white;
    transition: all 0.3s;
}

.btn-porto-green:hover {
    background-color: #4da33b;
    box-shadow: 0 5px 15px rgba(98, 183, 78, 0.4);
}

/* Utilitários Offcanvas */
.icon-box-sm {
    width: 40px;
    height: 40px;
}

.bg-light-danger {
    background-color: rgba(220, 53, 69, 0.1);
}

.bg-light-success {
    background-color: rgba(25, 135, 84, 0.1);
}

.bg-light-warning {
    background-color: rgba(255, 193, 7, 0.1);
}

.border-bottom-dashed {
    border-bottom: 1px dashed #dee2e6;
}

.text-purple {
    color: #8A4FFF !important;
}

/* Responsive */
@media (max-width: 991px) {
    .event-poster {
        width: 100%;
        height: 250px;
        cursor: zoom-in;
        /* Add cursor */
    }

    .event-card {
        align-items: center !important;
        /* Center items (horizontal in column) */
        text-align: center;
        /* Center text */
    }

    .event-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .action-grid {
        width: 100%;
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .action-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Fixes for Global CSS conflicts */
.nav-pills .nav-link::after {
    content: none !important;
    /* Remove global nav-link underline effect */
}

.btn-action {
    text-transform: none !important;
    /* Force natural case for "Regulamento" etc */
}

.btn-action i {
    display: block !important;
    font-family: 'bootstrap-icons' !important;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none !important;
    line-height: 1;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Force Bootstrap Icons globally for this module to avoid conflicts */
.bi {
    font-family: 'bootstrap-icons' !important;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none !important;
    line-height: 1;
}

.btn-outline-primary {
    border: 2px solid var(--porto-blue) !important;
}

/* === POSTER THUMBNAIL (Shared with Single Event) === */
.poster-thumb-container {
    height: 284px;
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    /* Strictly 9:16 (160 * 16 / 9) */
    position: relative;
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    /* Softer shadow for cards */
    border: 3px solid rgba(0, 0, 0, 0.05);
    /* Dark border for white bg */
    transition: transform 0.3s ease, border-color 0.3s ease;
    z-index: 5;
    background-color: #f0f0f0;
}

.poster-thumb-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.poster-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.poster-overlay i {
    color: white;
    font-size: 2rem;
}

.poster-thumb-container:hover {
    transform: scale(1.05);
    border-color: rgba(0, 0, 0, 0.2);
}

.poster-thumb-container:hover .poster-overlay {
    opacity: 1;
}


/* === MOBILE BLURRED BACKGROUND === */
.event-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 380px;
    /* Limit height roughly to flyer area */
    z-index: 0;
    filter: blur(15px) brightness(0.9);
    transform: scale(1.1);
    /* Fade out at the bottom to blend with white card */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

/* Mobile Adjustments for Poster */
@media (max-width: 991.98px) {
    .bg-surface {
        background-color: white !important;
        /* Ensure white background */
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
        overflow: hidden !important;
    }

    .poster-thumb-container {
        margin-bottom: 20px;
        margin-right: auto !important;
        margin-left: auto !important;
        align-self: center !important;
        height: 249px;
        width: 140px;
        min-width: 140px;
        max-width: 140px;
    }
}