/* Custom CSS for Nampo Himchan Clinic */

/* Site Brand Color */
:root {
    --brand-primary: #00b3e6; /* 사이트 포인트 색상 */
}

.text-brand {
    color: #00b3e6;
}

.bg-brand {
    background-color: #00b3e6;
}

.border-brand {
    border-color: #00b3e6;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero slider styles */
.hero-slider .slide {
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-slider .slide.active {
    opacity: 1;
}


.text-black h1{
    font-size: 2.3rem;
    font-weight: 600;
}

.text-black p{
    font-size: 1.5rem;
    font-weight: 400;
}

.text-black img{
    margin: 10px 0;
}

.text-white h1{
    font-size: 2.3rem;
    font-weight: 600;
}

.text-white p{
    font-size: 1.5rem;
    font-weight: 400;
}

.text-white img{
    margin: 10px 0;
}




/* Optimize for 1920x800 hero images - maintain aspect ratio across devices */
.hero-slider .slide {
    /* Ensure images maintain aspect ratio while covering the container */
    background-size: cover;
    background-position: center center;
}

/* For wide screens, maintain aspect ratio */
@media (min-width: 1200px) {
    .hero-slider .slide {
        background-size: cover !important;
        background-repeat: no-repeat !important;
        background-position: center center !important;
    }
}

/* For very wide screens, use original image size */
@media (min-width: 1920px) {
    .hero-slider .slide {
        background-size: 1920px 800px;
        background-position: center top;
    }
}

/* Hero section responsive heights to maintain 1920:800 aspect ratio */
/* Mobile: 320px width = 133px height (320/1920*800) */
/* Tablet: 768px width = 320px height (768/1920*800) */
/* Desktop: 1440px width = 600px height (1440/1920*800) */
/* Large: 1920px width = 800px height (original) */

@media (max-width: 640px) {
    #hero {
        height: 333px; /* Optimized for mobile viewing */
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    #hero {
        height: 400px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #hero {
        height: 533px;
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    #hero {
        height: 667px;
    }
}

@media (min-width: 1441px) {
    #hero {
        height: 800px;
    }
}

/* Background placeholder colors */
.slide:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.slide:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.slide:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Slider dot active state */
.slider-dot.active {
    opacity: 1 !important;
    background-color: #2563eb;
}

/* Animation utilities */
.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade in animation */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

/* Tab menu styles */
.tab-menu {
    /* Removed border-bottom */
}

