/* CSS Variables & Reset */
:root {
    --primary-color: #0047AB;
    /* Deep Blue mostly used in medical */
    --secondary-color: #002E6E;
    /* Darker Navy */
    --accent-color: #4facfe;
    /* Lighter Blue for gradients/accents */
    --text-color: #333333;
    --light-text: #666666;
    --bg-light: #f8f9fa;
    --bg-blue-soft: #f4f8ff;
    --bg-gray-soft: #f9f9f9;
    --border-color: rgba(0, 71, 171, 0.08);
    --white: #ffffff;
    --max-width: 1300px;
    /* Increased width for better nav fit */
    --header-height: 80px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.mobile-break {
    display: none;
}

@media (max-width: 768px) {
    .mobile-break {
        display: inline;
    }
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    padding-top: var(--header-height);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-blue-soft {
    background-color: var(--bg-blue-soft);
}

.bg-gray-soft {
    background-color: var(--bg-gray-soft);
}

/* Specific sections no border */
.hero,
.quick-info,
.section-padding:first-of-type {
    border-top: none;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--light-text);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Header */
.main-header {
    background: var(--white);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
}

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

.logo img {
    height: 50px;
    display: block;
}

.main-nav ul {
    display: flex;
    gap: 25px;
    /* Increased gap */
}

.main-nav a {
    font-weight: 600;
    /* Made bolder */
    font-size: 1.15rem;
    /* Increased font size */
    padding: 10px 0;
    position: relative;
    display: block;
    /* Ensure full click area */
}

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

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown a i {
    font-size: 0.8rem;
    margin-left: 5px;
}

.dropdown-content {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--white);
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 10px 0;
    z-index: 1000;
    flex-direction: column !important;
    gap: 0 !important;
    border: 1px solid #eee;
}

/* Add a pseudo-element to bridge the gap between trigger and menu */
.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
}

.dropdown:hover .dropdown-content,
.dropdown.open .dropdown-content {
    display: flex !important;
}

.dropdown-content li {
    width: 100%;
}

.dropdown-content a {
    padding: 10px 20px;
    font-size: 1rem;
    color: var(--text-color);
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 750px;
    /* Increased height */
    /* Default desktop height */
    min-height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4)), url('../images/hero_new.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    padding: 0 20px;
}

.hero-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 60px 40px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 900px;
    width: 100%;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 45px;
    opacity: 0.95;
    font-weight: 500;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--secondary-color);
}

