.hh-module {
  /* Local tokens (fallback to Bootstrap palette when available) */
  --hh-font-base: 1.6rem;
  --hh-line-base: 1.5;

  --hh-primary: var(--bs-primary, #757575);
  --hh-primary-rgb: var(--bs-primary-rgb, 117, 117, 117);
  --hh-secondary: var(--bs-secondary, #ffc72c);

  --hh-text: #11151c;
  --hh-text-muted: #57595b;
  --hh-text-on-dark: #fff;

  --hh-border: var(--bs-gray-200, #e8eaed);
  --hh-border-strong: color-mix(in srgb, var(--hh-border), #000 10%);

  --hh-bg: #fff;
  --hh-bg-dark: #1b1c1e;
  --hh-bg-subtle: var(--bs-gray-light, #f6f6f6);

  --hh-brand-1: #2d5c86; /* legacy primary button */
  --hh-brand-2: #325675; /* legacy secondary button */

  /* Effects */
  --hh-shadow-inset-1: 0 0 0 2px currentColor inset;
  --hh-gradient-soft: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.5) 100%);
  --hh-gradient-strong: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.5) 60%, rgba(0,0,0,.7) 70%, rgba(0,0,0,.8) 100%);
}

/* Base type */
.hh-module :is(html, body) {
  font-size: var(--hh-font-base);
  line-height: var(--hh-line-base);
}

/* Media helpers */
@media (prefers-reduced-motion: reduce) {
  .hh-module .post-img:hover > img { transform: none; }
}

/* Images & figures */
.hh-module .post .post-img {
  aspect-ratio: 1.5 / 1;
}
.hh-module .post .post-img > img,
.hh-module .post.post-widget .post-img > img,
.hh-module .hot-post :is(.hot-post-right, .hot-post-left) .post.post-thumb .post-img > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hh-module figure { display: table; margin: 0 0 20px; }
.hh-module figure > img { width: 100%; }
.hh-module figure:where(.pull-right) { margin-left: 15px; float:right;}
.hh-module figure:where(.pull-left)  { margin-right: 15px; float: left;}
.hh-module figure > figcaption {
  font-size: 1.4rem; text-align: center; margin-top: 10px; font-style: italic; color: var(--hh-text-muted);
  display: table-caption; caption-side: bottom;
}

/* Sections */
.hh-module.section { padding-top: 30px; }
.hh-module .section-row { margin-bottom: 30px; }
.hh-module .section-title { position: relative; margin-bottom: 20px; min-height: 10px; }
.hh-module .section-title .title {
  position: relative; display: inline-block; background-color: var(--hh-bg);
  font-size: 1.6rem; text-transform: uppercase; margin: 0; padding-right: 10px; z-index: 20;
}
.hh-module .section-title::after {
  content: ""; display: inline-block; height: 2px; background-color: var(--hh-border);
  position: absolute; inset-inline: 0; top: 10px; z-index: 10;
}

/* Inputs */
.hh-module .input {
  width: 100%; height: 40px; padding: 0 15px; background-color: var(--hh-bg);
  border-radius: 2px; border: 2px solid var(--hh-border);
}

/* Buttons */
.hh-module :is(.primary-button, .secondary-button) {
  text-decoration: none;
  display: inline-block;
  padding: 15px 40px;
  border-radius: 2px;
  border: none;
  font: 700 1.4rem/1 var(--bs-body-font-family, inherit);
  transition: .2s all;
  margin-top: 10px;
  color: var(--hh-text-on-dark);
}
.hh-module .primary-button { background: var(--hh-brand-1); box-shadow: var(--hh-shadow-inset-1); }
.hh-module .secondary-button { background: var(--hh-brand-2); box-shadow: var(--hh-shadow-inset-1); }

.hh-module .primary-button:is(:hover, :focus) {
  background: transparent; color: var(--hh-brand-1); text-decoration: none;
}
.hh-module .secondary-button:is(:hover, :focus, a:hover, a:focus) {
  background: transparent; color: var(--hh-brand-2); text-decoration: none;
}

/* Page header */
.hh-module.page-header {
  position: relative; margin: 0; padding: 300px 0 20px; background: var(--hh-bg-dark); border: none;
}
.hh-module.page-header::after { content: ""; position: absolute; inset: 0; background: var(--hh-gradient-soft); }
.hh-module .page-header-bg { position: absolute; inset: 0; background: no-repeat center/cover; }
.hh-module .page-header-bg::after { content: ""; position: absolute; inset: 0; background: var(--hh-gradient-strong); }
.hh-module.page-header .container { position: relative; z-index: 1; }
.hh-module.page-header h1 { font-size: 4.1rem; color: var(--hh-text-on-dark); margin: 0; }

/* Breadcrumb */
.hh-module :is(.breadcrumb, &.breadcrumb) { background-color: var(--hh-bg-subtle); margin-bottom: 0; }
.hh-module .breadcrumb a { color: var(--hh-text); }
.hh-module .breadcrumb a:is(:hover,:focus) { color: var(--hh-brand-1); }
.hh-module .breadcrumb > .active { color: #535353; }
.hh-module.breadcrumb ol { border-radius: 0; padding: 0; }

/* Posts */
.hh-module .post { position: relative; margin-bottom: 30px; }
.hh-module .post .post-img { display: block; overflow: hidden; position: relative; }
.hh-module .post-img > img { transition: 1.6s transform; }
.hh-module .post-img:hover > img { transform: scale(1.2); }

.hh-module .post .post-body { position: relative; margin: -50px 0 0 3%; padding: 5%; background: var(--hh-bg); z-index: 10; }
.hh-module .post .post-body p {font-size: var(--bs-body-font-size);line-height: var(--hh-line-base);}

.hh-module .post.post-widget .post-img { float: left; inline-size: 130px; block-size: 87px; }
.hh-module .post.post-widget .post-body { background: none; margin: 0 0 0 150px; padding: 0; }

.hh-module .post .post-title { font-size: 1.8rem; margin: 0 0 5px; }
.hh-module .post .post-title.title-sm { font-size: 1.6rem; }


.hh-module .post-title a {color: var(--hh-text);}
.hh-module .post-title a:is(:hover,:focus) { color: var(--hh-brand-1); }

.hh-module .post .post-category { margin-bottom: 3px; line-height: 1.2; font-size: 12px; }
.hh-module .post-category :is(span, a) {color: var(--hh-brand-1);font-weight: 700;font-size: 0.8rem;text-transform: uppercase;}
.hh-module .post-category :is(span, a)::after { content: ","; display: inline-block; }
.hh-module .post-category :is(span:last-child, a:last-child)::after { display: none; }

.hh-module .post-thumb { background: var(--hh-bg-dark); }
.hh-module :is(.post-thumb, .page-header) .post-category span { color: var(--hh-text-on-dark); }

.hh-module .post-meta { margin-bottom: 5px; padding: 0; }
.hh-module .post .post-meta {margin-bottom: 8px;}
.hh-module .post-meta span {display: inline-block;color: var(--hh-text-muted);font-size: 0.8rem;text-transform: uppercase;text-wrap: balance;}
.hh-module :is(.page-header, .post-thumb) .post-meta span { color: var(--hh-text-on-dark); }
.hh-module .post-meta span a { color: var(--hh-text-muted); font-weight: 700; }
.hh-module .post-meta span a:is(:hover,:focus) { color: var(--hh-brand-1); }
.hh-module .post-meta span::after { content: '•'; padding: 0 5px; }
.hh-module .post-meta span:last-child::after { content: none; }

/* Hot posts grid */
.hh-module .hot-post { padding: 0 15px; margin-bottom: 25px; }
.hh-module .hot-post .hot-post-left,
.hh-module .hot-post .hot-post-right { padding: 0; }
.hh-module .hot-post .post {margin-bottom: 7px;}

@media (min-width: 992px) {
  .hh-module .hot-post { display: flex; }
  .hh-module .hot-post :is(.hot-post-right, .hot-post-left) { display: flex; flex-direction: column; }
  .hh-module .hot-post .hot-post-right { padding-left: 5px; }
  .hh-module .hot-post .hot-post-right .post.post-thumb { height: 50%; }
  .hh-module .hot-post .hot-post-left  .post.post-thumb { height: 100%; }
  .hh-module .hot-post :is(.hot-post-right, .hot-post-left) .post.post-thumb .post-img { height: 100%; }
}

/* Post overlays */
.hh-module .post.post-thumb .post-img::after { content: ""; position: absolute; inset: 0; background: var(--hh-gradient-soft); }
.hh-module .post.post-thumb .post-body {
  position: absolute; inset-inline: 0; bottom: 0; margin: 0; padding: 5%; width: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.5) 20%, rgba(0,0,0,.8) 100%);
}
@media (min-width: 992px) {
  .hh-module .hot-post-right .post.post-thumb .post-body {
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.6) 15%, rgba(0,0,0,.8) 75%);
  }
}

