/* 서브페이지 공통 스타일 */

/* 서브페이지에서 스크롤바 표시 - 안전한 방법 */
html {
    scrollbar-width: thin !important;
    scrollbar-color: #c1c1c1 #f1f1f1 !important;
    -ms-overflow-style: auto !important;
}

::-webkit-scrollbar {
    display: block !important;
    width: 8px !important;
}

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1 !important;
    border-radius: 4px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8 !important;
}

/* Sub Visual Section */
.sub-visual {
    position: relative;
    height: 450px;
    background: url('../images/sub-visual-bg.jpg') center center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    border-bottom: none;
    margin-top: -80px;
    padding-top: 90px;
}

.sub-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    z-index: 1;
}

/* 로고 심볼 애니메이션 */
.logo-symbols {
    position: absolute;
    right: 14%;
    bottom: 20px;
    z-index: 100;
}

.symbol-square {
    width: 42px;
    height: 47px;
    background: linear-gradient(135deg, #e91e63, #f06292);
    margin-bottom: 1px;
    opacity: 0;
    transform: translateX(50px) scale(0.5);
    animation: symbolAppear 0.8s ease-out forwards;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.symbol-square:nth-child(1) {
    animation-delay: 1.2s;
    margin-left: -50px;
}

.symbol-square:nth-child(2) {
    animation-delay: 1.4s;
    margin-left: -12px;
}

.symbol-square:nth-child(3) {
    animation-delay: 1.6s;
    margin-left: 28px;
}

.symbol-square:nth-child(4) {
    animation-delay: 1.8s;
    margin-left: -7px;
}

.symbol-square:nth-child(5) {
    animation-delay: 2.0s;
    margin-left: -50px;
}

@keyframes symbolAppear {
    0% {
        opacity: 0;
        transform: translateX(50px) scale(0.5) rotate(45deg);
    }

    50% {
        opacity: 0.8;
        transform: translateX(10px) scale(1.1) rotate(0deg);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1) rotate(0deg);
    }
}

@keyframes slideUpFadeIn {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.sub-visual-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}

.sub-visual-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #333;
    margin-top: -10px;
    transform: translateY(-20px);
}

.sub-title {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 2px;
    color: #333;
    opacity: 0;
    transform: translateY(50px);
    animation: slideUpFadeIn 1s ease-out 0.3s forwards;
}

.history-page .sub-title {
    animation-delay: 0s !important;
}

.breadcrumb-nav {
    font-size: 0.95rem;
    opacity: 0;
    border-bottom: none;
    transform: translateY(30px);
    animation: slideUpFadeIn 1s ease-out 0.6s forwards;
}

.history-page .breadcrumb-nav {
    animation-delay: 0.1s !important;
}

.breadcrumb-nav a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
    color: #007bff;
}

.breadcrumb-nav span {
    color: #333;
}

.separator {
    margin: 0 10px;
}

.current {
    font-weight: 500;
}

/* 서브비주얼 히어로: ethics 기준 공통 사이즈 적용 */
.sub-page .scroll-indicator { bottom: 50px; }
.sub-page .scroll-arrow {
  width: 50px;
  height: 50px;
  border-width: 2px;
  font-size: 1.2rem;
}
.sub-page .hero-title { font-size: 3rem !important; }
.sub-page .hero-description { font-size: 1.1rem !important; }

/* Sub Menu Section */
.sub-menu-section {
    background: transparent;
    padding: 0;
    border-top: none;
    border-bottom: none;
    position: relative;
    z-index: 10;
    overflow: visible;
    margin-top: -70px;
    transform: translateY(-20px);
}

.sub-menu-section::before {
    display: none;
}

.sub-menu-tabs {
    position: relative;
    z-index: 2;
}

.sub-menu-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
}

.tab-item {
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.1);
    color: #333;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    backdrop-filter: blur(5px);
}

.tab-item::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 0;
    height: 3px;
    background: #007bff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-item:hover::before {
    width: 100%;
}

.tab-item:hover {
    color: #007bff;
    background: rgba(255, 255, 255, 0.2);
}

.tab-item.active {
    color: #007bff;
    border-bottom: 3px solid #007bff;
    background: rgba(255, 255, 255, 0.3);
}

.tab-item.active::before {
    display: none;
}

/* Main Content */
.main-content {
    padding: 80px 0;
    min-height: 60vh;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 24px;
}

