/*
Theme Name: HomeFix Child
Theme URI: https://fixhomelab.com
Description: Twenty Twenty-Five child theme for HomeFixLab
Author: HomeFixLab
Template: twentytwentyfive
Version: 1.0.0
Text Domain: homefix-child
*/

/* HomeFixLab custom styles will be added here */

:root {
  --hf-blue: #163a5f;
  --hf-blue-soft: #eaf2f8;
  --hf-mint: #2f8f83;
  --hf-mint-soft: #eaf7f4;
  --hf-orange: #d98b3a;
  --hf-orange-soft: #fff3e6;
  --hf-text: #263238;
  --hf-muted: #66737d;
  --hf-border: #dbe3e8;
  --hf-bg: #f6f8fa;
  --hf-card: #ffffff;
}

body {
  background: var(--hf-bg);
  color: var(--hf-text);
}

.homefix-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.homefix-article-head {
  max-width: 1180px;
  margin: 0 auto 28px;
}

.homefix-article-head h1 {
  color: var(--hf-blue);
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.homefix-layout {
  gap: 36px;
  align-items: flex-start;
}

.homefix-content {
  min-width: 0;
}

.homefix-content p,
.homefix-content li {
  font-size: 17.5px;
  line-height: 1.82;
}

.homefix-content p {
  margin-bottom: 1.45em;
}

.homefix-content h2 {
  color: var(--hf-blue);
  font-size: 1.6rem;
  line-height: 1.35;
  margin-top: 2.3em;
  margin-bottom: 0.9em;
  padding-left: 14px;
  border-left: 5px solid var(--hf-mint);
}

.homefix-content h3 {
  color: #244f73;
  font-size: 1.3rem;
  margin-top: 1.8em;
  margin-bottom: 0.75em;
}

.homefix-content a {
  color: #166f8f;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.homefix-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.homefix-sidebar {
  position: sticky;
  top: 24px;
}

.homefix-side-card {
  background: var(--hf-card);
  border: 1px solid var(--hf-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(30, 55, 75, 0.06);
}

.homefix-side-card h3 {
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--hf-blue);
  font-size: 1.05rem;
}

.homefix-side-card ul {
  margin: 0;
  padding-left: 18px;
}

.homefix-side-card li {
  margin-bottom: 10px;
  line-height: 1.45;
}

.homefix-side-card a {
  color: #35566f;
  text-decoration: none;
}

.homefix-side-card a:hover {
  color: var(--hf-mint);
}

.homefix-ad-placeholder {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafb, #eef4f6);
  color: #94a0a8;
  border-style: dashed;
}

.homefix-content blockquote {
  background: var(--hf-mint-soft);
  border-left: 5px solid var(--hf-mint);
  padding: 18px 20px;
  border-radius: 10px;
}

.homefix-content .wp-block-table {
  overflow-x: auto;
}

.homefix-content table {
  width: 100%;
  border-collapse: collapse;
}

.homefix-content th {
  background: var(--hf-blue-soft);
  color: var(--hf-blue);
}

.homefix-content th,
.homefix-content td {
  padding: 12px 14px;
  border: 1px solid var(--hf-border);
}

@media (max-width: 900px) {
  .homefix-main {
    padding: 20px 18px 44px;
  }

  .homefix-layout {
    display: block;
  }

  .homefix-content {
    width: 100%;
  }

  .homefix-sidebar {
    position: static;
    width: 100%;
    margin-top: 36px;
  }

  .homefix-ad-placeholder {
    display: none;
  }
}

@media (max-width: 767px) {
  .homefix-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .homefix-article-head h1 {
    font-size: 1.9rem;
    line-height: 1.3;
  }

  .homefix-content p,
  .homefix-content li {
    font-size: 17px;
    line-height: 1.78;
  }

  .homefix-content h2 {
    font-size: 1.45rem;
    padding-left: 12px;
    border-left-width: 4px;
  }

  .homefix-content h3 {
    font-size: 1.22rem;
  }

  .homefix-side-card {
    border-radius: 14px;
    padding: 18px;
  }
}

/* ===== HomeFix 2차 레이아웃 보정 ===== */

.homefix-main {
  max-width: 1280px !important;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.homefix-article-head {
  max-width: 1180px !important;
  width: 100%;
  margin: 0 auto 34px;
}

.homefix-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  width: 100%;
  max-width: 1180px !important;
  margin: 0 auto;
  align-items: start;
}

.homefix-content {
  width: 100% !important;
  max-width: 820px !important;
  min-width: 0;
}

.homefix-content > * {
  max-width: 820px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.homefix-content .alignwide,
.homefix-content .alignfull {
  max-width: 820px !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.homefix-sidebar {
  width: 300px !important;
  min-width: 300px;
  position: sticky;
  top: 28px;
  align-self: start;
}

.homefix-side-card {
  width: 100%;
  box-sizing: border-box;
}

.homefix-article-head .wp-block-post-featured-image {
  margin-top: 18px;
  margin-bottom: 16px;
}

.homefix-article-head .wp-block-post-featured-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 14px;
}

.homefix-article-head h1 {
  max-width: 1000px;
  margin-left: 0;
  margin-right: 0;
}

.homefix-main .wp-block-post-author,
.homefix-main .wp-block-post-terms {
  font-size: 0.92rem;
  color: var(--hf-muted);
}

/* PC에서 본문이 너무 가운데 몰리지 않도록 */
@media (min-width: 901px) {
  .homefix-main > .wp-block-group,
  .homefix-main > .wp-block-columns {
    max-width: 1180px !important;
  }
}

/* 태블릿 */
@media (max-width: 1024px) {
  .homefix-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 28px;
  }

  .homefix-sidebar {
    width: 260px !important;
    min-width: 260px;
  }
}

/* 모바일 */
@media (max-width: 900px) {
  .homefix-layout {
    display: block !important;
    max-width: 100% !important;
  }

  .homefix-content {
    max-width: 100% !important;
  }

  .homefix-content > *,
  .homefix-content .alignwide,
  .homefix-content .alignfull {
    max-width: 100% !important;
  }

  .homefix-sidebar {
    width: 100% !important;
    min-width: 0;
    position: static;
    margin-top: 40px;
  }
}

@media (max-width: 767px) {
  .homefix-main {
    padding-top: 14px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .homefix-article-head {
    margin-bottom: 24px;
  }

  .homefix-article-head h1 {
    font-size: 1.72rem !important;
    line-height: 1.32;
    margin-top: 0;
    margin-bottom: 18px;
  }

  .homefix-article-head .wp-block-post-featured-image {
    margin-top: 12px;
    margin-bottom: 14px;
  }

  .homefix-article-head .wp-block-post-featured-image img {
    border-radius: 10px;
  }

  .homefix-content p,
  .homefix-content li {
    font-size: 17px;
    line-height: 1.76;
  }

  .homefix-main .wp-block-post-author,
  .homefix-main .wp-block-post-terms {
    font-size: 0.85rem !important;
  }
}

/* ===== HomeFix 사이드바 정돈 ===== */

.homefix-layout {
  grid-template-columns: minmax(0, 800px) 320px !important;
  gap: 38px !important;
  justify-content: center;
}

.homefix-content {
  max-width: 800px !important;
}

.homefix-sidebar {
  width: 320px !important;
  min-width: 320px !important;
}

.homefix-side-card {
  padding: 22px;
  margin-bottom: 22px;
  border-radius: 14px;
}

.homefix-side-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--hf-mint-soft);
}

