/* ===================================================================
   News List — Elementor Widget Frontend CSS
   Featured image + expandable news list with image swap on hover
   =================================================================== */

/* ===== Scoped Reset (override WoodMart theme) ===== */
.nl-wrap {
  isolation: isolate;
  position: relative;
  background: #fff;
  width: 100%;
}

.nl-wrap *,
.nl-wrap *::before,
.nl-wrap *::after {
  box-sizing: border-box !important;
}

.nl-wrap ul,
.nl-wrap ol {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
}

.nl-wrap li {
  list-style: none !important;
  list-style-type: none !important;
  border: none !important;
  background: none !important;
}

/* Kill theme ::before bullets */
.nl-wrap li::before {
  display: none !important;
  content: none !important;
}

.nl-wrap a {
  text-decoration: none !important;
  cursor: pointer;
}

/* ===== Main Content ===== */
.nl-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 36px 20px;
  position: relative;
  z-index: 2000;
}

/* ===== Content Area ===== */
.nl-center {
  display: flex;
  align-items: stretch;
  gap: 60px;
  margin: 80px 0 30px 0;
  position: relative;
}

/* ===== Featured Image ===== */
.nl-featured {
  width: 48%;
  min-height: 450px;
  flex-shrink: 0;
  box-shadow: 0 17px 54px rgba(0, 0, 0, 0.22);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 0.3s ease;
}

/* ===== News List ===== */
.nl-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  min-width: 0;
}

.nl-wrap .nl-list > li {
  overflow: hidden;
  height: 65px;
  cursor: pointer;
  opacity: 1;
  padding: 0 !important;
  margin: 0 !important;
  transition: all 0.5s cubic-bezier(0.7, 0.01, 0.3, 1);
}

.nl-wrap .nl-list > li:not(:last-child) {
  margin-bottom: 36px !important;
}

/* Title */
.nl-item-title {
  font-size: 18px;
  color: #545454;
  display: block;
  margin-bottom: 5px;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s cubic-bezier(0.7, 0.01, 0.3, 1);
}

/* Date */
.nl-item-date {
  font-size: 16px;
  color: #8c8c8c;
  font-weight: 500;
  opacity: 0.5;
}

/* Description/summary */
.nl-item-desc {
  font-size: 14px;
  color: #a6a6a6;
  display: none;
  line-height: 24px;
  margin-top: 8px;
}

/* Hover */
.nl-wrap .nl-list > li:hover .nl-item-title {
  color: #337aff;
}

/* Active (expanded) */
.nl-wrap .nl-list > li.nl-active {
  height: auto !important;
  overflow: visible !important;
}

.nl-wrap .nl-list > li.nl-active .nl-item-desc {
  display: block !important;
}

/* Per-item image — hidden on desktop, shown on mobile */
.nl-item-img {
  display: none;
}


/* ===== Responsive ===== */

/* Large Desktop ≤ 1440px */
@media screen and (max-width: 1440px) {
  .nl-main {
    max-width: 1100px;
  }
}

/* Small Desktop ≤ 1280px */
@media screen and (max-width: 1280px) {
  .nl-main {
    max-width: 960px;
  }
}

/* Tablet Landscape ≤ 1024px */
@media screen and (max-width: 1024px) {
  .nl-main {
    max-width: 90%;
    padding: 0 20px 32px 20px;
  }

  .nl-center {
    margin: 60px 0 20px 0;
  }

  .nl-item-title {
    font-size: 16px;
  }

  .nl-item-date {
    font-size: 15px;
  }
}

/* Tablet Portrait ≤ 800px — switch to card feed layout */
@media screen and (max-width: 800px) {
  .nl-center {
    display: block;
    margin: 30px 0 20px 0;
  }

  /* Hide shared featured image */
  .nl-featured {
    display: none !important;
  }

  /* Full width list */
  .nl-list {
    width: 100% !important;
    margin-left: 0 !important;
    min-height: auto;
  }

  /* Card layout: expand all items, show images + descriptions */
  .nl-wrap .nl-list > li {
    height: auto !important;
    overflow: visible;
    margin-bottom: 0 !important;
    padding-bottom: 24px !important;
  }

  .nl-wrap .nl-list > li:not(:last-child) {
    margin-bottom: 30px !important;
  }

  /* Show per-item images */
  .nl-item-img {
    display: block !important;
    width: 100%;
    height: 0;
    padding-top: 56%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 14px;
  }

  /* Always show description on mobile cards */
  .nl-item-desc {
    display: block !important;
    margin-top: 6px;
  }

  .nl-item-title {
    white-space: normal;
    font-size: 16px;
    line-height: 1.4;
  }

  .nl-item-date {
    font-size: 14px;
  }

  .nl-item-desc {
    font-size: 13px;
    line-height: 22px;
  }
}

/* Large Phone ≤ 640px */
@media screen and (max-width: 640px) {
  .nl-main {
    padding: 0 4% 24px 4%;
  }

  .nl-item-title {
    font-size: 15px;
  }

  .nl-item-date {
    font-size: 13px;
  }

  .nl-item-desc {
    font-size: 13px;
    line-height: 20px;
  }

  .nl-wrap .nl-list > li:not(:last-child) {
    margin-bottom: 24px !important;
  }
}

/* Phone ≤ 480px */
@media screen and (max-width: 480px) {
  .nl-main {
    padding: 0 4% 20px 4%;
  }

  .nl-item-title {
    font-size: 15px;
  }

  .nl-item-date {
    font-size: 12px;
  }

  .nl-item-desc {
    font-size: 12px;
  }

  .nl-item-img {
    padding-top: 52%;
    margin-bottom: 12px;
  }

  .nl-wrap .nl-list > li:not(:last-child) {
    margin-bottom: 20px !important;
  }
}

/* Small Phone ≤ 375px */
@media screen and (max-width: 375px) {
  .nl-main {
    padding: 0 3.5% 16px 3.5%;
  }

  .nl-item-title {
    font-size: 14px;
  }

  .nl-item-date {
    font-size: 11px;
  }

  .nl-item-desc {
    font-size: 11px;
  }

  .nl-item-img {
    padding-top: 50%;
    margin-bottom: 10px;
  }
}
