/*
 * 여행노트 — 헤더 + 홈 화면 + 푸터의 스타일.
 *
 * 토큰(--yn-*)과 기본 타이포·본문·표·목록카드 스타일은 테마의 style.css 에 있다.
 * 이 파일에는 우리가 직접 그리는 화면(헤더·히어로·홈 구역·푸터)만 둔다.
 *
 * site1(혜택노트)과 갈라 놓은 지점 — 여기가 두 사이트를 다르게 보이게 하는 전부다.
 *   헤더    혜택노트는 흰 배경 + 메뉴를 3줄 안에 숨김
 *           여행노트는 진녹색 바 + 넓은 화면에서 메뉴를 밖으로 내놓음
 *   히어로  혜택노트는 좌 글자 / 우 사진의 2단
 *           여행노트는 전면 진녹색 + 능선 SVG + 가운데 정렬 1단
 *   구역    혜택노트는 가는 선 하나로만 구분
 *           여행노트는 크림/흰색 배경 띠를 번갈아 깔아 구분
 *   카드    혜택노트는 사진 아래 분류 글자(panel)
 *           여행노트는 사진 위 분류 띠(banner) — style.css 에 있다
 */

.yn-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------- 헤더 ----------------
   진녹색 바. 좌 = 로고 / 가운데~우 = 메뉴 / 우 = 검색 + (좁은 화면용) 3줄 메뉴. */

.yn-header-wrap {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--yn-brand-deep);
}

.yn-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: var(--yn-wide);
    min-height: var(--yn-header-h);
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 28px);
}

.yn-left {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

/* 로고는 워드프레스에 올린 이미지를 그대로 쓰되 헤더 높이에 맞춰 줄인다.
   (Astra 가 로고에 width:600px 을 강제해 모바일에서 화면 밖으로 넘치던 문제를
   여기서 함께 막는다.) */
.yn-left .custom-logo-link img,
.yn-left img.custom-logo {
    display: block;
    width: auto !important;
    max-width: 180px !important;
    height: auto !important;
    max-height: 42px;
}

.yn-logo-text {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
}

/* ---- 넓은 화면 메뉴 ----
   진녹색 바 위의 흰 글자. 지금 보고 있는 곳은 밑줄이 아니라 황토색 점으로 표시한다
   (밑줄은 링크와 구분이 안 된다). */

.yn-nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
}

.yn-nav a {
    position: relative;
    padding: 8px 13px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease;
}

.yn-nav a:hover,
.yn-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.yn-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* 검색창 — 녹색 바 위에 놓이므로 반투명 흰색으로 판다. */
.yn-search {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 36px;
    padding: 0 4px 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    transition: border-color 0.18s ease, background 0.18s ease;
}

.yn-search:focus-within {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
}

.yn-search-field {
    width: 170px;
    height: 32px;
    border: 0 !important;
    outline: none;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 14px;
    color: #fff;
    padding: 0 !important;
}

.yn-search-field::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.yn-search-submit,
.yn-search-toggle,
.yn-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.yn-search-submit:hover,
.yn-search-toggle:hover,
.yn-menu-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* 검색 아이콘 버튼과 3줄 메뉴는 좁은 화면에서만 쓴다. */
.yn-search-toggle,
.yn-menu {
    display: none;
}

/* 3줄 메뉴 */
.yn-menu {
    position: relative;
}

