/* ============================================================
   APPLY DM SANS TO ENTIRE COMPONENT
============================================================ */
.epc-safe-area,
.epc-safe-area * {
    font-family: "DM Sans", sans-serif !important;
}

/* ============================================================
   SAFE AREA
============================================================ */
.epc-safe-area {
    max-width: 1530px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

/* TABLET & MOBILE */
@media (max-width: 1024px) {
    .epc-safe-area {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* ============================================================
   GRID (3 COLUMNS)
============================================================ */
.epc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

@media (max-width: 1150px) {
    .epc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    /* hide vertical line */
    .epc-separator-vertical {
        display: none !important;
    }

    /* Make meta info vertical instead of horizontal */
    .epc-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px !important;
    }

    .epc-location,
    .epc-date {
        display: flex;
        align-items: center;
        gap: 4px;
    }
}

/* ============================================================
   EVENT CARD
============================================================ */
.epc-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.epc-image img {
    width: 100%;
    height: 232px !important;
    object-fit: cover;
    border-radius: 8px;
}

/* ============================================================
   META
============================================================ */
.epc-meta {
    display: flex;
    gap: 20px;
    font-size: 12px;
    margin-bottom: 0;
    font-weight: 600 !important;
    color: #292A29 !important;
}

.epc-separator-vertical {
    width: 1px;
    height: 16px;
    background: #D6D6D6;
    margin: 0 14px;
}

.epc-meta-divider {
    height: 1px;
    width: 100%;
    background: #E5E5E5;
    margin: 2px 0 12px 0;
    margin-bottom: 4px !important;
}

/* ============================================================
   TYPOGRAPHY
============================================================ */
.epc-title {
    font-size: 18px;
    font-weight: 600;
    color: #101110;
    margin: 0;
    line-height: 1.3;
}

.epc-excerpt {
    font-size: 14px;
    color: #101110;
    font-weight: 400;
}

/* ============================================================
   ICONS
============================================================ */
.epc-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    margin-top: -2px;
}

/* ============================================================
   EPC READ MORE (MATCHES EVENT SLIDER STYLE)
============================================================ */
.epc-readmore {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    position: relative;
    padding-bottom: 4px;
    font-size: 17px;
    font-weight: 500;
    color: #DB2129 !important;
    text-decoration: none !important;
    width: fit-content; /* prevents full-width underline */
}

/* underline */
.epc-readmore::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: calc(100% - 1px); /* match text width only */
    height: 1px;
    background: #DB2129;
    transition: 0.25s ease;
}

/* arrow wrapper */
.epc-arrow-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
}

/* arrow layers */
.epc-arrow {
    position: absolute;
    inset: 0;
    width: 20px;
    height: 20px;
    object-fit: contain;
    transition: opacity 0.25s ease;
}

.default-arrow {
    opacity: 1;
}

.hover-arrow {
    opacity: 0;
}

/* hover */
.epc-readmore:hover .default-arrow {
    opacity: 0 !important;
}

.epc-readmore:hover .hover-arrow {
    opacity: 1 !important;
}

.epc-readmore:hover {
    color: #292A29 !important;
}

.epc-readmore:hover::before {
    background: #292A29;
}

/* ============================================================
   ROW VARIANT — NO SAFE AREA
============================================================ */
.epc-row-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 0 !important;
}

/* 1530px → 3 columns */
@media (max-width: 1530px) {
    .epc-row-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 1150px → 2 columns */
@media (max-width: 1150px) {
    .epc-row-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 650px → 1 column */
@media (max-width: 650px) {
    .epc-row-grid {
        grid-template-columns: 1fr;
    }
}

/* Make all cards equal height */
.epc-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Content grows to fill vertical space */
.epc-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Excerpt pushes readmore down */
.epc-excerpt {
    margin-bottom: auto;
}

/* Align read more bottom consistently */
.epc-readmore {
    margin-top: 10px;
}

@media (max-width: 1530px) {
    .epc-row-grid .epc-card:nth-child(4) {
        display: none !important;
    }
}
