/* General container for the grid of event cards */
.events-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Responsive grid */
    gap: 25px; /* Space between cards */
    justify-content: center; /* Center grid items */
    font-family: 'Inter', sans-serif; /* A modern font */
    box-sizing: border-box;
    color: #333333; /* Default text color for the body */
}

/* Ensure the link wrapper doesn't break the card styling */
.event-card-link {
    text-decoration: none; /* Remove underline from link */
    color: inherit; /* Inherit text color */
    display: block; /* Make the link a block element to wrap the card */
}

/* Stil pentru containerul fiecărui card de eveniment */
.event-card {
    background-color: #FFFFFF; /* Fundal alb pentru card */
    border-radius: 16px; /* Colțuri mai rotunjite */
    border: 1px solid rgba(0, 0, 0, 0.05); /* Contur foarte subtil */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* Umbră elegantă */
    overflow: hidden;
    width: 100%; /* Ensures card fills its grid column */
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Tranziție mai fluidă */
    cursor: pointer;
    position: relative;
    height: 100%;
    z-index: 1; /* Pentru efecte de suprapunere */
}

/* Hover effects for the card (applied via the link wrapper) */
.event-card-link:hover .event-card {
    transform: translateY(-12px) scale(1.02); /* Efect de ridicare mai dinamic */
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15); /* Umbră intensificată */
    border-color: #407EF3; /* Contur activ pe hover (albastru) */
}



/* Stil pentru imaginea evenimentului */
.event-image-container {
    width: 100%;
    height: 220px; /* Înălțime ușor mărită pentru imagine */
    overflow: hidden;
    position: relative;
    /* Linie separatoare subtilă, cu nuanța primară roșie */
    border-bottom: 2px solid rgba(188, 23, 29, 0.2);
}

.event-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.event-card-link:hover .event-image-container img {
    transform: scale(1.1); /* Zoom mai pronunțat la hover */
}

/* Stil pentru conținutul textului (titlu și date) */
.event-content {
    padding: 25px; /* Padding mărit */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Stil pentru titlul evenimentului */
.event-content h3 {
    font-size: 1.65em; /* Dimensiunea titlului */
    color: #1f2937; /* Culoare text închisă, pentru lizibilitate pe fundal alb */
    margin: 0 0 12px 0;
    line-height: 1.35;
    font-weight: 700;
}

/* Stil pentru datele de desfășurare */
.event-date {
    font-size: 1em; /* Dimensiunea textului pentru dată */
    color: #555555; /* Culoare text gri mai închis */
    margin-top: 20px; /* Împinge data în jos */
    display: flex;
    align-items: center;
    gap: 10px; /* Spațiu între iconiță și text */
    font-weight: 500;
    padding-top: 15px; /* Padding sus pentru a separa de alte elemente */
    /* Linie punctată subtilă, gri deschis */
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

/* Stil pentru iconița de dată */
.event-date svg {
    fill: #BC171D; /* Culoarea primară pentru iconiță */
    width: 22px; /* Iconiță ușor mai mare */
    height: 22px;
    transition: fill 0.3s ease;
}

/* Stil pentru textul de dată specific */
.event-date span {
    font-family: "Montserrat", sans-serif;
    color: #BC171D; /* Culoarea secundară (albastru) pentru textul de dată */
    font-weight: 500;
}

.events-title{
    grid-column: 1/-1;
    text-align: center;
    position: relative;
}

.events-title::before{
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    position: absolute;
    top: calc(50% - 1px);
    left: 0;
    background: #939393;
}

.events-title span{
    background: #F9F9F9;
    position: relative;
    padding: 0px 4px;
}

.no-events{
    text-align: center;
    color: #888888; /* Culoare gri pentru mesajul de eroare */
    font-style: italic;
    font-weight: bold;
    margin-top: 20px;
    grid-column: 1/-1; /* Center the message across the grid */
}

.events-view-all{
    font-family: Montserrat, sans-serif;
    font-weight: 600;
    color: #407EF2;
    display: flex;
    align-items: center;
    font-size: 20px;
    border-bottom: 2px solid #407EF2;
    width: fit-content;
    margin-top: 16px;
    grid-column: 1/-1; /* Center the link across the grid */
    margin: 0px auto;
    transition: transform 0.2s ease-in-out;
}


.events-view-all:hover{
    transform: translateX(5px);
}

.events-view-all img {
    margin-left: 8px;
    width: 24px;
    height: 24px; 
}

/* Media queries pentru responsivitate */
@media (max-width: 768px) {
    .events-grid-container {
        grid-template-columns: 1fr; /* Stack cards vertically on small screens */
    }
    .event-card {
        max-width: 100%;
    }
    .event-image-container {
        height: 200px;
    }
    .event-content h3 {
        font-size: 1.4em;
    }
    .event-date {
        font-size: 0.9em;
    }
    .event-date svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .events-grid-container {
        gap: 15px;
    }
    .event-card {
        max-width: 100%;
        border-radius: 12px;
    }
    .event-content {
        padding: 18px;
    }
    .event-image-container {
        height: 160px;
        border-radius: 12px 12px 0 0; /* Colțuri rotunjite doar sus pe mobil */
    }
    .event-content h3 {
        font-size: 1.25em;
        margin-bottom: 8px;
    }
    .event-date {
        font-size: 0.85em;
        margin-top: 15px;
    }
    .event-date svg {
        width: 18px;
        height: 18px;
    }
}
