/* ========================================
   씨젠 클리닉 스타일 - 상용화 버전
   ======================================== */

/* ========================================
   Variables
   ======================================== */
:root {
    --color-primary: #c8102e;
    --color-primary-dark: #a50d24;
    --color-secondary: #333;
    --color-accent: #c8102e;
    --color-accent-light: #e0132f;
    /* 서브 페이지 전용 베이지/브라운 테마 */
    --color-sub-accent: #b89468;
    --color-sub-accent-dark: #9a7a52;
    --color-sub-accent-light: #d4b896;
    --color-text: #333;
    --color-text-light: #666;
    --color-text-muted: #999;
    --color-bg: #fff;
    --color-bg-light: #f5f5f5;
    --color-bg-warm: #fafafa;
    --color-border: #ddd;
    --color-border-light: #eee;
    --font-family: 'Noto Sans KR', -apple-system, sans-serif;
    --header-height: 70px;
    --section-padding: 80px 0;
    --container-max: 1200px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-family); color: var(--color-text); line-height: 1.8; overflow-x: hidden; background: var(--color-bg); font-size: 15px; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }

/* ========================================
   Header
   ======================================== */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: var(--header-bg, rgba(255,255,255,0.25));
    backdrop-filter: var(--header-blur, blur(12px));
    -webkit-backdrop-filter: var(--header-blur, blur(12px));
    border-bottom: none;
    box-shadow: none;
    transition: background 0.4s, box-shadow 0.4s;
}

/* 투명 헤더 비활성 - 항상 불투명 흰색 */

.header-inner {
    display: flex; flex-direction: column;
}

/* 상단: 로고 + 메뉴 + 로그인/회원가입 */
.header-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0;
    height: 70px;
}
.logo { display: flex; align-items: center; }
.logo-img { height: 44px; width: auto; transition: transform 0.3s; }
.logo:hover .logo-img { transform: scale(1.03); }

/* 중앙 네비게이션 */
.nav-desktop { gap: 0; }
.nav-group { position: relative; }
.nav-group-toggle {
    background: none; border: none; cursor: pointer;
    padding: 0 24px; font-size: 0.95rem; font-weight: 600;
    color: #333; transition: color 0.25s;
    display: flex; align-items: center; font-family: inherit;
    height: 70px; line-height: 70px;
    position: relative;
}
.nav-group-toggle::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    width: 0; height: 2px; background: var(--color-primary);
    transition: all 0.3s ease; transform: translateX(-50%);
}
.nav-group.active .nav-group-toggle,
.nav-group-toggle:hover { color: var(--color-primary); }
.nav-group.active .nav-group-toggle::after { width: 100%; }

