/**
 * 메인 — 걷기연맹 소개 히어로 + 이벤트 플랫폼 UI
 */

.gw-event-platform {
    --gw-hero-from: #0a4d8c;
    --gw-hero-mid: #157347;
    --gw-hero-to: #1aa179;
    --gw-soft-bg: #f4f7f6;
    --gw-pill-shadow: 0 12px 40px rgba(21, 115, 71, 0.12);
    overflow-x: clip;
}

/* ── Hero (걷기연맹 소개) ── */
.gw-hero-brand {
    position: relative;
    color: #fff;
    min-height: clamp(18rem, 42vw, 26rem);
    background-image: url('/img/bg.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.gw-hero-brand__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10, 77, 140, 0.28) 0%, rgba(0, 0, 0, 0.08) 45%, rgba(0, 0, 0, 0.58) 100%);
    pointer-events: none;
}

.gw-hero-brand__inner {
    position: relative;
    z-index: 1;
    padding: 3rem 0 2.75rem;
}

.gw-hero-brand__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    opacity: 0.92;
}

.gw-hero-brand__title {
    font-size: clamp(1.85rem, 4.5vw, 2.85rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.85rem;
    letter-spacing: -0.02em;
}

.gw-hero-brand__lead {
    max-width: 38rem;
    margin-bottom: 1.35rem;
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.65;
    opacity: 0.95;
}

.gw-hero-brand__lead-keep {
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .gw-hero-brand__lead-keep {
        white-space: normal;
    }
}

.gw-hero-brand__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.gw-hero-brand__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    text-shadow: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.gw-hero-brand__cta i {
    font-size: 1.05rem;
    opacity: 0.9;
}

.gw-hero-brand__cta--solid {
    background: #fff;
    color: var(--gywf-brand-dark, #146c43);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.gw-hero-brand__cta--solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    color: var(--gywf-brand-dark, #146c43);
    background: var(--gywf-brand-light, #d1e7dd);
}

.gw-hero-brand__cta--glass {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.gw-hero-brand__cta--glass:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.gw-hero-brand__wave {
    position: relative;
    line-height: 0;
    color: var(--gywf-surface, #f8f9fa);
    margin-top: -1px;
}

.gw-hero-brand__wave svg {
    display: block;
    width: 100%;
    height: 3.5rem;
}

/* ── Quick dock (아이콘 바로가기) ── */
.gw-quick-dock {
    margin-top: -2.25rem;
    position: relative;
    z-index: 3;
    padding-bottom: 1.5rem;
}

.gw-quick-dock__track {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding: 0.25rem 0.15rem 0.5rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.gw-quick-dock__track::-webkit-scrollbar {
    display: none;
}

.gw-quick-item {
    flex: 1 0 auto;
    min-width: 4.5rem;
    max-width: 6.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: var(--gywf-text);
    transition: transform 0.2s ease;
}

.gw-quick-item:hover {
    transform: translateY(-3px);
    color: var(--gywf-brand-dark);
}

.gw-quick-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: var(--gywf-surface-elevated);
    box-shadow: var(--gw-pill-shadow);
    font-size: 1.25rem;
    color: var(--gywf-brand-dark);
    transition: background 0.2s, color 0.2s;
}

.gw-quick-item:hover .gw-quick-item__icon {
    background: var(--gywf-brand-light);
}

.gw-quick-item--accent .gw-quick-item__icon {
    background: var(--gywf-brand);
    color: #fff;
    box-shadow: 0 8px 22px rgba(25, 135, 84, 0.3);
}

.gw-quick-item--accent:hover {
    color: var(--gywf-brand-dark);
}

.gw-quick-item--accent:hover .gw-quick-item__icon {
    background: var(--gywf-brand-dark);
    color: #fff;
}

.gw-quick-item__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

/* ── Sections ── */
.gw-event-platform .gw-section {
    padding: 2.5rem 0 3rem;
}

.gw-event-platform .gw-section--soft {
    background: var(--gw-soft-bg);
}

.gw-section-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.gw-section-head__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--gywf-brand-light);
    color: var(--gywf-brand-dark);
    font-size: 1rem;
}

.gw-section-head__title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

/* ── Federation (걷기연맹) ── */
.gw-federation-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--gywf-surface-elevated);
    border-radius: 1.35rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.gw-federation-intro {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-radius: 1.1rem;
    background:
        linear-gradient(145deg, rgba(209, 231, 221, 0.55) 0%, rgba(248, 249, 250, 0.9) 100%);
}

.gw-federation-intro__head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.gw-federation-intro__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--gywf-brand);
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(25, 135, 84, 0.25);
}

.gw-federation-intro__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--gywf-text);
}

.gw-federation-intro__sub {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gywf-brand-dark);
}

.gw-federation-intro__text {
    margin: 0;
    font-size: 0.925rem;
    line-height: 1.7;
    color: var(--gywf-text);
}

.gw-federation-intro__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    align-self: flex-start;
    margin-top: auto;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: var(--gywf-brand);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.gw-federation-intro__cta:hover {
    background: var(--gywf-brand-dark);
    color: #fff;
    transform: translateX(2px);
}

.gw-federation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    align-content: center;
}

