/* 지점 안내 페이지 CSS */
/* CSS 버전: 1.0.7 */

/* 커스텀 마커 스타일 */
.custom-marker-container {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate(-50%, -100%);
}

.custom-marker-label {
    background: linear-gradient(135deg, #0058a3 0%, #003d7a 100%);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 88, 163, 0.4);
    border: 2px solid #ffffff;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1.2;
}

.custom-marker-pin {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 16px solid #0058a3;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.custom-marker-container:hover .custom-marker-label {
    background: linear-gradient(135deg, #003d7a 0%, #0058a3 100%);
    box-shadow: 0 6px 16px rgba(0, 88, 163, 0.6);
    transform: translateY(-2px);
}

.custom-marker-container:hover .custom-marker-pin {
    border-top-color: #003d7a;
    transform: translateY(-2px);
}

.branches-main-section {
    padding: 40px 0 100px;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
}

/* 상단 탭 영역 래퍼 (고정 시 레이아웃 유지용) */
.branches-tab-wrapper {
    position: relative;
}

/* 상단 탭 영역 - 스크롤 시 상단 고정 */
.branches-tab-section {
    background: #ffffff;
    border-bottom: 2px solid #e9ecef;
    padding: 30px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: top 0.3s ease, box-shadow 0.3s ease;
}

/* 스크롤 시 고정 상태 (JS에서 branches-tab-fixed 클래스 추가) */
.branches-tab-section.branches-tab-fixed {
    position: fixed !important;
    top: var(--branches-tab-sticky-top, 45px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9990 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.branches-tab-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.branches-tab-list-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.branches-tab-swipe-hint {
    display: none;
}

.branches-tab-list {
    display: flex;
    gap: 8px;
    overflow-x: visible;
    padding: 10px 0;
    width: 100%;
}

.branch-tab-item {
    flex: 1 1 0;
    min-width: 0;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.branch-tab-item:hover {
    border-color: #0058a3;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 88, 163, 0.2);
}

.branch-tab-item.active {
    border-color: #0058a3;
    border-width: 3px;
    background: linear-gradient(135deg, #0058a3, #003d7a);
    box-shadow: 0 6px 25px rgba(0, 88, 163, 0.4);
    transform: translateY(-5px) scale(1.05);
    position: relative;
}

.branch-tab-item.active::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #0058a3, #003d7a);
    border-radius: 12px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(8px);
}

.branch-tab-item.active .branch-tab-image {
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.branch-tab-item.active .branch-tab-name {
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.branch-tab-image {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.branch-tab-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.branch-tab-item:hover .branch-tab-image img {
    transform: scale(1.05);
}

.branch-tab-name {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    line-height: 1.3;
    word-break: keep-all;
    transition: all 0.3s ease;
}

/* 스크롤 버튼 */
.branch-scroll-btn {
    display: none; /* 스크롤 없이 모든 탭을 한 줄에 표시하므로 버튼 숨김 */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
}

.branch-scroll-btn.show {
    opacity: 1;
    pointer-events: auto;
}

.branch-scroll-btn:hover {
    background: #0058a3;
    border-color: #0058a3;
    box-shadow: 0 4px 15px rgba(0, 88, 163, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.branch-scroll-btn:hover i {
    color: #ffffff;
}

.branch-scroll-btn i {
    font-size: 20px;
    color: #0058a3;
    transition: color 0.3s ease;
}

.branch-scroll-left {
    left: 10px;
}

.branch-scroll-right {
    right: 10px;
}

.branch-scroll-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* 지점 상세 정보 영역 */
.branches-content-section {
    max-width: 1600px;
    margin: 0 auto;
    padding: 60px 20px;
}

.branches-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.branch-section {
    background: #ffffff;
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* 1섹션: 매장 대표사진과 주요 설명 */
.branch-section-1 {
    padding: 0;
    overflow: hidden;
}

.branch-hero-container {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 0;
    min-height: 400px;
}

.branch-hero-image {
    width: 100%;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.branch-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* 이미지 로딩 스피너 */
.image-loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    z-index: 10;
}

.image-loading-spinner .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top-color: #0058a3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.image-loading-spinner p {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.branch-hero-content {
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #ffffff;
}

.branch-hero-name {
    font-size: 32px;
    font-weight: 900;
    color: #0058a3;
    margin: 0 0 40px 0;
    line-height: 1.3;
    padding-bottom: 20px;
    border-bottom: 3px solid #0058a3;
}

.branch-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.branch-info-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.branch-info-item.branch-info-full {
    grid-column: 1 / -1;
}

.branch-info-title {
    font-size: 18px;
    font-weight: 700;
    color: #0058a3;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.branch-info-text {
    font-size: 16px;
    color: #1a1a1a;
    line-height: 1.8;
    margin: 0;
    font-weight: 600;
}

.branch-services-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.branch-services-list li {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.8;
    padding-left: 24px;
    position: relative;
}

.branch-services-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #0058a3;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.4;
}

/* 2섹션: 지점 갤러리와 상담 안내 */
.branch-section-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

.branch-gallery-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.branch-section-title {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
}

.branch-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.branch-consultation-section {
    background: linear-gradient(135deg, rgba(0, 88, 163, 0.05), rgba(0, 61, 122, 0.05));
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.branch-consultation-text {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    text-align: center;
    line-height: 1.6;
}

.branch-consultation-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

.consultation-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 25px 20px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    text-decoration: none;
    color: #1a1a1a;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.consultation-btn:hover {
    border-color: #0058a3;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 88, 163, 0.2);
    color: #0058a3;
}

.consultation-btn i {
    font-size: 32px;
    color: #0058a3;
}

.consultation-btn span {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.consultation-btn small {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.consultation-btn-phone span {
    font-size: 20px;
    font-weight: 800;
    color: #0058a3;
}

/* 3섹션: 오프라인 매장 안내와 지도 */
.branch-section-3 {
    padding: 0;
}

.branch-location-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 600px;
}

.branch-location-info {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

.branch-info-box {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.branch-info-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.branch-info-label {
    font-size: 18px;
    font-weight: 700;
    color: #0058a3;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.branch-info-label i {
    font-size: 20px;
    color: #0058a3;
    flex-shrink: 0;
}

.branch-info-label span {
    flex: 1;
}

.branch-info-value {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.8;
    margin: 0;
}

.branch-info-value p {
    margin: 8px 0;
}

.branch-info-value strong {
    color: #1a1a1a;
    font-weight: 700;
}

.branch-map-section {
    position: relative;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
}

.branch-map-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 500px;
}

.branch-map-container {
    width: 100%;
    height: 100%;
    min-height: 500px;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 12px;
    overflow: hidden;
}


.branch-map-buttons-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.branch-map-controls {
    display: flex !important;
    gap: 10px;
    justify-content: flex-start;
    z-index: 10;
    position: relative;
}

.branch-map-toggle-btn {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
    justify-content: center;
}

.branch-map-toggle-btn:hover {
    border-color: #0058a3;
    color: #0058a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 88, 163, 0.15);
}

.branch-map-toggle-btn.active {
    background: linear-gradient(135deg, #0058a3, #003d7a);
    border-color: #0058a3;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 88, 163, 0.3);
}

.branch-map-toggle-btn i {
    font-size: 18px;
}

.branch-sms-btn {
    position: relative;
    padding: 16px 28px;
    background: linear-gradient(135deg, #0058a3, #003d7a);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 88, 163, 0.4);
    transition: all 0.3s ease;
    z-index: 10;
    white-space: nowrap;
}

.branch-sms-btn:hover {
    background: linear-gradient(135deg, #003d7a, #002855);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 88, 163, 0.5);
}

.branch-sms-btn i {
    font-size: 20px;
}

/* 반응형 디자인 */
/* 반응형: 작은 화면에서는 스크롤 버튼 숨김 */
@media (max-width: 991px) {
    .branches-tab-container {
        padding: 0 20px;
    }
    
    .branch-scroll-btn {
        display: none;
    }
}

@media (max-width: 1400px) {
    .branch-hero-container {
        grid-template-columns: 40% 60%;
    }
    
    .branch-location-container {
        grid-template-columns: 1fr;
    }
    
    .branch-hero-image {
        min-height: 400px;
    }
    
    .branch-hero-content {
        padding: 40px 40px;
    }
    
    .branch-location-info {
        padding: 40px 30px;
    }
}

@media (max-width: 991px) {
    .branch-hero-container {
        grid-template-columns: 1fr;
    }
    
    .branch-hero-image {
        min-height: 300px;
    }
    
    .branch-hero-content {
        padding: 40px 30px;
    }
    
    .branch-info-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .branch-info-item.branch-info-full {
        grid-column: 1;
    }
}

@media (max-width: 1200px) {
    .branch-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .branch-consultation-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .branches-main-section {
        padding: 20px 0 60px;
    }
    
    .branches-content-section {
        padding: 40px 15px;
    }
    
    .branch-section {
        padding: 30px 20px;
    }
    
    .branch-hero-name {
        font-size: 28px;
    }
    
    .branch-hero-title {
        font-size: 20px;
    }
    
    .branch-section-title {
        font-size: 24px;
    }
    
    .branch-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .branch-consultation-buttons {
        grid-template-columns: 1fr;
    }
    
    .branch-map-buttons-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .branch-map-controls {
        width: 100%;
        justify-content: center;
    }
    
    .branch-sms-btn {
        position: static;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .branches-tab-section {
        padding: 20px 0;
    }

    /* 모바일: 지점 탭 가로 스와이프 + 스와이프 힌트 */
    .branches-tab-list-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        margin: 0 -20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .branches-tab-list-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        right: -1px;
        bottom: 8px;
        width: 24px;
        background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
        pointer-events: none;
    }

    .branches-tab-list-wrapper::-webkit-scrollbar {
        height: 6px;
    }

    .branches-tab-list-wrapper::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 3px;
    }

    .branches-tab-list-wrapper::-webkit-scrollbar-thumb {
        background: #0058a3;
        border-radius: 3px;
    }

    .branches-tab-list {
        flex-wrap: nowrap;
        width: max-content;
        padding-right: 16px;
    }

    .branch-tab-item {
        flex: 0 0 auto;
        min-width: 100px;
        padding: 10px;
    }

    .branches-tab-swipe-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin: 10px 0 0;
        font-size: 13px;
        color: #64748b;
        font-weight: 500;
    }

    .branches-swipe-hint-icon {
        width: 20px;
        height: 20px;
        vertical-align: middle;
        object-fit: contain;
    }
    
    .branch-tab-image {
        height: 80px;
    }
    
    .branch-tab-name {
        font-size: 12px;
    }
    
    .branch-hero-image {
        min-height: 300px;
    }
    
    .branch-hero-content,
    .branch-location-info {
        padding: 30px 20px;
    }
    
    .branch-hero-name {
        font-size: 24px;
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
    
    .branch-hero-content {
        padding: 30px 20px;
    }
    
    .branch-info-grid {
        gap: 20px;
    }
    
    .branch-info-title {
        font-size: 15px;
    }
    
    .branch-info-text {
        font-size: 14px;
    }
    
    .branch-services-list li {
        font-size: 14px;
    }
    
    .branch-section-title {
        font-size: 20px;
    }
    
    .branch-gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .branch-consultation-section {
        padding: 30px 20px;
    }
    
    .branch-consultation-text {
        font-size: 18px;
    }
    
    .consultation-btn {
        padding: 20px 15px;
    }
    
    .consultation-btn i {
        font-size: 28px;
    }
    
    .branch-info-label {
        font-size: 16px;
    }
    
    .branch-info-value {
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .branches-tab-list {
        gap: 10px;
    }
    
    .branch-tab-item {
        min-width: 80px;
        flex: 0 0 auto;
    }
    
    .branch-tab-image {
        height: 60px;
    }
    
    .branch-tab-name {
        font-size: 11px;
    }
    
    .branch-hero-name {
        font-size: 20px;
    }
    
    .branch-hero-title {
        font-size: 16px;
    }
    
    .branch-section-title {
        font-size: 18px;
    }
    
    .branch-consultation-text {
        font-size: 16px;
    }
}