.hh-module .post.post-thumb .post-category { margin: 0; }
.hh-module .post.post-thumb .post-title {color: var(--hh-text-on-dark);margin: 0;font-size: var(--hh-font-base);}
.hh-module .post.post-thumb a:focus { outline-offset: -10px; }
.hh-module .post.post-thumb .post-meta { margin: 0; }
.hh-module .post.post-thumb .post-meta span a:is(:hover,:focus) { color: var(--hh-brand-1); }

.hh-module .post.post-thumb a:hover .post-title, .hh-module .post.post-thumb a:focus .post-title { text-decoration: underline; }

/* Post size variants */
.hh-module .post.post-sm .post-body { margin: 15px 0 0; background: none; padding: 0; }

/* Post row */
.hh-module .post.post-row::after, .hh-module .post.post-widget::after { content: ""; display: table; clear: both; }
.hh-module .post.post-row .post-img { width: 40%; float: left; }
.hh-module .post.post-row .post-body { margin: 0 0 0 calc(40% + 30px); padding: 0; }

/* Page header details */
.hh-module .page-header .post-category { margin-bottom: 10px; }
.hh-module .page-header .post-meta span, .hh-module .page-header .post-meta span a { color: var(--hh-text-on-dark); }
.hh-module .page-header .post-meta span a:is(:hover,:focus) { color: var(--hh-brand-1); }

