/* Global Variables */
@import url('https://fonts.googleapis.com/css2?family=Nanum+Myeongjo:wght@400;700;800&family=Nanum+Pen+Script&display=swap');

@font-face {
    font-family: 'GMarketSans';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansLight.woff') format('woff');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'GMarketSans';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff') format('woff');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'GMarketSans';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff') format('woff');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'GounBatang';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2108@1.1/GowunBatang-Regular.woff') format('woff');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'GounBatang';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2108@1.1/GowunBatang-Bold.woff') format('woff');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Light.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Medium.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-SemiBold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraBold.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

:root {
    /* Color Palette based on User provided images */
    --color-primary: #6EC5E9;
    /* Sky Blue - Approximate from logo/image */
    --color-primary-dark: #5CADCE;
    --color-secondary: #FFD1DC;
    /* Pastel Pink - Approximate from background */
    --color-secondary-dark: #FFB7C5;
    --color-gray: #666666;
    /* Gray Text */
    --color-dark-gray: #333333;
    /* Darker Gray for headings */
    --color-light-gray: #F5F5F7;
    /* Background Gray */
    --color-white: #FFFFFF;

    /* Fonts */
    --font-main: -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;

    /* Spacing */
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 48px;

    /* Border Radius */
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Pretendard', sans-serif;
    color: var(--color-gray);
    background-color: var(--color-light-gray);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
header {
    padding-bottom: 13px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: var(--spacing-md) 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 5px;
}

.logo-symbol {
    height: 40px;
    width: auto;
}

.logo-text {
    height: 22px;
    width: auto;
}

nav a {
    font-family: 'GmarketSans', serif;
    margin-left: var(--spacing-lg);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--color-primary);
}

/* Common Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--color-dark-gray);
    position: relative;
}

.section-subtitle {
    text-align: center;
    color: var(--color-dark-gray);
    position: relative;
    font-weight: 100;
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    padding: var(--spacing-lg);
}

/* Section 1: Hero (Redesign) */
.hero-section {
    position: relative;
    padding: 0;
    min-height: 530px;
    /* Increased height for better proportions */
    background: url('../public/images/hero_bg_new.png') no-repeat left center/cover;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Gradient Overlay to ensure text readability on the right */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    /* Moved to right */
    left: auto;
    /* Reset left */
    width: 60%;
    /* Fade out towards the right */
    height: 100%;
    /* Slightly transparent start to show background, now fading from Right to Left */
    background: linear-gradient(to left, rgba(255, 255, 255, 0.85) 45%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md) 0 2px;
    /* Adjusted padding-left to 2px as requested */
    align-items: center;
    justify-content: flex-end;
    /* Align text to the right */
    height: 100%;
    /* Ensure container takes full height */
}

/* Left: Text Area */
.hero-left-text {
    /* Fixed width to ensure separation */
    max-width: 550px;
    /* Limit text width */
    padding-left: 20px;
    /* Switch padding to left */
    padding-right: 0;
    z-index: 5;
    /* Ensure above everything */
    margin-left: auto;
    /* Push to right */
    text-align: right;
    /* Optional: align text content to right for balance, if desired. Keeping left for readability? User didn't specify. Left text on right side often looks okay. Let's start with auto margin. */
}

.hero-eyebrow {
    font-size: 0.9rem;
    color: #999;
    letter-spacing: 3px;
    margin-bottom: 20px;
    font-weight: 500;
    text-transform: uppercase;
}

.hero-main-msg {
    font-family: 'GounBatang', serif;
    font-weight: 400;
    /* Reduced from 700 */
    font-size: 2.4rem;
    /* Reduced from 2.8rem */
    color: #333333;
    line-height: 1.3;
    margin-bottom: 35px;
    /* Increased from 24px */
    letter-spacing: -0.5px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15);
    /* Subtle shadow applied */
}

