/*
 Theme Name: GeneratePress Child
 Description: Korea Day One - Newspaper (koreadayone)
 Author: Korea Day One
 Template: generatepress
 Version: 1.0.0
*/

/* =========================================================
   [블럭 0] 디자인 시스템 (신문 톤 변수 / 폭 통일)
========================================================= */
:root{
  --kdo-bg: #f5f1e8;
  --kdo-paper: #fffdf8;
  --kdo-text: #121110;
  --kdo-muted: rgba(18,17,16,.62);
  --kdo-line: rgba(0,0,0,.14);
  --kdo-line-strong: rgba(0,0,0,.22);
  --kdo-accent: #8b1e1e;

  --kdo-pad: 24px;
  --kdo-pad-m: 14px;
  --kdo-shell: min(1560px, calc(100% - 64px));
  --kdo-measure: 72ch;

  --kdo-font-masthead: "Pirata One", serif;
  --kdo-font-display: "Libre Baskerville","EB Garamond","Noto Serif KR",serif;
  --kdo-font-body: "EB Garamond","Noto Serif KR",serif;
  --kdo-font-ui: "Libre Franklin","Noto Sans KR",sans-serif;
}

@media (max-width: 768px){
  :root{ --kdo-shell: calc(100% - 28px); }
}

@media (min-width: 1700px){
  :root{ --kdo-shell: calc(100% - 64px); }
}

/* =========================================================
   [블럭 1] 베이스
========================================================= */
html,
body{
  color: var(--kdo-text);
  overflow-x: hidden;
  background-color: var(--kdo-bg) !important;
}

html{
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body{
  font-family: var(--kdo-font-body);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover{
  color: var(--kdo-accent);
}

h1,h2,h3,h4,h5,h6{
  font-family: var(--kdo-font-display);
  letter-spacing: -0.01em;
  color: var(--kdo-text);
}

/* =========================================================
   [블럭 2] 종이 질감
========================================================= */
html,
body{
  background-image:
    radial-gradient(1200px 700px at 50% -250px, rgba(0,0,0,.07), rgba(0,0,0,0) 60%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.018) 0 1px, rgba(0,0,0,0) 7px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.012) 0 1px, rgba(0,0,0,0) 9px) !important;
  background-repeat: no-repeat, repeat, repeat !important;
  background-size: auto, auto, auto !important;
}

.kdo-header,
.kdo-paper,
.wid-site-footer,
body.page:not(.home) .inside-article,
body.single-post .inside-article{
  background-color: var(--kdo-paper) !important;
  background-image:
    radial-gradient(900px 520px at 20% -180px, rgba(0,0,0,.05), rgba(0,0,0,0) 62%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.014) 0 1px, rgba(0,0,0,0) 9px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.010) 0 1px, rgba(0,0,0,0) 12px) !important;
  background-repeat: no-repeat, repeat, repeat !important;
  background-size: auto, auto, auto !important;
}

@media (max-width: 768px){
  html,
  body{
    background-image:
      radial-gradient(900px 520px at 50% -240px, rgba(0,0,0,.055), rgba(0,0,0,0) 60%),
      repeating-linear-gradient(0deg, rgba(0,0,0,.014) 0 1px, rgba(0,0,0,0) 9px) !important;
    background-repeat: no-repeat, repeat !important;
  }
}

/* =========================================================
   [블럭 3] 컨테이너
========================================================= */
.wid-container{
  width: 100%;
  max-width: var(--kdo-shell);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--kdo-pad);
  padding-right: var(--kdo-pad);
  box-sizing: border-box;
}

@media (max-width: 768px){
  .wid-container{
    max-width: 100%;
    padding-left: var(--kdo-pad-m);
    padding-right: var(--kdo-pad-m);
  }
}

/* =========================================================
   [블럭 4] 헤더
========================================================= */
.kdo-header{
  background-color: var(--kdo-paper) !important;
  position: relative;
  z-index: 5000;
  overflow: visible !important;
}

.kdo-masthead,
.kdo-navrow,
.kdo-navrow-inner{
  overflow: visible !important;
}

