/* =========================================================
   파일명: public/assets/css/style.css
   설명: 지식나눔터 퍼블릭 홈페이지 스타일
========================================================= */

:root {
    --bg: #ffffff;
    --soft: #f7f9fc;
    --soft-blue: #f3f7ff;
    --text: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --brand: #2563eb;
    --brand-dark: #1e3a8a;
    --navy: #0f172a;
    --radius: 18px;
    --shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
}

a {
    color: inherit;
}

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

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.narrow {
    max-width: 820px;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand img {
    width: 220px;
    max-height: 48px;
    object-fit: contain;
}

.site-nav {
    display: flex;
    gap: 22px;
    align-items: center;
    font-size: 15px;
    font-weight: 800;
}

.site-nav a {
    text-decoration: none;
    color: #4b5563;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--brand);
}

.nav-toggle {
    display: none;
    border: 0;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 8px 11px;
    font-size: 22px;
}

/* Hero */

.hero {
    padding: 0;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
}

.hero-visual {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.hero-bg {
    min-height: 560px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    position: relative;
}

.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,.97) 0%,
            rgba(255,255,255,.94) 35%,
            rgba(255,255,255,.66) 60%,
            rgba(255,255,255,.16) 100%
        );
}

.hero-panel {
    position: relative;
    z-index: 1;
    padding: 88px 0;
}

.hero-copy {
    max-width: 680px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--brand);
    font-size: 13px;
    letter-spacing: .16em;
    font-weight: 900;
}

.hero-copy .eyebrow {
    margin-bottom: 18px;
}

h1,
h2,
h3 {
    margin: 0 0 16px;
    line-height: 1.25;
    letter-spacing: -0.045em;
}

h1 {
    font-size: clamp(42px, 5.5vw, 66px);
    font-weight: 900;
    color: var(--navy);
}

.hero-copy h1 {
    font-size: clamp(42px, 5.6vw, 66px);
    font-weight: 900;
    line-height: 1.18;
    color: var(--navy);
}

h2 {
    font-size: clamp(28px, 3.6vw, 40px);
    font-weight: 900;
}

h3 {
    font-size: 21px;
    font-weight: 900;
}

.lead {
    margin: 22px 0 0;
    max-width: 640px;
    font-size: 18px;
    color: var(--muted);
    word-break: keep-all;
}

.hero-copy .lead {
    margin-top: 24px;
    max-width: 620px;
    color: #4b5563;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.hero-actions.center {
    justify-content: center;
}

.btn {
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 900;
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .22);
}

.btn.secondary {
    background: #fff;
    color: var(--brand-dark);
    border: 1px solid var(--line);
}

/* 기존 2단 히어로 호환용 */

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(380px, .98fr);
    gap: 64px;
    align-items: center;
}

.hero-image-wrap {
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .10);
}

.hero-image-wrap img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* Section Common */

.section {
    padding: 72px 0;
}

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

.section-head {
    margin-bottom: 30px;
}

.section-head p,
.split-head > p {
    max-width: 720px;
    color: var(--muted);
    word-break: keep-all;
}

.split-head {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 34px;
    align-items: start;
}

/* Recent Posts */

.post-list {
    display: grid;
    gap: 14px;
}

.post-row {
    display: block;
    padding: 24px 26px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.post-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #cbd5e1;
}

.post-kicker {
    display: inline-flex;
    margin-bottom: 9px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
}

.post-row strong {
    display: block;
    font-size: 21px;
    line-height: 1.4;
    margin-bottom: 7px;
}

.post-row p {
    margin: 0;
    color: var(--muted);
    word-break: keep-all;
}

/* Program Cards */

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

.program-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .035);
}

.program-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 18px;
}

.program-card p,
.course-card p,
.course-row p,
.prose-card p,
.empty-box p,
.cta-box p,
.contact-card p {
    color: var(--muted);
    word-break: keep-all;
}

.program-card a,
.text-link,
.course-card a {
    color: var(--brand);
    font-weight: 900;
    text-decoration: none;
}

/* Online Course Slider */

.course-slider-wrap {
    position: relative;
}

.course-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 4px 12px;
    scrollbar-width: none;
}

.course-slider::-webkit-scrollbar {
    display: none;
}

.course-card {
    display: flex;
    flex-direction: column;
    min-height: 230px;
    padding: 22px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: #fff;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.course-slider .course-card {
    flex: 0 0 calc((100% - 48px) / 4);
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #cbd5e1;
}

.course-card span,
.course-row span {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
}

.course-card h3 {
    font-size: 18px;
    line-height: 1.45;
}

.course-card p {
    flex: 1;
    margin-bottom: 18px;
}

.course-card a {
    margin-top: auto;
}

.course-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--brand);
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.course-arrow.prev {
    left: -20px;
}

.course-arrow.next {
    right: -20px;
}

/* 기존 course-grid 호환용 */

.course-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

/* Page Hero */

.page-hero {
    padding: 70px 0;
    background:
        radial-gradient(circle at 90% 10%, rgba(37, 99, 235, .08), transparent 34%),
        var(--soft);
    border-bottom: 1px solid var(--line);
}

.page-hero p {
    color: var(--muted);
    font-size: 18px;
    word-break: keep-all;
}

/* Detail Pages */

.program-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.program-detail-grid article,
.prose-card,
.empty-box {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .035);
}

.program-detail-grid li,
.prose li {
    margin-bottom: 8px;
}

.course-list {
    display: grid;
    gap: 16px;
}

.course-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 22px;
    align-items: center;
    padding: 24px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: #fff;
}

.course-row small {
    display: block;
    color: #7c8798;
}

/* About / Consulting */

.consulting-grid,
.about-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 44px;
    align-items: center;
}