/* Header Utils */
.header-utils { margin-right: 0; }
.header-util-link {
    font-size: 0.85rem; color: #222; font-weight: 600; text-decoration: none;
    padding: 4px 6px; transition: color 0.2s;
}
.header-util-link:hover { color: var(--color-primary); }
.header-util-divider { color: #ccc; font-size: 0.7rem; margin: 0 4px; }

/* ========================================
   Mega Dropdown (씨젠 스타일)
   ======================================== */
.mega-dropdown {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: none;
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    opacity: 0;
    box-shadow: none;
}
.mega-dropdown.open {
    max-height: 300px;
    opacity: 1;
}
.mega-dropdown-inner {
    padding: 32px 0 36px;
}
.mega-menu-content {
    display: flex;
    justify-content: center;
    gap: 48px;
}
.mega-menu-column {
    min-width: 160px;
}
.mega-menu-title {
    font-size: 0.82rem; font-weight: 700; color: #fff;
    text-transform: uppercase; letter-spacing: 0.5px;
    padding-bottom: 12px; margin-bottom: 8px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
}
.mega-menu-list {
    list-style: none; padding: 0; margin: 0;
}
.mega-menu-list li a {
    display: block; padding: 10px 0; font-size: 0.92rem; font-weight: 500;
    color: rgba(255,255,255,0.8); text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mega-menu-list li:last-child a { border-bottom: none; }
.mega-menu-list li a:hover,
.mega-menu-list li a.active {
    color: var(--color-primary);
    padding-left: 6px;
}

/* 메가메뉴 오버레이 */
.mega-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 999;
    opacity: 0; visibility: hidden;
    transition: opacity 0.35s;
    pointer-events: none;
}
.mega-overlay.open {
    opacity: 1; visibility: visible;
    pointer-events: auto;
}

/* Language Switcher */
.lang-toggle-btn {
    display: flex; align-items: center; gap: 6px; margin-left: 12px;
    background: #333; color: #fff; border: none; border-radius: 20px;
    padding: 6px 14px 6px 10px; font-size: 0.82rem; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: background 0.2s;
}
.lang-toggle-btn:hover { background: #444; }
.lang-toggle-btn i.bi-globe2 { font-size: 0.9rem; }
.lang-toggle-btn .lang-chevron { font-size: 0.55rem; margin-left: 2px; }
.lang-dropdown {
    position: fixed;
    background: #fff; border-radius: 12px; min-width: 140px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    display: none; z-index: 11000;
}
.lang-dropdown a {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 16px; font-size: 0.88rem; color: #555;
    text-decoration: none; font-weight: 500; transition: all 0.15s;
}
.lang-dropdown a:hover { background: #f5f5f5; color: #333; }
.lang-dropdown a.active { color: var(--color-primary); font-weight: 700; }
.lang-dropdown a + a { border-top: 1px solid #f0f0f0; }
.lang-dropdown.show { display: block; animation: langFadeIn 0.2s ease; }
@keyframes langFadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

.btn-hamburger { background: none; border: none; font-size: 1.6rem; color: var(--color-text); cursor: pointer; padding: 8px; }

/* 미사용 - 이전 개별 드롭다운 (메가메뉴로 대체) */
.nav-group-menu { display: none; }

/* Mobile Menu */
.nav-mobile .nav-link {
    display: block; padding: 15px 0; font-size: 1rem; font-weight: 500;
    border-bottom: 1px solid var(--color-border-light); color: var(--color-text);
}
.nav-mobile .nav-link:hover { color: var(--color-accent); }
.nav-mobile .nav-link-primary { color: var(--color-accent); font-weight: 700; }

/* Mobile Nav Group */
.mobile-nav-group { border-bottom: 1px solid var(--color-border-light); }
.mobile-nav-group-title {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 15px 0; font-size: 1rem; font-weight: 600;
    color: var(--color-text); background: none; border: none; cursor: pointer;
    font-family: inherit;
}
.mobile-nav-group-title i { font-size: 0.7rem; transition: transform 0.2s; }
.mobile-nav-group.open .mobile-nav-group-title i { transform: rotate(180deg); }
.mobile-nav-group.open .mobile-nav-group-title { color: var(--color-accent); }
.mobile-nav-group-items {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
}
.mobile-nav-group.open .mobile-nav-group-items { max-height: 200px; }
.mobile-nav-group-items .nav-link {
    padding: 12px 0 12px 16px; font-size: 0.92rem; font-weight: 400;
    border-bottom: none;
}

/* Language Dropdown (unused legacy - removed duplicate that broke .lang-dropdown position) */

/* Mobile lang buttons */
.lang-mobile-btn {
    padding: 8px 16px; font-size: 0.88rem; border: 1px solid var(--color-border);
    border-radius: 6px; text-decoration: none; color: var(--color-text); transition: all 0.2s;
}
.lang-mobile-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ========================================
   Hero Slider
   ======================================== */
.hero-slider { margin-top: var(--header-height); position: relative; overflow: hidden; }
.hero-slider .swiper-slide { position: relative; overflow: hidden; }
.hero-slide-img { width: 100%; height: auto; display: block; }
.hero-content {
    position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; color: #fff;
}
.hero-content h2 {
    font-size: 2.6rem; font-weight: 800; margin-bottom: 12px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.25); letter-spacing: -1px;
}
.hero-content p { font-size: 1.15rem; opacity: 0.9; font-weight: 300; }
.hero-slider .swiper-pagination-bullet { background: #fff; opacity: 0.4; width: 10px; height: 10px; }
.hero-slider .swiper-pagination-bullet-active { opacity: 1; background: var(--color-accent); width: 28px; border-radius: 5px; }
.hero-slider .swiper-button-next, .hero-slider .swiper-button-prev { color: rgba(255,255,255,0.7); }
.hero-slider .swiper-button-next:hover, .hero-slider .swiper-button-prev:hover { color: #fff; }

/* ========================================
   Sections
   ======================================== */
main { overflow-x: hidden; margin-top: var(--header-height); min-height: calc(100vh - var(--header-height) - 200px); }
/* 페이지에서 자체 margin-top을 갖는 경우 (히어로 배너, page-header 등) 리셋 */
main:has(.hero-banner),
main:has(.page-header),
main:has(.mp-hero) { margin-top: 0; min-height: calc(100vh - 200px); }
.section { padding: var(--section-padding); }
.section-light { background: var(--color-bg-light); }

.section-title { text-align: center; margin-bottom: 64px; }
.section-title h2 {
    font-size: 2rem; font-weight: 800; color: var(--color-primary);
    margin-bottom: 0; letter-spacing: -0.5px; display: inline-block; position: relative;
}
.section-title h2::after {
    content: ''; display: block; width: 40px; height: 2px;
    background: var(--color-accent); margin: 18px auto 0;
}
.section-title p {
    font-size: 1rem; color: var(--color-text-light);
    max-width: 480px; margin: 16px auto 0; font-weight: 300;
}

/* ========================================
   Greeting Section
   ======================================== */
.greeting-content {
    max-width: 700px; font-size: 1.02rem; line-height: 2.1;
    color: var(--color-text-light); word-break: keep-all;
}
.greeting-image {
    height: 100%;
}
.greeting-image img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 0;
}

/* ========================================
   Intro Section
   ======================================== */
.intro-card {
    background: #fff; border-radius: 2px; padding: 40px 28px; text-align: center;
    transition: var(--transition); border: 1px solid var(--color-border-light);
    height: 100%;
}
.intro-card:hover { box-shadow: 0 8px 30px rgba(102,93,81,0.08); border-color: var(--color-border); }

.intro-card .icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--color-bg-warm); border: 2px solid var(--color-border-light);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 22px; font-size: 1.6rem; color: var(--color-accent);
    transition: var(--transition);
}
.intro-card:hover .icon { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

.intro-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--color-primary); margin-bottom: 10px; }
.intro-card p { color: var(--color-text-light); font-size: 0.88rem; line-height: 1.7; }


/* Tests section title on background */
#pos3 .section-title h2 { color: #fff; }
#pos3 .section-title p { color: rgba(255,255,255,0.7); }

/* ========================================
   Test Icon Cards
   ======================================== */
.tests-grid {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 20px; max-width: var(--container-max); margin: 0 auto;
}
.test-icon-card {
    background: #fff; padding: 36px 16px 28px; text-align: center;
    border: 1px solid var(--color-border-light); transition: var(--transition);
    cursor: pointer; position: relative;
}
.test-icon-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 20px rgba(200,16,46,0.1);
}