/* 제호 */
.kdo-masthead-inner{
  max-width: var(--kdo-shell);
  margin: 0 auto;
  padding: 24px var(--kdo-pad) 18px;
  box-sizing: border-box;
  text-align: center;
}

@media (max-width: 768px){
  .kdo-masthead-inner{
    padding: 18px var(--kdo-pad-m) 14px;
  }
}

.kdo-masthead-title{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.kdo-masthead-logo{
  display: block;
  height: 84px;
  width: auto;
}

@media (max-width: 768px){
  .kdo-masthead-logo{
    height: 52px;
  }
}

/* 에디션 라인 */
.kdo-edition{
  margin: 10px 0 0;
  font-family: var(--kdo-font-ui);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(18,17,16,.58);
  line-height: 1.2;
}

.kdo-edition-dot{
  margin: 0 10px;
  color: rgba(0,0,0,.28);
}

.kdo-edition-date{
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px){
  .kdo-edition{
    margin-top: 8px;
    font-size: 10px;
    letter-spacing: .10em;
  }

  .kdo-edition-dot{
    margin: 0 8px;
  }
}

/* 메뉴 줄 */
.kdo-navrow{
  background-color: var(--kdo-paper) !important;
  background-image:
    radial-gradient(900px 520px at 20% -180px, rgba(0,0,0,.05), rgba(0,0,0,0) 62%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.014) 0 1px, rgba(0,0,0,0) 9px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.010) 0 1px, rgba(0,0,0,0) 12px) !important;
  background-repeat: no-repeat, repeat, repeat !important;
  background-size: auto, auto, auto !important;
  border-bottom: 1px solid rgba(0,0,0,.10);
}

.kdo-navrow-inner{
  max-width: var(--kdo-shell);
  margin: 0 auto;
  position: relative;
  padding: 10px var(--kdo-pad);
  box-sizing: border-box;
  background-color: transparent !important;
  background-image: none !important;
}