.consulting-grid img,
.about-grid img {
    border-radius: 24px;
    box-shadow: var(--shadow);
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.about-band {
    background: #fff;
}

/* CTA */

.cta {
    text-align: center;
    background: var(--soft-blue);
}

.cta-box {
    max-width: 760px;
    padding: 44px 28px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

/* Contact */

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

.contact-card {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .035);
}

.contact-card span {
    color: var(--brand);
    font-weight: 900;
}

.contact-card strong {
    display: block;
    margin: 8px 0;
    font-size: 26px;
}

/* Post Detail */

.prose {
    max-width: 860px;
}

.prose img {
    border-radius: 20px;
}

.prose p {
    font-size: 18px;
    color: #374151;
    word-break: keep-all;
}

/* Footer */

.site-footer {
    padding: 44px 0;
    background: #0f172a;
    color: #fff;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

.footer-logo {
    width: 220px;
    margin-bottom: 12px;
}

.site-footer p {
    margin: 0;
    color: #cbd5e1;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.footer-links a {
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.company-info {
    margin-top: 10px !important;
    font-size: 14px;
    color: #94a3b8 !important;
}

/* =========================
   Course Highlight Section
========================= */

.course-highlight {
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    border-top: 1px solid #e6ecf5;
    border-bottom: 1px solid #e6ecf5;
}

/* 카드 강조 */

.course-card.strong {
    border: 1px solid #dbeafe;
    box-shadow: 0 12px 30px rgba(37,99,235,.08);
}

.course-card.strong:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(37,99,235,.15);
}

/* 제목 강조 */

.course-highlight h2 {
    font-size: 40px;
}

/* Responsive */

@media (max-width: 900px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 76px;
        left: 20px;
        right: 20px;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav.open {
        display: flex;
    }

    .split-head,
    .program-grid,
    .program-card,
    .course-grid,
    .program-detail-grid,
    .course-row,
    .consulting-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-bg {
        min-height: auto;
        background-position: center bottom;
    }

    .hero-bg::before {
        background:
            linear-gradient(
                180deg,
                rgba(255,255,255,.98) 0%,
                rgba(255,255,255,.94) 54%,
                rgba(255,255,255,.74) 100%
            );
    }

    .hero-panel {
        padding: 64px 0 260px;
    }

    .hero-copy {
        max-width: 100%;
    }

    .hero-copy h1 {
        font-size: clamp(38px, 11vw, 54px);
    }

    .brand img {
        width: 190px;
    }

    .program-card img {
        height: 210px;
    }

    .course-slider .course-card {
        flex-basis: 82%;
    }

    .course-arrow.prev {
        left: 4px;
    }

    .course-arrow.next {
        right: 4px;
    }

    .footer-inner {
        flex-direction: column;
    }
}

/* =========================
   About Brand Page
   - 배경형 상단
   - 흐름형 설명
   - 하단 프로필
========================= */

.about-brand-hero {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.about-brand-bg {
    min-height: 720px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
}

.about-brand-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,.96) 0%,
            rgba(255,255,255,.90) 32%,
            rgba(255,255,255,.58) 48%,
            rgba(255,255,255,.12) 68%,
            rgba(255,255,255,0) 100%
        );
}

.about-brand-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin-left: max(40px, calc((100vw - 1120px) / 2));
    margin-right: auto;
}

.about-brand-content h1 {
    font-size: clamp(42px, 5.2vw, 62px);
    line-height: 1.16;
    letter-spacing: -0.055em;
    color: var(--navy);
}

.about-brand-content p {
    max-width: 500px;
    font-size: 18px;
    color: #374151;
    word-break: keep-all;
}

.about-narrative {
    padding: 74px 0;
    background: #fff;
}

.about-narrative h2 {
    margin-bottom: 22px;
}

.about-narrative p {
    font-size: 18px;
    color: #374151;
    word-break: keep-all;
}

.about-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}

.about-keywords span {
    padding: 9px 14px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 900;
}

.about-profile-section {
    padding: 80px 0;
    background: var(--soft);
}

.about-profile-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 40px;
    align-items: start;
    max-width: 920px;
}

.about-profile-photo {
    margin: 0;
}

.about-profile-photo img {
    width: 170px;
    height: 170px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.about-profile-content {
    max-width: 720px;
}

.about-profile-content h2 {
    margin-bottom: 8px;
}

.profile-summary {
    margin: 0 0 22px;
    color: var(--brand-dark);
    font-weight: 900;
}

.profile-list {
    margin: 0 0 24px;
    padding-left: 20px;
    color: #374151;
}

.profile-list li {
    margin-bottom: 7px;
}

.about-profile-content p {
    font-size: 17px;
    color: #374151;
    word-break: keep-all;
}

.about-email {
    margin-top: 22px;
    font-weight: 900;
}

.about-email a {
    color: var(--brand);
    text-decoration: none;
}

/* 모바일에서만 배경형 상단 정리 */
@media (max-width: 900px) {
    .about-brand-bg {
        min-height: 680px;
        padding: 56px 0 300px;
        background-size: auto 100%;
        background-position: 72% center;
    }

    .about-brand-bg::before {
        content: "";
        position: absolute;
        inset: 0;
        background:
            linear-gradient(
                90deg,
                rgba(255,255,255,.97) 0%,
                rgba(255,255,255,.92) 46%,
                rgba(255,255,255,.68) 66%,
                rgba(255,255,255,.36) 100%
            );
    }

    .about-brand-content {
        max-width: 68%;
        margin-left: 24px;
        margin-right: auto;
    }

    .about-brand-content h1 {
        font-size: clamp(34px, 9vw, 46px);
        line-height: 1.22;
    }

    .about-brand-content p {
        font-size: 16px;
        line-height: 1.7;
    }
}