.homefix-side-card .wp-block-latest-posts {
  padding: 0;
  margin: 0;
  list-style: none;
}

.homefix-side-card .wp-block-latest-posts li {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f3;
}

.homefix-side-card .wp-block-latest-posts li:last-child {
  border-bottom: 0;
}

.homefix-side-card .wp-block-latest-posts a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;

  font-size: 0.93rem;
  line-height: 1.5;
  font-weight: 600;
  color: #36576e;
  text-decoration: none;
}

.homefix-side-card .wp-block-latest-posts a:hover {
  color: var(--hf-mint);
}

.homefix-side-card > ul:not(.wp-block-latest-posts) {
  list-style: none;
  padding-left: 0;
}

.homefix-side-card > ul:not(.wp-block-latest-posts) li {
  padding: 9px 0;
  margin: 0;
  border-bottom: 1px solid #edf1f3;
}

.homefix-side-card > ul:not(.wp-block-latest-posts) li:last-child {
  border-bottom: 0;
}

.homefix-ad-placeholder {
  display: none !important;
}

@media (max-width: 1024px) and (min-width: 901px) {
  .homefix-layout {
    grid-template-columns: minmax(0, 1fr) 280px !important;
    gap: 28px !important;
  }

  .homefix-sidebar {
    width: 280px !important;
    min-width: 280px !important;
  }
}

/* ===== HomeFix H1 최종 크기 ===== */
.homefix-article-head h1,
.homefix-main .wp-block-post-title {
    font-size: 36px !important;
    line-height: 1.32 !important;
    letter-spacing: -0.025em;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    font-weight: 600;
}

@media (max-width: 1024px) {
    .homefix-article-head h1,
    .homefix-main .wp-block-post-title {
        font-size: 32px !important;
    }
}

