/* HALI News Widgets – scoped frontend styles */
.hnw-featured-wrap,
.hnw-featured,
.hnw-post-grid-wrap,
.hnw-post-grid,
.hnw-related-wrap,
.hnw-related-grid,
.hnw-sidebar,
.hnw-pagination,
.hnw-empty{box-sizing:border-box;width:100%}
.hnw-featured-wrap *,
.hnw-featured *,
.hnw-post-grid-wrap *,
.hnw-post-grid *,
.hnw-related-wrap *,
.hnw-related-grid *,
.hnw-sidebar *,
.hnw-pagination *{box-sizing:border-box}
.hnw-featured-wrap a,
.hnw-post-grid-wrap a,
.hnw-related-wrap a,
.hnw-sidebar a{color:inherit;text-decoration:none}

/* Section heading */
.hnw-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:28px}
.hnw-section-title{position:relative;margin:0 0 28px;padding:0 0 14px;color:#005d6d;font-size:28px;font-weight:700;line-height:1.25;text-transform:uppercase}
.hnw-section-heading .hnw-section-title{margin-bottom:0}
.hnw-section-title::after{position:absolute;left:0;bottom:0;width:38px;height:3px;border-radius:999px;background:#005d6d;content:""}
.hnw-section-title[hidden]{display:none!important}
.hnw-view-all{display:inline-flex;align-items:center;gap:8px;flex:0 0 auto;color:#91a0bd;font-size:14px;font-weight:400;line-height:1.4;transition:color .2s ease}
.hnw-view-all span{font-size:20px;line-height:1}

/* Shared media */
.hnw-featured__main-image,
.hnw-featured-item__image,
.hnw-post-card__image{display:block;overflow:hidden;background:#edf3f4}
.hnw-featured__main-image img,
.hnw-featured-item__image img,
.hnw-post-card__image img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.hnw-featured__main:hover .hnw-featured__main-image img,
.hnw-featured-item:hover .hnw-featured-item__image img,
.hnw-post-card:hover .hnw-post-card__image img{transform:scale(1.025)}
.hnw-placeholder{display:block;width:100%;height:100%;background:linear-gradient(135deg,#edf3f4,#dce8eb)}

/* Date */
.hnw-date{display:flex;align-items:center;gap:7px;color:#8b9ab3;font-size:15px;font-weight:400;line-height:1.4}
.hnw-date img{display:block;width:20px;height:20px;object-fit:contain}

/* Featured news */
.hnw-featured{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(360px,1fr);align-items:start;gap:20px}
.hnw-featured__main,.hnw-featured__list{min-width:0}
.hnw-featured__main-image{height:300px;border-radius:14px}
.hnw-featured__main .hnw-date{margin-top:12px}
.hnw-featured__main-title{display:-webkit-box;overflow:hidden;margin:12px 0 0;color:#09283b;font-size:22px;font-weight:600;line-height:1.45;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.hnw-featured__list{display:flex;flex-direction:column}
.hnw-featured-item{display:grid;grid-template-columns:165px minmax(0,1fr);gap:12px;align-items:center;padding:0 0 14px;margin:0 0 14px;border-bottom:1px solid #e4ecef}
.hnw-featured-item:last-child{margin-bottom:0}
.hnw-featured-item__image{height:80px;border-radius:8px}
.hnw-featured-item__body{min-width:0}
.hnw-featured-item__title{display:-webkit-box;overflow:hidden;margin:0;color:#09283b;font-size:15px;font-weight:600;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.hnw-featured-item .hnw-date{margin-top:8px;font-size:14px}
.hnw-featured-item .hnw-date img{width:16px;height:16px}

/* Post grids */
.hnw-post-grid,.hnw-related-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:20px;row-gap:24px}
.hnw-related-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:15px}
.hnw-post-card{min-width:0}
.hnw-post-card__image{height:175px;border-radius:14px}
.hnw-post-card .hnw-date{margin-top:10px}
.hnw-post-card__title{display:-webkit-box;overflow:hidden;margin:7px 0 0;color:#09283b;font-size:16px;font-weight:600;line-height:1.42;-webkit-box-orient:vertical;-webkit-line-clamp:3}

/* Category sidebar */
.hnw-sidebar{padding:20px 15px;border-radius:12px;background:#006878;color:#fff}
.hnw-sidebar__title{margin:0 0 8px;padding:0 0 14px;border-bottom:1px solid rgba(255,255,255,.16);color:#fff;font-size:20px;font-weight:700;line-height:1.3;text-transform:uppercase}
.hnw-sidebar__nav{display:flex;flex-direction:column}
.hnw-sidebar__link{display:block;padding:14px 0;border-bottom:1px solid rgba(255,255,255,.13);color:#fff;text-decoration:none;font-size:15px;font-weight:400;line-height:1.45;transition:color .2s ease,padding-left .2s ease}
.hnw-sidebar__link:last-child{border-bottom:0}
.hnw-sidebar__link:hover,.hnw-sidebar__link:focus-visible,.hnw-sidebar__link.is-active{color:#ffd66b;padding-left:3px}

/* Pagination */
.hnw-pagination{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px;margin-top:30px}
.hnw-pagination .page-numbers{appearance:none;border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:42px;padding:9px 16px;border-radius:999px;background:#edf2f4;color:#263b47;text-decoration:none;font-size:16px;font-weight:400;line-height:1;transition:background .2s ease,color .2s ease}
.hnw-pagination .page-numbers.current,.hnw-pagination .page-numbers:hover,.hnw-pagination .page-numbers:focus-visible{background:#00697a;color:#fff}
.hnw-pagination .prev,.hnw-pagination .next{font-size:15px;font-weight:600}
.hnw-empty{padding:28px;border-radius:12px;background:#edf3f4;color:#244050;text-align:center}

@media(max-width:1024px){
  .hnw-featured{grid-template-columns:1fr;gap:18px}
  .hnw-featured__list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}
  .hnw-featured-item{grid-template-columns:140px minmax(0,1fr);margin:0;padding-bottom:14px}
  .hnw-post-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 16px}
  .hnw-related-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
}

@media(max-width:767px){
  .hnw-section-heading{align-items:center}
  .hnw-section-title{font-size:24px}
  .hnw-featured__main-image{height:220px;border-radius:12px}
  .hnw-featured__main-title{font-size:19px}
  .hnw-featured__list{display:flex;gap:0}
  .hnw-featured-item{grid-template-columns:112px minmax(0,1fr);gap:10px;width:100%;padding-bottom:12px;margin-bottom:12px}
  .hnw-featured-item__image{height:72px}
  .hnw-featured-item__title{font-size:14px}
  .hnw-featured-item .hnw-date{font-size:13px}
  .hnw-post-grid,.hnw-related-grid{grid-template-columns:1fr;gap:18px}
  .hnw-post-card__image{height:220px;border-radius:12px}
  .hnw-pagination{gap:8px;margin-top:24px}
  .hnw-pagination .page-numbers{min-width:40px;min-height:40px;padding:8px 14px}
  .hnw-sidebar{padding:18px 14px}
}

/* Live filtering */
.hnw-results-region{position:relative;min-height:40px;transition:opacity .18s ease}
.hnw-post-grid-wrap.is-loading .hnw-results-region{opacity:.48;pointer-events:none}
.hnw-post-grid-wrap.is-loading .hnw-results-region::after{position:absolute;top:18px;right:18px;width:22px;height:22px;border:2px solid rgba(0,93,109,.22);border-top-color:#005d6d;border-radius:50%;content:"";animation:hnw-spin .7s linear infinite}
.hnw-pagination .dots{cursor:default;background:transparent;color:#81909a}
.hnw-pagination .dots:hover{background:transparent;color:#81909a}
@keyframes hnw-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.hnw-results-region{transition:none}.hnw-post-grid-wrap.is-loading .hnw-results-region::after{animation:none}}