.tab-button {
    position: relative;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.tab-button:hover {
    opacity: 0.8;
}

.tab-button.active {
    background-color: #00b3e6 !important;
    color: white !important;
}

.tab-button:not(.active) {
    background-color: #DBE9EC !important;
    color: #4b5563 !important;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.tab-content.active {
    display: block;
    text-align: center;
}

.space-y-3{
    position: relative;
    left: 43%;
}
/* Circular image containers */
.circle-image {
    width: 426px;
    height: 426px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #2563eb;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-pattern p{
    font-size: 1.0rem;
    
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hero-slider h1 {
        font-size: 2.5rem;
    }
    
    .hero-slider p {
        font-size: 1rem;
    }
    
    .circle-image {
        width: 320px;
        height: 320px;
    }
}

/* Intersection Observer animation classes */
.observe-element {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.observe-element.in-view {
    opacity: 1;
    transform: translateY(0);
}

.observe-element.slide-left {
    transform: translateX(-50px);
}

.observe-element.slide-left.in-view {
    transform: translateX(0);
}

.observe-element.slide-right {
    transform: translateX(50px);
}

.observe-element.slide-right.in-view {
    transform: translateX(0);
}

/* Section background patterns */
.section-pattern {
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(255,255,255,0.2) 2px, transparent 0),
        radial-gradient(circle at 75px 75px, rgba(255,255,255,0.1) 1px, transparent 0);
    background-size: 100px 100px;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Loading placeholder for images */
.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Map container */
.map-container {
    height: 100%;
    min-height: 500px;
    width: 100%;
    max-width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 카카오 지도 강제 크기 제한 */
.map-container .root_daum_roughmap,
.map-container #daumRoughmapContainer1755002732192 {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 카카오 지도 하단 주소 정보 박스 숨기기 및 지도 확대 */
.root_daum_roughmap .wrap_controllers,
.root_daum_roughmap .wrap_button,
.root_daum_roughmap .roughmap_maker_label,
.root_daum_roughmap > div:last-child,
.root_daum_roughmap .roughmap_lebel_text,
.root_daum_roughmap .roughmap_lebel_wrap {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* 지도 영역을 전체 컨테이너에 맞춤 */
.root_daum_roughmap > div:first-child {
    height: 100% !important;
}

.root_daum_roughmap iframe,
.root_daum_roughmap > div > iframe {
    height: 100% !important;
}

/* Footer styles */
.footer-pattern {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    position: relative;
}

.footer-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

/* Treatment images for different aspect ratios */

/* Single treatment image 690:398 aspect ratio */
.treatment-image {
    width: 100%;
    height: auto;
    aspect-ratio: 690/398;
}

/* Tab content image shadows - left and bottom */
.tab-content .treatment-item > div:first-child {
    box-shadow: -8px 8px 16px rgba(0, 0, 0, 0.15);
}

/* Treatment grid images - fixed height with automatic proportional widths */
.treatment-grid-square,
.treatment-grid-wide {
    height: 200px; /* 고정 높이 */
    box-shadow: -8px 8px 16px rgba(0, 0, 0, 0.15); /* 왼쪽과 아래쪽 그림자 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0; /* Prevent shrinking in flex container */
}

/* Square images (276x276 -> 1:1 ratio) */
.treatment-grid-square {
    width: 200px; /* 200px 높이에 맞는 정사각형 */
    aspect-ratio: 1/1;
}

/* Wide images (552x276 -> 2:1 ratio) */
.treatment-grid-wide {
    width: 400px; /* 200px 높이에 맞는 2:1 비율 */
    aspect-ratio: 2/1;
}

/* Single treatment image (690x398 -> 1.73:1 ratio) - larger size */
.treatment-image {
    height: 300px; /* 고정 높이 확대 */
    width: 520px; /* 300px 높이에 맞는 비율 (300 * 690/398) */
    margin: 0 auto 16px auto; /* 하단 여백 추가 */
    aspect-ratio: 690/398;
}

/* Ensure images fill container while maintaining aspect ratio */
.treatment-grid-square img,
.treatment-grid-wide img,
.treatment-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Treatment item container with image and title */
.treatment-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.treatment-item .treatment-grid-square,
.treatment-item .treatment-grid-wide {
    margin-bottom: 12px; /* 이미지와 제목 사이 간격 */
}

/* Responsive sizing - maintain proportions */
@media (max-width: 1200px) {
    .treatment-grid-square,
    .treatment-grid-wide {
        height: 160px;
    }
    
    .treatment-grid-square {
        width: 160px; /* 정사각형 유지 */
    }
    
    .treatment-grid-wide {
        width: 320px; /* 2:1 비율 유지 */
    }
    
    .treatment-image {
        height: 240px;
        width: 416px; /* 비율 유지 */
    }
}

@media (max-width: 768px) {
    .treatment-grid-square,
    .treatment-grid-wide {
        height: 120px;
    }
    
    .treatment-grid-square {
        width: 120px; /* 정사방형 유지 */
    }
    
    .treatment-grid-wide {
        width: 240px; /* 2:1 비율 유지 */
    }
    
    .treatment-image {
        height: 180px;
        width: 312px; /* 비율 유지 */
    }
}

@media (max-width: 640px) {
    .treatment-grid-square,
    .treatment-grid-wide {
        height: 100px;
    }
    
    .treatment-grid-square {
        width: 100px; /* 정사각형 유지 */
    }
    
    .treatment-grid-wide {
        width: 200px; /* 2:1 비율 유지 */
    }
    
    .treatment-image {
        height: 140px;
        width: 243px; /* 비율 유지 */
    }
}

/* Single treatment image shadow effect */
.treatment-image {
    box-shadow: -8px 8px 16px rgba(0, 0, 0, 0.15); /* 왼쪽과 아래쪽 그림자 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effects for treatment images */
.treatment-grid-square:hover,
.treatment-grid-wide:hover,
.treatment-image:hover {
    transform: translateY(-4px);
    box-shadow: -10px 12px 20px rgba(0, 0, 0, 0.2);
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 690/398) {
    .treatment-image {
        height: 230px; /* 400px width = 230px height for 690:398 ratio */
    }
    
    @media (min-width: 768px) {
        .treatment-image {
            height: 316px; /* 548px width = 316px height for 690:398 ratio */
        }
    }
}

/* Immunotherapy section responsive heights for 1920:1230 aspect ratio */
/* Mobile: 320px width = 205px height (320/1920*1230) */
/* Tablet: 768px width = 492px height (768/1920*1230) */
/* Desktop: 1440px width = 922px height (1440/1920*1230) */
/* Large: 1920px width = 1230px height (original) */

@media (max-width: 640px) {
    #immunotherapy {
        min-height: 410px; /* Optimized for mobile viewing */
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    #immunotherapy {
        min-height: 492px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #immunotherapy {
        min-height: 656px;
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    #immunotherapy {
        min-height: 922px;
    }
}

@media (min-width: 1441px) {
    #immunotherapy {
        min-height: 1230px;
    }
}

/* Treatment Methods Layout - Full Width Design */
.treatment-methods-fullwidth {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.treatment-item-container {
    position: relative;
    width: 100%;
    height: 300px;
    margin-bottom: 2rem;
}

/* 둥근 이미지 공통 스타일 */
.treatment-circle-left,
.treatment-circle-right {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.treatment-circle-left {
    left: calc((100vw - 1200px) / 2); /* 1200px 기준 컨텐츠 영역의 왼쪽 */
    top: 50%;
    transform: translateY(-50%);
}

.treatment-circle-right {
    right: calc((100vw - 1200px) / 2); /* 1200px 기준 컨텐츠 영역의 오른쪽 */
    top: 50%;
    transform: translateY(-50%);
}

/* 텍스트 박스 공통 스타일 */
.treatment-text-box {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
    z-index: 1;
}

/* 첫 번째, 세 번째 치료법 (1,2칸 차지, 왼쪽에서 시작) */
.treatment-text-right {
    left: 0;
    top: calc(50% - 56px); /* 원의 상단 5분의 3 위치부터 시작 */
    width: 66.67%; /* 전체의 2/3 */
    height: calc(100% - 56px); /* 원 하단을 넘어서 확장 */
    padding: 3rem;
    padding-left: calc((100vw - 1200px) / 2 + 168px); /* 원의 3/5 지점부터 시작 */
    border-radius: 0 1rem 1rem 0; /* 오른쪽 모서리만 둥글게 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.treatment-text-right > div {
    margin-left: 16.67%; /* 박스 내에서 2번째 칸(1/6 지점)부터 시작 */
    margin-right: 16.67%; /* 박스 내에서 2번째 칸에서 끝 */
    text-align: center;
}

/* 두 번째 치료법 (2,3칸 차지, 오른쪽에서 시작) */
.treatment-text-center-blue {
    right: 0;
    top: calc(50% - 56px); /* 원의 상단 5분의 3 위치부터 시작 */
    width: 66.67%; /* 전체의 2/3 */
    height: calc(100% - 56px); /* 원 하단을 넘어서 확장 */
    padding: 3rem;
    padding-right: calc((100vw - 1200px) / 2 + 168px); /* 원의 3/5 지점까지 */
    border-radius: 1rem 0 0 1rem; /* 왼쪽 모서리만 둥글게 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.treatment-text-center-blue > div {
    margin-left: 16.67%; /* 박스 내에서 2번째 칸에 위치 */
    margin-right: 16.67%; /* 박스 내에서 2번째 칸에 위치 */
    text-align: center;
}

/* 텍스트 스타일 */
.treatment-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #1f2937;
}

.treatment-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: #4b5563;
}

/* 파란색 박스의 텍스트 색상 */
.treatment-text-center-blue .treatment-title,
.treatment-text-center-blue .treatment-desc {
    color: white;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .treatment-circle-left {
        left: calc(50vw - 500px);
    }
    
    .treatment-circle-right {
        right: calc(50vw - 500px);
    }
    
    .treatment-text-right {
        padding-left: calc(50vw - 350px);
    }
    
    .treatment-text-center-blue {
        padding-right: calc(50vw - 350px);
    }
}

@media (max-width: 1024px) {
    .treatment-item-container {
        height: 250px;
    }
    
    .treatment-circle-left,
    .treatment-circle-right {
        width: 220px;
        height: 220px;
    }
    
    .treatment-circle-left {
        left: calc(50vw - 400px);
    }
    
    .treatment-circle-right {
        right: calc(50vw - 400px);
    }
    
    .treatment-text-box {
        padding: 2rem;
        min-height: 160px;
    }
    
    .treatment-text-right {
        padding-left: calc(50vw - 250px);
    }
    
    .treatment-text-center-blue {
        padding-right: calc(50vw - 250px);
    }
    
    .treatment-title {
        font-size: 1.25rem;
    }
    
    .treatment-desc {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .treatment-methods-fullwidth {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .treatment-item-container {
        height: auto;
        width: 100%;
        max-width: 400px;
        margin: 0;
        position: static;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    /* 모든 이미지를 첫 번째 순서로 */
    .treatment-circle-left,
    .treatment-circle-right {
        width: 200px;
        height: 200px;
        position: static;
        transform: none;
        margin: 0 auto;
        order: 1;
    }
    
    /* 모든 텍스트를 두 번째 순서로 */
    .treatment-text-box {
        position: static;
        width: 100%;
        max-width: 400px;
        padding: 2rem;
        margin: 1.5rem auto 0;
        transform: none;
        border-radius: 1rem;
        order: 2;
    }
    
    .treatment-text-right,
    .treatment-text-center-blue {
        text-align: center;
        padding: 2rem;
    }
    
    .treatment-text-right > div,
    .treatment-text-center-blue > div {
        margin-left: 0;
        margin-right: 0;
        text-align: center;
    }
    
    .treatment-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .treatment-desc {
        font-size: 1rem;
    }
}

/* Hospital Info Banner */
.hospital-info-banner {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.hospital-banner-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1920/363; /* 원본 비율 유지 */
    object-fit: cover;
    display: block;
}

/* 반응형 높이 조정 (1920:363 비율 기준) */
@media (max-width: 640px) {
    .hospital-banner-image {
        height: 121px; /* 640px 기준 높이 */
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .hospital-banner-image {
        height: 145px; /* 768px 기준 높이 */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hospital-banner-image {
        height: 194px; /* 1024px 기준 높이 */
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .hospital-banner-image {
        height: 272px; /* 1440px 기준 높이 */
    }
}

@media (min-width: 1441px) {
    .hospital-banner-image {
        height: 363px; /* 원본 높이 */
    }
}

/* Location Section Layout */
.location-map-wrapper {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-100%);
    width: 500px;
    height: 100%;
    z-index: 2;
}

.location-info-wrapper {
    position: relative;
    left: 50%;
    width: 500px;
    min-height: 500px;
    padding: 2rem;
    padding-top: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .location-map-wrapper {
        position: relative;
        left: 0;
        transform: none;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .location-info-wrapper {
        position: relative;
        left: 0;
        width: 100%;
        padding: 1rem;
    }
    
    #location .map-container {
        height: 375px; /* 250px의 1.5배 */
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}