@keyframes fadeInUpBig {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-main-msg .char {
    opacity: 0;
    display: inline-block;
    animation: fadeInUpBig 0.8s ease-out forwards;
}

.hero-sub-msg {
    font-family: 'GounBatang', serif;
    font-size: 1.1rem;
    color: #575757;
    line-height: 1.7;
    font-weight: 400;
}

/* Soft warm text color adjustment */
.hero-sub-msg strong {
    color: inherit;
    /* Use parent color as requested */
    font-weight: 400;
    /* Match surrounding text weight */
}

/* Right: Image Area */
.hero-right-img {
    position: absolute;
    /* Direct child of relative section */
    left: 0;
    /* Moved to left */
    top: 0;
    bottom: 0;
    width: 50%;
    height: 100%;
    z-index: 2;
    right: auto;
    /* Ensure it's not also on the right */
    /* No flex needed on parent since it's absolute */
}

.hero-doctor-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fill the area */
    object-position: center 20%;
    /* Focus on face (slightly up from center) */
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    margin-bottom: -30px;
    margin-left: -20px;
    /* Push slightly left */

    /* Warm and Bright Correction */
    filter: brightness(1.08) saturate(1.1) sepia(0.05) contrast(1.05);
}

@media (max-width: 900px) {
    .hero-section {
        padding: 60px 0;
        text-align: center;
        background-position: center;
    }

    .hero-section::before {
        width: 100%;
        background: rgba(255, 255, 255, 0.9);
        /* More covering on mobile */
    }

    .hero-container {
        flex-direction: column;
    }

    .hero-left-text {
        max-width: 100%;
        padding-right: 0;
        margin-bottom: 40px;
    }

    .hero-right-img {
        max-width: 100%;
        justify-content: center;
    }

    .hero-main-msg {
        font-size: 2rem;
    }
}

/* Section 3: Treatment Principles (Redesign) */
.principles-section {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../public/images/hero_bg_clinic.png') no-repeat center center/cover;
    text-align: center;
    padding: 100px 0;
    /* Increase padding for moody look */
    color: #fff;
}

.principles-section .section-title {
    color: #fff;
    /* Override default dark gray */
    margin-bottom: 20px;
    font-size: 1.2rem;
    /* Make it look like a small header/tagline like "MEMORY PLASTIC..." */
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
    opacity: 0.8;
}

.solution-intro {
    font-family: inherit;
}

.principles-section .solution-intro h3 {
    color: #fff;
    font-size: 2.5rem;
    /* Big headline */
    margin-bottom: 40px;
    line-height: 1.4;
    font-weight: 700;
}

.principles-section .solution-intro p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

.principles-section .solution-intro strong {
    color: #fff;
    font-weight: bold;
}

.text-emphasis {
    font-size: 1.25rem;
    /* Increased size by roughly 2px (from 1.1rem) */
    font-weight: 500;
    display: inline-block;
    margin-top: 5px;
}

/* Section 5: Solution (Redesign) */
.keypoints-section {
    background-color: #fff;
    padding: 200px 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 Columns */
    gap: 40px;
    /* Wider gap like reference */
}

/* New Clean Column Card Style */
.card.clean-col {
    background: transparent;
    border: none;
    box-shadow: none;
    text-align: left;
    background-color: #f1f6ff;
    /* Ref suggests left align text or centered? Reference images often centered or left. Let's stick to left for clean read. */
    transition: none;
    /* Remove hover float for this clean style */
}

.card.clean-col:hover {
    transform: none;
    box-shadow: none;
}

.card-image-box {
    width: 100%;
    aspect-ratio: 1;
    /* Square image */
    background-color: #f0f0f0;
    margin-bottom: 30px;
    overflow: hidden;
}

.image-placeholder-square {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
    color: #aaa;
    font-size: 1.2rem;
}

.card-text-box {
    padding: 0 33px 50px;
}

.card h3 {
    font-size: 1.5rem;
    /* Bold and Big */
    font-weight: 700;
    color: #000;
    text-align: center;
}