/* Quick Info */
.quick-info {
    background: var(--white);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.quick-info .container {
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    display: flex;
    justify-content: space-around;
    padding: 40px 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tel-link,
.location-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.tel-link:hover,
.location-link:hover {
    transform: translateY(-3px);
}

.tel-link:hover i {
    color: var(--primary-color);
}

.footer-tel {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.footer-tel:hover {
    color: var(--white);
    text-decoration: underline;
}

.info-item i {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.info-item h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.info-item p {
    font-size: 1.1rem;
    color: var(--light-text);
    line-height: 1.8;
}

.hours-info p strong {
    color: var(--secondary-color);
}

.hours-info .closed {
    color: #e74c3c;
    /* Red text for closed days */
    font-weight: 500;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-list {
    margin-top: 30px;
}

.feature-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.feature-list i {
    color: var(--primary-color);
}

.about-image {
    flex: 1;
}

.img-placeholder {
    width: 100%;
    height: 350px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #888;
    border-radius: 10px;
}

/* Doctor Section Refinement */
#doctors {
    background: linear-gradient(to bottom, #ffffff, #f0f4f8);
}

.doctor-profile {
    display: flex;
    gap: 80px;
    align-items: center;
    background: var(--white);
    padding: 60px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.doctor-profile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--primary-color);
}

.doctor-image {
    flex: 1;
    max-width: 450px;
    position: relative;
    padding: 20px;
    /* Added padding for decorative elements */
}

/* Studio Backdrop Effect */
.doctor-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.doctor-image::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 100px;
    height: 100px;
    border-right: 4px solid rgba(0, 102, 204, 0.1);
    border-bottom: 4px solid rgba(0, 102, 204, 0.1);
    border-radius: 0 0 20px 0;
    z-index: 0;
}

.doctor-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    position: relative;
    z-index: 1;
    /* Elevated shadow to feel like it's in a studio */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.doctor-profile:hover .doctor-image img {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 102, 204, 0.12);
}

.doctor-info {
    flex: 1.5;
}

.doctor-name {
    margin-bottom: 40px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.doctor-name h3 {
    font-size: 2.8rem;
    color: #333;
    font-weight: 700;
    letter-spacing: -1px;
}

.doctor-name h3 span {
    color: var(--primary-color);
    margin-right: 10px;
}

.doctor-name .specialty {
    display: inline-block;
    background: #eef2f7;
    color: var(--primary-color);
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 10px;
}

.doctor-quote {
    font-size: 1.25rem;
    color: #666;
    font-style: italic;
    margin-top: 20px;
    font-family: serif;
    position: relative;
    padding-left: 20px;
    white-space: nowrap;
}

.doctor-quote::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 2rem;
    color: rgba(0, 102, 204, 0.1);
}

.doctor-history {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.doctor-history li {
    font-size: 1.05rem;
    color: #555;
    padding-left: 25px;
    position: relative;
    line-height: 1.6;
}

.doctor-history li::before {
    content: '\f058';
    /* fa-check-circle */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.9rem;
    top: 2px;
}

@media (max-width: 1200px) {
    .doctor-profile {
        gap: 40px;
        padding: 40px;
    }
}

@media (max-width: 992px) {
    .doctor-profile {
        flex-direction: column;
        padding: 40px 30px;
        text-align: center;
    }

    .doctor-history {
        text-align: left;
    }

    .doctor-image {
        max-width: 100%;
        margin-bottom: 30px;
    }

    .doctor-name h3 {
        font-size: 2.2rem;
    }

    .doctor-quote {
        white-space: normal;
        /* Allow text wrapping on mobile */
        word-break: keep-all;
        /* Keep words together for Korean */
    }
}

/* Adjust dropdown icons */
.main-nav .dropdown a i {
    font-size: 0.8rem;
    margin-left: 5px;
    transition: transform 0.3s;
}

.main-nav .dropdown:hover a i {
    transform: rotate(180deg);
}

.about-image img,
.detail-image img {
    width: 100%;
    height: 350px;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    background: #f0f0f0;
    /* Light fallback background */
}

.card-img-box img.img-center {
    object-position: left center;
    transform: scale(1.4) translateX(12%);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    border: 1px solid #eee;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.icon-box {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--primary-color);
    font-size: 2rem;
    transition: all 0.3s;
}

.service-card:hover .icon-box {
    background: var(--primary-color);
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--light-text);
    font-size: 0.95rem;
}

/* Location */
.location-wrapper {
    display: flex;
    gap: 40px;
}

.map-container {
    flex: 1.5;
    /* Increased flex ratio for wider map */
    min-height: 400px;
    background: #ffffff;
    /* Changed from #ddd to white to match map image */
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.map-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Keeps 'contain' to avoid cropping map info, but white background makes it seamless */
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #666;
}

.map-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.location-info {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-group {
    background: var(--white);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.info-group h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-group p {
    font-size: 1.1rem;
}

/* Detailed Services Sections */
.detail-service {
    display: flex;
    align-items: center;
    gap: 60px;
}

.detail-service.reverse {
    flex-direction: row-reverse;
}

.detail-text {
    flex: 1;
}

.detail-image {
    flex: 1;
}

.sub-title {
    display: block;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.detail-text h2 {
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.detail-text p {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 30px;
    line-height: 1.8;
}

.detail-list {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.detail-list li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 20px;
    font-size: 1.05rem;
}

.detail-list li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1.5;
}

.detail-list strong {
    color: var(--text-color);
    font-weight: 600;
    margin-right: 5px;
}

/* Responsive for Details */
@media (max-width: 768px) {

    /* Fix layout stacking */
    .detail-service,
    .detail-service.reverse,
    .about-content,
    .location-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    /* Prevent image cutting on mobile */
    .about-image img,
    .detail-image img {
        height: auto;
        /* Remove fixed height */
        max-height: none;
        object-fit: contain;
        /* Show full image content */
        margin-top: 20px;
    }

    .detail-text h2 {
        font-size: 1.8rem;
    }

    /* Hero adjustments */
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 20px 60px;
    }

    .hero-content {
        padding: 40px 20px;
        margin-top: 40px;
    }

    .hero-content h2 {
        font-size: 2rem;
    }
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #aaa;
    text-align: center;
}

.footer-top {
    background: #ffffff;
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.footer-bottom {
    padding: 50px 0;
}

.footer-logo img {
    height: 60px;
}

.footer-content p {
    margin-bottom: 10px;
}

.copyright {
    font-size: 0.9rem;
    margin-top: 30px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

/* Detailed Treatment Gallery Section */
.treatment-gallery {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.gallery-category {
    width: 100%;
}

.gallery-cat-title {
    font-size: 1.6rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-blue-soft);
}

.gallery-cat-title i {
    color: var(--primary-color);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.treatment-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    transition: all 0.3s ease;
    text-align: center;
}

.treatment-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 71, 171, 0.12);
    border-color: var(--primary-color);
}

.card-img-box {
    width: 100%;
    aspect-ratio: 1 / 0.8;
    overflow: hidden;
    background: #fff;
    position: relative;
    cursor: pointer;
}

.card-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.treatment-card:hover .card-img-box img {
    transform: scale(1.1);
}

.card-overlay {
    display: none;
    /* Hide old overlay structure, will use as JS data source */
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    /* Sophisticated glass effect */
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 850px;
    /* Organic, asymmetrical rounded shape */
    border-radius: 40px 100px 40px 100px;
    position: relative;
    z-index: 1;
    overflow: visible;
    /* Allow image to float out */
    box-shadow:
        0 40px 100px rgba(0, 71, 171, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(0, 71, 171, 0.1);
    transform: scale(0) rotate(-5deg);
    /* Start with a slight tilt */
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease;
    /* Bouncy organic entry */
}

.modal.active .modal-content {
    transform: scale(1) rotate(0deg);
    opacity: 1;
}

/* Floating Circular Image Section */
.modal-image-box {
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 12px solid var(--white);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    z-index: 5;
    background: #fff;
    transition: all 0.8s ease 0.2s;
    opacity: 0;
}

.modal.active .modal-image-box {
    left: -40px;
    opacity: 1;
}

.modal-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.modal-text-box {
    margin-left: 280px;
    /* Offset for floating image */
    padding: 80px 60px 80px 40px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Creative details */
.modal-title-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 25px;
}

#modal-title {
    font-size: 2.8rem;
    color: var(--secondary-color);
    letter-spacing: -1.5px;
    z-index: 2;
    position: relative;
}

.modal-title-wrapper::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: -10px;
    width: 40%;
    height: 15px;
    background: rgba(0, 71, 171, 0.1);
    z-index: 1;
    border-radius: 20px;
}

#modal-desc {
    font-size: 1.25rem;
    line-height: 1.9;
    color: #444;
    word-break: keep-all;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s ease 0.4s;
}

.modal.active #modal-desc {
    transform: translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #333;
    z-index: 10;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(180deg);
}

/* Mobile Adjustments for Creative Design */
@media (max-width: 992px) {
    .modal-content {
        max-width: 450px;
        border-radius: 30px;
        margin-top: 50px;
    }

    .modal-image-box {
        position: relative;
        left: 50%;
        top: -100px;
        /* Float out of top instead of side */
        transform: translateX(-50%);
        width: 200px;
        height: 200px;
        margin-bottom: -80px;
        border-width: 8px;
    }

    .modal.active .modal-image-box {
        left: 50%;
        top: -80px;
    }

    .modal-text-box {
        margin-left: 0;
        padding: 40px 30px 50px;
        text-align: center;
        min-height: auto;
    }

    #modal-title {
        font-size: 1.8rem;
    }

    .modal-title-wrapper::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

.modal-btn {
    align-self: flex-start;
    padding: 15px 35px;
}

@media (max-width: 992px) {
    .modal-body {
        flex-direction: column;
    }

    .modal-image-box {
        min-height: 300px;
    }

    .modal-text-box {
        padding: 40px 30px;
    }

    .modal-text-box h3 {
        font-size: 1.8rem;
    }
}

/* On desktop, show briefly on hover or keep it click-only as requested? 
   User said "click", so we'll stick to clicking for both desktop and mobile as requested to see description. */

.card-label {
    padding: 15px 10px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--secondary-color);
    background: var(--white);
    border-top: 1px solid #f5f5f5;
}