/* Smooth fade-in on scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-reveal {
    opacity: 1;
    transform: translateY(0);
    transition-duration: 1.25s;
    /* 조금 더 천천히 */
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .sub-title {
        font-size: 2.2rem; /* smaller title on mobile */
        letter-spacing: 1px;
    }

    .sub-menu-section {
        margin-top: -50px;
        transform: translateY(-20px);
        margin-bottom: 0 !important; /* remove gap below tabs */
        padding-bottom: 0 !important;
    }

    .sub-menu-tabs {
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 0 !important; /* prevent tabs from adding space */
    }

    /* Disable sub-visual white overlay on mobile to avoid layered look */
    .sub-visual::before { display: none !important; }

    /* Breadcrumb smaller on mobile */
    .breadcrumb-nav { font-size: 0.9rem; display: none !important; }
    .separator { margin: 0 6px; }

    /* Symbol responsiveness (tablet) */
    .logo-symbols { right: 3%; bottom: 40px; }
    .symbol-square { width: 20px; height: 25px; margin-bottom: 1px; }
    .symbol-square:nth-child(1) { margin-left: -30px; }
    .symbol-square:nth-child(2) { margin-left: -8px; }
    .symbol-square:nth-child(3) { margin-left: 15px; }
    .symbol-square:nth-child(4) { margin-left: -5px; }
    .symbol-square:nth-child(5) { margin-left: -30px; }

    /* 서브페이지 공통: 본문 텍스트 좌측 정렬 */
    .sub-page .content-intro,
    .sub-page .content-intro p { text-align: left !important; }

    /* 서브페이지 공통: 인트로 헤드라인 기본 축소 (페이지별 CSS에서 재조정 가능) */
    .sub-page .intro-title { font-size: 1.05rem !important; line-height: 1.45 !important; }

    /* 서브비주얼 히어로: ethics 기준 공통 모바일 사이즈 */
    .sub-page .scroll-indicator { bottom: 10px; }
    /* 페이지 개별 CSS보다 우선 적용되도록 !important 부여 */
    .sub-page .scroll-arrow { width: 35px !important; height: 35px !important; border-width: 1.5px !important; font-size: 1rem !important; }
    /* 일부 페이지가 body.sub-page를 누락한 경우를 대비한 예비 오버라이드 */
    .scroll-arrow { width: 35px !important; height: 35px !important; border-width: 1.5px !important; font-size: 1rem !important; }
    .sub-page .hero-title { font-size: 2rem !important; }
    .sub-page .hero-description { font-size: 0.9rem !important; }
}

@media (max-width: 576px) {
    .sub-visual {
        height: 300px;
        margin-bottom: 0 !important; /* ensure no trailing gap below sub-visual */
        padding-bottom: 0 !important;
    }

    .sub-visual-content {
        margin-top: 30px;
    }

    .sub-menu-section {
        margin-top: -40px;
        transform: translateY(-20px);
        margin-bottom: 0 !important; /* keep compact below tabs */
        padding-bottom: 0 !important;
    }

    /* Keep overlay disabled on smaller screens as well */
    .sub-visual::before { display: none !important; }

    /* Further reduce title/breadcrumb on very small screens */
    .sub-title { font-size: 1.8rem; }
    .breadcrumb-nav { font-size: 0.8rem; display: none !important; }
    .separator { margin: 0 4px; }

    /* Symbol responsiveness (mobile) */
    .logo-symbols { right: 3%; bottom: 60px; }
    .symbol-square { width: 15px; height: 18px; margin-bottom: 1px; }
    .symbol-square:nth-child(1) { margin-left: -22px; }
    .symbol-square:nth-child(2) { margin-left: -6px; }
    .symbol-square:nth-child(3) { margin-left: 11px; }
    .symbol-square:nth-child(4) { margin-left: -4px; }
    .symbol-square:nth-child(5) { margin-left: -22px; }
}

@media (max-width: 480px) {
    .sub-menu-tabs .tab-item {
        font-size: 0.8rem;
        padding: 10px 12px;
    }

    /* 서브페이지 공통: 초소형에서 인트로 헤드라인 추가 축소 */
    .sub-page .intro-title { font-size: 1rem !important; line-height: 1.5 !important; }

    /* 서브비주얼 히어로: ethics 기준 초소형 사이즈 */
    .sub-page .hero-title { font-size: 1.7rem !important; }
    .sub-page .hero-description { font-size: 0.85rem !important; }
    /* 일부 페이지가 body.sub-page를 누락한 경우를 대비한 예비 오버라이드 */
    .scroll-arrow { width: 35px !important; height: 35px !important; border-width: 1.5px !important; font-size: 1rem !important; }
}

@media (max-width: 400px) {
    .sub-menu-tabs .tab-item {
        font-size: 0.74rem;
        padding: 9px 10px;
    }
}

@media (max-width: 360px) {
    .sub-menu-tabs .tab-item {
        font-size: 0.7rem;
        letter-spacing: -0.2px;
    }
}

/* History Timeline Styles */
.history-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #007bff;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 120px;
}

.timeline-year {
    position: absolute;
    left: -120px;
    top: 0;
    width: 80px;
    height: auto;
    background: transparent;
    color: #333;
    border-radius: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    font-weight: bold;
    font-size: 2rem;
    z-index: 2;
    text-align: left;
}

.timeline-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #036fe2;
}

.timeline-content h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.timeline-content ul {
    margin: 0;
    padding-left: 20px;
}

