/* HolaMed-style medical blog — matches homepage-medical-blog demo */
:root {
  --hm-teal: #00d4c5;
  --hm-teal-2: #1ee0d2;
  --hm-navy: #1c2739;
  --hm-ink: #243044;
  --hm-muted: #8a94a6;
  --hm-line: #e9eef3;
  --hm-bg: #ffffff;
}

body:is(.home, .blog, .single, .archive, .search, .error404) {
  background: var(--hm-bg);
  --c1: var(--hm-teal);
  --c2: var(--hm-teal-2);
  --navy: var(--hm-navy);
  --ink: var(--hm-ink);
}

body:is(.home, .blog, .single, .archive, .search) .site-topbar {
  display: none;
}

body:is(.home, .blog, .single, .archive, .search) .site-header {
  position: relative;
  box-shadow: none;
  border-bottom: 1px solid var(--hm-line);
}

body:is(.home, .blog, .single, .archive, .search) .header-inner {
  min-height: 92px;
  position: relative;
}

body:is(.home, .blog, .single, .archive, .search) .logo {
  gap: 10px;
  min-width: 0;
}

body:is(.home, .blog, .single, .archive, .search) .logo .logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
}

body:is(.home, .blog, .single, .archive, .search) .logo .hm-logo-text span {
  display: block;
  font-size: 11px;
}

body:is(.home, .blog, .single, .archive, .search) .logo .hm-logo-text strong {
  font-family: Vazirmatn, sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--hm-navy);
  white-space: nowrap;
}

body:is(.home, .blog, .single, .archive, .search) .main-nav {
  flex: 1;
  margin-inline: 24px 8px;
}

body:is(.home, .blog, .single, .archive, .search) .nav-menu {
  gap: 26px;
}

body:is(.home, .blog, .single, .archive, .search) .nav-menu a {
  color: var(--hm-navy);
  font-weight: 500;
  font-size: 15px;
}

body:is(.home, .blog, .single, .archive, .search) .nav-menu .current-menu-item a,
body:is(.home, .blog, .single, .archive, .search) .nav-menu a:hover {
  color: var(--hm-teal);
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  background: var(--hm-navy);
}

.hm-logo-plus {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--hm-teal);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.hm-logo-plus svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
}

.hm-header-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hm-icon-btn,
.hm-socials a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--hm-navy);
  background: #eef6f7;
  border: 1px solid #e4eef0;
}

.hm-icon-btn {
  cursor: pointer;
}

.hm-icon-btn:hover,
.hm-socials a:hover {
  color: var(--hm-teal);
  background: #e2f6f4;
}

.hm-icon-btn svg,
.hm-socials a svg {
  width: 22px;
  height: 22px;
}

.hm-icon-btn svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.hm-socials {
  display: flex;
  gap: 8px;
  margin-left: 6px;
}

.hm-socials a svg {
  fill: currentColor;
  stroke: none;
}

.hm-search-panel {
  display: none;
  position: absolute;
  left: 16px;
  top: 86px;
  background: #fff;
  border: 1px solid var(--hm-line);
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(28, 39, 57, 0.12);
  z-index: 50;
  min-width: 280px;
}

.hm-search-panel.open {
  display: block;
}

.hm-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 36px auto 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
}

.hm-cat {
  display: inline-block;
  background: var(--hm-teal);
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.hm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--hm-muted);
  font-size: 12px;
  margin-top: 8px;
}

.hm-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hm-meta svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.hm-title {
  color: var(--hm-ink) !important;
  font-family: Vazirmatn, sans-serif;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
}

.hm-title a {
  color: inherit;
}

.hm-title a:hover {
  color: var(--hm-teal);
}

.hm-excerpt {
  color: var(--hm-muted);
  font-size: 14px;
  line-height: 1.8;
  margin: 10px 0 0;
}

.hm-featured {
  display: grid;
  grid-template-columns: 1.38fr 0.82fr;
  gap: 28px;
  margin-bottom: 30px;
}

.hm-media {
  display: block;
  overflow: hidden;
  background: #e8f7f6;
  position: relative;
  border-radius: 10px;
}

.hm-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

.hm-featured-main .hm-media {
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 280px;
  margin-bottom: 14px;
}