.card-sub {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 15px;
    font-weight: 400;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.card-desc {
    padding: 0 10px;
}

.card-desc p {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    background: transparent;
    padding: 0;
    margin: 0;
    /* Reset */
}

/* Group Spacing: Relatively Wide */
.desc-group {
    margin-bottom: 24px;
}

.desc-group:last-child {
    margin-bottom: 0;
}

/* Title Spacing: Relatively Narrow */
.desc-title {
    font-family: 'Pretendard', serif;
    font-weight: 600;
    display: block;
    font-size: 1.1rem;
    color: #000;
    margin-bottom: 6px;
}

.desc-text {
    font-family: 'Pretendard', serif;
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.5;
    color: #555;
    word-break: keep-all;
}

/* Responsive Grid */
@media (max-width: 900px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Section 3: Reservation */
.reservation-section {
    text-align: center;
    background: linear-gradient(180deg, #FFFFFF 0%, #FFF0F4 100%);
    /* Fade to soft pink */
}

.reservation-msg {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-xl);
    font-weight: 500;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    transition: transform 0.2s, opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(110, 197, 233, 0.4);
}

.btn-kakao {
    background-color: #FEE500;
    color: #000;
    box-shadow: 0 4px 15px rgba(254, 229, 0, 0.4);
}

.btn-naver {
    background-color: #03C75A;
    color: white;
    box-shadow: 0 4px 15px rgba(3, 199, 90, 0.4);
}

/* Section: Location & Info (Redesigned) */
.location-section-v2 {
    background-color: #fff;
    padding: 100px 0;
}

.container-v2 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.location-content {
    display: flex;
    gap: 80px;
    align-items: flex-start;
}

.location-left {
    flex: 1;
}

.map-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #eee;
    border: 1px solid #eee;
}

.location-right {
    flex: 1;
    text-align: left;
}

.brand-header {
    margin-bottom: 60px;
}

.brand-logo-serif {
    font-family: 'Pretendard', sans-serif;
    font-size: 2.7rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 0px;
    line-height: 1.1;
}

.brand-stmt {
    font-family: 'Pretendard', sans-serif;
    font-size: 1rem;
    color: #444;
    line-height: 1.4;
    word-break: keep-all;
    margin-bottom: 8px;
}

.hours-container {
    margin-bottom: 60px;
}

.hours-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 13px;
}

.hours-list {
    margin-bottom: 20px;
}

.hours-row {
    display: flex;
    gap: 30px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f1f1;
    font-size: 1.1rem;
}

.hours-row:last-child {
    border-bottom: none;
}

.hours-row .day {
    font-weight: 700;
    color: #111;
    min-width: 70px;
}

.hours-row .time {
    color: #444;
}

.hours-row.closed .time {
    color: #999;
}

.parking-note {
    font-size: 0.95rem;
    color: #777;
    margin-top: 15px;
}

.cta-container {
    margin-top: 40px;
}

.cta-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.kakao-icon {
    width: 24px;
    height: 24px;
    background-color: #f7e600;
    color: #3c1e1e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
}

.cta-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: #333;
    transition: transform 0.2s;
}

.cta-link:hover {
    transform: translateX(5px);
}

.cta-link .arrow {
    font-size: 1.2rem;
    color: #999;
}

/* Responsive Location Section */
@media (max-width: 1024px) {
    .location-content {
        gap: 40px;
    }

    .brand-logo-serif {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .location-content {
        flex-direction: column;
    }

    .container-v2 {
        padding: 0 20px;
    }

    .map-wrapper {
        aspect-ratio: 4 / 3;
    }

    .location-right {
        padding-top: 20px;
    }

    .brand-header {
        margin-bottom: 40px;
    }

    .hours-container {
        margin-bottom: 40px;
    }
}

/* Footer */
footer {
    background-color: #333;
    color: #aaa;
    padding: 40px 0;
    font-size: 0.9rem;
}

.footer-info p {
    margin-bottom: 8px;
}

.footer-links {
    margin: 15px 0;
}

.footer-links span {
    cursor: pointer;
    margin: 0 5px;
}

.footer-links span:hover {
    text-decoration: underline;
}

/* Section 2: Key Subjects */
.subjects-section {
    padding: 0;
    /* Remove vertical padding to connect with section 1 */
    background-color: #fff;
    /* Reset or keep if needed, but left/right will handle bg */
}

.subjects-container {
    display: flex;
    width: 100%;
    margin: 0;
    min-height: 500px;
    /* Match or approximate hero height for balance */
}

/* Left 2/5 -> Fixed 40% */
.subjects-left {
    flex: 0 0 40%;
    text-align: center;
    /* Center align content as logo is centered */
    padding: var(--spacing-xl);
    /* Increase padding for inner content breathing room */
    background-color: #E1EFF9;
    /* Removing border-radius for seamless connection */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Helper for centering children */
    max-width: 40%;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center the logo */
    gap: 10px;
    margin-bottom: 20px;
}

.section-logo {
    height: 100px;
    /* 4x increase from 40px */
    width: auto;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-gray);
    margin-top: 10px;
}

