/*
 * Results Listing Styles
 */

/* ---------------------------------
 * Main Wrapper
 * --------------------------------- */
#lor-results-wrapper {
    width: 100%;
    max-width: 1120px;
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
}

/* ---------------------------------
 * Filter Dropdown
 * --------------------------------- */
.lor-filters {
    margin-bottom: 30px;
    max-width: 400px; /* You can adjust this */
    width: 100%; /* Make filter use the width */
}

.lor-filters select {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 1px solid #c0c0c0;
    border-radius: 50px; /* Matches your screenshot */
    background-color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Custom arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 20px;
    cursor: pointer;
}

/* ---------------------------------
 * Grid Layout
 * --------------------------------- */
.lor-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3-column grid */
    gap: 30px; /* Space between cards */
    margin-bottom: 30px;
    min-height: 300px; /* Prevents "jumping" when loading */
    width: 100%; /* Make grid use the wrapper width */
}

/* ---------------------------------
 * Result Card
 * --------------------------------- */
.lor-grid-item {
    border-radius: 12px 12px 12px 12px;
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: var(--e-global-color-d4e4912); /* Make sure this Elementor global color is defined */
    transition: background 0.3s, border 0.3s, border-radius 0.3s, box-shadow 0.3s;
    padding: 0px 0px 0px 0px;
}

.lor-grid-item:hover{
  box-shadow: 0px 6px 16px -4px rgba(0, 0, 0, 0.25);
}

.lor-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensures all cards in a row are the same height */
}

.lor-card-image {
    aspect-ratio: 14 / 10; /* Gives a consistent image height */
    overflow: hidden;
}

.lor-card-image img {
    width: 100%;
    border-radius: 12px 12px 0px 0px !important;
    height: 250px !important;
    object-fit: cover;
}

.lor-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Makes content fill the remaining card space */
}

.lor-card-category {
    font-family: "Proxima Nova", Sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #022641;
    background-color: #D9EEFC;
    text-transform: uppercase;
    margin-bottom: 10px;
    
    /* Tag Styling */
    display: inline-block;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 4px;
}

.lor-card-title {
    font-family: "Proxima Nova", Sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2em;
    letter-spacing: 0.04em;
}

.lor-card-title a {
    color: #022641 !important;
    font-weight: bold !important;
    transition: color 0.3s ease;
}

.lor-card-title a:hover {
    color: #00CCFF !important; /* Example hover color */
}

.lor-card-excerpt {
    font-size: 18px;
    color: inherit;
    flex-grow: 1; /* Pushes the stats and read more to the bottom */
    margin-bottom: 20px;
}

/* Placeholder Stats Styling */
.lor-card-stats {
    display: flex;
    gap: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-bottom: 20px;
}

.lor-stat-item {
    flex: 1;
    font-weight: 600;
    line-height: 1;
    font-size: 14px;
    color: #022641;
}

.lor-stat-item span {
    font-size: 24px;
    font-weight: 900;
    display: block;
    margin-bottom: 5px;
}

.lor-card-readmore {
    font-size: 18px;
    font-weight: 700 !important;
    text-transform: capitalize;
    letter-spacing: 0.04em;
    fill: #022641;
    color: #022641 !important;
    padding: 0px 0px 0px 0px;
    transition: color 0.3s ease;
    cursor: pointer;
    
    /* Flex to align text and circle icon */
    display: flex;
    align-items: start;
    line-height: 1.7;
  }

/* * Circle Icon & Animation 
 */
.lor-card-readmore svg {
    width: 22px;
    height: 22px;
    background-color: #022641; /* Normal State: Dark Blue Circle */
    border-radius: 50%;
    
    /* Padding centers the icon inside the circle */
    padding: 4px; 
    box-sizing: border-box;
    
    margin-left: 10px;
    transition: all 0.3s ease;
    
    /* Normal State: Rotate arrow to point North-East */
    transform: rotate(-45deg);
}

.lor-card-readmore svg path {
    fill: #ffffff !important; /* White arrow */
}

/* Hover States */
.lor-card-readmore:hover {
    color: #00CCFF !important; /* Text turns light blue */
}

.lor-card-readmore:hover svg path {
    fill: #ffffff !important; 
}

.lor-card-readmore:hover svg {
    background-color: #00CCFF; /* Circle turns Light Blue */
    /* Active State: Rotate arrow to point Straight Right or South-East */
    transform: rotate(45deg); 
}

/* ---------------------------------
 * Pagination
 * --------------------------------- */
.lor-pagination-container {
    text-align: center;
    margin-top: 30px;
}

.lor-pagination-container .lor-page-link {
    display: inline-block;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    margin: 0 4px;
    border: 1px solid #c0c0c0;
    border-radius: 8px; /* Matches your screenshot */
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
}

.lor-pagination-container .lor-page-link:hover {
    background-color: #f0f0f0;
    border-color: #a0a0a0;
}

.lor-pagination-container .lor-page-link.current {
    background-color: #003a65; /* Dark blue from screenshot */
    border-color: #003a65;
    color: #fff;
    cursor: default;
}

/* Hide prev/next if you only want numbers */
.lor-pagination-container .lor-page-link.prev,
.lor-pagination-container .lor-page-link.next {
    /* uncomment to hide: display: none; */
}

/* ---------------------------------
 * Loading & Utility
 * --------------------------------- */
.lor-loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #003a65; /* Spinner color */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: lor-spin 1s linear infinite;
    margin: 100px auto; /* Center in the grid container */
    grid-column: 1 / -1; /* Span all columns */
}

@keyframes lor-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lor-no-results {
    font-size: 18px;
    text-align: center;
    color: #555;
    grid-column: 1 / -1; /* Span all columns */
}

/* ---------------------------------
 * Responsive (Tablet & Mobile)
 * --------------------------------- */
@media (max-width: 991px) {
    .lor-grid-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns */
    }
}

@media (max-width: 767px) {
    .lor-grid-container {
        grid-template-columns: 1fr; /* 1 column */
    }

    .lor-card-title {
        font-size: 22px;
    }
}