@media (max-width: 768px){
  .kdo-navrow-inner{
    padding-left: var(--kdo-pad-m);
    padding-right: var(--kdo-pad-m);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

/* 메뉴 중앙 */
.kdo-primary-nav{
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}

@media (min-width: 1025px){
  .kdo-primary-nav{
    padding-right: 180px;
  }
}

.kdo-primary-menu{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kdo-primary-menu li{
  margin: 0;
}

.kdo-primary-menu a{
  font-family: var(--kdo-font-ui);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(18,17,16,.94);
  opacity: 1;
}

.kdo-primary-menu a:hover{
  color: var(--kdo-accent);
}

@media (max-width: 768px){
  .kdo-primary-menu{
    gap: 10px 14px;
  }

  .kdo-primary-menu a{
    font-size: 13px;
    letter-spacing: .05em;
  }
}

/* 언어 영역 */
.kdo-lang{
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  z-index: 6000;
}

@media (max-width: 1024px){
  .kdo-lang{
    position: static;
    transform: none;
    margin-top: 10px;
    display: flex;
    justify-content: center;
  }
}

@media (max-width: 768px){
  .kdo-lang{
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
    align-self: flex-end;
    margin-top: 4px;
    z-index: 7000;
  }
}

/* 언어 드롭다운 */
.wid-lang-dd{
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  z-index: 6500;
}

.wid-lang-btn{
  appearance: none;
  border: 1px solid rgba(0,0,0,.16);
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--kdo-font-ui);
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(18,17,16,.70);
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.wid-lang-btn:hover{
  border-color: rgba(0,0,0,.28);
  color: rgba(18,17,16,.92);
}

.wid-lang-prefix{ opacity: .72; }
.wid-lang-colon{ margin: 0 6px; opacity: .45; }

.wid-lang-current{
  font-weight: 700;
  color: rgba(18,17,16,.92);
}

.wid-lang-caret{
  margin-left: 8px;
  color: rgba(0,0,0,.40);
}

.wid-lang-menu{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: var(--kdo-paper);
  border: 1px solid rgba(0,0,0,.14);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 6px;
  z-index: 7000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.wid-lang-dd:hover .wid-lang-menu,
.wid-lang-dd:focus-within .wid-lang-menu{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.wid-lang-item{
  display: block;
  padding: 10px 12px 10px 36px;
  border-radius: 10px;
  font-family: var(--kdo-font-ui);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: none;
  text-decoration: none;
  color: rgba(18,17,16,.82);
  position: relative;
}

.wid-lang-item:hover{
  background: rgba(0,0,0,.04);
  color: var(--kdo-text);
}

.wid-lang-item.is-active{
  background: rgba(0,0,0,.07);
  color: var(--kdo-text);
}

.wid-lang-item.is-active::before{
  content: "✓";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0,0,0,.55);
}

@media (max-width: 768px){
  .wid-lang-btn{
    font-size: 11px;
    letter-spacing: .08em;
    padding: 6px 10px;
  }
}

/* =========================================================
   [블럭 5] 홈 신문 지면 레이아웃
   - EN 루트(/) + ES(/es/) + PT(/pt/) 공통
========================================================= */
.wid-home-fullbleed{
  background: transparent;
}

.kdo-front{
  background: transparent;
  padding: 18px 0 54px;
}

/* 홈 공통: GeneratePress 영향 차단 */
body.home .site-main,
body.page-es .site-main,
body.page-pt .site-main{
  margin: 0 !important;
  padding: 0 !important;
}

body.home .grid-container,
body.page-es .grid-container,
body.page-pt .grid-container{
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 홈 공통: 풀폭 신문 지면 */
body.home .kdo-front,
body.page-es .kdo-front,
body.page-pt .kdo-front{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow-x: clip;

  background-color: var(--kdo-paper) !important;
  background-image:
    radial-gradient(900px 520px at 20% -180px, rgba(0,0,0,.05), rgba(0,0,0,0) 62%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.014) 0 1px, rgba(0,0,0,0) 9px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.010) 0 1px, rgba(0,0,0,0) 12px) !important;
  background-repeat: no-repeat, repeat, repeat !important;
  background-size: auto, auto, auto !important;

  border-top: 1px solid rgba(0,0,0,.08);
  border-bottom: 1px solid rgba(0,0,0,.08);
}

/* 홈 공통: 기존 가운데 박스(.kdo-paper) 제거 */
body.home .kdo-front .kdo-paper,
body.page-es .kdo-front .kdo-paper,
body.page-pt .kdo-front .kdo-paper{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 22px 0 28px !important;

  border: 0 !important;
  box-shadow: none !important;

  background: transparent !important;
  background-image: none !important;
}

@media (max-width: 768px){
  body.home .kdo-front,
  body.page-es .kdo-front,
  body.page-pt .kdo-front{
    border-top: 1px solid rgba(0,0,0,.06);
    border-bottom: 1px solid rgba(0,0,0,.06);
  }

  body.home .kdo-front .kdo-paper,
  body.page-es .kdo-front .kdo-paper,
  body.page-pt .kdo-front .kdo-paper{
    padding: 18px 0 24px !important;
  }
}

/* 상단 */
.kdo-front-top{
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
  padding-top: 22px;
}

@media (min-width: 1280px){
  .kdo-front-top{
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 18px;
    align-items: start;
  }

  .kdo-latest{
    justify-self: stretch;
    align-self: start;
    margin: 0;
    padding: 0;
  }
}

@media (max-width: 1024px){
  .kdo-front-top{
    grid-template-columns: 1fr;
  }
}

/* Top Story */
.kdo-lead{
  border-right: 1px solid var(--kdo-line);
  padding-right: 22px;
}

@media (max-width: 1024px){
  .kdo-lead{
    border-right: 0;
    padding-right: 0;
    border-bottom: 1px solid var(--kdo-line);
    padding-bottom: 18px;
  }
}

.kdo-kicker{
  margin: 0 0 10px;
  font-family: var(--kdo-font-ui);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(18,17,16,.62);
}

.kdo-lead-title{
  margin: 0 0 8px;
  font-family: var(--kdo-font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.kdo-lead-title a{
  color: var(--kdo-text);
  text-decoration: none;
}

.kdo-lead-title a:hover{
  color: var(--kdo-accent);
}

.kdo-byline{
  margin: 8px 0 12px;
  font-family: var(--kdo-font-ui);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(18,17,16,.52);
}

.kdo-byline::before{
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: rgba(0,0,0,.14);
  margin-right: 10px;
  transform: translateY(-3px);
}

.kdo-lead-excerpt{
  margin: 0;
  max-width: var(--kdo-measure);
  color: rgba(18,17,16,.86);
  font-size: 16px;
  line-height: 1.78;
}

.kdo-lead-excerpt::first-letter{
  float: left;
  font-family: var(--kdo-font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: .9;
  padding: 6px 10px 0 0;
  color: var(--kdo-text);
}

.kdo-lead-thumb{
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--kdo-line);
  background: #fff;
  margin: 0 0 14px;
  text-decoration: none;
}

.kdo-lead-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 1025px){
  .kdo-lead{
    display: grid;
    grid-template-columns: 1fr 300px;
    column-gap: 22px;
    align-items: start;
  }

  .kdo-lead .kdo-kicker{
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .kdo-lead .kdo-lead-title{
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .kdo-lead .kdo-byline{
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .kdo-lead .kdo-lead-excerpt{
    grid-column: 1;
    grid-row: 4;
    margin-top: 0;
  }

  .kdo-lead .kdo-lead-thumb{
    grid-column: 2;
    grid-row: 4;
    width: 300px;
    aspect-ratio: 4 / 3;
    justify-self: center;
    align-self: center;
    margin: 0;
  }
}

@media (max-width: 1024px){
  .kdo-lead{
    display: flex;
    flex-direction: column;
  }

  .kdo-kicker{ order: 1; }
  .kdo-lead-title{ order: 2; }
  .kdo-byline{ order: 3; }
  .kdo-lead-thumb{ order: 4; }
  .kdo-lead-excerpt{ order: 5; }

  .kdo-lead-thumb{
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 240px;
  }

  .kdo-lead-thumb img{
    max-height: 240px;
  }
}

@media (max-width: 768px){
  .kdo-lead-title{
    font-size: 24px !important;
    line-height: 1.14 !important;
    letter-spacing: -0.02em !important;
  }

  .kdo-lead-excerpt{
    font-size: 15px;
    line-height: 1.72;
  }

  .kdo-lead-excerpt::first-letter{
    font-size: 46px;
    padding-right: 8px;
  }
}

/* Latest */
.kdo-latest h3{
  margin: 0 0 14px;
  font-family: var(--kdo-font-ui);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(18,17,16,.62);
  padding-bottom: 10px;
  border-bottom: 3px solid rgba(0,0,0,.12);
}

.kdo-latest ul{
  list-style: none;
  margin: 0;
  padding: 0;
}

.kdo-latest li{
  display: block;
  position: relative;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.kdo-latest li::before,
.kdo-latest li::after,
.kdo-latest a::before,
.kdo-latest a::after,
.kdo-date::before,
.kdo-date::after{
  content: none !important;
  display: none !important;
}

.kdo-latest a{
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-weight: 700;
  line-height: 1.35;
  font-size: clamp(15px, 1.15vw, 18px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  color: var(--kdo-text);
}

.kdo-latest a:hover{
  color: var(--kdo-accent);
}

.kdo-date{
  display: none !important;
}

/* 하단 섹션 */
.kdo-sections{
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--kdo-line-strong);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

@media (max-width: 1024px){
  .kdo-sections{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px){
  .kdo-sections{
    grid-template-columns: 1fr;
  }
}

/* 섹션 헤더 */
.kdo-section{
  padding-top: 12px;
  border-top: 1px solid var(--kdo-line);
}

.kdo-section-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:16px;
}

.kdo-section-title{
  margin: 0;
  line-height: 1;
  font-family: var(--kdo-font-ui);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(18,17,16,.58);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 3px solid rgba(0,0,0,.14);
}

.kdo-section-title::after{
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,.14);
  transform: translateY(1px);
}

@media (max-width: 768px){
  .kdo-section-title::after{
    display: none;
  }
}

.kdo-section-more{
  flex:0 0 auto;
  display:inline-block;
  margin:0;
  padding:0;
  font-size:13px;
  line-height:1;
  color:inherit;
  text-decoration:none;
  white-space:nowrap;
  letter-spacing:.04em;
  opacity:.78;
  position:relative;
  top:1px;
}

.kdo-section-more:hover{
  opacity:1;
  text-decoration:none;
}

@media (max-width: 768px){
  .kdo-section-more{
    font-size:12px;
    top:0;
  }
}

/* =========================================================
   [블럭 5-SEC-ITEM] 섹션 아이템
========================================================= */
.kdo-item{
  padding: 10px 0;
  border-top: 1px solid rgba(0,0,0,.10);
  box-sizing: border-box;
}

.kdo-item:first-child{
  border-top: 0;
}

/* 썸네일 있는 경우만 가로 배치 */
.kdo-item.has-thumb{
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 12px;
}

.kdo-item.no-thumb{
  display: block;
}

.kdo-item-thumb{
  width: 88px;
  height: 66px;
  overflow: hidden;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.kdo-item-thumb a{
  display: block;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  box-shadow: none;
  text-decoration: none;
}

.kdo-item-thumb img{
  display: block;
  width: 88px;
  height: 66px;
  object-fit: cover;
  margin: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.kdo-item-title{
  margin: 0;
  font-family: var(--kdo-font-display);
  font-weight: 700;
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.kdo-item-title a{
  color: var(--kdo-text);
  text-decoration: none;
}

.kdo-item-title a:hover{
  color: var(--kdo-accent);
}

/* has-thumb: 2줄까지 허용 */
.kdo-item.has-thumb .kdo-item-title{
  min-width: 0;
}

.kdo-item.has-thumb .kdo-item-title a{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* no-thumb: 1줄 유지 */
.kdo-item.no-thumb .kdo-item-title a{
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 섹션 첫 글 강조 제거 */
.kdo-section .kdo-item:first-of-type.has-thumb{
  grid-template-columns: 88px 1fr !important;
  gap: 12px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.kdo-section .kdo-item:first-of-type.has-thumb .kdo-item-thumb{
  width: 88px !important;
  height: 66px !important;
}

.kdo-section .kdo-item:first-of-type.has-thumb .kdo-item-thumb img{
  width: 88px !important;
  height: 66px !important;
}

.kdo-section .kdo-item:first-of-type.has-thumb .kdo-item-title{
  font-size: clamp(15px, 1.1vw, 18px) !important;
  line-height: 1.35 !important;
}

/* 모바일 */
@media (max-width: 768px){
  .kdo-item{
    padding: 14px 0;
  }

  .kdo-item.has-thumb{
    grid-template-columns: 72px 1fr;
    gap: 12px;
  }

  .kdo-item-thumb{
    width: 72px;
    height: 72px;
  }

  .kdo-item-thumb img{
    width: 72px;
    height: 72px;
  }

  .kdo-section .kdo-item:first-of-type.has-thumb{
    grid-template-columns: 72px 1fr !important;
    gap: 12px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  .kdo-section .kdo-item:first-of-type.has-thumb .kdo-item-thumb{
    width: 72px !important;
    height: 72px !important;
  }

  .kdo-section .kdo-item:first-of-type.has-thumb .kdo-item-thumb img{
    width: 72px !important;
    height: 72px !important;
  }

  .kdo-section .kdo-item:first-of-type.has-thumb .kdo-item-title{
    font-size: clamp(15px, 4vw, 17px) !important;
    line-height: 1.35 !important;
  }

  .kdo-item-title{
    font-size: clamp(15px, 4vw, 17px);
    line-height: 1.35;
  }
}

/* =========================================================
   [블럭 6] 글/페이지 가독성
========================================================= */
.inside-article{
  background: var(--kdo-paper);
}

body.page:not(.home) .inside-article,
body.single-post .inside-article{
  max-width: 860px;
  margin: 18px auto 0;
  padding: 18px 18px;
  border-top: 1px solid var(--kdo-line-strong);
  border-bottom: 1px solid var(--kdo-line);
  box-sizing: border-box;
}

.entry-title{
  margin: 0;
  font-family: var(--kdo-font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.8vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.entry-meta{
  font-family: var(--kdo-font-ui);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(18,17,16,.58);
}

/* 본문 텍스트 폭 */
.entry-content{
  margin: 10px auto 0;
  max-width: var(--kdo-measure);
  font-size: 16px;
  line-height: 1.85;
  color: rgba(18,17,16,.88);
}

.entry-content h2{
  margin: 34px 0 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,.12);
  font-family: var(--kdo-font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.35;
}

.entry-content a{
  color: var(--kdo-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content img{
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.entry-content .alignfull,
.entry-content .alignwide,
.entry-content figure.alignfull,
.entry-content figure.alignwide,
.entry-content .wp-block-image.alignfull,
.entry-content .wp-block-image.alignwide{
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
}

@media (max-width: 768px){
  body.page:not(.home) .inside-article,
  body.single-post .inside-article{
    max-width: none;
    margin: 12px auto 0;
    padding: 14px 14px;
    border-left: 0;
    border-right: 0;
  }

  .entry-content{
    font-size: 15px;
    line-height: 1.8;
  }
}

/* =========================================================
   [블럭 7] 목록(카테고리/아카이브/검색)
========================================================= */
body.blog .site-main article,
body.archive .site-main article,
body.search .site-main article{
  background: var(--kdo-paper);
  border-top: 1px solid var(--kdo-line);
  padding-top: 18px;
  margin-top: 18px;
}

body.blog .entry-title a,
body.archive .entry-title a,
body.search .entry-title a{
  text-decoration: none;
  color: var(--kdo-text);
}

body.blog .entry-title a:hover,
body.archive .entry-title a:hover,
body.search .entry-title a:hover{
  color: var(--kdo-accent);
}

/* =========================================================
   [블럭 8] 푸터
========================================================= */
.wid-site-footer{
  margin-top: 28px;
  border-top: 1px solid var(--kdo-line-strong);
  background: var(--kdo-paper);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
}

.wid-footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  max-width: var(--kdo-shell);
  margin-left: auto;
  margin-right: auto;
  padding: 16px var(--kdo-pad) 18px;
  box-sizing: border-box;
}

.wid-footer-copy{
  margin: 0;
  font-family: var(--kdo-font-ui);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(18,17,16,.58);
}

.wid-footer-menu{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 0;
}

.wid-footer-menu li{
  margin: 0;
}

.wid-footer-menu li:not(:last-child)::after{
  content: "·";
  display: inline-block;
  margin: 0 12px;
  color: rgba(0,0,0,.30);
}

.wid-footer-menu a{
  font-family: var(--kdo-font-ui);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(18,17,16,.58);
  text-decoration: none;
  white-space: nowrap;
}

.wid-footer-menu a:hover{
  color: var(--kdo-accent);
}

@media (max-width: 768px){
  .wid-footer-inner{
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
    padding: 18px 14px 20px !important;
    text-align: center !important;
  }

  .wid-footer-copy{
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    letter-spacing: .06em !important;
    text-align: center !important;
  }

  .wid-footer-menu{
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px 12px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .wid-footer-menu li{
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .wid-footer-menu li:not(:last-child)::after{
    margin: 0 0 0 12px !important;
    color: rgba(0,0,0,.22) !important;
  }

  .wid-footer-menu a{
    font-size: 11px !important;
    line-height: 1.45 !important;
    letter-spacing: .05em !important;
    white-space: nowrap !important;
  }
}

/* =========================================================
   [블럭 9] GeneratePress 기본 레이아웃 제한 해제
========================================================= */
#page .grid-container{
  max-width: none !important;
}

#page .inside-header.grid-container,
#page .inside-navigation.grid-container{
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#page.site{
  max-width: none !important;
}

#content.site-content{
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.content-area{
  width: 100% !important;
  float: none !important;
}

#right-sidebar,
#left-sidebar,
.widget-area{
  display: none !important;
}

/* =========================================================
   [블럭 10] single post 강제 1컬럼 / 사이드바 제거
========================================================= */
body.single-post #content > .wid-container{
  width: 100% !important;
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.single-post .site-content,
body.single-post .inside-content,
body.single-post .content-area,
body.single-post .site-main,
body.single-post #primary{
  display: block !important;
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.single-post #secondary,
body.single-post .widget-area,
body.single-post .sidebar,
body.single-post aside.sidebar{
  display: none !important;
}

/* =========================================================
   [블럭 11] 본문 시작 상단 여백 통일
========================================================= */
body.single-post .entry-header{
  margin-bottom: 16px !important;
}

body.single-post .entry-content{
  margin-top: 0 !important;
}

body.single-post .entry-content > *:first-child{
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.single-post .entry-content > .wp-block-image:first-child,
body.single-post .entry-content > figure:first-child,
body.single-post .entry-content > img:first-child,
body.single-post .entry-content > p:first-child,
body.single-post .entry-content > h2:first-child,
body.single-post .entry-content > h3:first-child{
  margin-top: 0 !important;
}



/* =========================================================
   [ES-PT HOME WIDTH FIX]
   - PT / ES 홈에서 Latest 긴 제목이 레이아웃을 밀어내는 문제 수정
========================================================= */

/* 홈 상단 grid 아이템이 서로를 밀어내지 못하게 */
.kdo-front-top{
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) !important;
}

@media (min-width: 1280px){
  .kdo-front-top{
    grid-template-columns: minmax(0, 1fr) minmax(0, 400px) !important;
  }
}

/* 양쪽 칼럼 축소 허용 */
.kdo-front-top > *,
.kdo-lead,
.kdo-latest,
.kdo-latest ul,
.kdo-latest li,
.kdo-latest a,
.kdo-lead-excerpt{
  min-width: 0 !important;
}

/* PT / ES Latest 제목은 2줄까지 허용 */
body.page-es .kdo-latest a,
body.page-pt .kdo-latest a{
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  line-height: 1.32 !important;
}

/* PT / ES 섹션 제목도 2줄까지 허용 */
body.page-es .kdo-item.no-thumb .kdo-item-title a,
body.page-es .kdo-item.has-thumb .kdo-item-title a,
body.page-pt .kdo-item.no-thumb .kdo-item-title a,
body.page-pt .kdo-item.has-thumb .kdo-item-title a{
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  line-height: 1.32 !important;
}


/* =========================================================
   [ES-PT LATEST ONE LINE]
   - 스페인어 / 포르투갈어 홈 Latest를 영어처럼 1줄 ... 처리
   - 레이아웃 복구용 min-width fix는 유지
========================================================= */

body.page-es .kdo-latest a,
body.page-pt .kdo-latest a{
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;

  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

/* =========================================================
   [HOME MOBILE STACK FIX]
   - 모바일/태블릿에서 Latest를 아래로 떨어뜨림
========================================================= */
@media (max-width: 1024px){
  .kdo-front-top{
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .kdo-lead{
    border-right: 0 !important;
    padding-right: 0 !important;
    border-bottom: 1px solid var(--kdo-line) !important;
    padding-bottom: 18px !important;
  }

  .kdo-latest{
    width: 100% !important;
    max-width: 100% !important;
  }
}


/* =========================================================
   [ARCHIVE + SINGLE TOP GAP FINAL]
   - 목록/상세/일반페이지 시작 간격 최종 통일
========================================================= */

/* 1) 비홈 화면 공통: content 시작 여백을 site-content 기준으로 통일 */
body.archive #content.site-content,
body.blog #content.site-content,
body.search #content.site-content,
body.page:not(.home) #content.site-content,
body.single-post #content.site-content{
  padding-top: 22px !important;
}

/* 2) 목록/일반페이지에서 wid-container 자체 top padding 제거
   - 위 간격은 site-content에서만 만들기 */
body.archive #content.site-content > .wid-container,
body.blog #content.site-content > .wid-container,
body.search #content.site-content > .wid-container,
body.page:not(.home) #content.site-content > .wid-container{
  padding-top: 0 !important;
}

/* 3) 일반페이지 / 상세페이지 inside-article 위 margin 제거 */
body.page:not(.home) .inside-article,
body.single-post .inside-article{
  margin-top: 0 !important;
}

/* 4) 아카이브 헤더 위쪽 추가 여백 제거 */
body.archive .page-header,
body.blog .page-header,
body.search .page-header{
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 5) single entry header 첫 줄도 불필요한 위 여백 제거 */
body.single-post .entry-header{
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 모바일 */
@media (max-width: 768px){
  body.archive #content.site-content,
  body.blog #content.site-content,
  body.search #content.site-content,
  body.page:not(.home) #content.site-content,
  body.single-post #content.site-content{
    padding-top: 16px !important;
  }
}

/* =========================================================
   [ARCHIVE PAGE TITLE GAP FIX]
   - 목록페이지 시작 높이를 single과 더 가깝게 맞춤
========================================================= */

/* 아카이브/카테고리 제목 기본 h1 위여백 제거 */
body.archive .page-header .page-title,
body.blog .page-header .page-title,
body.search .page-header .page-title{
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
}

/* page-header 자체 여백도 정리 */
body.archive .page-header,
body.blog .page-header,
body.search .page-header{
  margin-top: 0 !important;
  padding-top: 0 !important;
  margin-bottom: 10px !important;
}

/* 첫 아카이브 글 위쪽 뜨는 간격 살짝 정리 */
body.archive .site-main article:first-of-type,
body.blog .site-main article:first-of-type,
body.search .site-main article:first-of-type{
  margin-top: 14px !important;
}

/* =========================================================
   [HEADER SEARCH]
========================================================= */
.kdo-header-search{
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 14px;
}

.kdo-header-search-toggle{
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(0,0,0,.14);
  background: #fffdf8;
  color: #121110;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 999px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.kdo-header-search-toggle:hover{
  background: #f6f1e8;
  border-color: rgba(0,0,0,.22);
}

.kdo-header-search-toggle:focus-visible{
  outline: 2px solid rgba(0,0,0,.22);
  outline-offset: 2px;
}

.kdo-header-search-toggle svg{
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kdo-header-search-panel{
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 9999;
  width: 360px;
  padding: 16px;
  background: #fffdf8;
  border: 1px solid rgba(0,0,0,.14);
  box-shadow: 0 14px 34px rgba(0,0,0,.10);
}

.kdo-header-search-panel[hidden]{
  display: none !important;
}

.kdo-header-search-form{
  display: flex;
  align-items: center;
  gap: 10px;
}

.kdo-header-search-form input[type="search"]{
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  color: #121110;
  font-size: 15px;
  font-weight: 700;
}

.kdo-header-search-form input[type="search"]::placeholder{
  color: rgba(18,17,16,.55);
  font-weight: 700;
}

.kdo-header-search-form input[type="search"]:focus{
  outline: none;
  border-color: rgba(0,0,0,.22);
}

.kdo-header-search-submit{
  flex: 0 0 auto;
  height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(0,0,0,.14);
  background: #121110;
  color: #fffdf8;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.kdo-header-search-submit:hover{
  opacity: .92;
}

@media (max-width: 768px){
  .kdo-header-search{
    margin-left: 10px;
  }

  .kdo-header-search-toggle{
    width: 40px;
    height: 40px;
  }

  .kdo-header-search-panel{
    right: -8px;
    width: min(92vw, 340px);
    padding: 14px;
  }

  .kdo-header-search-form{
    flex-direction: column;
    align-items: stretch;
  }

  .kdo-header-search-submit{
    width: 100%;
  }
}

/* =========================================================
   [HEADER SEARCH INLINE]
========================================================= */
.kdo-header-search-row{
  padding: 14px 0 18px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.kdo-header-search-inline-form{
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(0,0,0,.18);
  background: #f3f3f3;
}

.kdo-header-search-inline-input{
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid rgba(0,0,0,.18);
  border-radius: 0;
  background: #f3f3f3;
  color: #121110;
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
}

.kdo-header-search-inline-input::placeholder{
  color: rgba(18,17,16,.55);
  font-weight: 700;
}

.kdo-header-search-inline-input:focus{
  outline: none;
}

.kdo-header-search-inline-submit{
  flex: 0 0 auto;
  height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: #121110;
  color: #fffdf8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 768px){
  .kdo-header-search-row{
    padding: 12px 0 16px;
  }

  .kdo-header-search-inline-form{
    max-width: none;
  }

  .kdo-header-search-inline-input{
    height: 42px;
    font-size: 14px;
  }

  .kdo-header-search-inline-submit{
    height: 42px;
    padding: 0 14px;
    font-size: 12px;
  }
}