.treatment-card:hover .card-label {
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .card-label {
        font-size: 0.95rem;
        padding: 10px 5px;
    }
}

/* Treatment Conditions Section */
.conditions-image-container {
    width: 100%;
    margin: 0 auto;
    border-radius: 15px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

.conditions-full-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    /* CREATIVE MOBILE THEME: Floating Islands */

    /* 1. Global creative background */
    body {
        background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
        /* Example: Cloudy Knoxville */
        background: linear-gradient(to bottom, #dbe6f6, #f4f8ff);
        /* Fresh Medical Blue Gradient */
        /* Restore text color for readability on white cards */
        color: #333;
    }

    /* 2. Turn Sections into Floating Cards (Exclude Hero) */
    section:not(.hero) {
        background: #ffffff;
        margin: 20px 5px;
        /* Reduced side margin for wider text area */
        border-radius: 20px;
        /* Slightly smaller radius */
        box-shadow: 0 5px 20px rgba(0, 71, 171, 0.1);
        overflow: hidden;
    }

    /* Override padding for card-like feel */
    .section-padding {
        padding: 40px 15px;
        /* Reduced side padding */
        border: none;
    }

    /* 3. Hero Section - Restore to Full Width / Desktop-like */
    .hero {
        margin: 0;
        border-radius: 0;
        /* No heavy curves */
        width: 100%;
        /* Keep mobile optimization for height/bg but remove 'floating' constraints */
        background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)), url('../images/hero_new.jpg') no-repeat center top/cover;
    }

    .hero-content {
        /* Restore glass effect or simple look from desktop responsive */
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(5px);
        padding: 40px 20px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        max-width: 100%;
        box-shadow: none;
    }

    .hero-content h2 {
        font-size: 2.5rem;
        /* Restore larger size */
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    /* 4. Quick Info (Floating overlap) */
    .quick-info {
        margin-top: -60px;
        /* Pull up over hero */
        background: transparent;
        /* Clear section bg */
        box-shadow: none;
        padding: 0 15px;
        /* Align with other floaters */
    }

    .quick-info .container {
        background: #ffffff;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
        border-radius: 25px;
    }

    /* 5. Typography Tweaks */
    .section-title h2 {
        font-size: 1.8rem;
        color: var(--primary-color);
        position: relative;
        display: inline-block;
    }

    /* Creative Underline for Titles */
    .section-title h2::after {
        content: '';
        display: block;
        width: 100%;
        height: 6px;
        background: rgba(0, 71, 171, 0.1);
        position: absolute;
        bottom: 5px;
        z-index: -1;
    }

    /* 6. Card Resets (Since they are inside a card now) */
    .service-card,
    .treatment-card,
    .doctor-profile {
        box-shadow: none;
        /* Remove double shadow */
        border: 1px solid #f0f0f0;
        /* Light border instead */
        background: #fafafa;
        /* Slight distinctive bg */
        border-radius: 20px;
    }

    .doctor-profile {
        padding: 30px 20px;
    }

    /* Fix layout stacking */
    .detail-service,
    .detail-service.reverse,
    .about-content,
    .location-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .mobile-menu-toggle {
        display: block;
        color: var(--primary-color);
    }


    .main-nav {
        display: none;
        position: absolute;
        /* Fix visibility */
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 0;
        z-index: 1100;
        border-radius: 0 0 20px 20px;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        /* Full width items */
        gap: 0;
        padding: 10px 0;
    }

    .main-nav li {
        width: 100%;
        text-align: center;
        margin: 0;
    }

    .main-nav a {
        padding: 15px 20px;
        border-bottom: 1px solid #f5f5f5;
        font-size: 1.1rem;
        display: block;
    }

    /* Remove blue line from doctor profile on mobile */
    .doctor-profile::before {
        display: none !important;
    }

    .doctor-history,
    .doctor-profile {
        border-left: none !important;
        border-right: none !important;
    }

    /* Maximize width for doctor text */
    .doctor-profile {
        padding: 30px 10px !important;
        /* Minimized side padding */
        width: 100%;
        box-sizing: border-box;
    }

    .doctor-name h3 {
        font-size: 1.8rem;
        /* Slightly adjust to fit if needed */
        word-break: keep-all;
    }

    /* Mobile Dropdown */
    .dropdown-content {
        position: static;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        display: none;
        /* Hidden by default, toggled via JS or just simple hover if tapped */
        padding: 0;
    }

    .dropdown:hover .dropdown-content {
        display: flex;
        /* Show on tap/hover in mobile */
    }

    .dropdown-content a {
        padding-left: 0;
        font-size: 0.95rem;
        color: #666;
    }

    .quick-info .container {
        flex-direction: column;
        gap: 30px;
    }

    .about-content,
    .location-wrapper {
        flex-direction: column;
    }

    .hero-content h2 {
        font-size: 2rem;
        word-break: keep-all;
        /* Prevent awkward breaks in Korean */
    }

    .section-title h2 {
        font-size: 2rem;
    }

    /* Ensure modals work well on mobile */
    .modal-content {
        width: 90%;
        margin: 20px auto;
        border-radius: 20px;
    }
}

