/* ==========================================================
   서울특별시윈드서핑연맹 리디자인 — 메인 전용 swsf_main.css
   index.php에서만 불러옴. 색상 변수는 swsf.css에 정의
   ========================================================== */

/* :where()로 감싸 우선순위를 0으로 → .sw-wrap의 가운데 정렬, 좌우 여백이 지워지지 않게 */
:where(.sw-hero, .sw-quick, .sw-sec, .sw-wind, .sw-sp) * {
    box-sizing: border-box; margin: 0; padding: 0; border-radius: 0;
}
.sw-hero a, .sw-quick a, .sw-sec a, .sw-wind a, .sw-sp a { color: inherit; text-decoration: none; }

/* ---------- 메인 비주얼 ---------- */
.sw-hero {
    position: relative;
    height: 720px;
    background: var(--sw-navy);
    overflow: hidden;
}
.sw-hero-media { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.sw-hero-img {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: 50% 45%;
    opacity: 0;
    transition: opacity 1s;
}
.sw-hero-img.on { opacity: 1; }
.sw-hero-panel {
    position: absolute; left: 0; bottom: 0;
    width: 688px; height: 312px;
    padding: 60px 0 0 120px;
    background: rgba(13, 43, 78, .8);
}
.sw-hero-h {
    font-size: 52px; line-height: 1.25; font-weight: 700;
    color: #fff; letter-spacing: -0.035em;
}
.sw-hero-p {
    margin-top: 20px;
    font-size: 17px; line-height: 1.6;
    color: rgba(255, 255, 255, .78);
}
.sw-hero-ctrl {
    position: absolute; right: 48px; top: 68px;
    display: flex; align-items: center; gap: 8px;
}
.sw-hc-num { width: 14px; text-align: center; font-size: 14px; font-weight: 500; color: #fff; }
.sw-hc-num.dim { color: rgba(255, 255, 255, .55); }
.sw-hc-bar { width: 32px; height: 2px; background: rgba(255, 255, 255, .3); transition: background .3s; }
.sw-hc-bar.on { background: var(--sw-or); }

/* ---------- 바로가기 ---------- */
.sw-quick { background: var(--sw-navy); border-top: 1px solid rgba(255, 255, 255, .14); }
.sw-quick-in { display: flex; }
.sw-qk {
    flex: 1;
    display: flex; flex-direction: column; gap: 8px;
    padding: 40px 32px 44px;
    border-left: 1px solid rgba(255, 255, 255, .14);
}
.sw-qk:first-child { border-left: 0; padding-left: 0; }
.sw-qk-t { font-size: 20px; font-weight: 600; color: #fff; }
.sw-qk-d { font-size: 14px; color: rgba(255, 255, 255, .66); }

/* ---------- 섹션 공통 ---------- */
.sw-sec { padding: 104px 0; background: #fff; }
.sw-sec.sw-gray  { background: var(--sw-bg2); }
.sw-sec.sw-tight { padding: 80px 0; }
.sw-sec.sw-line  { border-top: 1px solid var(--sw-line); }
.sw-sh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 32px; }
.sw-sh h2 { font-size: 30px; font-weight: 700; line-height: 1.3; letter-spacing: -0.03em; color: var(--sw-ink); }
.sw-more { padding-bottom: 2px; font-size: 14px; color: var(--sw-sub); border-bottom: 1px solid var(--sw-mute); }
.sw-thumb { display: block; overflow: hidden; background: var(--sw-bg2); }
.sw-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sw-empty { padding: 24px 0; font-size: 15px; color: var(--sw-mute); }

/* ---------- 공지사항 · 대회 소식 ---------- */
.sw-two { display: flex; gap: 80px; }
.sw-col-l { width: 460px; flex-shrink: 0; }
.sw-col-r { flex: 1; min-width: 0; }

.sw-nt { border-top: 2px solid var(--sw-navy); }
.sw-nt-row {
    display: flex; align-items: center; gap: 12px;
    height: 68px;
    border-bottom: 1px solid var(--sw-line);
}
.sw-nt-t {
    flex: 1; min-width: 0;
    font-size: 16px; color: var(--sw-ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sw-nt-row:hover .sw-nt-t { color: var(--sw-navy); }
.sw-nt-tag {
    display: inline-block; width: 30px; margin-right: 12px;
    font-style: normal; font-size: 14px; font-weight: 600; color: var(--sw-or);
}
.sw-nt-d { flex-shrink: 0; font-size: 14px; color: var(--sw-mute); }

.sw-rcs { display: flex; gap: 24px; }
.sw-rc { flex: 1; min-width: 0; display: block; }
.sw-rc-img { height: 248px; }
.sw-rc-t { margin-top: 20px; font-size: 18px; font-weight: 600; line-height: 1.45; color: var(--sw-ink); }
.sw-rc-m { margin-top: 8px; font-size: 14px; color: var(--sw-sub); }
.sw-gap2 { display: inline-block; width: 14px; }

/* ---------- 오늘 한강 바람 ---------- */
.sw-wind { background: #fff; border-top: 1px solid var(--sw-line); }
.sw-wind-in { display: flex; align-items: center; gap: 80px; padding-top: 56px; padding-bottom: 56px; }
.sw-wind-txt { width: 460px; flex-shrink: 0; }
.sw-wind-txt h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; color: var(--sw-ink); }
.sw-wind-txt p { margin-top: 8px; font-size: 15px; color: var(--sw-sub); }
.sw-wind-box { flex: 1; height: 220px; background: var(--sw-bg2); border: 1px solid var(--sw-line); }
.sw-wind-box iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- 체험·교육 ---------- */
.sw-prgs { display: flex; gap: 32px; }
.sw-prg { flex: 1; min-width: 0; display: block; background: #fff; }
.sw-prg-img { height: 260px; }
.sw-prg-t { padding: 28px 28px 0; font-size: 19px; font-weight: 600; color: var(--sw-ink); }
.sw-prg-dl {
    display: grid; grid-template-columns: 44px 1fr; row-gap: 6px;
    padding: 16px 28px 30px;
    font-size: 14px;
}
.sw-prg-dl dt { color: var(--sw-mute); }
.sw-prg-dl dd { color: var(--sw-sub); }

/* ---------- 갤러리 ---------- */
.sw-gcs {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 220px 220px;
    gap: 16px;
}
.sw-gc { position: relative; display: block; overflow: hidden; background: var(--sw-bg2); }
.sw-gc:first-child { grid-row: span 2; }
.sw-gc-video { grid-column: span 2; }
.sw-gc img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sw-gc-tag {
    position: absolute; left: 0; top: 0;
    padding: 7px 12px;
    font-size: 13px; font-weight: 500; color: #fff;
    background: var(--sw-navy);
}

/* ---------- 소속 클럽 ---------- */
.sw-logos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.sw-logo-box {
    display: flex; align-items: center; justify-content: center;
    height: 96px; padding: 16px;
    font-size: 14px; color: var(--sw-sub); text-align: center;
    border: 1px solid var(--sw-line);
}
.sw-logo-box img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- 후원·관련기관 ---------- */
.sw-sp { background: var(--sw-bg2); }
.sw-sp-in { display: flex; align-items: center; gap: 48px; padding-top: 36px; padding-bottom: 36px; }
.sw-sp-l { width: 120px; flex-shrink: 0; font-size: 15px; font-weight: 600; color: var(--sw-sub); }
.sw-sp-row { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.sw-sp-box {
    display: flex; align-items: center; justify-content: center;
    height: 56px; padding: 10px;
    font-size: 13px; color: var(--sw-mute);
    background: #fff;
}
.sw-sp-box img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }

/* ==========================================================
   반응형
   ========================================================== */

@media (max-width: 1200px) {
    .sw-two { gap: 48px; }
    .sw-col-l, .sw-wind-txt { width: 400px; }
    .sw-wind-in { gap: 48px; }
}

@media (max-width: 992px) {
    .sw-br-pc { display: none; }

    /* 메인 비주얼: 사진 위, 문구 아래 */
    .sw-hero { height: auto; overflow: visible; background: none; }
    .sw-hero-media { position: relative; top: auto; left: auto; right: auto; bottom: auto; height: 300px; background: var(--sw-navy); }
    .sw-hero-img { background-position: 72% 50%; }
    .sw-hero-panel { position: static; width: auto; height: auto; padding: 32px 20px 28px; background: var(--sw-navy); }
    .sw-hero-h { font-size: 32px; line-height: 1.3; }
    .sw-hero-p { margin-top: 14px; font-size: 15px; }
    .sw-hero-ctrl { position: static; margin-top: 24px; }
    .sw-hc-num { width: 12px; font-size: 13px; }
    .sw-hc-bar { width: 28px; }

    /* 바로가기 2x2 */
    .sw-quick-in { display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
    .sw-qk { gap: 6px; padding: 22px 20px 24px; border-left: 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
    .sw-qk:first-child { padding-left: 20px; }
    .sw-qk:nth-child(odd) { border-right: 1px solid rgba(255, 255, 255, .14); }
    .sw-qk:nth-child(n+3) { border-bottom: 0; }
    .sw-qk-t { font-size: 16px; }
    .sw-qk-d { font-size: 12px; line-height: 1.5; }

    /* 섹션 */
    .sw-sec, .sw-sec.sw-tight { padding: 56px 0; }
    .sw-sh { margin-bottom: 20px; }
    .sw-sh h2 { font-size: 22px; }
    .sw-more { padding-bottom: 1px; font-size: 13px; }

    /* 공지 · 대회 */
    .sw-two { display: block; }
    .sw-col-l { width: auto; }
    .sw-col-r { margin-top: 56px; }
    .sw-nt-row { flex-direction: column; align-items: flex-start; gap: 6px; height: auto; padding: 16px 0; }
    .sw-nt-row:nth-child(5) { display: none; }
    .sw-nt-t { font-size: 15px; line-height: 1.45; white-space: normal; }
    .sw-nt-tag { width: auto; margin-right: 8px; }
    .sw-nt-d { font-size: 13px; }

    /* 가로 스크롤 카드 */
    .sw-scroll {
        margin: 0 -20px; padding: 0 20px;
        overflow-x: auto; -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .sw-scroll::-webkit-scrollbar { display: none; }
    .sw-rcs, .sw-prgs { gap: 14px; width: max-content; }
    .sw-rc, .sw-prg { flex: 0 0 280px; width: 280px; }
    .sw-rc-img { height: 200px; }
    .sw-rc-t { margin-top: 14px; font-size: 16px; }
    .sw-rc-m { margin-top: 6px; font-size: 13px; }
    .sw-gap2 { width: 10px; }

    /* 바람 */
    .sw-wind { border-top: 0; }
    .sw-wind-in { display: block; padding-top: 0; padding-bottom: 56px; }
    .sw-wind-txt { width: auto; }
    .sw-wind-txt h2 { font-size: 20px; }
    .sw-wind-txt p { margin-top: 6px; font-size: 13px; }
    .sw-wind-box { margin-top: 16px; height: 240px; }

    /* 체험·교육 */
    .sw-prg-img { height: 190px; }
    .sw-prg-t { padding: 20px 20px 0; font-size: 16px; }
    .sw-prg-dl { grid-template-columns: 36px 1fr; row-gap: 4px; padding: 12px 20px 22px; font-size: 13px; }

    /* 갤러리: 큰 사진 1 + 작은 사진 2, 영상 칸 숨김 */
    .sw-gcs { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 140px; gap: 10px; }
    .sw-gc:first-child { grid-row: auto; grid-column: span 2; }
    .sw-gc-video { display: none; }
    .sw-gc-tag { padding: 5px 10px; font-size: 12px; }

    /* 클럽 · 후원 */
    .sw-logos { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .sw-logo-box { height: 64px; padding: 10px; font-size: 12px; }
    .sw-sp-in { display: block; padding-top: 28px; padding-bottom: 28px; }
    .sw-sp-l { width: auto; margin-bottom: 14px; font-size: 14px; }
    .sw-sp-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .sw-sp-box { height: 44px; font-size: 12px; }
}