/* Share buttons */
.hh-module .post-share a {
  display: inline-block; padding: 5px 15px; border-radius: 5px; color: var(--hh-text-on-dark);
  background-color: var(--hh-text-muted); margin: 0 4px 6px 0; transition: .2s opacity;
}
.hh-module .post-share a:hover { opacity: .9; }
.hh-module .post-share a i { width: 20px; text-align: center; }
.hh-module .post-share a span { padding-left: 10px; border-left: 2px solid rgba(255,255,255,.1); text-transform: uppercase; font-size: 1.2rem; font-weight: 700; margin-left: 10px; }

/* Post nav */
.hh-module .post-nav::after { content: ""; display: table; clear: both; }
.hh-module .post-nav .post-title { font-size: 1.4rem; margin: 0; }
.hh-module .post-nav .post-img { display: block; width: 100px; overflow: hidden; }

/* Widgets */
.hh-module .aside-widget { margin-bottom: 30px; }
.hh-module .social-widget ul { list-style: none; padding: 0; overflow: auto; }
.hh-module .social-widget ul li { float: left; width: 33.33%; }
.hh-module .social-widget ul li a {
  display: block; text-align: center; padding: 30px 15px; color: var(--hh-text-on-dark); transition: .2s opacity; text-decoration: none;
}
.hh-module .social-widget ul li a:focus-visible { outline: 2px solid var(--hh-text-on-dark); outline-offset: -4px; }
.hh-module .social-widget ul li a:hover { opacity: .9; }
.hh-module .social-widget ul li a span { font-weight: 700; font-size: 1.4rem; }
.hh-module .social-widget ul li a i {display: block;font-size: 3rem;}

/* Social brand colors (kept as is; could be tokenized further) */
.hh-module .social-widget .social-facebook { background: #225b99 !important; }
.hh-module .social-widget .social-twitter { background: #000 !important; }
.hh-module .social-widget .social-twitter .fa-twitter::before { content: "𝕏"; font-weight: bold; }
.hh-module .social-widget :is(.social-pinterest-p) { background: #cc2127 !important; }
.hh-module .social-widget .social-instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important; }
.hh-module .social-widget .social-linkedin { background: #0077B5 !important; }
.hh-module .social-widget .social-rss { background: #f26522 !important; }
.hh-module .social-widget .social-youtube { background: #CC181E !important; }
.hh-module .social-widget .social-twitch { background: #6441a5 !important; }
.hh-module .social-widget .social-tiktok { background: #000 !important; }

/* Newsletter */
.hh-module .newsletter-widget { position: relative; padding: 0 30px 30px; border-inline: 2px dashed var(--hh-border); }
.hh-module .aside-widget:last-child .newsletter-widget { border-bottom: 2px dashed var(--hh-border); }
.hh-module .newsletter-widget p { min-height: 68px; max-height: 159px; position: relative; }
.hh-module .newsletter-widget span { display: block; margin-bottom: 5px; }
.hh-module .newsletter-widget .input { margin-bottom: 15px; }
.hh-module .newsletter-widget::after {
  content: "\f0e0"; font-family: "Font Awesome 5 Free"; position: absolute; bottom: -25px; right: 27px; font-size: 16rem; color: var(--hh-border);
  transform: rotate(13deg); z-index: -1; font-weight: 900;
}

/* Category widget */
.hh-module .category-widget ul { padding: 0; list-style: none; }
.hh-module .category-widget ul li { padding: 15px 0; border-bottom: 1px solid var(--hh-border); }
.hh-module .category-widget ul li a { display: block; text-transform: uppercase; font-weight: 700; color: var(--hh-text); }
.hh-module .category-widget ul li a:is(:hover,:focus) { color: var(--hh-brand-1); }
.hh-module .category-widget ul li a span { float: right; font-size: 1.4rem; color: var(--hh-text-muted); margin-left: 15px; }

/* Contact list */
.hh-module .contact li { position: relative; margin-bottom: 20px; padding: 5px 0 0 55px; min-height: 40px; }
.hh-module .contact li i {
  position: absolute; inset-inline-start: 0; inset-block-start: 0; inline-size: 40px; block-size: 40px; text-align: center; line-height: 40px;
  background: var(--hh-bg); color: var(--hh-brand-1); border: 1px solid var(--hh-border); border-radius: 50%;
}

/* Responsive tweaks */
@media (max-width: 767px) {
  .hh-module .page-header h1 { font-size: 3.2rem; }
}