.yn-menu-btn {
    flex-direction: column;
    gap: 4px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.yn-menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.yn-menu-btn[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.yn-menu-btn[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.yn-menu-btn[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.yn-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 210px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--yn-line);
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(16, 34, 22, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

/* 메뉴는 눌러서 연다. 마우스만 올려도 열리면 지나가다 화면을 가린다. */
.yn-menu.is-open .yn-menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.yn-menu-panel a {
    display: block;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--yn-ink);
    text-decoration: none;
    border-radius: 9px;
    white-space: nowrap;
}

.yn-menu-panel a:hover,
.yn-menu-panel a:focus-visible {
    background: #eef2ec;
    color: var(--yn-brand);
}

.yn-menu-group + .yn-menu-group {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--yn-line);
}

/* 안내 문서 묶음은 한 단계 낮춰 보이게 한다. */
.yn-menu-group:not(.yn-menu-group--main) a {
    font-weight: 500;
    font-size: 14px;
    color: var(--yn-muted);
}

/* ---------------- 좁은 화면 (헤더) ---------------- */

@media (max-width: 921px) {
    .yn-header-inner {
        gap: 8px;
        padding: 0 14px;
    }

    .yn-left {
        flex: 1 1 auto;
    }

    .yn-left .custom-logo-link img,
    .yn-left img.custom-logo {
        max-width: 150px !important;
        max-height: 36px;
    }

    /* 밖에 나와 있던 메뉴는 접고 3줄 메뉴로 넘긴다. */
    .yn-nav {
        display: none;
    }

    .yn-search-toggle,
    .yn-menu {
        display: flex;
    }

    /* 검색창은 아이콘으로 접어 두고, 누르면 헤더 아래로 펼친다. */
    .yn-search {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
        height: 0;
        padding: 0 14px;
        border: 0;
        border-radius: 0;
        background: var(--yn-brand-deep);
        overflow: hidden;
    }

    .yn-header-wrap.yn-search-open .yn-search {
        height: 54px;
        padding: 8px 14px;
    }

    .yn-search-field {
        width: 100%;
        flex: 1 1 auto;
    }
}


/* ================= 홈 ================= */

.yn-landing {
    display: block;
}

/* ---- 히어로 ----
   전면 진녹색 + 아래쪽 능선. 사진 파일이 없다 — 능선은 front-page.php 의 SVG 다.
   왜 사진을 안 쓰는지는 그 파일 주석에 적어 뒀다. */

.yn-hero {
    position: relative;
    background: linear-gradient(165deg, #24603b 0%, var(--yn-brand) 46%, var(--yn-brand-deep) 100%);
    color: #fff;
    overflow: hidden;
}

.yn-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: clamp(48px, 7vw, 92px) clamp(18px, 4vw, 28px) clamp(84px, 10vw, 132px);
    text-align: center;
}

.yn-hero-logo {
    margin: 0 0 clamp(18px, 2.6vw, 28px);
}

/* 로고는 대부분 짙은 글자로 만들어져 있어 녹색 위에서 묻힌다.
   흰 알약 위에 얹어 어느 로고를 올려도 읽히게 한다. */
.yn-hero-logo-img {
    display: inline-block;
    width: auto;
    max-width: clamp(150px, 20vw, 220px);
    height: auto;
    padding: 10px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
}

.yn-hero-eyebrow {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #f0c9a8;   /* 황토(--yn-accent)를 녹색 위에서 읽히게 밝힌 값 */
}

.yn-hero-title {
    margin: 0 0 20px;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.035em;
    color: #fff;
}

/* 강조는 색이 아니라 밑줄이다 — 녹색 위에서는 색을 하나 더 쓸수록 지저분해진다. */
.yn-hero-title em {
    font-style: normal;
    box-shadow: inset 0 -0.34em 0 rgba(194, 112, 61, 0.62);
}

.yn-hero-lead {
    margin: 0 auto 14px;
    max-width: 620px;
    font-size: clamp(17px, 2vw, 21px);
    font-weight: 700;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.94);
}

.yn-hero-about {
    margin: 0 auto;
    max-width: 620px;
    font-size: clamp(15px, 1.6vw, 16px);
    line-height: 1.78;
    color: rgba(255, 255, 255, 0.76);
}

/* 능선. 히어로 맨 아래에 붙여 다음 구역(크림색)과 맞물린다. */
.yn-hero-ridge {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;          /* 반올림 때문에 1px 틈이 생기는 것을 막는다 */
    width: 100%;
    height: clamp(56px, 8vw, 116px);
    display: block;
}

/* ---- 구역 공통 ----
   배경 띠를 번갈아 깔아 구분한다. site1 은 가는 선 하나만 쓴다. */

.yn-section {
    padding: clamp(52px, 7vw, 96px) 0;
}

.yn-section--tools {
    background: var(--yn-soft);
}

.yn-section--posts {
    background: var(--yn-bg);
}

.yn-section-inner {
    max-width: var(--yn-wide);
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 28px);
}

.yn-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(26px, 4vw, 44px);
}

/* 구역 제목 왼쪽의 짧은 황토색 막대. 본문 h2 의 녹색 막대와 짝이 맞는다. */
.yn-section-title {
    position: relative;
    margin: 0 0 12px;
    padding-left: 16px;
    font-size: clamp(24px, 3.4vw, 40px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
    color: var(--yn-ink);
}

.yn-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.16em;
    bottom: 0.16em;
    width: 5px;
    border-radius: 3px;
    background: var(--yn-accent);
}

