@import "../_variables.css";

.component-latest-new {
    padding: 48px 0;
    padding-bottom: 8px;
}

  .builder-row.builder-r0-c0 > div.component-latest-new {
    padding-bottom: 8px;
  }

.component-latest-new .wrap-latest-new-1st {
    position: relative;
    aspect-ratio: 1.64 / 1;
    width: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 16px;
}

.component-latest-new .wrap-news-content {
    position: absolute;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.64) 23.65%, rgba(0, 0, 0, 0.8) 100%);
    padding: 32px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.component-latest-new .latest-new-1st-category {
    margin-bottom: 9px;
}

.component-latest-new .latest-new-1st-category span {
    border: 1px solid #E5E7EB;
    padding: 4px 8px;
    border-radius: 6px;
    background: #F9FAFB;
    font-weight: 400;
    font-size: 0.857rem;
    line-height: 1.143rem;
    letter-spacing: 0;
    text-align: center;
    vertical-align: middle;
}

.component-latest-new .latest-news-1st-title {
    font-weight: 700;
    font-size: 2.143rem;
    line-height: 2.571rem;
    letter-spacing: 0;
    color: white;
    position: relative;
    margin-bottom: 6px;
}

.component-latest-new .latest-news-1st-title a {
    color: inherit;
    text-decoration: none;
}

.component-latest-new .latest-news-1st-title a:hover {
    color: inherit;
}

.component-latest-new .latest-news-1st-title > div {
    width: 90%;
}

.component-latest-new .latest-news-1st-title img {
    position: absolute;
    right: 0;
    top: 0;
    cursor: pointer;
}

.component-latest-new .latest-news-1st-description {
    font-weight: 400;
    font-size: 1.286rem;
    line-height: 2rem;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.component-latest-new .latest-news-1st-description > p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.component-latest-new .latest-news-1st-information .container {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: sans-serif;
}

.component-latest-new .latest-news-1st-information .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.component-latest-new .latest-news-1st-information .info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 50%;
}

.component-latest-new .latest-news-1st-information .meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    margin-left: auto;
    width: 40%;
}

.component-latest-new .latest-news-1st-information .name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.429rem;
    letter-spacing: 0;
    color: white;
}

.component-latest-new .latest-news-1st-information .date {
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.429rem;
    letter-spacing: 0;
    color: #FFFFFFCC;
}

.component-latest-new .latest-news-1st-information .last-view-at {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.429rem;
    letter-spacing: 0;
    text-align: right;
    color: white;
}

.component-latest-new .latest-news-1st-information .views {
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.429rem;
    letter-spacing: 0;
    text-align: right;
    color: #FFFFFFCC;
}

.component-latest-new .latest-news-1st-information .row-icons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 0 0 0;
    flex-wrap: wrap;
    gap: 10px;
}

.component-latest-new .latest-news-1st-information .row-icons .column {
    flex: 1;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.429rem;
    letter-spacing: 0;
}

.component-latest-new .latest-news-1st-information .row-icons .left {
    text-align: left;
}

.component-latest-new .latest-news-1st-information .row-icons .center {
    text-align: center;
    /* flex: 1.4; */
}

.component-latest-new .latest-news-1st-information .row-icons .right {
    text-align: right;
    flex: 0.6;
}

.component-latest-new .latest-news-1st-information .row-icons .item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    color: white;
}

.component-latest-new .latest-news-1st-information .row-icons .icon {
    width: 24px;
    height: 24px;
}

.btn-redirect-all-posts {
    width: fit-content;
    margin-bottom: 24px;
}

/* =========================
   Responsive overrides
   (paste AFTER your current CSS)
   ========================= */

@media (max-width: 1200px) {
  .component-latest-new { padding: 36px 0 8px; }

  .component-latest-new .wrap-news-content { padding: 24px; }

  .component-latest-new .latest-news-1st-title {
    font-size: 1.875rem;   /* ~30px */
    line-height: 2.25rem;  /* ~36px */
  }

  .component-latest-new .latest-news-1st-description {
    font-size: 1.071rem;   /* ~15px */
    line-height: 1.6rem;
  }

  .component-latest-new .latest-news-1st-information { width: 60%; }
}

@media (max-width: 1024px) {
  .component-latest-new .uk-grid > [class*="uk-width-"] {
    width: 100% !important;
  }

  .component-latest-new .uk-grid > .uk-width-1-3 {
    margin-top: 24px;
  }

  .component-latest-new .wrap-latest-new-1st {
    aspect-ratio: 16 / 9;
  }

  .component-latest-new .latest-news-1st-title > div { width: 100%; }
  .component-latest-new .latest-news-1st-information { width: 100%; }

  .component-latest-new .latest-news-1st-information .container {
    gap: 12px;
  }

  .component-latest-new .latest-news-1st-information .row-icons {
    padding-top: 10px;
  }
}

@media (max-width: 768px) {
  .component-latest-new .wrap-news-content { padding: 16px; }

  .component-latest-new .latest-new-1st-category span {
    font-size: 0.813rem;
    line-height: 1.1rem;
    padding: 3px 6px;
  }

  .component-latest-new .latest-news-1st-title {
    font-size: 1.5rem;     /* ~24px */
    line-height: 1.9rem;
    margin-bottom: 4px;
  }

  .component-latest-new .latest-news-1st-title img {
    width: 28px;
    height: 28px;
  }

  .component-latest-new .latest-news-1st-description {
    font-size: 0.95rem;
    line-height: 1.45rem;
    margin-bottom: 8px;
  }

  .component-latest-new .latest-news-1st-information .avatar {
    width: 34px; height: 34px;
  }

  .component-latest-new .latest-news-1st-information .name,
  .component-latest-new .latest-news-1st-information .date,
  .component-latest-new .latest-news-1st-information .last-view-at,
  .component-latest-new .latest-news-1st-information .views {
    font-size: 0.938rem;
    line-height: 1.3rem;
  }

  .component-latest-new .latest-news-1st-information .row-icons .item {
    font-size: 0.938rem;
  }

  .component-latest-new .latest-news-1st-information .row-icons .icon {
    width: 20px; height: 20px;
  }
}

@media (max-width: 640px) {
  .component-latest-new { padding: 28px 0 6px; }

  .component-latest-new .wrap-latest-new-1st {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
  }

  .component-latest-new .wrap-news-content {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 14px;
  }

  .component-latest-new .latest-new-1st-category { margin-bottom: 6px; }

  .component-latest-new .latest-news-1st-title {
    font-size: 1.25rem;    /* ~20px */
    line-height: 1.6rem;
  }

  .component-latest-new .latest-news-1st-description > p {
    -webkit-line-clamp: 1;
  }

  .component-latest-new .latest-news-1st-information .container {
    gap: 10px;
  }

  .component-latest-new .latest-news-1st-information .row-icons {
    gap: 8px;
  }
  .component-latest-new .latest-news-1st-information .row-icons .column {
    flex: 0 0 100%;
    text-align: left;
  }
  .component-latest-new .latest-news-1st-information .row-icons .right {
    text-align: left;
    /*flex: 0 0 100%;*/
  }

  .btn-redirect-all-posts { margin-bottom: 16px; }
}

@media (max-width: 420px) {
  .component-latest-new .latest-news-1st-description { display: none; }
  .component-latest-new .latest-news-1st-title img { width: 24px; height: 24px; }
}
