/* ✅ 모든 요소 box-sizing 설정 */
* {
    box-sizing: border-box;
}

/* 스크롤바를 항상 표시하여 레이아웃 시프트 방지 */
html {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
    overflow-y: scroll;
}

/* Webkit 브라우저용 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ✅ 기본 폰트 및 정렬 */
body {
    font-family: 'NanumSquareRound', sans-serif;
    margin: 0;
    padding: 0;
    text-align: left;
    line-height: 1.6;
    color: #333;
    /* 레이아웃 시프트 방지를 위한 최소 높이 설정 */
    min-height: 100vh;
    /* 스크롤바 공간 확보 */
    padding-right: 0;
    /* 기본 폰트 크기 설정 */
    font-size: 1.2rem;
    line-height: 1.7;
    /* 모바일 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    /* 전역 단어 단위 줄바꿈 */
    word-break: keep-all;
    word-wrap: break-word;
}

/* 전역 폰트 크기 시스템 */
h1 {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 1.2rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

a {
    font-size: 1rem;
    line-height: 1.6;
}

button {
    font-size: 1rem;
    line-height: 1.4;
    /* 버튼에서 텍스트 선택 방지 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 1.2rem;
    text-align: center;
}

/* row-pc flex 스타일 완전 삭제! */

.summary-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.card {
    flex: 1;
    min-width: 280px;
    padding: 1.5rem 2rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #f9f9f9;
}

h3 {
    font-size: 1.4rem;
    font-weight: bold;
}

.qr-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

#map {
    width: 100%;
    height: 400px;
    border: 1px solid #ccc;
    border-radius: 10px;
    margin-top: 1rem;
}

.iframe-container iframe, .doctor-frame-container iframe {
    width: 100%;
    height: auto !important;
    min-height: 800px;
    border: none;
    display: block;
    margin: auto;
}

.notices-container, .notice-detail {
    max-width: 900px;
    margin: 2rem auto;
    padding: 20px;
    text-align: left;
}

.notices-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notices-container li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #ddd;
    font-size: 1.5rem;
    line-height: 1.8;
}

.notices-container a {
    text-decoration: none;
    color: #008080;
    font-weight: bold;
    font-size: 1.7rem;
    display: block;
}

.notices-container span {
    font-size: 1.3rem;
    color: gray;
}

/* 공통 박스/카드 스타일 */
.card, .profile-section, .guide-section, .info-section, .info-card, .faq-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* 주차안내 섹션 PC 폰트 크기 조정 */
.parking-guide p {
    font-size: 0.95rem;
}

/* 공통 제목 스타일 */
h1, h2, h3 {
    color: #008080;
    font-weight: bold;
    margin-bottom: 1.2rem;
}
h2 {
    font-size: 1.6rem;
    border-bottom: 2px solid #008080;
    padding-bottom: 0.5rem;
    text-align: center;
}
h3 {
    font-size: 1.2rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.3rem;
}

/* 공통 리스트/텍스트 스타일 */
.card ul, .profile-section ul, .guide-section ul, .info-section ul, .faq-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.card li, .profile-section li, .guide-section li, .info-section li, .faq-item li {
    font-size: 1.2em;
    line-height: 1.8;
    color: #555;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}
.card li:before, .profile-section li:before, .guide-section li:before, .info-section li:before, .faq-item li:before {
    content: "•";
    color: #008080;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.card p, .profile-section p, .guide-section p, .info-section p, .faq-item p {
    font-size: 1.2em;
    color: #555;
}

/* 헤더 스타일 */
.header {
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}



.nav-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
}

/* Since 2022 텍스트 스타일 - 기본적으로 숨김 */
.since-text {
    display: none;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    color: #196A25;
    font-size: 0.99rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}


.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #196A25;
    font-weight: bold;
    font-size: 1.5rem;
}

.logo img {
    height: 40px;
    margin-right: 0.5rem;
}

/* 로고 반응형 설정 */
.mobile-logo-img {
    display: none;
}

.desktop-logo {
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #196A25;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.3rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
    padding-top: 120px;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: #196A25;
}

