/*
Theme Name: GGY Youth Union
Theme URI: https://ggyouthunion.com/
Author: GitHub Copilot
Description: 경기도 청년연합 공식 홈페이지용 커스텀 워드프레스 테마
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: ggyouthunion
*/

:root {
    --bg: #f4f7fa;
    --surface: #ffffff;
    --surface-alt: #f8fbfd;
    --line: #dbe4ec;
    --line-strong: #c7d4e0;
    --text: #1f3145;
    --muted: #627489;
    --muted-strong: #41586e;
    --primary: #163d69;
    --primary-strong: #0f2f53;
    --accent: #2d7db8;
    --shadow: 0 16px 40px rgba(22, 53, 87, 0.06);
    --shadow-soft: 0 10px 24px rgba(22, 53, 87, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --layout: 1360px;
}

* {
    box-sizing: border-box;
    font-family: 'Pretendard', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    caret-color: transparent;
}

body.menu-open {
    overflow: hidden;
}

body *,
main,
section,
article,
div,
p,
h1,
h2,
h3,
h4,
h5,
h6,
span,
strong,
small,
li,
dt,
dd {
    caret-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

a,
button,
[role='button'],
[data-tab-target],
[data-slide-dot],
[data-slide-prev],
[data-slide-next] {
    caret-color: transparent;
    -webkit-tap-highlight-color: transparent;
}

a:focus,
button:focus,
[role='button']:focus,
[data-tab-target]:focus,
[data-slide-dot]:focus,
[data-slide-prev]:focus,
[data-slide-next]:focus {
    outline: none;
}

a:focus-visible,
button:focus-visible,
[role='button']:focus-visible,
[data-tab-target]:focus-visible,
[data-slide-dot]:focus-visible,
[data-slide-prev]:focus-visible,
[data-slide-next]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

input,
textarea,
select,
option,
[contenteditable='true'],
[contenteditable=''],
[contenteditable='plaintext-only'] {
    caret-color: auto;
}

img {
    display: block;
    max-width: 100%;
}

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

.page-shell {
    min-height: 100vh;
}

.layout-shell,
.nav-container,
.footer-grid,
.footer-bottom,
.page-main {
    width: min(calc(100% - 48px), var(--layout));
    margin: 0 auto;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

header.scrolled {
    box-shadow: 0 8px 24px rgba(22, 53, 87, 0.05);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 88px;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.site-logo-image--header {
    width: min(320px, 34vw);
    height: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1 1 auto;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 10px;
    color: var(--muted-strong);
    font-size: 0.98rem;
    font-weight: 700;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-item > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.68rem;
    opacity: 0.7;
}

.nav-item:hover > a,
.nav-item:focus-within > a {
    color: var(--primary);
    border-color: var(--primary);
}

.dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    min-width: 180px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown a {
    display: block;
    padding: 10px 12px;
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 600;
}

.dropdown a:hover {
    color: var(--primary);
    background: var(--surface-alt);
}

.nav-cta,
.primary-link,
.home-board-link,
.home-banner-card span,
.home-promo-card a,
.home-share-copy a,
.home-business-card,
.section-more-link,
.page-side-link,
.cta-btn,
.home-secondary-link {
    transition: all 0.2s ease;
}

.nav-cta,
.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    border: 1px solid var(--primary);
}

.home-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--line-strong);
    font-weight: 700;
}

.nav-cta:hover,
.cta-btn:hover {
    background: var(--primary-strong);
}

.home-secondary-link:hover {
    border-color: var(--primary);
    color: var(--primary-strong);
}

.mobile-menu-toggle,
.mobile-drawer {
    display: none;
}

.site-main {
    padding-bottom: 88px;
}

.home-visual-section {
    padding-top: 24px;
}

.home-visual-shell {
    position: relative;
}

.home-visual-slider {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #eef5fa 0%, #f8fbfd 100%);
    box-shadow: var(--shadow);
}

.home-visual-slide {
    display: none;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    gap: 40px;
    align-items: center;
    min-height: 470px;
    padding: 56px 60px;
}

.home-visual-slide.is-active {
    display: grid;
}

.home-visual-copy h1 {
    margin: 0;
    color: var(--primary);
    font-size: clamp(2.8rem, 5vw, 4.9rem);
    line-height: 1.08;
    letter-spacing: -0.06em;
    word-break: keep-all;
}

.home-visual-copy p {
    max-width: 700px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.home-visual-kicker,
.section-heading-kicker,
.page-eyebrow,
.page-side-kicker {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-visual-copy .primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 28px;
    padding: 0 18px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.home-visual-copy .primary-link:hover {
    background: var(--primary-strong);
}

.home-visual-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(219, 228, 236, 0.85);
}

.home-visual-media img {
    max-height: 300px;
    width: auto;
    object-fit: contain;
}

.home-visual-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 0 26px;
}

.home-visual-arrow,
.home-visual-dot {
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--primary);
}