.gw-federation-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 1rem 0.95rem;
    border-radius: 1rem;
    background: var(--gywf-surface, #f8f9fa);
    text-decoration: none;
    color: var(--gywf-text);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.gw-federation-card:hover {
    background: #fff;
    color: var(--gywf-brand-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}

.gw-federation-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, var(--gywf-brand-light), #fff);
    color: var(--gywf-brand-dark);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.gw-federation-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.gw-federation-card__title {
    font-size: 0.925rem;
    font-weight: 800;
    line-height: 1.3;
}

.gw-federation-card__desc {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gywf-text-muted);
    line-height: 1.35;
}

.gw-federation-card:hover .gw-federation-card__desc {
    color: var(--gywf-brand-dark);
    opacity: 0.85;
}

.gw-federation-card__arrow {
    font-size: 0.95rem;
    color: var(--gywf-text-muted);
    opacity: 0.55;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.gw-federation-card:hover .gw-federation-card__arrow {
    transform: translateX(3px);
    opacity: 1;
    color: var(--gywf-brand-dark);
}

/* ── Feed panels (소식) ── */
.gw-news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.gw-feed-panel {
    height: 100%;
    background: var(--gywf-surface-elevated);
    border-radius: 1.35rem;
    padding: 1.35rem 1.35rem 1.15rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.gw-feed-panel .latest {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
}

.latest-home-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--gywf-border);
}

.latest-home-head__title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.latest-home-head__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--gywf-brand-light);
    color: var(--gywf-brand-dark);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.latest-home-head__label {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.latest-home-head__label a {
    color: var(--gywf-text);
    text-decoration: none;
}

.latest-home-head__label a:hover {
    color: var(--gywf-brand-dark);
}

.latest-home-head__more {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gywf-text-muted);
    text-decoration: none;
    white-space: nowrap;
}

.latest-home-head__more:hover {
    color: var(--gywf-brand-dark);
}

.latest-home-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.latest-home-list__item {
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.85rem;
    background: var(--gywf-surface, #f8f9fa);
    transition: background 0.2s ease, transform 0.2s ease;
}

.latest-home-list__item:hover {
    background: var(--gywf-brand-light);
    transform: translateX(2px);
}

.latest-home-list__date {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gywf-text-muted);
    letter-spacing: 0.02em;
}

.latest-home-list__link {
    color: var(--gywf-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-home-list__item:hover .latest-home-list__link {
    color: var(--gywf-brand-dark);
}

.latest-home-list__badge {
    display: inline-block;
    margin-right: 0.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: var(--gywf-brand);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    vertical-align: middle;
}

.latest-home-list__new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
}

.latest-home-list__empty,
.latest-home-gallery__empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 2rem 1rem;
    border-radius: 0.85rem;
    background: var(--gywf-surface, #f8f9fa);
    color: var(--gywf-text-muted);
    font-size: 0.875rem;
    text-align: center;
}

.latest-home-gallery-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    align-content: start;
}

.latest-home-gallery-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--gywf-text);
    border-radius: 1rem;
    overflow: hidden;
    background: var(--gywf-surface, #f8f9fa);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.latest-home-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    color: var(--gywf-brand-dark);
}

.latest-home-gallery-item__thumb {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e9ecef;
}

.latest-home-gallery-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.latest-home-gallery-item:hover .latest-home-gallery-item__thumb img {
    transform: scale(1.05);
}

.latest-home-gallery-item__title {
    display: block;
    padding: 0 0.65rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Map card ── */
.gw-map-card {
    max-width: 48rem;
    margin: 0 auto;
    background: var(--gywf-surface-elevated);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.gw-map-card__map iframe {
    display: block;
    width: 100%;
    min-height: 280px;
    border: 0;
}

.gw-map-card__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    text-decoration: none;
    color: var(--gywf-text);
    font-size: 0.9rem;
    font-weight: 600;
    border-top: 1px solid var(--gywf-border);
}

.gw-map-card__link:hover {
    color: var(--gywf-brand-dark);
    background: var(--gywf-brand-light);
}

.gw-map-card__link .bi-chevron-right {
    margin-left: auto;
    opacity: 0.5;
}

/* ── Legacy compat (행사 페이지) ── */
.gw-home .gw-hero,
.gw-home .gw-brand-hero {
    background: linear-gradient(135deg, #0b5ed7 0%, #198754 55%, #157347 100%);
    color: #fff;
    padding: 4rem 0 4.5rem;
}

.gw-home .gw-stats {
    background: var(--gywf-surface, #f8f9fa);
}

.gw-home .gw-stat-card {
    background: var(--gywf-surface-elevated, #fff);
    border-radius: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1rem;
    text-align: center;
    height: 100%;
}

.gw-home .gw-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gywf-brand-dark, #157347);
}

.gw-home .gw-stat-label {
    font-size: 0.9rem;
    color: var(--gywf-text-muted, #6c757d);
}

.gw-home .gw-progress {
    height: 8px;
    background: #e9ecef;
    border-radius: 999px;
    overflow: hidden;
}

.gw-home .gw-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #198754, #20c997);
}

.gw-home .gw-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* ── Responsive ── */
@media (max-width: 767.98px) {
    .gw-hero-brand__inner {
        padding: 2.25rem 20px 2rem;
    }

    .gw-hero-brand {
        min-height: 16rem;
    }

    .gw-federation-panel {
        grid-template-columns: 1fr;
        padding: 1.15rem;
    }

    .gw-federation-grid {
        grid-template-columns: 1fr;
    }

    .gw-quick-dock {
        margin-top: -1.75rem;
    }
}

@media (max-width: 991.98px) {
    .gw-news-grid {
        grid-template-columns: 1fr;
    }

    .gw-federation-panel {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {
    .gw-quick-dock__track {
        justify-content: center;
        max-width: 36rem;
        margin: 0 auto;
    }

    .gw-quick-item {
        flex: 1;
    }
}