.subjects-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-dark-gray);
    margin-bottom: var(--spacing-lg);
    line-height: 1.2;
    word-break: keep-all;
}

.subjects-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-gray);
    word-break: keep-all;
    /* Improve Korean text wrapping */
}

/* Right 3/5 -> Fixed 60% */
.subjects-right {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center vertically */
    padding: var(--spacing-xl) 60px;
    /* Add significant horizontal padding */
    gap: 15px;
    background-color: #f0f4f8;
    /* Apply the original section bg here if needed, or white */
    max-width: 60%;
}

.tags-group {
    font-family: sans-serif;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Specific Grid for Skin Tags (4 columns) */
.skin-tags-grid {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    gap: 15px;
    width: 100%;
}

.skin-tags-grid .tag-skin {
    width: auto;
    /* justify-self: center; removed to allow natural left alignment */
}

/* Section 4: Greeting */
/* Section 4: Greeting (Redesign) */
.greeting-section {
    display: flex;
    flex-direction: row-reverse;
    padding: 0;
    /* Remove default padding for full split */
    background-color: #fff;
    min-height: 600px;
}

.greeting-left {
    flex: 1;
    background-color: #EFECE5;
    /* Warm Beige */
    padding: 80px 180px 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.greeting-right {
    flex: 1;
    background-color: #CCC;
    /* Placeholder until image is added */
    position: relative;
    /* In real implementation, background-image here */
}

.director-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 10%;
    display: block;
}

.greeting-header {
    margin-bottom: 40px;
}

.hospital-name {
    font-size: 1rem;
    color: #555;
    /* Subtle color */
    margin-bottom: 5px;
    font-weight: 500;
    letter-spacing: 1px;
}

.director-name {
    font-size: 2.5rem;
    /* Large Name */
    color: #333;
    font-weight: 400;
    /* Serif feel usually lighter */
    font-family: 'Nanum Myeongjo', serif;
    /* Or keep sans if not available, but user ref implies serif-like elegance */
    display: flex;
    align-items: center;
}

.director-name .position {
    font-size: 1.2rem;
    color: #616161;
    margin-left: 10px;
    font-weight: 300;
    margin-top: 15px;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 20px;
    padding: 4px 10px;
    font-size: 1rem;
    font-family: 'Pretendard', sans-serif;
    color: #333;
    background-color: transparent;
    /* Match right section background */
    border: 1px solid #cacaca;
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-btn::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 5px;
    margin-top: -6px;
    transition: transform 0.2s ease;
}

.profile-btn:hover {
    background-color: #333;
    color: #EFECE5;
}

.greeting-quote {
    font-size: 1.4rem;
    color: #444;
    margin-bottom: 20px;
    font-family: 'Nanum Myeongjo', serif;
    font-weight: 700;
    letter-spacing: -0.05em;
}

.greeting-body p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
    text-align: justify;
    letter-spacing: -0.03em;
}

.director-sign {
    margin-top: 30px;
    font-weight: bold;
    text-align: right !important;
    font-family: 'Nanum Pen Script', cursive;
    /* Optional signature feel */
    font-size: 1.5rem !important;
}

/* Responsive Greeting */
@media (max-width: 900px) {
    .greeting-section {
        flex-direction: column;
    }

    .greeting-left {
        padding: 40px 20px;
    }

    .greeting-right {
        min-height: 300px;
    }
}

