/* ============================================
   Main CSS - 위드봄산부인과의원
   ============================================ */

.main-page {
    padding-top: var(--header-height);
    background: #F6F3E8;
}

/* ===== HERO ===== */
.sec-hero {
    position: relative;
    width: 100%;
    height: min(56vw, 720px);
    min-height: 420px;
}

.hero-slides {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 30px;
    right: 30px;
    overflow: hidden;
    border-radius: 0 30px 0 30px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.1s ease;
}

.hero-slide.on { opacity: 1; }

.hero-slide img,
.hero-slide .ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(var(--container), calc(100% - 120px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    text-align: right;
}

.hero-title-wrap {
    position: relative;
    display: inline-block;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(28px, 3.6vw, 36px);
	font-weight: 800;
    line-height: 1.4;
    color: #2A4734;
	margin-bottom: 20px;
}

.hero-desc {
    font-size: clamp(14px, 1vw, 16px);
	font-weight: 400;
    line-height: 1.5;
    color: #2A4734;
    white-space: pre-line;
}

.hero-pagination {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 90px;
    width: min(var(--container), calc(100% - 120px));
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.hero-pag-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 0;
}

.hero-pag-num {
    font-size: 16px;
    letter-spacing: .08em;
    color: rgba(67, 67, 67, 0.30);
    transition: color .35s ease;
    font-variant-numeric: tabular-nums;
}

.hero-pag-item.on .hero-pag-num { color: #2A4734; }

.hero-pag-bar {
    position: relative;
    width: 0;
    height: 1px;
    background: transparent;
    overflow: hidden;
    border-radius: 1px;
    transition: width .25s ease, background .25s ease;
}

.hero-pag-item.on .hero-pag-bar {
    width: 56px;
    background: rgba(30, 46, 40, .18);
}

.hero-pag-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 100%;
    background: #1e2e28;
    border-radius: 1px;
    transition: none;
}

/* ===== INTRO ===== */
.sec-intro {
    padding: 190px 0 190px;
}

.intro-inner {
    display: flex;
    /* grid-template-columns: 1fr 1.05fr; */
    /* gap: clamp(36px, 5vw, 84px); */
    align-items: center;
    justify-content: space-between;
}

.intro-copy {
    padding-bottom: 12px;
    position: relative;
}

.intro-plant {
	margin-top: 30px
}

.intro-link {
    margin-top: 32px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-primary);
    transition: opacity var(--transition);
}

.intro-link::before { content: '↗'; font-size: 14px; }
.intro-link:hover { opacity: .65; }

.intro-cards {
	position: relative;
	width: max-content;
}

.intro-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    /* text-align: right; */
}

.intro-card img,
.intro-card .ph { width: 465px; }

.intro-card-main { }

.intro-card-sub { position: absolute; bottom: calc(-100% - 40px); }

.intro-chip {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    font-family: var(
    --font-sans);
    font-size: 16px;
    letter-spacing: .14em;
    color: #2A4734;
}

/* ===== Department ===== */
.sec-Department {
    padding: 80px 0 0;
    background: #7A8B5A;
    overflow: hidden;
}

.dp-top {
    text-align: center;
}

.dp-top .section-en-label {
    color: #DDBF9E;
}

.dp-top .section-title {
    color: #fff;
    margin: 20px 0 70px;
}

.dp-top .department-list {
    position: relative;
    display: flex;
    gap: 150px;
    justify-content: center;
}

.dp-top .department-list::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #DDBF9E;
}

.sec-Department.is-visible .dp-top .department-list::after {
    animation: linewidth 0.8s ease forwards;
}

.dp-top .department-list .department-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    padding-bottom: 40px;
}

.dp-top .department-list .department-item::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 6px;
    height: 6px;
    background: #DDBF9E;
    border-radius: 100%;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.dp-top .department-list .department-item.active::after {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.dp-top .department-list .department-item svg path {
    fill: rgba(255, 255, 255, 0.5);
    transition: fill 0.35s ease;
}

.dp-top .department-list .department-item p {
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-sans);
    font-size: 16px;
    transition: color 0.35s ease;
}

.dp-top .department-list .department-item.active svg path {
    fill: #DDBF9E;
}

.dp-top .department-list .department-item.active p {
    color: #fff;
}

.dp-content {
    display: flex;
}

.dp-content > div {
    flex: 1;
}

.dp-content .dp-left {
    position: relative;
    padding: 170px 0 230px;
    padding-bottom: 230px;
}

.dp-content .dp-left::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 0;
    background: #DDBF9E;
}

