/* ========================================
   Common CSS - 해운대아산내과의원
   ======================================== */

/* CSS Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'NanumSquareNeo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #191919;
    line-height: 1.6;
    background-color: #fff;
}

ul, ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ========================================
   CSS Variables
   ======================================== */
:root {
    /* Colors */
    --color-main: #DA7538;
    --color-sub1: #F4ECE7;
    --color-sub2: #2F2F2F;
    --color-sub3: #F1F1F1;

    /* Text Colors */
    --text-dark: #191919;
    --text-medium: #404040;
    --text-light: #919191;
    --text-accent: #EFA77B;
    --text-muted: #CECECE;

    /* Line Colors */
    --line-color: #B3B3B3;
    --line-color-light: #C3C3C3;

    /* Layout */
    --max-width: 1400px;
    --header-height: 80px;
}

/* ========================================
   Typography - NanumSquareNeo
   ======================================== */

/* === FONT - MAIN === */
/* GNB: NanumSquareNeo / 굵기 700 / 22px / 행간 120% */
.font-gnb {
    font-family: 'NanumSquareNeo', sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 120%;
    letter-spacing: 0;
}

/* 대타이틀 (Hero): NanumSquareNeo / 800 / 74px / 120% */
.title-hero {
    font-family: 'NanumSquareNeo', sans-serif;
    font-weight: 800;
    font-size: 74px;
    line-height: 120%;
    letter-spacing: 0;
}

/* 소타이틀 (Hero): NanumSquareNeo / regular / 28px / 140% */
.subtitle-hero {
    font-family: 'NanumSquareNeo', sans-serif;
    font-weight: 400;
    font-size: 28px;
    line-height: 140%;
    letter-spacing: 0;
}

/* === FONT - TEXT === */
/* 메인 타이틀: NanumSquareNeo / 800 / 46px / 100% */
.title-section {
    font-family: 'NanumSquareNeo', sans-serif;
    font-weight: 800;
    font-size: 46px;
    line-height: 100%;
    letter-spacing: 0;
}

/* 소타이틀: NanumSquareNeo / bold / 36px / 100% */
.subtitle-section {
    font-family: 'NanumSquareNeo', sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 100%;
    letter-spacing: 0;
}

/* 본문: NanumSquareNeo / regular / 28px / 160% */
.text-body {
    font-family: 'NanumSquareNeo', sans-serif;
    font-weight: 400;
    font-size: 28px;
    line-height: 160%;
    letter-spacing: 0;
}

/* 본문2: NanumSquareNeo / semibold / 26px / 120% */
.text-body-2 {
    font-family: 'NanumSquareNeo', sans-serif;
    font-weight: 700;
    font-size: 26px;
    line-height: 120%;
    letter-spacing: 0;
}

/* 본문3: NanumSquareNeo / regular / 36px / 100% */
.text-body-3 {
    font-family: 'NanumSquareNeo', sans-serif;
    font-weight: 400;
    font-size: 36px;
    line-height: 100%;
    letter-spacing: 0;
}

/* 작은 텍스트: NanumSquareNeo / regular / 22px / 160% */
.text-small {
    font-family: 'NanumSquareNeo', sans-serif;
    font-weight: 400;
    font-size: 22px;
    line-height: 160%;
    letter-spacing: 0;
}

/* 아주 작은 텍스트: NanumSquareNeo / regular / 18px / 160% */
.text-xsmall {
    font-family: 'NanumSquareNeo', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 160%;
    letter-spacing: 0;
}

/* ========================================
   Layout Utilities
   ======================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: 120px 0;
}

/* ========================================
   Header
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header.transparent {
    background-color: transparent;
}

.header.scrolled {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
}

.header-logo {
    flex-shrink: 0;
}

.header-logo img {
    height: 40px;
    width: auto;
}

.header-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-list {
    display: flex;
    gap: 60px;
}

.nav-item a {
    font-family: 'NanumSquareNeo', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.header.scrolled .nav-item a {
    color: #191919 !important;
}

/* 로고 전환 */
.header-logo .logo-white {
    display: block;
}

.header-logo .logo-dark {
    display: none;
}

.header.scrolled .header-logo .logo-white {
    display: none !important;
}

.header.scrolled .header-logo .logo-dark {
    display: block !important;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    position: relative;
    padding-bottom: 8px;
    display: block;
}

.nav-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-main);
    transition: width 0.3s ease;
}

.nav-item:hover > a::after {
    width: 100%;
}

.nav-item > a:hover {
    color: var(--color-main);
}