.hm-featured-main h2 {
  font-size: 26px;
}

.hm-featured-side {
  display: grid;
  gap: 22px;
}

.hm-side-card .hm-media {
  aspect-ratio: 16 / 10;
  height: auto;
  min-height: 128px;
  margin-bottom: 10px;
}

.hm-side-card h3 {
  font-size: 16px;
}

.hm-list {
  display: grid;
  gap: 20px;
  margin: 8px 0 34px;
}

.hm-list-item {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 16px;
  align-items: start;
}

.hm-list-item .hm-media {
  width: 78px;
  height: 78px;
}

.hm-list-item h3 {
  font-size: 16px;
  margin-bottom: 2px;
}

.hm-newsletter {
  position: relative;
  background: linear-gradient(115deg, #00d4c5 0%, #3fe0d4 48%, #7eebdf 100%);
  color: #fff;
  padding: 40px 36px 40px 220px;
  margin: 8px 0 38px;
  overflow: hidden;
  min-height: 188px;
  border-radius: 10px;
}

.hm-newsletter::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -28deg,
      rgba(255, 255, 255, 0.09) 0 16px,
      transparent 16px 32px
    );
  pointer-events: none;
}

.hm-newsletter h3 {
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  position: relative;
  margin: 0 0 14px;
  line-height: 1.35;
}

.hm-newsletter-form {
  display: flex;
  max-width: 340px;
  position: relative;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #fff;
}

.hm-newsletter-form input {
  flex: 1;
  border: 0;
  height: 46px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  border-radius: 0;
}

.hm-newsletter-form button {
  border: 0;
  background: var(--hm-navy);
  color: #fff;
  padding: 0 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  border-radius: 0;
}

.hm-newsletter-photo {
  position: absolute;
  left: 24px;
  top: 24px;
  width: 168px;
  height: calc(100% - 48px);
  max-width: none;
  object-fit: cover;
  object-position: center center;
  border-radius: 10px;
  z-index: 1;
}

.hm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 22px;
}

.hm-grid-card .hm-media {
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 160px;
  margin-bottom: 12px;
}

.hm-grid-card .hm-media .hm-cat {
  position: absolute;
  right: 10px;
  bottom: 10px;
  margin: 0;
  border-radius: 10px;
}

.hm-grid-card h3 {
  font-size: 16px;
}

.hm-sidebar .widget {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 28px;
  margin-bottom: 4px;
}

.hm-sidebar .widget h3 {
  font-size: 22px;
  margin-bottom: 16px;
  font-family: Vazirmatn, sans-serif;
  font-weight: 800;
}

.hm-sidebar .widget h3::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  background: var(--hm-teal);
  margin-top: 8px;
}

.hm-cats li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 0;
  padding: 6px 0;
  color: var(--hm-muted);
  font-size: 14px;
}

.hm-cats a {
  color: var(--hm-ink);
}

.hm-cats a::before {
  content: "+";
  color: var(--hm-teal);
  margin-left: 8px;
  font-weight: 800;
}

.hm-pop {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.hm-pop .hm-media {
  width: 72px;
  height: 58px;
}

.hm-pop h4 {
  font-size: 14px;
  margin: 0 0 4px;
  font-weight: 800;
  line-height: 1.45;
}

.hm-comment {
  padding: 10px 0;
  border-bottom: 1px dashed var(--hm-line);
  font-size: 14px;
  color: var(--hm-ink);
}

.hm-comment b {
  color: var(--hm-teal);
}

.hm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hm-tags a {
  border: 1px solid var(--hm-teal);
  color: var(--hm-teal);
  border-radius: 20px;
  padding: 4px 13px;
  font-size: 13px;
}

.hm-tags a:hover {
  background: var(--hm-teal);
  color: #fff;
}

.hm-calendar table,
#wp-calendar {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 13px;
}

.hm-calendar caption,
#wp-calendar caption {
  color: var(--hm-ink);
  font-weight: 700;
  padding: 0 0 10px;
  caption-side: top;
}

.hm-cal-nav {
  color: var(--hm-ink);
  padding: 0 6px;
}

.hm-calendar th,
#wp-calendar th {
  color: var(--hm-ink);
  padding: 6px 2px;
  font-weight: 700;
}