.sec-Department.is-visible .dp-content .dp-left::after {
    animation: lineheight 0.9s 0.3s ease forwards;
}

.dp-content .dp-left .section-en-label {
    color: #DDBF9E;
}

.dp-content .dp-left .section-title {
    color: #fff;
    margin: 20px 0 40px;
}

.dp-content .dp-left .section-desc {
    color: #FFF;
    font-family: Pretendard;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 32px;
}

.dp-content .btn-more {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 50px;
    border: 1px solid #DDBF9E;
    color: #fff;
    border-radius: 0 20px 0 20px;
}

.dp-content .btn-more svg {
    transform: translateX(40px);
}

.dp-content .dp-right {
    position: relative;
    height: max-content;
}

.dp-content .dp-right::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 0;
    height: 1px;
    background-color: #DDBF9E;
}

.sec-Department.is-visible .dp-content .dp-right::before {
    animation: linewidth 0.8s 0.6s ease forwards;
    --line-target: 1200px;
}

.dp-content .dp-right .round-stroke {
    position: absolute;
    top: 100%;
    left: 366px;
    transform: translateY(-1px);
}

.dp-content .dp-right .round-stroke svg path {
    stroke-dasharray: 370;
    stroke-dashoffset: 370;
}

.sec-Department.is-visible .dp-content .dp-right .round-stroke svg path {
    animation: drawStroke 1s 0.9s ease forwards;
}

@keyframes linewidth {
    from { width: 0; }
    to { width: var(--line-target, 100%); }
}

@keyframes lineheight {
    from { height: 0; }
    to { height: 100%; }
}

@keyframes drawStroke {
    from { stroke-dashoffset: 370; }
    to { stroke-dashoffset: 0; }
}

/* ===== DIFF ===== */
.sec-diff {
    padding: 100px 0 120px;
    overflow: hidden;
}

.diff-head {
    text-align: center;
    margin-bottom: 64px;
}

.sec-diff .section-title,
.sec-Preview .section-title {
    font-weight: 800;
}

.diff-slider {
    overflow-x: clip;
    overflow-y: visible;
}