@media (max-width: 767px) {
    .homefix-article-head h1,
    .homefix-main .wp-block-post-title {
        font-size: 27px !important;
        line-height: 1.35 !important;
        margin-bottom: 16px !important;
    }
}

/* ===== HomeFix Header ===== */

.homefix-header-wrap {
  background: #ffffff;
  border-bottom: 1px solid #dfe7ec;
  box-shadow: 0 2px 10px rgba(22, 58, 95, 0.04);
}

.homefix-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  gap: 28px;
}

.homefix-site-title a {
  color: var(--hf-blue) !important;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.homefix-nav {
  flex: 1;
}

.homefix-nav a {
  color: #3d5568 !important;
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
}

.homefix-nav a:hover {
  background: var(--hf-mint-soft);
  color: var(--hf-mint) !important;
}

.homefix-search {
  width: 180px;
}

.homefix-search .wp-block-search__inside-wrapper {
  border: 1px solid #d8e1e6;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafb;
}

.homefix-search input {
  background: transparent;
  font-size: 0.9rem;
}

.homefix-search button {
  background: var(--hf-blue);
  color: #fff;
  border: 0;
}

@media (max-width: 900px) {
  .homefix-header-inner {
    min-height: 64px;
    padding: 0 16px;
    gap: 14px;
  }

  .homefix-nav {
    flex: 0 0 auto;
  }

  .homefix-search {
    width: auto;
  }

  .homefix-search input {
    display: none;
  }

  .homefix-search .wp-block-search__inside-wrapper {
    border: 0;
    background: transparent;
  }

  .homefix-search button {
    border-radius: 8px;
    padding: 8px 10px;
  }
}

/* ===== HomeFix Archive / Category ===== */

.homefix-archive {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 24px 64px;
}

.homefix-archive-head {
  max-width: 100%;
  margin-bottom: 34px;
}

.homefix-archive-head .wp-block-query-title {
  color: var(--hf-blue);
  font-size: 36px !important;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
}

.homefix-archive-head .taxonomy-description {
  max-width: 820px;
  color: #5d6d78;
  font-size: 16px;
  line-height: 1.7;
}

.homefix-archive-grid {
  gap: 28px !important;
}

.homefix-post-card {
  background: #fff;
  border: 1px solid var(--hf-border);
  border-radius: 16px;
  padding: 0 0 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(30,55,75,.06);
}

.homefix-card-image {
  margin: 0 !important;
}

.homefix-card-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.homefix-card-title {
  margin: 18px 20px 10px !important;
  font-size: 20px !important;
  line-height: 1.45 !important;
  font-weight: 700;
}

.homefix-card-title a {
  color: var(--hf-blue) !important;
  text-decoration: none;
}

.homefix-card-title a:hover {
  color: var(--hf-mint) !important;
}

.homefix-card-excerpt {
  margin: 0 20px !important;
  color: #677680;
  font-size: 14px;
  line-height: 1.65;
}

.homefix-archive .wp-block-query-pagination {
  margin-top: 42px;
}

@media (max-width: 767px) {
  .homefix-archive {
    padding: 26px 16px 48px;
  }

  .homefix-archive-head .wp-block-query-title {
    font-size: 27px !important;
  }

  .homefix-archive-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .homefix-card-title {
    font-size: 18px !important;
  }
}

/* ===== HomeFix Home Category Cards ===== */

.homefix-category-cards {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
  margin-bottom: 34px;
}

.homefix-category-card {
  background: #fff;
  border: 1px solid var(--hf-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(30,55,75,.06);
}

.homefix-category-card:nth-child(1) {
  border-top: 4px solid var(--hf-blue);
}

.homefix-category-card:nth-child(2) {
  border-top: 4px solid var(--hf-mint);
}

.homefix-category-card:nth-child(3) {
  border-top: 4px solid var(--hf-orange);
}

.homefix-category-card h3 {
  margin: 0 0 10px;
  color: var(--hf-blue);
  font-size: 1.15rem;
  line-height: 1.4;
}

.homefix-category-card p {
  margin: 0 0 16px;
  color: #64737d;
  font-size: 0.95rem;
  line-height: 1.65;
}

.homefix-category-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hf-blue);
  font-weight: 700;
  text-decoration: none;
}

.homefix-category-card a:hover {
  color: var(--hf-mint);
}

@media (max-width: 767px) {
  .homefix-category-cards {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .homefix-category-card {
    padding: 20px;
  }
}

/* ===== HomeFix Footer ===== */

.homefix-footer {
  margin-top: 72px;
  padding: 48px 24px 28px;
  background: #102f4b;
  color: #dfe8ee;
}

.homefix-footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  gap: 48px;
}

