/* ==========================================================================
   Latest News
   Template: page-templates/latest-news.php
   Script:   js/latest-news.js

   Layout, spacing, cards, forms, and the Show more button use Bootstrap 4
   utilities and components. Rules in this file are only what Bootstrap
   cannot do: image crop, 3-line clamps, and the card hover.
   ========================================================================== */


/* --------------------------------------------------------------------------
   Toolbar — theme sets .form-control and .custom-select to border: none
   -------------------------------------------------------------------------- */

.aes-news-toolbar .form-control,
.aes-news-toolbar .custom-select,
.aes-news-toolbar .input-group-text {
    border: 2px solid #000;
    padding: 0.7rem 1rem;
}

.aes-news-toolbar .custom-select,
.aes-news-toolbar .form-control {
    height: auto;
    background-color: #fff;
    border-radius: 0.25rem;
}

.aes-news-toolbar .custom-select {
    padding-right: 2.25rem;
}

.aes-news-toolbar .input-group-text {
    background-color: #0096d7;
    color: #fff;
    border-right-width: 0;
    border-radius: 0.25rem 0 0 0.25rem;
}

.aes-news-toolbar .input-group .form-control {
    border-radius: 0 0.25rem 0.25rem 0;
}

.aes-news-toolbar .form-control:focus,
.aes-news-toolbar .custom-select:focus {
    border-color: #000;
    box-shadow: 0 0 0 0.15rem rgba(0, 150, 215, 0.2);
}


/* --------------------------------------------------------------------------
   Cards — image fills the card head
   -------------------------------------------------------------------------- */

.aes-news-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aes-news-card__media {
    height: 210px;
    overflow: hidden;
    background-color: #f4f6f8;
}

.aes-news-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


/* --------------------------------------------------------------------------
   Cards — clamp title and excerpt to 3 lines
   -------------------------------------------------------------------------- */

.aes-news-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}


/* --------------------------------------------------------------------------
   Cards — title, excerpt, hover, and read link
   -------------------------------------------------------------------------- */

.aes-news-card .card-title {
    margin-top: 0;
    font-weight: 700;
    line-height: 1.3;
}

.aes-news-card .card-text {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
}

.aes-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(58, 80, 94, 0.15) !important;
}

.aes-news-read {
    color: #0096d7;
}

.aes-news-card:hover .aes-news-read {
    color: #3a505e;
}


/* --------------------------------------------------------------------------
   Single post — featured image, back link, latest news sidebar
   -------------------------------------------------------------------------- */

.aes-news-single__back {
    margin-bottom: 2.5rem;
}

.aes-news-single__hero {
    display: block;
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.aes-news-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.aes-news-single__aside {
    max-width: 500px;
}

.aes-news-single__thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 35 / 18;
    object-fit: cover;
    border-radius: 0.25rem;
}

.aes-news-single__title {
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 0.15rem;
}

.aes-news-single__link {
    color: #3a505e;
}

.aes-news-single__link:hover {
    color: #0096d7;
    text-decoration: none;
}

.aes-news-single__aside .aes-news-single__link:last-child {
    margin-bottom: 0 !important;
}

@media (max-width: 767.98px) {
    .aes-news-single__hero {
        height: 220px;
    }
}