.diff-track {
    --card-w: min(720px, 76vw);
    --gap: 28px;
    display: flex;
    gap: var(--gap);
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.diff-card {
    position: relative;
    flex: 0 0 var(--card-w, min(720px, 76vw));
    border-radius: 22px;
    background: #fff;
    opacity: 0.45;
    transform: scale(0.96);
    transition: opacity 0.55s ease, transform 0.55s ease;
    cursor: pointer;
}

.diff-card.is-active {
    opacity: 1;
    transform: scale(1);
    cursor: default;
}

.diff-card-img {
    border-radius: 22px;
    overflow: hidden;
}

.diff-card-img img {
    width: 100%;
    height: clamp(260px, 30vw, 400px);
    object-fit: cover;
    display: block;
}

.diff-card-body {
    position: absolute;
    bottom: 0;
    transform: translateY(50%);
    right: 0;
	width: 85%;
    padding: 28px 30px 38px;
    background: #fff;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}

.diff-card-title {
    font-family: var(--font-sans);
    font-size: clamp(17px, 1.65vw, 24px);
    line-height: 1.45;
    color: var(--color-text);
    font-weight: 800;
}

.diff-card-title span {
	position: relative;
}

.diff-card-title span::after {
	content: "";
	display: block;
	width: 103%;
	height: 5px;
	background: #6DECA0;
	position: absolute;
	bottom: 1px;
	left: 50%;
	transform: translateX(-50%);
	z-index: -1;
}

.diff-card-desc {
    margin-top: 38px;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.85;
    color: var(--color-text-sub);
}

/* ===== LOCATION ===== */
.sec-location {
    background: #FEF9F7;
    border-radius: 80px 0 0 0;
    overflow: hidden;
    padding: 0 0 100px;
}

.location-wrap {
    display: flex;
    align-items: center;
    gap: 60px;
    padding-left: max(60px, calc((100vw - var(--container)) / 2));
}

.location-content {
    flex: 0 0 clamp(300px, calc(var(--container) / 2 - 60px), 540px);
	padding-top: 80px;
}

.location-title {
    font-family: var(--font-sans);
    font-size: 28px;
    font-weight: 700;
    color: #2A4734;
    line-height: 1.4;
    margin-bottom: 20px;
}

.location-desc {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
    color: #2A4734;
    margin-bottom: 28px;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.location-info-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.location-info-row strong {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    color: #2A4734;
}

.location-info-row span,
.location-hours p {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.65;
    color: #2A4734;
}

.location-closed {
    color: #999 !important;
}

.location-map-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 50px;
    padding: 0 20px 0 24px;
    border: 1px solid #2A4734;
    border-radius: 0 16px 0 16px;
    font-family: var(--font-sans);
    font-size: 15px;
    color: #2A4734;
    transition: background var(--transition), color var(--transition);
}

.location-map-btn:hover {
    background: #2A4734;
    color: #fff;
}

.location-map-btn:hover svg path {
    stroke: #fff;
}

.location-img {
    flex: 1;
    height: 550px;
    border-radius: 0 0 0 32px;
    overflow: hidden;
    min-width: 0;
}

.location-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== PREVIEW ===== */
.sec-Preview {
    padding: 100px 0 100px;
}

.preview-head {
    margin-bottom: 56px;
	text-align: center;
}

.preview-gallery {
    display: flex;
    gap: 12px;
    height: 480px;
}

.preview-item {
    position: relative;
    flex: 0 0 120px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-item.is-active {
    flex: 1;
    cursor: default;
}

.preview-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 접힌 상태: 녹색 오버레이 */
.preview-overlay {
    position: absolute;
    inset: 0;
    background: #4D6D58;
    mix-blend-mode: multiply;
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.preview-item.is-active .preview-overlay {
    opacity: 0;
}

/* 펼친 상태: 하단 그라디언트 */
.preview-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.22) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.preview-item.is-active::after {
    opacity: 1;
}

/* 세로 레이블 (접힌 상태) */
.preview-label-v {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    white-space: nowrap;
    z-index: 2;
    color: #DDBF9E;
    font-family: var(--font-sans);
    font-size: 16px;
    opacity: 1;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.preview-item.is-active .preview-label-v {
    opacity: 0;
}

/* 가로 pill 정보 (펼친 상태) */
.preview-label-h {
    position: absolute;
    bottom: 28px;
    left: 28px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease 0.3s;
    pointer-events: none;
}

.preview-item.is-active .preview-label-h {
    opacity: 1;
}

.preview-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 38px;
    padding: 0 16px 0 4px;
    background: rgba(242, 241, 237, 0.92);
    border-radius: 19px;
    backdrop-filter: blur(4px);
}

.preview-pill-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #2A4734;
    color: #fff;
    font-family: var(--font-futura);
    font-size: 13px;
    font-weight: 500;
}

.preview-pill-name {
    font-family: var(--font-serif);
    font-size: 16px;
    color: #2A4734;
    letter-spacing: -0.02em;
}

/* 원형 뱃지 (접힌 상태) */
.preview-badge-circle {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(217, 217, 217, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.preview-badge-circle span {
    font-family: var(--font-futura);
    font-size: 13px;
    color: #2A4734;
}

.preview-item.is-active .preview-badge-circle {
    opacity: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .intro-card-sub { margin-left: 48px; }
}

@media (max-width: 1024px) {
    .sec-hero {
        height: auto;
        min-height: 480px;
    }

    .hero-content { align-items: flex-start; text-align: left; }
    .hero-title-wrap::before { display: none; }
    .hero-pagination { left: clamp(24px, 5vw, 48px); right: auto; }

    .intro-inner { grid-template-columns: 1fr; }
    .intro-card-sub { margin-left: 0; }

    .diff-track { --card-w: min(680px, 88vw); }

    .preview-gallery {
        height: 420px;
    }

    .location-wrap {
        gap: 40px;
        padding-left: 36px;
    }

    .location-img {
        height: 420px;
    }
}

@media (max-width: 768px) {
    .sec-intro,
    .sec-diff {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .hero-title { font-size: 28px; }
    .hero-desc  { font-size: 13px; }

    .intro-card-main { height: 220px; }
    .intro-card-sub  { height: 132px; }
    .intro-plant     { display: none; }

    .diff-track { --card-w: 88vw; --gap: 16px; }
    .diff-card-body { padding: 22px 24px 28px; }

    .sec-location { padding: 64px 0; border-radius: 40px 0 0 0; }

    .location-wrap {
        flex-direction: column;
        padding-left: 18px;
        padding-right: 18px;
        gap: 36px;
    }

    .location-content { flex: none; width: 100%; }

    .location-img {
        width: 100%;
        height: 280px;
        border-radius: 20px;
        flex: none;
    }

    .preview-gallery {
        height: 360px;
        gap: 8px;
    }

    .preview-item { flex: 0 0 72px; }
}