.timeline-content li {
    color: #666;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Ethics Styles */
.ethics-section {
    margin-bottom: 60px;
}

.ethics-section h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.ethics-section h3 i {
    color: #007bff;
    margin-right: 10px;
}

.ethics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.ethics-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.card-icon {
    width: 80px;
    height: 80px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.card-icon i {
    font-size: 2rem;
    color: white;
}

.ethics-card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.ethics-card p {
    color: #666;
    line-height: 1.6;
}

.ethics-code {
    max-width: 800px;
    margin: 0 auto;
}

.code-item {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #007bff;
}

.code-item h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.code-item p {
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.report-center {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.report-info p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.contact-item i {
    color: #007bff;
    font-size: 1.2rem;
}

/* Contact Styles */
.contact-content {
    margin-bottom: 60px;
}

.map-container {
    margin-bottom: 10px;
}

.contact-info {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    height: fit-content;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #333;
    text-align: center;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-item i {
    color: #007bff;
    font-size: 1.2rem;
    margin-right: 15px;
    margin-top: 3px;
    min-width: 20px;
}

.info-item strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.info-item p {
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.transportation-info {
    margin-top: 60px;
}

.transportation-info h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.transport-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.transport-card h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.transport-card h4 i {
    color: #007bff;
    margin-right: 10px;
}

.transport-card ul {
    margin: 0;
    padding-left: 20px;
}

.transport-card li {
    color: #666;
    margin-bottom: 8px;
    line-height: 1.5;
}

.parking-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    text-align: center;
}

.parking-info h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.parking-info h4 i {
    color: #007bff;
    margin-right: 10px;
}

.parking-info p {
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Contact Hero Section */
.contact-hero {
    position: relative;
    height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    margin-bottom: 40px;
}

.contact-hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.contact-hero .hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.contact-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.contact-hero .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
}

.contact-hero .hero-title {
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.contact-hero .hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.8s forwards;
}

/* 모바일: ethics 모바일 스펙과 동일 */
@media (max-width: 768px) {
    .contact-hero {
        height: 28vh;
        margin-bottom: 40px;
        margin-top: -12px;
    }
    .contact-hero .hero-title { font-size: 2rem; }
    .contact-hero .hero-description { font-size: 0.9rem; }
    .contact-hero .scroll-indicator { bottom: 10px; }
    .contact-hero .scroll-arrow { width: 35px; height: 35px; border-width: 1.5px; font-size: 1rem; }
    .contact-hero .hero-title { padding-left: 30px; }
}

@media (max-width: 480px) {
    .contact-hero .hero-content { padding: 0 15px; }
    .contact-hero .hero-title { font-size: 1.3rem; }
    .contact-hero .hero-description { font-size: 0.85rem; }
}

/* Contact page: 히어로 아래 소개 타이틀 영역 여백/폰트 조정 */
/* 히어로 다음 main-content 상단 패딩 축소 (기존 80px -> 40px) */
.contact-hero + .main-content { padding-top: 40px; }

/* 타이틀 폰트를 transportation-info h3(1.8rem)과 정렬 */
.contact-hero + .main-content .page-header h2 { font-size: 1.8rem; margin-bottom: 10px; }

/* 설명 문구 폰트/색상 통일 */
.contact-hero + .main-content .page-header .page-description { font-size: 1.1rem; color: #666; margin-bottom: 0; }

/* 모바일에서 상단 패딩을 더 축소 */
@media (max-width: 768px) {
  .contact-hero + .main-content { padding-top: 24px; }
}

/* 서브페이지 헤더 스타일 오버라이드 */
body .main-header {
    background: transparent;
    box-shadow: none;
    position: relative;
}

body .main-header::before {
    display: none;
}

body .main-header .header-container {
    position: relative;
    z-index: 2;
}

body .logo-text {
    color: #333 !important;
}

/* 메가메뉴와 충돌하지 않도록 특정 컨텍스트로 제한 */
body .main-navigation .nav-link {
    color: #333 !important;
}

body .main-navigation .nav-link:hover {
    color: #007bff !important;
}

body .dropdown-btn {
    color: #333 !important;
}

body .dropdown-btn:hover {
    color: #007bff !important;
}

body .dropdown-btn i {
    color: #333 !important;
}

body .mobile-menu-toggle span {
    background: #000 !important;
}

/* 모바일 햄버거 메뉴 강제 검정색 적용 */
.mobile-menu-toggle span,
.mobile-menu-toggle span::before,
.mobile-menu-toggle span::after {
    background-color: #000 !important;
    background: #000 !important;
}

/* 더 구체적인 선택자로 강제 적용 */
body .main-header .mobile-menu-toggle span,
body .main-header .mobile-menu-toggle span::before,
body .main-header .mobile-menu-toggle span::after {
    background-color: #000 !important;
    background: #000 !important;
}

/* 메가메뉴 스타일 */
body .mega-dropdown {
    background: white;
    border: 1px solid #e9ecef;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body .mega-content h2 {
    color: #333;
}

body .sub-menu a {
    color: #666;
    transition: color 0.3s ease;
}

body .sub-menu a:hover {
    color: #007bff;
}

body .dropdown-menu {
    background: white;
    border: 1px solid #e9ecef;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body .dropdown-item {
    color: #666;
}

body .dropdown-item:hover {
    color: #007bff;
    background: #f8f9fa;
}