.homefix-footer h3 {
  color: #ffffff;
  font-size: 1.05rem;
  margin: 0 0 14px;
}

.homefix-footer p,
.homefix-footer li {
  color: #c9d6df;
  font-size: 0.92rem;
  line-height: 1.7;
}

.homefix-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.homefix-footer li {
  margin-bottom: 8px;
}

.homefix-footer a {
  color: #dfe8ee;
  text-decoration: none;
}

.homefix-footer a:hover {
  color: #78c9bc;
}

.homefix-footer .wp-block-separator {
  max-width: 1180px;
  margin: 30px auto 20px;
  border-color: rgba(255,255,255,.18);
}

.homefix-footer-copy {
  max-width: 1180px;
  margin: 0 auto !important;
  font-size: 0.82rem !important;
  color: #9fb0bc !important;
}

@media (max-width: 767px) {
  .homefix-footer {
    margin-top: 48px;
    padding: 36px 18px 24px;
  }

  .homefix-footer-grid {
    display: block;
  }

  .homefix-footer-grid .wp-block-column {
    margin-bottom: 28px;
  }
}


/* ===== HomeFix Page Spacing ===== */

/* 홈 */
body.home .wp-site-blocks > main,
body.blog .wp-site-blocks > main {
  margin-top: 30px !important;
}

/* 카테고리 / 아카이브 */
body.archive .wp-site-blocks > main {
  margin-top: 30px !important;
}

/* 일반 페이지 */
body.page:not(.home) main {
  margin-top: 0 !important;
  padding-top: 20px !important;
}

body.page:not(.home) main > .wp-block-group:first-child {
  margin-top: 0 !important;
  padding-top: 24px !important;
}

body.page:not(.home) main h1:first-of-type {
  margin-top: 0 !important;
  margin-bottom: 16px !important;
}

body.page:not(.home) .wp-site-blocks > header + *,
body.page:not(.home) .wp-site-blocks > .wp-block-template-part + * {
  margin-top: 0 !important;
}

/* 모바일 */
@media (max-width: 767px) {
  body.home .wp-site-blocks > main,
  body.blog .wp-site-blocks > main,
  body.archive .wp-site-blocks > main {
    margin-top: 18px !important;
  }

  body.page:not(.home) main {
    padding-top: 12px !important;
  }

  body.page:not(.home) main > .wp-block-group:first-child {
    padding-top: 12px !important;
  }
}


/* ===== HomeFix Header Navigation ===== */

.wp-block-navigation .wp-block-navigation-item__content,
.wp-block-navigation .wp-block-navigation-item__label {
  color: #304b61 !important;
  font-size: 16px !important;
  font-weight: 650 !important;
  letter-spacing: -0.015em !important;
  text-decoration: none !important;
}

.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .wp-block-navigation-item__content:hover .wp-block-navigation-item__label {
  color: var(--hf-mint) !important;
  text-decoration: none !important;
}

.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content .wp-block-navigation-item__label {
  color: var(--hf-blue) !important;
  font-weight: 750 !important;
}

@media (max-width: 767px) {
  .wp-block-navigation .wp-block-navigation-item__content,
  .wp-block-navigation .wp-block-navigation-item__label {
    font-size: 16px !important;
    font-weight: 650 !important;
  }
}

/* ===== HomeFix Mobile Final Polish ===== */

@media (max-width: 767px) {

  /* 글 제목 */
  .homefix-article-head h1,
  .homefix-main .wp-block-post-title {
    font-size: 25px !important;
    line-height: 1.38 !important;
    letter-spacing: -0.025em !important;
    margin-bottom: 18px !important;
  }

  /* 본문 */
  .homefix-content {
    font-size: 18px !important;
    line-height: 1.78 !important;
  }

  .homefix-content p,
  .homefix-content li {
    font-size: 18px !important;
    line-height: 1.78 !important;
  }

  /* H2 */
  .homefix-content h2 {
    font-size: 23px !important;
    line-height: 1.45 !important;
    margin-top: 42px !important;
    margin-bottom: 18px !important;
  }

  /* H3 */
  .homefix-content h3 {
    font-size: 20px !important;
    line-height: 1.5 !important;
  }

  /* 글 하단 → 푸터 과한 공백 축소 */
  .homefix-main {
    margin-bottom: 0 !important;
    padding-bottom: 20px !important;
  }

  .homefix-footer {
    margin-top: 24px !important;
  }

  /* 모바일 푸터 간격 */
  .homefix-footer-grid .wp-block-column {
    margin-bottom: 22px !important;
  }
}

/* ===== HomeFix Mobile Header Final ===== */

/* PC에서는 기존 navigation 안의 로고 사용 */
.homefix-mobile-logo {
  display: none !important;
}