.hm-calendar td,
#wp-calendar td {
  padding: 6px 2px;
  color: var(--hm-muted);
}

.hm-calendar td a,
#wp-calendar td a {
  color: var(--hm-teal);
  display: inline-flex;
  text-decoration: none;
}

.hm-cal-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  line-height: 1;
  border-radius: 50%;
}

.hm-calendar td:hover .hm-cal-num,
.hm-calendar a:hover .hm-cal-num,
#wp-calendar td:hover .hm-cal-num,
#wp-calendar a:hover .hm-cal-num {
  color: #000;
}

#wp-calendar #today,
.hm-calendar #today {
  background: transparent;
}

#wp-calendar #today .hm-cal-num,
.hm-calendar #today .hm-cal-num {
  background: var(--hm-teal);
  color: #fff;
  border-radius: 50%;
}

#wp-calendar #today:hover .hm-cal-num,
.hm-calendar #today:hover .hm-cal-num {
  color: #000;
}

.hm-footer {
  background: var(--hm-navy);
  color: #c5d0dc;
  padding: 0;
}

.hm-footer-top {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hm-footer-top .logo {
  color: #fff !important;
  gap: 10px;
}

.hm-footer-top .logo .logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
}

.hm-footer-top strong {
  color: #fff;
  font-size: 15px;
}

.hm-footer .hm-socials a {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hm-footer .hm-socials a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.hm-footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 36px;
  padding: 40px 0 24px;
}

.hm-footer h3 {
  color: #fff;
  font-size: 22px;
  font-family: Vazirmatn, sans-serif;
}

.hm-footer a {
  color: #c5d0dc;
}

.hm-footer a:hover {
  color: var(--hm-teal);
}

.hm-contact-line {
  display: flex;
  gap: 10px;
  margin: 10px 0;
  align-items: flex-start;
}

.hm-contact-line i {
  color: var(--hm-teal);
  font-style: normal;
  font-weight: 800;
  min-width: 16px;
}

.hm-explore {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

.hm-explore li {
  padding: 4px 0;
  border: 0;
}

.hm-btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hm-teal) !important;
  color: #fff !important;
  border: 0;
  border-radius: 10px;
  padding: 12px 26px;
  font-weight: 800;
  box-shadow: none;
}

.hm-btn-contact:hover {
  transform: none;
  filter: brightness(0.95);
  box-shadow: none;
}

.hm-news-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.hm-news-item .hm-media {
  width: 72px;
  height: 58px;
  background: #2a3a55;
}

.hm-news-item h4 {
  color: #fff;
  font-size: 14px;
  margin: 0 0 4px;
  font-weight: 700;
  line-height: 1.45;
}

.hm-news-item h4 a {
  color: #fff;
}

.hm-footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.hm-top {
  width: 34px;
  height: 34px;
  background: var(--hm-teal);
  color: #fff !important;
  display: grid;
  place-items: center;
  border-radius: 2px;
  font-size: 16px;
}

body.blog .page-hero,
body.blog .blog-layout {
  display: none;
}

@media (min-width: 981px) {
  body:is(.home, .blog, .single, .archive, .search) .main-nav {
    display: block !important;
    position: static;
    inset: auto;
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
  }

  body:is(.home, .blog, .single, .archive, .search) .nav-menu {
    flex-direction: row;
    gap: 26px;
  }
}

@media (max-width: 980px) {
  .hm-wrap,
  .hm-featured,
  .hm-grid,
  .hm-footer-top,
  .hm-footer-grid {
    grid-template-columns: 1fr;
  }

  .hm-newsletter {
    padding: 28px 22px 168px;
  }

  .hm-newsletter-photo {
    width: 140px;
    height: 140px;
    top: auto;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    border-radius: 10px;
  }

  .site-header .hm-socials {
    display: none;
  }

  body:is(.home, .blog, .single, .archive, .search) .nav-menu {
    flex-direction: column;
    gap: 10px;
  }
}

body.single .single-cover {
  height: auto;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #d7eef1;
}

body.single .single-cover img {
  position: static;
  inset: auto;
  width: 100%;
  height: 700px;
  max-width: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 10px;
  background-clip: inherit;
  display: block;
}