/* Section 6: Before/After */
.ba-section {
    background-color: #FFF0F5;
    /* Light pink bg */
}

.ba-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.ba-item {
    text-align: center;
    padding: var(--spacing-md);
}

.ba-item p {
    font-family: 'Pretendard', serif;
    font-size: 1.1em;
    text-align: center;
    margin-top: var(--spacing-sm);
    font-weight: bold;
    color: var(--color-dark-gray);
}

/* Section 7: YouTube */
.youtube-section {
    background-color: #fff;
}

.youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.video-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    border-radius: var(--radius-md);
}

.youtube-card p {
    font-weight: 500;
    color: var(--color-dark-gray);
}

/* Section 8: Columns */
.columns-section {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

.columns-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('../public/images/column_bg.jpg') no-repeat center center/115%;
    filter: blur(8px);
    transform: scale(1.1);
    z-index: -1;
}

.columns-section .container {
    position: relative;
    z-index: 1;
}

.columns-section .section-title {
    color: #fff;
    margin-bottom: 15px;
}

.col-desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    text-align: center;
    margin-bottom: 50px;
}

.columns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.col-list {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    color: #fff;
}

.col-list h3 {
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
    padding-bottom: 5px;
    color: #fff;
}

.col-list ul li {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    transition: background-color 0.2s;
    list-style: none;
}

.col-list ul li a {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

.col-list ul li:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.col-list ul li:last-child {
    border-bottom: none;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.page-num {
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-right: -1px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 0;
}

.page-num:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.page-num:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-right: 0;
}

.page-num:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.page-num.active {
    background-color: #337ab7;
    border-color: #337ab7;
    color: #fff !important;
    cursor: default;
    z-index: 2;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .greeting-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .greeting-image {
        flex: auto;
        width: 100%;
        max-width: 300px;
    }
}

/* Base Tag Styling */
.tag-resp,
.tag-skin,
.tag-other {
    text-shadow: 2px 2px 18px rgba(0, 0, 0, 0.08);
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, .18);
    /* Pill shape */
    font-size: 1rem;
    font-weight: 500;
    color: white;
    /* Text color inside pill */
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    box-shadow: 3px 8px 20px rgba(70, 70, 70, .1),
        inset 1px 2px 0 rgba(255, 255, 255, .25);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
    transition: transform 0.2s;
}

.tag-resp:hover,
.tag-skin:hover,
.tag-other:hover {
    transform: translateY(-2px);
}

/* Respiratory - Pastel Blue */
.tag-resp {
    background-color: #6CD0FF;
    /* Bright pastel blue */
    border: none;
    color: white;
}

/* Skin - Pastel Pink */
.tag-skin {
    background-color: #FF99A6;
    /* Bright pastel pink */
    border: none;
    color: white;
}

/* Other - Pastel Black/Gray */
.tag-other {
    background-color: #555555;
    /* Pastel Black/Dark Gray */
    border: none;
    color: white;
}

/* Section 6: Before/After (Redesign) */
.ba-section {
    display: flex;
    padding: 0;
    width: 100%;
    min-height: 500px;
}

.ba-left {
    flex: 0 0 38%;
    background-color: #F8C8DC;
    /* Higher saturation Pastel Pink */
    padding: 80px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.ba-left img {
    opacity: 0.8;
}

.ba-right {
    flex: 0 0 55%;
    background-color: #FFF0F5;
    /* LavenderBlush */
    padding: 60px 20px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ba-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    color: #333;
    line-height: 1.3;
}

.ba-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-dark-gray);
    margin-bottom: var(--spacing-lg);
    line-height: 1.2;
    word-break: keep-all;
}

.ba-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-gray);
    word-break: keep-all;
}

.ba-desc strong {
    font-weight: 700;
    color: var(--color-dark-gray);
    display: block;
    margin-top: 10px;
}

.ba-list {
    display: flex;
    flex-direction: column;
    gap: 35px;
    width: 80%;
}

.carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.ba-carousel {
    position: relative;
    overflow: hidden;
    flex-grow: 1;
    max-width: calc(100% - 160px);
    min-width: 0;
    margin: 0 15px;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.ba-carousel .ba-item {
    min-width: 100%;
    box-sizing: border-box;
    padding: 0;
    /* remove inner padding so image fills fully */
}

/* slight padding to prevent edges from touching arrows strictly */


.carousel-btn {
    flex-shrink: 0;
    margin-top: calc(15% - 32px);
    /* Proportional centering with the image */
    background: transparent;
    color: #777;
    border: none;
    font-size: 3.5rem;
    cursor: pointer;
    z-index: 10;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    padding: 0;
    transition: color 0.2s ease;
}

.carousel-btn:hover {
    background: transparent;
    color: #FF5A79;
}

.ba-item {
    display: flex;
    flex-direction: column;
    font-family: sans-serif;
}

.ba-images {
    display: flex;
    width: 100%;
    aspect-ratio: 8/3;
}

.ba-img-before,
.ba-img-after {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-color: #e2e2e2;
}

.ba-img-before img,
.ba-img-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ba-img-after {
    border-left: 2px solid #fff;
    background-color: #f1f1f1;
}

.ba-labels {
    display: flex;
    width: 100%;
}

.ba-lbl-before,
.ba-lbl-after {
    font-family: 'GmarketSans', serif;
    flex: 1;
    text-align: center;
    padding: 5px 0 2px;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 400;
}

.ba-lbl-before {
    background-color: #6d727b;
}

.ba-lbl-after {
    background-color: #fc5b80;
}

.ba-details {
    margin-top: 15px;
    font-size: 0.95rem;
    color: #111;
    text-align: left;
    line-height: 1.6;
}

.ba-details .red-txt {
    color: #e02f55;
    font-weight: 600;
}

@media (max-width: 900px) {
    .ba-section {
        flex-direction: column;
    }

}

/* Section 7: YouTube (Redesign) */
.youtube-section {
    background-color: #fff;
    padding: 100px 0;
    text-align: center;
}

.youtube-section .container {
    max-width: 1400px;
}

.yt-header {
    margin-bottom: 50px;
}

.yt-eyebrow {
    font-size: 0.9rem;
    color: #D4AF37;
    /* Gold/Mustard tone based on reference */
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 15px;
}

.yt-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.yt-desc {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
}

.youtube-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.yt-card {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.yt-card:hover {
    transform: translateY(-5px);
}

.yt-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #eee;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #888;
    font-weight: bold;
    font-size: 1.2rem;
}

.yt-caption {
    font-size: 1.15rem;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
    padding: 0 10px;
}

@media (max-width: 900px) {
    .youtube-grid {
        grid-template-columns: 1fr;
    }
}

/* Specific scaling for YouTube Carousel Buttons */
.youtube-section .carousel-btn {
    width: 80px;
    height: 80px;
    font-size: 4.5rem;
    margin-top: calc(12% - 40px);
}

/* Section 8: Thesis Layout (Redesign) */
.thesis-container {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 15px;
}

.thesis-image {
    flex: 0 0 30%;
    /* Approx 1/3 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.paper-stack {
    position: relative;
    width: 60px;
    height: 80px;
}

.paper {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.paper.p1 {
    top: 0;
    left: 0;
    z-index: 3;
}

.paper.p2 {
    top: 2px;
    left: 3px;
    z-index: 2;
    transform: rotate(3deg);
}

.paper.p3 {
    top: 4px;
    left: 6px;
    z-index: 1;
    transform: rotate(6deg);
}

.thesis-text {
    flex: 0 0 70%;
    /* Approx 2/3 */
}

.thesis-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.thesis-text li {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 12px;
    line-height: 1.5;
    position: relative;
    padding-left: 10px;
}

.thesis-text li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ccc;
}

@media (max-width: 900px) {
    .thesis-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .thesis-image {
        display: none;
        /* Hide illustrative image on small screens if needed, or keep it */
    }
}

/* Quick Menu (Fixed Sidebar) */
#quick-menu {
    position: fixed;
    right: 20px;
    top: 43%;
    transform: translateY(-50%);
    z-index: 1000;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 80px;
}

