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

/* ✅ 기본 폰트 및 정렬 */
body {
    font-family: 'NanumSquareRound', sans-serif;
    margin: 0;
    padding: 0;
    text-align: left;
    line-height: 1.6;
}

.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;
    word-break: break-word; /* 긴 단어 자동 줄바꿈 */
    overflow-wrap: break-word; /* 추가 줄바꿈 지원 */
    white-space: normal; /* 한 글자씩 세로로 출력되는 문제 해결 */
    font-size: 1.1rem;
    line-height: 1.7;
    box-sizing: border-box;
}

@media (max-width: 600px) {
  .notices-container, .notice-detail {
    font-size: 1rem;
    padding: 0.7rem;
  }
}

.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;
}

/* 공통 제목 스타일 */
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;
}

/* 공통 탭 스타일 */
.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: 768px) {
    .card, .profile-section, .guide-section, .info-section, .info-card, .faq-item {
        padding: 1.2rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    h3 {
        font-size: 1.5rem;
    }
    p, li, a, button, input, label, span, div {
        font-size: 1.5rem;
    }
    .tab-button {
        width: 48%;
        min-width: 210px;
        font-size: 2.1rem;
        padding: 1.8rem 0;
    }
    .tab-container {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    .tab-button {
        width: 48%;
        min-width: 140px;
        font-size: 1.4rem;
        padding: 1.2rem 0;
    }
    
    .hamburger {
        font-size: 1.5rem;
        padding: 0.5rem;
    }
    
    .logo img {
        height: 90px;
        max-width: 82%;
        min-height: 75px;
    }
    .card h3,
    .card p,
    .card li,
    .card span {
        font-size: 1.3rem;
    }
    .card p, .card li {
      font-size: 1.2em;
    }
    .profile-section p, .profile-section li {
      font-size: 1.4em;
    }
}
@media screen and (max-width: 480px) {
    .card, .profile-section, .guide-section, .info-section, .info-card, .faq-item {
        padding: 0.8rem;
    }
    h2 {
        font-size: 1.6rem;
    }
    h3 {
        font-size: 1.4rem;
    }
    p, li, a, button, input, label, span, div {
        font-size: 1.4rem;
    }
    .tab-button {
        width: 100%;
        min-width: 0;
        font-size: 1.8rem;
        padding: 1.5rem 0;
    }
    .card h3,
    .card p,
    .card li,
    .card span {
        font-size: 1.2rem;
    }
}

/* ✅ 작은 모바일 화면에서 메뉴 버튼 크기 조정 */
@media screen and (max-width: 480px) {
    .hamburger {
        font-size: 1.4rem;
        padding: 0.8rem;
    }
    
    .logo img {
        height: 95px;
        max-width: 80%;
        min-height: 80px;
    }
}

/* ✅ 모바일 반응형 스타일 */
@media screen and (max-width: 1024px) {
    html {
        font-size: 20px;
    }

    body {
        font-size: 1.6rem;
        line-height: 2.0;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2.3rem;
    }

    h3 {
        font-size: 1.8rem;
    }

    p, li, a, button, input, label, span, div {
        font-size: 1.6rem;
    }

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

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

    #map {
        height: 350px !important;
    }

    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
    }

    .logo {
        text-align: left;
        width: auto;
        margin: 0;
        display: block;
    }

    .logo img {
        height: 85px;
        max-width: 85%;
        min-height: 70px;
    }

    .hamburger {
        display: block;
        font-size: 1.6rem;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        color: #008080;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 1rem;
        background: white;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        border-radius: 8px;
        padding: 1.2rem;
        z-index: 1000;
        flex-direction: column;
        gap: 1rem;
        min-width: 180px;
    }

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

    .mobile-menu a {
        font-size: 1.6rem;
        font-weight: bold;
        text-decoration: none;
        color: #333;
    }

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

    .mobile-logo-wrapper {
        display: block;
        text-align: center;
        margin-top: 2rem;
    }

    .mobile-logo {
        width: 200px;
        max-width: 65%;
        height: auto;
    }
}

.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 (max-width: 768px) {
  .tab-button {
    display: block !important;
    width: 48% !important;
    min-width: 140px !important;
    font-size: 1.4rem !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: 1.2rem !important;
    padding: 1rem 0 !important;
    margin-bottom: 8px !important;
    box-sizing: border-box !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) {
  .profile-section * {
    font-size: 1.4em !important;
  }
}