/* Floating Menu */
.floating-menu {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.floating-btn i {
    transition: transform 0.3s ease;
}

.floating-btn span {
    position: absolute;
    right: 75px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.floating-btn span::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 5px solid rgba(0, 0, 0, 0.8);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.floating-btn:hover {
    transform: scale(1.1);
}

.floating-btn:hover i {
    transform: scale(1.1);
}

.floating-btn:hover span {
    opacity: 1;
    visibility: visible;
    right: 70px;
}

/* Button Colors */
.floating-btn.blog {
    background-color: #03c75a;
    /* Naver Green */
}

.floating-btn.reservation {
    background-color: var(--primary-color);
}

.floating-btn.map {
    background-color: #607d8b;
    /* Blue Grey for map */
}

.floating-btn.contact {
    background-color: #ffcc00;
    /* Yellow for attention */
    color: #333;
}

.floating-btn.blog:hover {
    background-color: #02b350;
}

.floating-btn.reservation:hover {
    background-color: var(--secondary-color);
}

.floating-btn.map:hover {
    background-color: #455a64;
}

.floating-btn.contact:hover {
    background-color: #ffb300;
}

/* Mobile adjustment for Shockwave image to hide watermark */
@media (max-width: 768px) {
    #img-shockwave {
        height: auto;
        /* Restore auto height for natural aspect ratio */
        object-fit: contain;
        /* Restore contain to show full width */
        clip-path: inset(0 0 15% 0);
        /* Slice off bottom 15% (watermark area) */
        margin-bottom: -15%;
        /* Recover the whitespace left by clip */
    }
}

@media (max-width: 768px) {
    .floating-menu {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }

    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .floating-btn span {
        display: none;
        /* Hide labels on mobile to save space */
    }
}

/* Non-covered items section enhancement */
#non-covered-items {
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.section-subtitle-description {
    color: var(--light-text);
    font-size: 1.1rem;
    margin-top: 10px;
    font-weight: 400;
}

.a4-image-container {
    max-width: 1000px;
    /* Slightly more focused width */
    margin: 40px auto 0;
    background: var(--white);
    padding: 30px;
    box-shadow: 0 30px 60px rgba(0, 71, 171, 0.08);
    /* Softer, medical blue-tinted shadow */
    border-radius: 20px;
    border: 1px solid rgba(0, 71, 171, 0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.a4-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 20px 200px 0 0;
    /* Sophisticated accent line */
}

.a4-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 40px 80px rgba(0, 71, 171, 0.12);
}

.a4-image-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    border: 1px solid #f0f4f8;
    image-rendering: -webkit-optimize-contrast;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .a4-image-container {
        padding: 15px;
        margin-top: 20px;
        border-radius: 12px;
    }
}