.yn-section-sub {
    margin: 0;
    max-width: 620px;
    padding-left: 16px;
    font-size: 15px;
    line-height: 1.72;
    color: var(--yn-muted);
}

/* ---- 여행 도구 ----
   카드 자체는 도구 플러그인이 그린다(.ync-hub / .ync-card).
   여기서는 홈에 맞게 칸을 다시 잡는다.
   플러그인 CSS 가 뒤에 실리므로 반드시 .yn-tool-hub 를 앞에 붙여 이긴다. */

.yn-tool-hub .ync-hub {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
    margin: 0;
}

.yn-tool-hub .ync-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 22px;
    border: 1px solid var(--yn-line);
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    color: var(--yn-ink);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

/* 카드 위쪽 황토색 선. 크림 배경 위에서 흰 카드가 떠 보이게 하는 최소한의 장치다. */
.yn-tool-hub .ync-card::before {
    content: "";
    position: absolute;
    left: 22px;
    right: 22px;
    top: 0;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--yn-accent);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.yn-tool-hub .ync-card:hover {
    border-color: var(--yn-brand);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(20, 45, 28, 0.1);
}

.yn-tool-hub .ync-card:hover::before {
    opacity: 1;
}

.yn-tool-hub .ync-card-title {
    display: block;
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--yn-brand);
}

.yn-tool-hub .ync-card-desc {
    display: block;
    font-size: 14px;
    line-height: 1.65;
    color: var(--yn-muted);
}

/* ---- 최근 글 ----
   칸과 카드는 목록 화면과 같은 것을 쓴다(style.css 의 .yn-grid / .yn-card).
   같은 카드를 홈과 카테고리에서 두 번 그리지 않는다. */

.yn-section--posts .yn-pagination {
    margin-top: clamp(34px, 5vw, 54px);
}

/* ================= 글 아래 '많이 본 글' ================= */

/* 읽던 글이 끝났다는 것이 보여야 한다. 배경을 한 톤 깔고 본문 폭 밖으로 넓힌다. */
.yn-popular {
    margin-top: clamp(40px, 6vw, 72px);
    padding: clamp(36px, 5vw, 60px) 0;
    background: var(--yn-soft);
    border-top: 1px solid var(--yn-line);
}

.yn-popular-inner {
    max-width: var(--yn-wide);
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 28px);
}

.yn-popular-title {
    margin: 0 0 clamp(18px, 2.6vw, 28px);
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--yn-ink);
}

/* 두 장뿐이라 화면이 넓어도 반씩 나눠 갖는다(카드가 과하게 커지지 않게). */
.yn-popular .yn-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ================= 푸터 ================= */

/* 헤더와 같은 진녹색으로 위아래를 맞물린다. site1 은 흰색에 가까운 푸터를 쓴다. */
.yn-footer {
    margin-top: 0;
    background: var(--yn-brand-deep);
    color: rgba(255, 255, 255, 0.82);
}

.yn-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 28px;
    max-width: var(--yn-wide);
    margin: 0 auto;
    padding: 34px clamp(16px, 3vw, 28px) 18px;
}

.yn-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.yn-footer-links a {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
}

.yn-footer-links a:hover {
    color: #fff;
}

.yn-footer-copy {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.56);
}

.yn-footer-social {
    display: flex;
    gap: 12px;
}

.yn-footer-social a {
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    text-decoration: none;
}

/* 안전 안내. 저작권 줄보다 아래, 가는 선 하나로 나눈다. */
.yn-footer-notice {
    max-width: var(--yn-wide);
    margin: 0 auto;
    padding: 14px clamp(16px, 3vw, 28px) 34px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.52);
}

/* ================= 좁은 화면 (홈) ================= */

@media (max-width: 921px) {
    .yn-section-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .yn-hero-title {
        letter-spacing: -0.02em;
    }

    /* 카드를 무조건 한 줄에 하나로 두면 세로로 길게 늘어져
       그 아래 글 목록까지 스크롤이 너무 멀어진다. 폭이 되는 만큼만 나눈다. */
    .yn-tool-hub .ync-hub {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }

    .yn-footer-inner {
        justify-content: center;
        text-align: center;
    }

    .yn-footer-links {
        justify-content: center;
    }

    .yn-footer-notice {
        text-align: center;
    }
}
