/* HALI Study Guide Manager – scoped frontend styles */
.hsg-country-browser,
.hsg-country-tabs,
.hsg-topic-grid,
.hsg-post-grid,
.hsg-featured,
.hsg-sidebar,
.hsg-pagination,
.hsg-empty{box-sizing:border-box;width:100%}
.hsg-country-browser *,
.hsg-country-tabs *,
.hsg-topic-grid *,
.hsg-post-grid *,
.hsg-featured *,
.hsg-sidebar *,
.hsg-pagination *{box-sizing:border-box}

/* Country tabs + category panels */
.hsg-country-browser{width:100%}
.hsg-country-tabs{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:14px}
.hsg-country-tab{appearance:none;display:inline-flex;align-items:center;gap:10px;min-height:62px;padding:10px 20px;border:0;border-radius:10px;background:#eaf2f4;color:#005d6d;text-decoration:none;font:inherit;font-size:16px;font-weight:600;line-height:1.3;cursor:pointer;transition:background .2s ease,color .2s ease,transform .2s ease,box-shadow .2s ease}
.hsg-country-browser__panels{width:100%;margin-top:28px}
.hsg-country-panel{width:100%}
.hsg-country-panel[hidden]{display:none!important}
.hsg-country-tabs__fallback{margin-top:12px;text-align:center}
.hsg-country-tabs__fallback a{color:#005d6d;text-decoration:underline}
.hsg-country-tab:hover,.hsg-country-tab:focus-visible,.hsg-country-tab.is-active{background:#005d6d;color:#fff;transform:translateY(-1px);box-shadow:0 6px 18px rgba(0,93,109,.12)}
.hsg-country-tab__image{display:block;width:42px;height:42px;object-fit:contain;border-radius:9px;background:#fff}

/* Responsive grids. Elementor responsive selectors override these safe fallbacks. */
.hsg-responsive-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}

/* Topic cards */
.hsg-topic-card,.hsg-post-card{min-width:0}
.hsg-topic-card__image,.hsg-post-card__image{display:block;overflow:hidden;border-radius:14px;background:#edf3f4}
.hsg-topic-card__image{aspect-ratio:6/5}
.hsg-post-card__image{aspect-ratio:4/3}
.hsg-topic-card__image img,.hsg-post-card__image img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.hsg-topic-card:hover .hsg-topic-card__image img,.hsg-post-card:hover .hsg-post-card__image img{transform:scale(1.025)}
.hsg-placeholder{display:block;width:100%;height:100%;background:linear-gradient(135deg,#edf3f4,#dce8eb)}
.hsg-topic-card__body{padding-top:12px}
.hsg-topic-card__heading{display:flex;align-items:flex-start;gap:10px}
.hsg-topic-card__icon{display:inline-flex;flex:0 0 44px;align-items:center;justify-content:center;width:44px;height:44px;padding:6px;border-radius:7px;background:#edf4f5}
.hsg-topic-card__icon img{display:block;width:100%;height:100%;object-fit:contain}
.hsg-topic-card__heading-content{min-width:0;flex:1}
.hsg-topic-card__title,.hsg-post-card__title{margin:0}
.hsg-topic-card__title a,.hsg-post-card__title a{color:#09283b;text-decoration:none}
.hsg-topic-card__title{font-size:16px;line-height:1.35;font-weight:600}
.hsg-topic-card__description{margin-top:6px;color:#8b9ab3;font-size:14px;line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hsg-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin-top:12px;padding:10px 16px;border-radius:999px;background:#00697a;color:#fff;text-decoration:none;font-size:14px;font-weight:500;line-height:1.2;transition:background .2s ease,transform .2s ease}
.hsg-topic-card.has-icon .hsg-button{margin-left:54px}
.hsg-button:hover,.hsg-button:focus-visible{background:#0b2c4c;color:#fff;transform:translateY(-1px)}

/* Post cards */
.hsg-post-card__body{padding-top:10px}
.hsg-post-card__date,.hsg-featured__date,.hsg-featured-item__date{display:flex;align-items:center;gap:7px;color:#8b9ab3;font-size:15px;line-height:1.4}
.hsg-post-card__date img,.hsg-featured__date img{display:block;width:20px;height:20px;object-fit:contain}
.hsg-post-card__title{margin-top:7px;font-size:16px;line-height:1.42;font-weight:600;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* Featured + newest widget */
.hsg-featured{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(360px,1fr);align-items:start;gap:20px}
.hsg-featured__main,.hsg-featured__list{min-width:0}
.hsg-featured__main-image{display:block;overflow:hidden;aspect-ratio:2.05/1;border-radius:14px;background:#edf3f4}
.hsg-featured__main-image img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.hsg-featured__main:hover .hsg-featured__main-image img{transform:scale(1.02)}
.hsg-featured__date{margin-top:12px}
.hsg-featured__main-title{margin:12px 0 0;font-size:22px;font-weight:600;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hsg-featured__main-title a,.hsg-featured-item__title a{color:#09283b;text-decoration:none}
.hsg-featured__list{display:flex;flex-direction:column}
.hsg-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}
.hsg-featured-item:last-child{margin-bottom:0}
.hsg-featured-item__image{display:block;overflow:hidden;aspect-ratio:2.05/1;border-radius:8px;background:#edf3f4}
.hsg-featured-item__image img{display:block;width:100%;height:100%;object-fit:cover}
.hsg-featured-item__body{min-width:0}
.hsg-featured-item__title{margin:0;font-size:15px;font-weight:600;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hsg-featured-item__date{margin-top:8px;font-size:14px}
.hsg-featured-item__date img{display:block;width:16px;height:16px;object-fit:contain}

/* Sidebar */
.hsg-sidebar{padding:20px 15px;border-radius:12px;background:#00697a;color:#fff}
.hsg-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;text-transform:uppercase}
.hsg-sidebar__nav{display:flex;flex-direction:column}
.hsg-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}
.hsg-sidebar__link:hover,.hsg-sidebar__link:focus-visible,.hsg-sidebar__link.is-active{color:#ffd66b}

/* Pagination */
.hsg-pagination{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px;margin-top:30px}
.hsg-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}
.hsg-pagination .page-numbers.current,.hsg-pagination .page-numbers:hover,.hsg-pagination .page-numbers:focus-visible{background:#00697a;color:#fff}
.hsg-empty{padding:28px;border-radius:12px;background:#edf3f4;color:#244050;text-align:center}

@media(max-width:1024px){
  .hsg-responsive-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  .hsg-country-tab{min-height:56px;padding:9px 16px}
  .hsg-country-tab__image{width:38px;height:38px}
  .hsg-featured{grid-template-columns:1fr;gap:18px}
  .hsg-featured__list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}
  .hsg-featured-item{grid-template-columns:140px minmax(0,1fr);margin:0;padding-bottom:14px}
}

@media(max-width:767px){
  .hsg-responsive-grid{grid-template-columns:repeat(1,minmax(0,1fr));gap:18px}
  .hsg-country-tabs{overflow-x:auto;flex-wrap:nowrap;padding-bottom:5px;scrollbar-width:thin}
  .hsg-country-tab{flex:0 0 auto;min-height:50px;padding:8px 14px;font-size:14px}
  .hsg-country-tab__image{width:34px;height:34px}
  .hsg-topic-card__image,.hsg-post-card__image,.hsg-featured__main-image{border-radius:12px}
  .hsg-topic-card.has-icon .hsg-button{margin-left:0}
  .hsg-featured__main-title{font-size:19px}
  .hsg-featured__list{display:flex;gap:0}
  .hsg-featured-item{grid-template-columns:112px minmax(0,1fr);gap:10px;width:100%;padding-bottom:12px;margin-bottom:12px}
  .hsg-featured-item__title{font-size:14px}
  .hsg-featured-item__date{font-size:13px}
  .hsg-pagination{gap:8px;margin-top:24px}
  .hsg-pagination .page-numbers{min-width:40px;min-height:40px;padding:8px 14px}
  .hsg-sidebar{padding:18px 14px}
}

.hsg-country-tab:focus-visible{outline:2px solid #0b2c4c;outline-offset:3px}
.hsg-topic-card[hidden]{display:none!important}
.hsg-client-pagination button.page-numbers{font-family:inherit}