.test-icon-wrapper {
    width: 120px; height: 120px; margin: 0 auto 18px; border-radius: 50%;
    background: var(--color-bg-warm); display: flex; align-items: center;
    justify-content: center; transition: var(--transition); padding: 18px;
}
.test-icon-card:hover .test-icon-wrapper { background: #f5efe6; }

.test-icon-wrapper img { width: 72px; height: 72px; object-fit: contain; transition: transform 0.4s ease; }
.test-icon-card:hover .test-icon-wrapper img { transform: translateY(-3px); }

.test-icon-info h3 {
    font-size: 0.88rem; font-weight: 600; color: var(--color-text);
    margin-bottom: 8px; line-height: 1.4;
}
.test-icon-price { margin: 0; }
.test-icon-price .original { display: block; font-size: 0.78rem; color: var(--color-text-muted); text-decoration: line-through; }
.test-icon-price .current { font-size: 1.05rem; font-weight: 800; color: var(--color-accent); }

@media (max-width: 1200px) { .tests-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 991px) { .tests-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (max-width: 575px) {
    .tests-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .test-icon-card { padding: 24px 10px 18px; }
    .test-icon-wrapper { width: 88px; height: 88px; padding: 14px; }
    .test-icon-wrapper img { width: 52px; height: 52px; }
    .test-icon-info h3 { font-size: 0.8rem; }
    .test-icon-price .current { font-size: 0.92rem; }
}

/* ========================================
   Price Table (Tabs)
   ======================================== */
.price-tabs { overflow: hidden; }
.price-tabs .nav-tabs { border-bottom: none; gap: 0; margin-bottom: 0; }
.price-tabs .nav-link {
    border: none; border-radius: 0; padding: 12px 32px; font-weight: 600; font-size: 0.9rem;
    color: var(--color-text-light); background: #ece8e2; transition: var(--transition);
    position: relative; white-space: nowrap;
}
.price-tabs .nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px; background: transparent; transition: var(--transition);
}
.price-tabs .nav-link.active { color: #fff; background: var(--color-primary); }
.price-tabs .nav-link.active::after { background: var(--color-accent); }
.price-tabs .nav-link:hover:not(.active) { background: #e2ddd5; color: var(--color-primary); }

.price-table { width: 100%; border-collapse: collapse; }
.price-table thead { background: var(--color-primary); }
.price-table th { font-weight: 600; color: #fff; font-size: 0.9rem; padding: 14px 20px; text-align: left; }
.price-table td {
    padding: 15px 20px; text-align: left; font-size: 0.9rem;
    border-bottom: 1px solid var(--color-border-light);
}
.price-table tbody tr:hover { background: var(--color-bg-warm); }
.price-table .price-cell { font-weight: 700; color: var(--color-primary-dark); }
.price-table .note-cell { color: var(--color-accent); font-size: 0.82rem; }

/* ========================================
   Gallery Carousel
   ======================================== */
.gallery-carousel {
    position: relative; display: flex; align-items: center; gap: 12px;
}
.gallery-track-wrapper {
    overflow: hidden; flex: 1; border-radius: 8px;
}
.gallery-track {
    display: flex; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-slide {
    min-width: calc(100% / 3); box-sizing: border-box; padding: 0 8px;
    position: relative; aspect-ratio: 4/3; overflow: hidden;
}
.gallery-slide img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 8px;
    transition: transform 0.5s ease;
}
.gallery-slide:hover img { transform: scale(1.06); }
.gallery-slide .caption {
    position: absolute; bottom: 0; left: 8px; right: 8px; padding: 12px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff; font-size: 0.85rem; font-weight: 500;
    border-radius: 0 0 8px 8px;
}
.gallery-nav {
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--color-border-light);
    background: #fff; color: var(--color-primary); font-size: 1.2rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: all 0.2s; flex-shrink: 0;
}
.gallery-nav:hover { background: var(--color-primary); color: #fff; }
.gallery-dots {
    display: flex; justify-content: center; gap: 8px; margin-top: 16px;
}
.gallery-dot {
    width: 10px; height: 10px; border-radius: 50%; background: #d1d5db;
    border: none; cursor: pointer; transition: all 0.3s; padding: 0;
}
.gallery-dot.active { background: var(--color-primary); transform: scale(1.2); }
@media (max-width: 992px) {
    .gallery-slide { min-width: calc(100% / 2); }
}
@media (max-width: 576px) {
    .gallery-slide { min-width: 100%; }
    .gallery-nav { width: 36px; height: 36px; font-size: 1rem; }
}

/* ========================================
   Clinic Info / Map
   ======================================== */
.clinic-info-card {
    background: #fff; padding: 36px; border: 1px solid var(--color-border-light);
}
.clinic-info-card h3 { font-size: 1.2rem; font-weight: 700; color: var(--color-primary); margin-bottom: 24px; }

.clinic-info-list { list-style: none; padding: 0; }
.clinic-info-list li {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 11px 0; border-bottom: 1px solid var(--color-border-light);
}
.clinic-info-list li:last-child { border-bottom: none; }
.clinic-info-list .icon { color: var(--color-accent); font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.clinic-info-list .label { font-weight: 600; min-width: 70px; color: var(--color-primary); font-size: 0.9rem; }

.map-container { overflow: hidden; border: 1px solid var(--color-border-light); }
.map-container iframe, .map-container #map { width: 100%; height: 400px; border: none; }

/* ========================================
   Floating Quick Menu
   ======================================== */
.floating-menu {
    position: fixed; right: 24px; bottom: 32px; z-index: 999;
    display: flex; flex-direction: column; gap: 10px;
    opacity: 0; transform: translateY(20px); transition: var(--transition);
}
.floating-menu.visible { opacity: 1; transform: translateY(0); }

.floating-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 74px; height: 74px; border-radius: 50%;
    background: var(--color-primary); color: #fff; border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18); cursor: pointer;
    transition: var(--transition); font-size: 0.68rem; text-decoration: none;
    letter-spacing: -0.2px; font-weight: 500;
}
.floating-btn i { font-size: 1.4rem; margin-bottom: 3px; }
.floating-btn:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 6px 22px rgba(0,0,0,0.28); }

/* 예약 - 레드 */
.floating-btn:nth-child(1) { background: var(--color-primary); }
.floating-btn:nth-child(1):hover { background: var(--color-primary-dark); }

/* 결과조회 - 네이비 */
.floating-btn:nth-child(2) { background: #213991; }
.floating-btn:nth-child(2):hover { background: #1a2e75; }

/* 오시는길 - 그린 */
.floating-btn:nth-child(3) { background: #2d8e6e; }
.floating-btn:nth-child(3):hover { background: #257a5e; }

/* 1:1문의 - 퍼플 */
.floating-btn.btn-inquiry { background: #7c3aed; }
.floating-btn.btn-inquiry:hover { background: #6d28d9; }

/* TOP - 연한 그레이 */
.floating-btn.btn-top { background: #888; }
.floating-btn.btn-top:hover { background: #666; }

/* 관리자 - 인디고 */
.floating-btn.btn-admin { background: #6366f1; }
.floating-btn.btn-admin:hover { background: #4f46e5; }

/* ========================================
   Footer
   ======================================== */
/* 푸터 - 시안 스타일 */
.site-footer { background: #222; color: #bbb; padding: 40px 0 32px; }

/* 상단: 로고 + 링크 */
.footer-top {
    display: flex; align-items: center; justify-content: space-between;
}
.footer-logo {
    display: flex; align-items: center; gap: 12px;
}
.footer-logo-img {
    height: 36px; filter: brightness(0) invert(1); display: block;
}
.footer-logo-sub {
    font-size: 0.78rem; color: rgba(255,255,255,0.5); font-weight: 400;
    letter-spacing: 0.5px;
}
.footer-top-links {
    display: flex; align-items: center; gap: 0;
}
.footer-top-links a {
    color: rgba(255,255,255,0.75); font-size: 0.82rem; text-decoration: none;
    font-weight: 500; transition: color 0.2s; padding: 0 14px;
}
.footer-top-links a:hover { color: #fff; }
.footer-top-divider {
    color: rgba(255,255,255,0.2); font-size: 0.75rem;
}

.footer-divider { border-color: rgba(255,255,255,0.08); margin: 24px 0 20px; }

/* 하단: 주소 + 패밀리사이트 */
.footer-bottom {
    display: flex; align-items: flex-end; justify-content: space-between;
}
.footer-bottom-info { flex: 1; min-width: 0; }
.footer-address {
    font-size: 0.78rem; color: rgba(255,255,255,0.45); margin: 0 0 6px;
    line-height: 1.6;
}
.footer-info-sep {
    margin: 0 8px; color: rgba(255,255,255,0.2);
}
.footer-copyright {
    font-size: 0.72rem; margin: 0; color: rgba(255,255,255,0.3);
    letter-spacing: 0.5px; text-transform: uppercase;
}

/* 패밀리 사이트 드롭다운 */
.footer-family-select {
    appearance: none; -webkit-appearance: none;
    background: transparent; color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.3); border-radius: 20px;
    padding: 8px 36px 8px 18px; font-size: 0.8rem;
    cursor: pointer; outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.5)' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    min-width: 140px;
    transition: border-color 0.2s;
}
.footer-family-select:hover { border-color: rgba(255,255,255,0.5); }
.footer-family-select option { background: #333; color: #ddd; }

/* 반응형 */
@media (max-width: 767px) {
    .footer-top { flex-direction: column; align-items: flex-start; gap: 16px; }
    .footer-top-links a { padding: 0 10px 0 0; }
    .footer-top-links a:first-child { padding-left: 0; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
    .footer-address { font-size: 0.72rem; }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 991px) {
    :root { --header-height: 70px; --section-padding: 60px 0; }
    .hero-slide-img { min-height: 280px; object-fit: cover; }
    .hero-content h2 { font-size: 1.7rem; }
    .section-title h2 { font-size: 1.6rem; }
    .section-title { margin-bottom: 44px; }
    .greeting-image img { height: 350px; }
    .hero-slider .swiper-button-next, .hero-slider .swiper-button-prev { display: none; }
}
@media (max-width: 575px) {
    :root { --section-padding: 56px 0; }
    .hero-slide-img { min-height: 200px; }
    .hero-content h2 { font-size: 1.3rem; }
    .section-title h2 { font-size: 1.35rem; }
    .section-title { margin-bottom: 36px; }
    .greeting-image img { height: 260px; }
    .price-tabs .nav-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .price-tab-content > div { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .price-table { min-width: 500px; }
    .price-table td, .price-table th { white-space: nowrap; }
    .floating-menu { right: 10px; bottom: 16px; gap: 6px; }
    .floating-btn { width: 42px; height: 42px; font-size: 0.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
    .floating-btn i { font-size: 1rem; margin-bottom: 0; }
    .floating-btn span { display: none; }
    .price-tabs .nav-link { padding: 10px 16px; font-size: 0.82rem; }
}

/* ========================================
   Utilities
   ======================================== */
.text-primary-custom { color: var(--color-primary) !important; }
.text-accent { color: var(--color-accent) !important; }
.bg-primary-custom { background: var(--color-primary) !important; }

.btn-primary-custom {
    background: var(--color-primary); color: #fff; border: none;
    padding: 13px 36px; border-radius: 2px; font-weight: 600;
    transition: var(--transition); font-size: 0.92rem; letter-spacing: 0.3px;
}
.btn-primary-custom:hover { background: var(--color-primary-dark); color: #fff; }

.btn-accent {
    background: var(--color-accent); color: #fff; border: none;
    padding: 13px 36px; border-radius: 2px; font-weight: 600;
    transition: var(--transition); font-size: 0.92rem;
}
.btn-accent:hover { background: var(--color-accent-light); color: #fff; }

/* ========================================
   Animations & Polish
   ======================================== */

/* 섹션 타이틀 밑줄 애니메이션 */
.section-title h2::after {
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}
[data-aos].aos-animate .section-title h2::after,
.section-title h2.aos-animate::after,
.aos-animate .section-title h2::after {
    width: 40px;
}

/* 히어로 텍스트 등장 */
.hero-content h2 {
    animation: heroFadeUp 1s ease 0.3s both;
}
.hero-content p {
    animation: heroFadeUp 1s ease 0.6s both;
}
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}


/* 카드 호버 - 부드러운 떠오르기 */
.intro-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.intro-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(200,16,46,0.1);
}

/* 검사 카드 호버 */
.test-icon-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.test-icon-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(200,16,46,0.1);
}
.test-icon-card:hover .test-icon-wrapper img {
    transform: translateY(-4px) scale(1.05);
}

/* 갤러리 캐러셀 - 캡션 호버 강조 */
.gallery-slide .caption {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-slide:hover .caption {
    padding-bottom: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
}
.gallery-slide img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-slide:hover img {
    transform: scale(1.08);
}

/* 버튼 호버 - 미세 확대 + 그림자 */
.btn-primary-custom,
.btn-accent {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.btn-primary-custom:hover,
.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.btn-primary-custom:active,
.btn-accent:active {
    transform: translateY(0);
}

/* 버튼 클릭 리플 효과 */
.btn-primary-custom::after,
.btn-accent::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
    transform: scale(10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}
.btn-primary-custom:active::after,
.btn-accent:active::after {
    transform: scale(0);
    opacity: 1;
    transition: 0s;
}

/* 플로팅 메뉴 순차 등장 */
.floating-menu.visible .floating-btn:nth-child(1) { animation: fabIn 0.4s ease 0.0s both; }
.floating-menu.visible .floating-btn:nth-child(2) { animation: fabIn 0.4s ease 0.08s both; }
.floating-menu.visible .floating-btn:nth-child(3) { animation: fabIn 0.4s ease 0.16s both; }
.floating-menu.visible .floating-btn:nth-child(4) { animation: fabIn 0.4s ease 0.24s both; }
.floating-menu.visible .floating-btn:nth-child(5) { animation: fabIn 0.4s ease 0.32s both; }
.floating-menu.visible .floating-btn:nth-child(6) { animation: fabIn 0.4s ease 0.40s both; }
@keyframes fabIn {
    from { opacity: 0; transform: scale(0.5) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 플로팅 버튼 펄스 (예약 버튼) */
.floating-btn:nth-child(1) {
    animation: pulse 2s ease-in-out infinite;
}
.floating-menu.visible .floating-btn:nth-child(1) {
    animation: fabIn 0.4s ease 0.0s both, pulse 2s ease-in-out 1s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
    50% { box-shadow: 0 4px 24px rgba(200,16,46,0.4); }
}

/* 클리닉 안내 카드 호버 */
.clinic-info-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.clinic-info-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

/* 가격표 행 호버 */
.price-table tbody tr {
    transition: all 0.2s ease;
}
.price-table tbody tr:hover {
    background: var(--color-bg-warm);
    transform: scale(1.005);
}

/* 스크롤바 커스텀 */
html::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-track { background: #f5f5f5; }
html::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
html::-webkit-scrollbar-thumb:hover { background: #999; }

/* 텍스트 선택 색상 */
::selection { background: var(--color-accent); color: #fff; }

/* 포커스 스타일 */
*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* 부드러운 이미지 로딩 */
img {
    opacity: 1;
    transition: opacity 0.4s ease;
}
img[loading="lazy"] {
    opacity: 0;
}
img[loading="lazy"].loaded,
img[loading="lazy"][complete] {
    opacity: 1;
}