.qm-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 0.8rem;
    font-weight: 600;
    transition: transform 0.2s;
}

.qm-item:hover {
    transform: translateY(-3px);
}

.qm-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.qm-icon img {
    width: 50%;
    height: 50%;
    object-fit: contain;
}

.qm-text {
    font-family: sans-serif;
    line-height: 1.2;
    text-align: center;
}

/* Icon Colors */
.nav-book {
    background-color: #03C75A;
    font-size: 0.7rem;
}

/* Naver Green (Reservation) */
.nav-kakao {
    background-color: #FEE500;
    color: #3C1E1E;
}

/* Kakao Yellow */
.nav-naver {
    background-color: #03C75A;
}

.nav-naver img {
    width: 40%;
    height: 40%;
}

/* Naver Green (Talk) */
.nav-blog {
    background-color: #70f13d;
    font-size: 0.7rem;

}

.nav-blog img {
    width: 80%;
    height: 80%;
}

/* Blog Green */
.nav-instagram {
    background-color: #ec4297;
}

/* Instagram Pink */
.nav-youtube {
    background-color: #FF0000;
    font-size: 0.8rem;
}

/* YouTube Red */
.nav-top {
    background-color: #EFECE5;
    color: #555;
    font-size: 1rem;
}

/* Top Button (Beige) */

@media (max-width: 900px) {
    #quick-menu {
        display: none;
        /* Hide on small screens or change to bottom bar if requested */
    }
}

/* Profile Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    /* Controlled by JS */
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 0;
    /* Sharp corners as in image */
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    padding: 60px 50px;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 35px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    padding: 0;
}

.modal-close::before,
.modal-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #333;
}

.modal-close::before {
    transform: rotate(45deg);
}

.modal-close::after {
    transform: rotate(-45deg);
}

.modal-close:hover {
    opacity: 0.5;
}

.modal-body {
    display: flex;
    gap: 50px;
}

.modal-left {
    flex: 0 0 350px;
}

.director-profile-photo img {
    width: 100%;
    height: auto;
    display: block;
    background-color: #f5f5f5;
}

.modal-right {
    flex: 1;
}

.profile-header {
    margin-bottom: 35px;
}