.home-visual-arrow {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.home-visual-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-visual-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    cursor: pointer;
}

.home-visual-dot.is-active {
    background: var(--primary);
    border-color: var(--primary);
}

.home-shortcut-section,
.home-news-section,
.home-participation-section,
.home-share-section,
.home-business-section,
.home-banner-section,
.home-partner-section {
    padding-top: 48px;
}

.home-shortcut-grid,
.home-card-track,
.home-business-grid,
.home-partner-grid {
    display: grid;
    gap: 16px;
}

.home-shortcut-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.home-shortcut-card,
.home-business-card {
    min-height: 122px;
    padding: 20px 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    color: var(--muted-strong);
}

.home-shortcut-card i,
.home-business-card i {
    font-size: 1.45rem;
    color: var(--primary);
}

.home-shortcut-card span,
.home-business-card span {
    font-weight: 700;
}

.home-shortcut-card:hover,
.home-business-card:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.home-news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
    gap: 24px;
}

.home-news-panel,
.home-letter-panel,
.home-promo-card,
.home-share-card,
.home-banner-card,
.page-content-card,
.page-side-card,
.page-hero-inner {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.home-news-panel,
.home-letter-panel,
.home-promo-card,
.home-share-card,
.page-content-card,
.page-side-card,
.page-hero-inner {
    padding: 28px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.section-heading.compact {
    margin-bottom: 16px;
}

.section-heading.center {
    justify-content: center;
    text-align: center;
}

.section-heading h2,
.page-title,
.home-business-copy h2 {
    margin: 0;
    color: var(--primary);
    line-height: 1.12;
    letter-spacing: -0.05em;
    word-break: keep-all;
}

.section-heading h2,
.home-business-copy h2 {
    font-size: clamp(2rem, 4vw, 3.1rem);
}

.section-heading-sub,
.home-business-copy p,
.page-summary,
.home-letter-card p {
    margin: 10px 0 0;
    color: var(--muted);
}

.section-heading-tools {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.home-tab-list {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.home-tab-list.centered {
    justify-content: center;
    margin-bottom: 18px;
}

.home-tab-button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--muted-strong);
    font-weight: 700;
    cursor: pointer;
}

.home-tab-button.is-active {
    border-color: var(--primary);
    color: var(--primary);
    background: #f3f8fc;
}

.section-more-link {
    color: var(--primary);
    font-weight: 700;
}

.home-tab-panel {
    display: none;
}

.home-tab-panel.is-active {
    display: block;
}

.home-board-list li {
    position: relative;
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 96px;
    gap: 18px;
    align-items: start;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.home-board-list li:first-child {
    border-top: 0;
    padding-top: 6px;
}

.home-board-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    background: #eef4f8;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.home-board-copy strong {
    display: block;
    color: var(--primary);
    font-size: 1rem;
    line-height: 1.4;
}

.home-board-copy p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.home-board-list time {
    color: var(--muted);
    font-size: 0.9rem;
    text-align: right;
}

.home-board-link {
    position: absolute;
    inset: 0;
}

.home-letter-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    color: var(--text);
}

.home-letter-card img {
    width: 100%;
    min-height: 180px;
    padding: 20px;
    border: 1px solid var(--line);
    background: var(--surface-alt);
    object-fit: contain;
}

.home-letter-card strong,
.home-promo-card strong,
.home-share-copy strong,
.home-banner-card strong {
    color: var(--primary);
    font-size: 1.18rem;
    line-height: 1.35;
}

.home-card-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-promo-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-promo-card img {
    width: 100%;
    height: 170px;
    object-fit: contain;
    border: 1px solid var(--line);
    background: var(--surface-alt);
    padding: 16px;
}

.home-promo-card p,
.home-share-copy p,
.home-banner-card p {
    margin: 0;
    color: var(--muted);
}

.home-promo-card a,
.home-share-copy a {
    color: var(--primary);
    font-weight: 700;
}

.home-share-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.home-share-card {
    display: grid;
    grid-template-rows: 210px auto;
    gap: 18px;
}

.home-share-thumb {
    border: 1px solid var(--line);
    background: var(--surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.home-share-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.home-share-copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-business-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.home-business-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-banner-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.home-banner-card {
    min-height: 190px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
}

.home-banner-card.tone-blue {
    background: linear-gradient(135deg, #edf5fb 0%, #f8fbfd 100%);
}

.home-banner-card.tone-light {
    background: linear-gradient(135deg, #f8fbfd 0%, #f1f7fb 100%);
}

.home-banner-card span {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    font-weight: 700;
}

.home-partner-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.home-partner-grid li {
    min-height: 78px;
    padding: 18px 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted-strong);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.page-main {
    padding-top: 32px;
    padding-bottom: 88px;
}

.page-hero {
    padding-bottom: 20px;
}

.page-hero-inner {
    padding: 34px 38px;
}

.page-title {
    font-size: clamp(2.2rem, 4vw, 3.7rem);
}

.page-summary {
    max-width: 760px;
    font-size: 1rem;
}

.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
}

.page-content-body > *:first-child {
    margin-top: 0;
}

.page-content-body h2 {
    margin: 34px 0 14px;
    color: var(--primary);
    font-size: 1.8rem;
    line-height: 1.25;
}

.page-content-body h3 {
    margin: 24px 0 10px;
    color: var(--primary);
    font-size: 1.22rem;
}

.page-content-body p,
.page-content-body ul,
.page-content-body ol {
    margin: 0 0 16px;
    color: var(--muted-strong);
}

.page-content-body ul,
.page-content-body ol {
    padding-left: 20px;
}

.page-content-body li {
    margin-bottom: 8px;
}

.page-side-card {
    position: sticky;
    top: 110px;
    align-self: start;
}

.page-side-links {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.page-side-link {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--line);
    color: var(--muted-strong);
    font-weight: 700;
    background: var(--surface-alt);
}

.page-side-link.current,
.page-side-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f3f8fc;
}

footer {
    padding: 36px 0 28px;
    background: #eef4f8;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
}

.footer-brand {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.site-logo-image--footer {
    width: 240px;
    height: auto;
}

.footer-brand h3 {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 1.15rem;
}

.footer-brand p,
.footer-bottom {
    margin: 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    color: var(--primary);
    font-weight: 700;
    background: var(--surface);
}

.footer-bottom {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
}

@media (max-width: 1200px) {
    .home-shortcut-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-card-track,
    .home-share-grid,
    .home-business-grid,
    .home-partner-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-news-layout,
    .home-business-layout,
    .page-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .page-side-card {
        position: static;
    }
}

@media (max-width: 960px) {
    .nav-menu,
    .nav-cta {
        display: none;
    }

    .mobile-menu-toggle,
    .mobile-drawer {
        display: flex;
    }

    .mobile-menu-toggle {
        width: 46px;
        height: 46px;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--line-strong);
        background: var(--surface);
        color: var(--primary);
        cursor: pointer;
    }

    .mobile-drawer {
        position: fixed;
        top: 88px;
        right: 24px;
        left: 24px;
        flex-direction: column;
        gap: 16px;
        padding: 20px;
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    }

    .mobile-drawer.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .mobile-group {
        border-top: 1px solid var(--line);
        padding-top: 14px;
    }

    .mobile-group:first-child {
        border-top: 0;
        padding-top: 0;
    }

    .mobile-group strong {
        display: block;
        margin-bottom: 10px;
        color: var(--primary);
    }

    .mobile-links {
        display: grid;
        gap: 8px;
    }

    .mobile-links a {
        padding: 10px 12px;
        border: 1px solid var(--line);
        color: var(--muted-strong);
        background: var(--surface-alt);
    }

    .home-visual-slide {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 38px 32px;
    }

    .home-board-list li {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .home-board-list time {
        text-align: left;
    }
}

@media (max-width: 720px) {
    .layout-shell,
    .nav-container,
    .footer-grid,
    .footer-bottom,
    .page-main {
        width: min(calc(100% - 24px), var(--layout));
    }

    .site-logo-image--header {
        width: min(240px, 58vw);
    }

    .home-shortcut-grid,
    .home-card-track,
    .home-share-grid,
    .home-business-grid,
    .home-partner-grid,
    .home-banner-grid {
        grid-template-columns: 1fr;
    }

    .home-visual-copy h1 {
        font-size: clamp(2.1rem, 10vw, 3.1rem);
    }

    .home-visual-slide,
    .home-news-panel,
    .home-letter-panel,
    .home-promo-card,
    .home-share-card,
    .home-banner-card,
    .page-content-card,
    .page-side-card,
    .page-hero-inner {
        padding: 22px;
    }

    .home-visual-controls {
        padding-bottom: 18px;
    }

    .home-tab-list,
    .section-heading-tools,
    .home-visual-controls,
    .footer-links {
        justify-content: flex-start;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-visual-copy .primary-link,
    .cta-btn,
    .home-secondary-link {
        width: 100%;
    }

    .section-heading h2,
    .home-business-copy h2,
    .page-title {
        font-size: clamp(1.8rem, 8vw, 2.6rem);
    }
}