.mobile-logo-wrapper {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.mobile-logo {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
}

/* 메인 컨텐츠 */
main {
    min-height: calc(100vh - 80px);
    padding: 2rem 1.5rem;
}

/* 푸터 */
.footer {
    background: #f8f8f8;
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

.footer p {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

/* 공통 탭 스타일 */
.tab-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
}
.tab-button {
    padding: 1.05rem 1.8rem;
    margin: 0 5px;
    border: none;
    background-color: #f0f0f0;
    cursor: pointer;
    font-size: 1.65rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.tab-button:hover {
    background-color: #e0e0e0;
}
.tab-button.active {
    background-color: #008080;
    color: white;
}

.tab-content {
    display: none;
    text-align: center;
    min-height: 400px;
    transition: opacity 0.3s ease;
}
.tab-content.active {
    display: block;
    opacity: 1;
}

/* FAQ 스타일 */
.faq-grid {
    display: grid;
    gap: 1rem;
}
.faq-item {
    border-left: 4px solid #008080;
}




/* 태블릿 반응형 */
@media screen and (max-width: 1024px) {
    body {
        font-size: 1.1rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    p {
        font-size: 0.95rem;
    }

    a {
        font-size: 0.95rem;
    }

    button {
        font-size: 0.95rem;
    }

    .summary-cards {
        display: block !important;
        text-align: center;
    }

    .summary-cards .card {
        width: 100% !important;
        margin-bottom: 2rem;
    }

    #map {
        height: 350px !important;
    }
}

/* 모바일 스타일 (iPhone Pro Max 등) */
@media screen and (max-width: 768px) {
    body {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    h4 {
        font-size: 1rem;
    }

    p {
        font-size: 1rem;
    }

    a {
        font-size: 1rem;
    }

    button {
        font-size: 1rem;
    }

    main {
        padding: 1rem 0.8rem;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-container {
        padding: 0.4rem 1rem;
        flex-direction: row-reverse;
        position: relative;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo img {
        height: 28px;
    }
    
    /* 모바일에서 로고 변경 */
    .desktop-logo {
        display: none;
    }
    
    .mobile-logo-img {
        display: block;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
        margin-right: 0.3rem;
    }

    /* Since 2022 텍스트 표시 */
    .since-text {
        display: block;
        font-style: italic;
        font-size: 1.078rem;
    }

    main {
        padding: 1.5rem 1rem;
    }

    .footer {
        padding: 1.5rem 1rem;
    }

    /* 모바일 헤더 최적화 */
    .header {
        background: white !important;
    }
    .header .logo {
        color: #196A25 !important;
    }
    .header .logo img {
        filter: none;
    }

    /* 진료시간 섹션 폰트 크기 조정 */
    .treatment-hours p {
        font-size: 1.05rem;
    }

    /* 주차안내 섹션 폰트 크기 조정 */
    .parking-guide p {
        font-size: 1.05rem;
    }
}

/* 작은 모바일 반응형 (iPhone mini 등) */
@media screen and (max-width: 480px) {
    body {
        font-size: 16px; /* 작은 모바일에서 표준 폰트 크기 */
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    h4 {
        font-size: 1rem;
    }

    p {
        font-size: 1rem;
    }

    a {
        font-size: 1rem;
    }

    button {
        font-size: 1rem;
    }

    main {
        padding: 0.8rem 0.6rem;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-container {
        padding: 0.3rem 0.8rem;
        flex-direction: row-reverse;
        position: relative;
    }

    .logo {
        font-size: 1rem;
    }

    .logo img {
        height: 24px;
    }
    
    /* 작은 모바일에서 로고 변경 */
    .desktop-logo {
        display: none;
    }
    
    .mobile-logo-img {
        display: block;
        height: 28px;
        border-radius: 50%;
        object-fit: cover;
        margin-right: 0.2rem;
    }

    /* Since 2022 텍스트 표시 */
    .since-text {
        display: block;
        font-style: italic;
        font-size: 1.012rem;
    }

    main {
        padding: 1.2rem 0.8rem;
    }

    .footer {
        padding: 1.2rem 0.8rem;
    }

    /* 작은 모바일 헤더 최적화 */
    .header {
        background: white !important;
    }
    .header .logo {
        color: #196A25 !important;
    }
    .header .logo img {
        filter: none;
    }

    /* 진료시간 섹션 폰트 크기 조정 */
    .treatment-hours p {
        font-size: 1.0rem;
    }

    /* 주차안내 섹션 폰트 크기 조정 */
    .parking-guide p {
        font-size: 1.0rem;
    }
}

/* 초소형 모바일 화면 (구형 안드로이드 등) */
@media screen and (max-width: 375px) {
    body {
        font-size: 16px; /* 작은 화면에서도 표준 폰트 크기 */
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    h4 {
        font-size: 1rem;
    }

    p {
        font-size: 1rem;
    }

    a {
        font-size: 1rem;
    }

    button {
        font-size: 1rem;
    }

    .hamburger span {
        width: 20px;
        height: 2px;
    }

    .nav-container {
        padding: 0.3rem 0.8rem;
        flex-direction: row-reverse;
        position: relative;
    }

    .logo img {
        height: 24px;
    }
    
    .mobile-logo-img {
        height: 28px;
        margin-right: 0.2rem;
    }

    .logo {
        font-size: 1rem;
    }

    /* Since 2022 텍스트 표시 */
    .since-text {
        display: block;
        font-style: italic;
        font-size: 0.946rem;
    }

    /* 진료시간 섹션 폰트 크기 조정 */
    .treatment-hours p {
        font-size: 1.0rem;
    }

    /* 주차안내 섹션 폰트 크기 조정 */
    .parking-guide p {
        font-size: 1.0rem;
    }
}

.process-step, .info-card, .step-content p, .symptom-item p {
  word-break: keep-all;
  white-space: normal;
  max-width: 95%;
  margin: 0 auto;
}

/* 진료과목 안내 모바일 2줄 버튼 강제 적용 */
.tab-container {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  justify-content: center !important;
}

@media screen and (min-width: 769px) {
  .tab-button {
    padding: 0.89rem 1.53rem;
    font-size: 1.4rem;
    min-width: 178px;
  }
}

@media screen and (max-width: 768px) {
  .tab-button {
    display: block !important;
    width: 48% !important;
    min-width: 140px !important;
    font-size: 1.12rem !important;
    padding: 1.2rem 0 !important;
    margin-bottom: 10px !important;
    box-sizing: border-box !important;
  }
}

@media screen and (max-width: 480px) {
  .tab-button {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    font-size: 0.96rem !important;
    padding: 1rem 0 !important;
    margin-bottom: 8px !important;
    box-sizing: border-box !important;
  }
  
  .profile-section * {
    font-size: 1.12em !important;
  }
}