.profile-name {
    font-size: 2.8rem;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.profile-pos {
    font-size: 1.3rem;
    color: #7e7e7e;
    font-family: 'Pretendard', sans-serif;
    font-weight: 400;
}

.profile-eng {
    font-size: 1.8rem;
    color: #333;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
}

.profile-brand {
    display: inline-block;
    background-color: #6EC5E9;
    /* Sky Blue Matching Site */
    color: #fff;
    padding: 3px 24px;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin-top: 4px;
}

.profile-section {
    display: flex;
    margin-bottom: 30px;
    font-family: 'Pretendard', sans-serif;
}

.section-label {
    flex: 0 0 80px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
}

.section-content {
    flex: 1;
}

.profile-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-list li {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 6px;
    line-height: 1.5;
}

.profile-list .exp-item {
    color: #777;
    padding-left: 10px;
}

.sub-list {
    margin-top: 20px;
}

/* Scrollbar Style for Modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

@media (max-width: 900px) {
    .modal-content {
        padding: 40px 20px;
    }

    .modal-body {
        flex-direction: column;
        gap: 30px;
    }

    .modal-left {
        flex: auto;
        max-width: 300px;
        margin: 0 auto;
    }

    .profile-name {
        font-size: 2rem;
        flex-direction: column;
        gap: 5px;
    }
}

/* Comprehensive Mobile Responsive Adjustments */
@media (max-width: 900px) {

    /* Header & Nav */
    header .container {
        flex-direction: column;
        gap: 15px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        width: 100%;
        margin-top: 10px;
    }

    nav a {
        margin-left: 0;
        font-size: 0.95rem;
    }

    /* Section 1: Hero */
    .hero-section {
        flex-direction: column-reverse;
        /* Already column-reverse but keeping here */
        height: auto;
        min-height: auto;
        padding: 0;
        /* Override old padding to remove gap above photo */
        background-position: center top;
    }

    .hero-main-msg {
        font-size: 1.4rem;
        word-break: keep-all;
    }

    .hero-sub-msg {
        font-size: 0.95rem;
        word-break: keep-all;
    }

    .hero-section::before {
        background: rgba(255, 255, 255, 0.85);
        width: 100%;
        height: 100%;
    }

    .hero-container {
        padding: 50px 20px;
        /* Equalized top and bottom spacing */
        flex-direction: column;
    }

    .hero-left-text {
        text-align: center;
        margin-left: 0;
        padding-left: 0;
        margin-bottom: 0;
        /* Remove old margin to balance spacing */
        max-width: 100%;
    }

    .hero-right-img {
        position: relative;
        width: 100%;
        height: 400px;
        max-width: 100%;
    }

    .hero-doctor-img {
        margin-bottom: 0;
        margin-left: 0;
        object-position: center 30%;
    }

    /* Section 2: Key Treatment Subjects */
    .subjects-container {
        flex-direction: column;
    }

    .subjects-left,
    .subjects-right {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 40px 20px;
    }

    .subjects-title {
        font-size: 1.6rem;
    }

    .tags-group {
        justify-content: center;
        gap: 12px 8px;
        /* 줄간격(상하)은 12px, 좌우간격은 8px로 조절하여 밸런스 맞춤 */
    }

    .tag-resp,
    .tag-skin,
    .tag-other {
        flex: 0 0 calc(33.333% - 6px);
        max-width: calc(33.333% - 6px);
        padding: 8px;
        font-size: 0.82rem;
        letter-spacing: -0.5px;
        min-width: 0;
        word-break: keep-all;
        text-align: center;
    }

    /* Section 3: Principles */
    .principles-section {
        padding: 60px 20px;
    }

    .principles-section .solution-intro h3 {
        font-size: 1.5rem;
    }

    /* Section 4: Greeting */
    .greeting-section {
        min-height: auto;
        flex-direction: column-reverse;
    }

    .greeting-left {
        padding: 40px 20px;
    }

    .greeting-quote {
        font-size: 1.1rem;
    }

    .director-name {
        font-size: 1.6rem;
        justify-content: center;
    }

    /* Section 5: Keypoints */
    .keypoints-section {
        padding: 80px 20px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    /* Section 6: Before/After */
    .ba-section {
        flex-direction: column;
    }

    .ba-title {
        font-size: 1.6rem;
    }

    .ba-left,
    .ba-right {
        flex: 0 0 100%;
        padding: 40px 20px;
    }

    .ba-list {
        width: 100%;
    }

    .ba-carousel {
        max-width: 100%;
        margin: 0;
    }

    /* Before/After Image and Label Reordering Trick */
    .ba-item {
        display: flex;
        flex-direction: column;
    }

    .ba-images,
    .ba-labels {
        display: contents;
        /* Strip out container wrapper in CSS flow */
    }

    .ba-img-before,
    .ba-img-after {
        border-left: none;
        border-bottom: 2px solid #fff;
    }

    .ba-img-before {
        order: 1;
        aspect-ratio: 4/3;
    }

    .ba-lbl-before {
        order: 2;
        width: 100%;
        padding: 10px 0;
        margin-bottom: 20px;
    }

    .ba-img-after {
        order: 3;
        aspect-ratio: 4/3;
    }

    .ba-lbl-after {
        order: 4;
        width: 100%;
        padding: 10px 0;
    }

    .ba-details {
        order: 5;
        margin-top: 15px;
    }

    .carousel-btn {
        margin-top: 35%;
        width: 40px;
        font-size: 2.5rem;
    }

    /* Section 7: YouTube */
    .youtube-section {
        padding: 60px 20px;
    }

    .yt-title {
        font-size: 1.6rem;
    }

    /* Section 8: Columns */
    .columns-section {
        padding: 60px 20px;
    }

    .col-list {
        padding: 20px 10px;
    }

    /* Quick Menu */
    #quick-menu {
        display: none;
    }
}