/* ==========================================================
   1. GLOBAL LAYOUT & TOP CONTROLS
   ========================================================== */
.erl-container {
    display: flex;
    flex-direction: column; 
    padding: 0 15px; 
    font-family: Arial, sans-serif;
}

.erl-top-controls {
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
    flex-wrap: wrap; 
    gap: 15px; 
}

.erl-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-right: 20px; 
}

#erl-search {
    width: 250px; 
    min-width: 150px;
    padding: 8px 12px;
    border: 1px solid #174485;
    border-radius: 4px;
    font-size: 14px;
}

/* ==========================================================
   2. DROPDOWN & FILTER STYLES
   ========================================================== */
.erl-filters button {
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}

.erl-any-btn {
    background: #005bbb !important;
    color: white !important;
    border: 1px solid #005bbb !important;
    border-radius: 4px;
    padding: 8px 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap; 
}

.erl-dropdown-filter {
    position: relative;
    display: inline-block;
}

.erl-dropdown-toggle {
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.erl-dropdown-toggle .arrow {
    font-size: 1.1em;
    line-height: 1;
    transition: transform 0.2s;
}

.erl-dropdown-filter.active .erl-dropdown-toggle {
    background: #005bbb;
    color: white;
    border-color: #005bbb;
}

.erl-dropdown-menu {
    display: none; 
    position: absolute;
    top: 100%; 
    left: 0;
    z-index: 10;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    padding: 5px 0;
}

.erl-dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    color: #15325f; 
}

.erl-dropdown-menu button:hover,
.erl-dropdown-menu button.active {
    background: #eef9ff; 
    color: #005bbb;
}

.erl-dropdown-filter.open .erl-dropdown-toggle .arrow {
    transform: rotate(180deg);
}
.erl-dropdown-filter.open .erl-dropdown-menu {
    display: block; 
}

/* ==========================================================
   3. GRID & CARD LAYOUT
   ========================================================== */

.erl-grid { 
    display: grid; 
    gap: 30px; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    width: 100%; 
    padding: 0;
}

.erl-card { 
    padding: 20px; 
    border: 1px solid #eee; 
    border-radius: 8px; 
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

/* --- Image Styling for Uniform Size --- */
.erl-thumb {
    height: 180px;
    width: 100%;
    overflow: hidden; 
    border-radius: 8px; 
    margin-bottom: 15px;
}

.erl-thumb img { 
    width: 100%; 
    height: 100%; 
    border-radius: 8px;
    object-fit: cover; 
    display: block; 
}

/* --- Card Content --- */
.erl-categories {
    margin-bottom: 10px;
}

.erl-category-label {
    display: inline-block;
    color: #15325f;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 4px;
    background: #eef9ff;
    margin-right: 5px;
}

.erl-card h3 {
    font-size: 23px; 
    line-height: 1.2em; 
    margin-top: 10px;
    margin-bottom: 10px;
    color: #15325f;
}
.erl-card p {
    flex-grow: 1;
    margin-bottom: 20px;
    color: #555;
}

.erl-btn { 
    display: flex;
    align-self: flex-start; 
    align-items: center;
    background: #174485; 
    color: #fff !important; 
    padding: 8px 12px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: 600;
    margin-top: auto; 
}
.erl-btn::after {
    content: '›';
    font-size: 1.5em;
    margin-left: 5px;
    line-height: 0.8;
}

/* ==========================================================
   4. AJAX LOAD MORE STYLES
   ========================================================== */
.erl-load-more-wrap {
    text-align: center;
    margin-top: 40px;
}
#erl-load-more {
    background: #fff;
    color: #174485;
    border: 2px solid #174485;
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}
#erl-load-more:hover {
    background: #174485;
    color: #fff;
}
#erl-load-more.disabled {
    opacity: 0.5;
    cursor: default;
}
.erl-loading {
    color: #174485;
    font-weight: bold;
}