/* 드롭다운 메뉴 */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    width: auto;
    padding: 12px 0;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown li {
    padding: 0;
}

.nav-dropdown a {
    display: block;
    padding: 8px 20px;
    font-size: 15px;
    color: #191919 !important;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-dropdown a:hover {
    background-color: var(--color-sub1);
    color: var(--color-main) !important;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: #000;
    padding: 60px 0 40px;
    color: #fff;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.footer-logo {
    margin-bottom: 30px;
}

.footer-logo img {
    height: 36px;
    margin: 0 auto;
}

.footer-info {
    font-size: 14px;
    color: #999;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-info p {
    margin-bottom: 5px;
}

.footer-copyright {
    font-size: 13px;
    color: #666;
    padding-top: 20px;
    border-top: 1px solid #333;
}

/* ========================================
   Utility Classes
   ======================================== */
.text-main {
    color: var(--color-main);
}

.text-white {
    color: #fff;
}

.text-center {
    text-align: center;
}

.bg-white {
    background-color: #fff;
}

.bg-dark {
    background-color: var(--color-sub2);
}

.bg-light {
    background-color: var(--color-sub3);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   Mobile Menu Button
   ======================================== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    margin: 3px 0;
    transition: all 0.3s ease;
}

.header.scrolled .mobile-menu-btn span {
    background-color: #191919;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Responsive - Tablet (max-width: 1024px)
   ======================================== */
@media (max-width: 1024px) {
    :root {
        --header-height: 70px;
    }

    .container {
        padding: 0 30px;
    }

    .header-inner {
        padding: 0 30px;
    }

    .nav-list {
        gap: 40px;
    }

    .nav-item a {
        font-size: 16px;
    }

    .section {
        padding: 80px 0;
    }

    /* Typography 축소 */
    .title-hero {
        font-size: 56px;
    }

    .subtitle-hero {
        font-size: 22px;
    }

    .title-section {
        font-size: 38px;
    }

    .subtitle-section {
        font-size: 28px;
    }

    .text-body {
        font-size: 22px;
    }

    .text-body-2 {
        font-size: 20px;
    }

    .text-body-3 {
        font-size: 28px;
    }

    .text-small {
        font-size: 18px;
    }
}

/* ========================================
   Responsive - Mobile (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .container {
        padding: 0 20px;
    }

    .header-inner {
        padding: 0 20px;
    }

    .header-logo img {
        height: 32px;
    }

    /* 모바일 메뉴 버튼 표시 */
    .mobile-menu-btn {
        display: flex;
    }

    /* 네비게이션 숨기기 (모바일 메뉴로 대체) */
    .header-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #fff;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }

    .header-nav.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
    }

    .nav-item {
        border-bottom: 1px solid #eee;
    }

    .nav-item > a {
        display: block;
        padding: 18px 20px;
        font-size: 16px;
        color: #191919 !important;
    }

    .nav-item > a::after {
        display: none;
    }

    .nav-dropdown {
        position: static;
        transform: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        display: none;
        background-color: #f9f9f9;
        padding: 0;
        border-radius: 0;
    }

    .nav-item:hover .nav-dropdown,
    .nav-item.active .nav-dropdown {
        display: block;
    }

    .nav-dropdown a {
        padding: 14px 30px;
        text-align: left;
        font-size: 14px;
    }

    .section {
        padding: 60px 0;
    }

    /* Typography 모바일 */
    .title-hero {
        font-size: 36px;
    }

    .subtitle-hero {
        font-size: 16px;
    }

    .title-section {
        font-size: 28px;
    }

    .subtitle-section {
        font-size: 22px;
    }

    .text-body {
        font-size: 16px;
    }

    .text-body-2 {
        font-size: 16px;
    }

    .text-body-3 {
        font-size: 20px;
    }

    .text-small {
        font-size: 14px;
    }

    .text-xsmall {
        font-size: 13px;
    }

    /* Footer 모바일 */
    .footer {
        padding: 40px 0 30px;
    }

    .footer-inner {
        padding: 0 20px;
    }

    .footer-logo img {
        height: 28px;
    }

    .footer-info {
        font-size: 12px;
    }

    .footer-copyright {
        font-size: 11px;
    }
}

/* ========================================
   Responsive - Small Mobile (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .header-inner {
        padding: 0 15px;
    }

    .title-hero {
        font-size: 28px;
    }

    .subtitle-hero {
        font-size: 14px;
    }

    .title-section {
        font-size: 24px;
    }

    .subtitle-section {
        font-size: 18px;
    }
}