.homefix-header-shell {
  justify-content: center !important;
}

@media (max-width: 767px) {

  .homefix-header-shell {
    width: 100% !important;
    padding: 14px 20px !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  /* 모바일 전용 외부 로고 */
  .homefix-mobile-logo {
    display: block !important;
    margin: 0 !important;
  }

  .homefix-mobile-logo img {
    width: 105px !important;
    height: auto !important;
  }

  .homefix-header-nav {
    margin-left: auto !important;
  }

  /* 열린 모바일 메뉴 안에 기존 로고가 또 나오는 것 방지 */
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-site-logo {
    display: none !important;
  }

  /* 햄버거 버튼 크기 */
  .wp-block-navigation__responsive-container-open svg {
    width: 30px !important;
    height: 30px !important;
  }

  /* 글 하단과 푸터 사이 여백 추가 축소 */
  .homefix-main {
    padding-bottom: 8px !important;
  }

  .homefix-footer {
    margin-top: 12px !important;
  }
}

/* ===== HomeFix Single Layout Final ===== */

@media (min-width: 901px) {

  .homefix-main {
    max-width: 1088px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* 제목 + 대표이미지도 본문과 같은 왼쪽 선 */
  .homefix-article-head {
    width: 800px !important;
    max-width: 800px !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  .homefix-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 800px) 260px !important;
    gap: 28px !important;
    align-items: start !important;
    justify-content: start !important;
  }

  .homefix-content {
    width: 100% !important;
    max-width: 800px !important;
    min-width: 0 !important;
  }

  .homefix-sidebar {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    position: sticky !important;
    top: 110px !important;
    align-self: start !important;
  }

  .homefix-sidebar .wp-block-post-title,
  .homefix-sidebar .wp-block-post-title a {
    font-size: 15.5px !important;
    line-height: 1.45 !important;
    font-weight: 650 !important;
  }

  .homefix-sidebar h3 {
    font-size: 16.5px !important;
  }
}

/* ===== HomeFix Header / Content Axis Final ===== */
@media (min-width: 1024px) {
  .homefix-header-shell {
    width: min(1088px, calc(100% - 48px)) !important;
    max-width: 1088px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 22px !important;
  }

  .homefix-mobile-logo,
  .homefix-header-nav {
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  .homefix-header-shell .wp-block-navigation__container {
    justify-content: flex-start !important;
    gap: 18px !important;
  }
}

/* ===== HomeFix H1 Size Final ===== */
@media (min-width: 1024px) {
  .homefix-article-head h1,
  .homefix-main .wp-block-post-title {
    font-size: 33px !important;
    line-height: 1.35 !important;
  }
}

@media (max-width: 767px) {
  .homefix-article-head h1,
  .homefix-main .wp-block-post-title {
    font-size: 24px !important;
    line-height: 1.38 !important;
  }
}

/* ===== HomeFix Final Color System ===== */

:root {
  --hf-site-bg: #f6f8fa;
  --hf-surface: #ffffff;
  --hf-header-bg: #f8fafb;
}

body,
.wp-site-blocks {
  background: var(--hf-site-bg) !important;
}

.homefix-header-shell,
header.wp-block-template-part {
  background: var(--hf-header-bg) !important;
}

.homefix-content,
.homefix-sidebar-card,
.homefix-category-card,
.homefix-post-card,
.homefix-archive .wp-block-post-template > li {
  background: var(--hf-surface) !important;
}

/* ===== Sidebar Ad Block 7 ===== */
.homefix-ad-slot {
  width: 100% !important;
  margin: 24px auto 0 !important;
  padding: 0 !important;
  text-align: center !important;
  overflow: hidden;
}

@media (max-width: 900px) {
  .homefix-ad-slot {
    display: none !important;
  }
}

/* ===== HomeFix Sidebar Up Final ===== */
@media (min-width: 901px) {
  .homefix-layout {
    margin-top: -8px !important;
  }

  .homefix-sidebar {
    margin-top: -90px !important;
    position: sticky !important;
    top: 100px !important;
  }
}

/* ===== HomeFix Single Structural Final ===== */

@media (min-width: 901px) {

  .homefix-main {
    width: 1088px !important;
    max-width: calc(100% - 48px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* H1은 본문과 같은 왼쪽 시작선 */
  .homefix-article-head {
    width: 800px !important;
    max-width: 800px !important;
    margin: 0 !important;
  }

  .homefix-layout {
    display: grid !important;
    grid-template-columns: minmax(0,800px) 260px !important;
    gap: 28px !important;
    align-items: start !important;
    justify-content: start !important;
    margin-top: 18px !important;
  }

  /* 본문은 끝까지 800px */
  .homefix-content {
    width: 800px !important;
    max-width: 800px !important;
    min-width: 0 !important;
  }

  /* 대표이미지도 본문 축 안에 */
  .homefix-single-featured {
    width: 100% !important;
    margin: 0 0 28px !important;
  }

  .homefix-single-featured img {
    width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
  }

  /* 독립 사이드바 */
  .homefix-sidebar {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    margin: 0 !important;

    position: sticky !important;
    top: 100px !important;
    align-self: start !important;
  }

  .homefix-sidebar-card {
    margin: 0 0 18px !important;
  }

  .homefix-sidebar h3 {
    font-size: 16.5px !important;
    line-height: 1.4 !important;
  }

  .homefix-sidebar .wp-block-post-title,
  .homefix-sidebar .wp-block-post-title a {
    font-size: 15.5px !important;
    line-height: 1.45 !important;
    font-weight: 650 !important;
    letter-spacing: -0.02em !important;
  }

  .homefix-ad-slot {
    width: 100% !important;
    margin: 18px 0 0 !important;
    padding: 0 !important;
    text-align: center !important;
    overflow: hidden !important;
  }
}

/* 모바일에서는 사이드바 광고 미노출 */
@media (max-width: 900px) {
  .homefix-ad-slot {
    display: none !important;
  }
}

/* ===== HomeFix Sidebar Ad Final Position ===== */

@media (min-width: 901px) {
  .homefix-sidebar-card {
    margin-bottom: 18px !important;
  }

  .homefix-ad-slot {
    width: 100% !important;
    margin: 18px 0 0 !important;
    padding: 0 !important;
    text-align: center !important;
    overflow: hidden !important;
  }
}

/* 모바일 사이드바 광고 숨김 */
@media (max-width: 900px) {
  .homefix-ad-slot {
    display: none !important;
  }
}

/* ==================================================
   HomeFix SINGLE STRUCTURE - FINAL OVERRIDE
   ================================================== */

@media (min-width: 901px) {

  .homefix-main {
    width: 1088px !important;
    max-width: calc(100% - 48px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* H1 = 본문 왼쪽축 */
  .homefix-article-head {
    width: 800px !important;
    max-width: 800px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .homefix-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 800px) 260px !important;
    column-gap: 28px !important;
    align-items: start !important;
    justify-content: start !important;
    margin-top: 18px !important;
  }

  /* 왼쪽 본문 */
  .homefix-content {
    width: 800px !important;
    max-width: 800px !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  /* 대표이미지도 본문의 일부 */
  .homefix-single-featured {
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 0 28px !important;
  }

  .homefix-single-featured img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
  }

  /* 오른쪽 독립 사이드바 */
  .homefix-sidebar {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    margin: 0 !important;
    padding: 0 !important;

    position: sticky !important;
    top: 100px !important;
    align-self: start !important;
  }

  .homefix-sidebar-card {
    width: 100% !important;
    margin: 0 0 18px !important;
  }

  .homefix-sidebar h3 {
    font-size: 16.5px !important;
    line-height: 1.4 !important;
  }

  .homefix-sidebar .wp-block-post-title,
  .homefix-sidebar .wp-block-post-title a {
    font-size: 15.5px !important;
    line-height: 1.45 !important;
    font-weight: 650 !important;
    letter-spacing: -0.02em !important;
  }

  /* 3번 사이드바 광고 */
  .homefix-ad-slot {
    width: 100% !important;
    max-width: 260px !important;
    margin: 18px 0 0 !important;
    padding: 0 !important;
    text-align: center !important;
    overflow: hidden !important;
  }
}

/* 모바일은 본문 1열 */
@media (max-width: 900px) {

  .homefix-main,
  .homefix-article-head,
  .homefix-content {
    width: 100% !important;
    max-width: 100% !important;
  }

  .homefix-layout {
    display: block !important;
  }

  .homefix-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    position: static !important;
    margin-top: 30px !important;
  }

  .homefix-ad-slot {
    display: none !important;
  }
}

/* ===== HomeFix Sidebar Rail Final ===== */

@media (min-width: 901px) {

  .homefix-main {
    width: 1068px !important;
    max-width: calc(100% - 48px) !important;
  }

  .homefix-layout {
    grid-template-columns: minmax(0, 800px) 240px !important;
    column-gap: 28px !important;
    align-items: start !important;
  }

  .homefix-sidebar {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;

    position: sticky !important;
    top: 100px !important;

    margin: 0 !important;
    padding: 0 0 0 18px !important;

    border-left: 1px solid #d8e1e7 !important;
    background: transparent !important;
  }

  .homefix-sidebar-card {
    width: 100% !important;
    margin: 0 0 22px !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .homefix-sidebar-card h3 {
    margin: 0 0 12px !important;
    padding-bottom: 10px !important;

    font-size: 16px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;

    border-bottom: 1px solid #dfe7ec !important;
  }

  .homefix-sidebar-card ul {
    margin: 0 !important;
    padding-left: 18px !important;
  }

  .homefix-sidebar .wp-block-post-title {
    margin: 0 0 11px !important;
  }

  .homefix-sidebar .wp-block-post-title,
  .homefix-sidebar .wp-block-post-title a {
    font-size: 15px !important;
    line-height: 1.45 !important;
    font-weight: 650 !important;
  }

  .homefix-ad-slot {
    width: 100% !important;
    max-width: 222px !important;
    margin: 20px 0 0 !important;
  }
}

/* ==================================================
   HomeFix SINGLE LAYOUT TRUE FINAL
   ================================================== */

@media (min-width: 901px) {

  /* 전체 글 영역 */
  .homefix-main {
    width: 1062px !important;
    max-width: calc(100% - 48px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* H1은 본문과 같은 800px 축 */
  .homefix-article-head {
    width: 800px !important;
    max-width: 800px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 본문 800 + 간격 32 + 사이드바 230 */
  .homefix-layout {
    display: grid !important;
    grid-template-columns: 800px 230px !important;
    column-gap: 32px !important;
    align-items: start !important;
    justify-content: start !important;
    margin-top: 18px !important;
    padding: 0 !important;
  }

  /* 본문 */
  .homefix-content {
    width: 800px !important;
    max-width: 800px !important;
    min-width: 800px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* 대표이미지 */
  .homefix-single-featured {
    width: 800px !important;
    max-width: 800px !important;
    margin: 0 0 28px !important;
    padding: 0 !important;
  }

  .homefix-single-featured img {
    display: block !important;
    width: 800px !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
  }

  /* 오른쪽 독립 사이드바 */
  .homefix-sidebar {
    width: 230px !important;
    min-width: 230px !important;
    max-width: 230px !important;

    margin: 0 !important;
    padding: 0 0 0 18px !important;

    box-sizing: border-box !important;

    position: sticky !important;
    top: 100px !important;
    align-self: start !important;

    border-left: 1px solid #d8e1e7 !important;
    background: transparent !important;
  }

  /* 사이드바 내부 카드 */
  .homefix-sidebar-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 22px !important;
    padding: 0 !important;

    box-sizing: border-box !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .homefix-sidebar-card h3 {
    margin: 0 0 12px !important;
    padding: 0 0 9px !important;

    font-size: 15.5px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;

    border-bottom: 1px solid #dfe7ec !important;
  }

  .homefix-sidebar-card ul {
    margin: 0 !important;
    padding-left: 17px !important;
  }

  .homefix-sidebar-card li {
    margin-bottom: 7px !important;
  }

  .homefix-sidebar .wp-block-post-title {
    margin: 0 0 11px !important;
  }

  .homefix-sidebar .wp-block-post-title,
  .homefix-sidebar .wp-block-post-title a {
    font-size: 14.5px !important;
    line-height: 1.45 !important;
    font-weight: 650 !important;
    letter-spacing: -0.02em !important;
  }

  /* Block 7 */
  .homefix-ad-slot {
    width: 211px !important;
    max-width: 211px !important;
    margin: 18px 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    text-align: center !important;
    overflow: hidden !important;
  }
}

/* ===== HomeFix Sidebar Link Colors ===== */

.homefix-sidebar-card ul {
  list-style: none !important;
  padding-left: 0 !important;
}

.homefix-sidebar-card li {
  margin: 0 0 8px !important;
}

.homefix-sidebar-card li a {
  display: block !important;
  padding: 9px 11px !important;
  border-radius: 8px !important;

  background: #eef4f8 !important;
  color: #163a5f !important;

  font-weight: 650 !important;
  text-decoration: none !important;

  transition: background .2s ease, color .2s ease !important;
}

.homefix-sidebar-card li a:hover {
  background: #dfeaf2 !important;
  color: #2f8f83 !important;
}

/* ===== HomeFix Sidebar Link Final Colors ===== */

.homefix-sidebar-card li a {
  display: block !important;
  padding: 9px 11px !important;
  border-radius: 8px !important;

  background: #eef4f8 !important;
  color: #163a5f !important;

  font-weight: 700 !important;
  text-decoration: none !important;
}

.homefix-sidebar-card li a:hover {
  background: #dfeaf2 !important;
  color: #2f8f83 !important;
}

.homefix-sidebar .wp-block-post-title a {
  color: #214d70 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.homefix-sidebar .wp-block-post-title a:hover {
  color: #2f8f83 !important;
}

/* ===== HomeFix Sidebar Link Hierarchy Final ===== */

/* 1번 카테고리 */
.homefix-sidebar > .homefix-sidebar-card:first-of-type li a {
  display: block !important;
  padding: 9px 11px !important;
  border-radius: 8px !important;
  background: #eef4f8 !important;
  color: #163a5f !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/* 2번 최근글 */
.homefix-sidebar > .homefix-sidebar-card:nth-of-type(2) li a,
.homefix-sidebar > .homefix-sidebar-card:nth-of-type(2) .wp-block-post-title a {
  display: block !important;
  padding: 7px 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  color: #214d70 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.homefix-sidebar > .homefix-sidebar-card:nth-of-type(2) li a:hover,
.homefix-sidebar > .homefix-sidebar-card:nth-of-type(2) .wp-block-post-title a:hover {
  color: #2f8f83 !important;
}

/* ===== HomeFix Sidebar Category Font Size Final ===== */

.homefix-sidebar > .homefix-sidebar-card:first-of-type li a {
  font-size: 15px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
}

/* ===== HomeFix Sidebar Heading Emphasis ===== */
.homefix-sidebar-card h3 {
  font-weight: 800 !important;
  color: #163a5f !important;
}

/* ===== HomeFix Header Horizontal Balance Final ===== */
@media (min-width: 1024px) {

  .homefix-header-shell {
    position: relative !important;
    left: 80px !important;
  }
}

/* ===== HomeFix Header True Center Final ===== */
@media (min-width: 1024px) {
  .homefix-header-shell {
    width: fit-content !important;
    max-width: calc(100% - 48px) !important;

    margin-left: auto !important;
    margin-right: auto !important;

    position: relative !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;

    justify-content: center !important;
  }
}

/* =========================================================
   HOMEFIX SIDEBAR - PICK STYLE FIXED
   ========================================================= */

@media (min-width: 1000px) {

    .homefix-sidebar {
        position: fixed !important;
        top: 125px !important;
        left: calc(50% + 280px) !important;
        width: 310px !important;
        max-height: calc(100vh - 145px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        z-index: 50 !important;
        scrollbar-width: thin;
    }

    .homefix-sidebar .adsbygoogle,
    .homefix-sidebar iframe {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .homefix-sidebar [class*="ad"],
    .homefix-sidebar ins.adsbygoogle {
        display: block !important;
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

@media (max-width: 999px) {

    .homefix-sidebar {
        position: static !important;
        width: 100% !important;
        max-height: none !important;
        overflow: visible !important;
    }
}

/* ===== HOMEFIX GAP + VISIBLE SIDEBAR SCROLL FINAL ===== */
@media (min-width: 1000px) {

    .homefix-sidebar {
        transform: translateX(32px) !important;

        height: calc(100vh - 220px) !important;
        max-height: calc(100vh - 220px) !important;

        overflow-y: scroll !important;
        overflow-x: hidden !important;

        scrollbar-width: auto !important;
        scrollbar-color: #7f8d86 #e7ece9 !important;
    }

    .homefix-sidebar::-webkit-scrollbar {
        width: 11px !important;
        display: block !important;
    }

    .homefix-sidebar::-webkit-scrollbar-track {
        background: #e7ece9 !important;
        border-radius: 10px !important;
    }

    .homefix-sidebar::-webkit-scrollbar-thumb {
        background: #7f8d86 !important;
        border-radius: 10px !important;
        border: 2px solid #e7ece9 !important;
    }

    .homefix-sidebar::-webkit-scrollbar-thumb:hover {
        background: #5f6e66 !important;
    }
}

@media (max-width: 999px) {
    .homefix-sidebar {
        transform: none !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
}

/* ===== HOMEFIX FINAL GAP MATCH ===== */
@media (min-width: 1000px) {
    .homefix-sidebar {
        transform: translateX(48px) !important;
    }
}

/* ===== HOMEFIX WIDER GAP FINAL ===== */
@media (min-width: 1000px) {
    .homefix-sidebar {
        transform: translateX(64px) !important;
    }
}

/* ===== CHATGPT DESKTOP READING WIDTH START ===== */
@media (min-width: 1025px) {
  .homefix-layout {
    grid-template-columns: minmax(0, 840px) 320px !important;
    gap: 38px !important;
    max-width: 1200px !important;
    justify-content: center;
  }

  .homefix-content,
  .homefix-content > *,
  .homefix-content .alignwide,
  .homefix-content .alignfull {
    max-width: 840px !important;
  }
}
/* ===== CHATGPT DESKTOP READING WIDTH END ===== */
