/* banner.css - 메인 배너 전용 스타일시트 */

/* SangSangBodyM 웹폰트 등록 */
@font-face {
    font-family: 'SangSangBodyM';
    src: url('../font/SangSangBodyM.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* 전역 backdrop-filter 비활성화 */
* {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Main Banner Section */
.main-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0;
    z-index: 1;
    isolation: isolate;
    pointer-events: none;
}

/* Background Video */
.banner-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    isolation: isolate;
    transform: translateZ(0);
    will-change: transform;
}

.banner-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: translateZ(0);
    will-change: transform;
    opacity: 1 !important;
}

/* 비디오 정지 상태 */
.banner-video video.paused {
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
}

.banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1400px;
    width: 100%;
    padding: 0 40px;
    text-align: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: auto;
}

/* 스크롤 시 배너 콘텐츠 숨김 */
.banner-content.scrolled {
    opacity: 0;
    transform: translateY(-30px);
    pointer-events: none;
}

.banner-text {
    text-align: center;
    color: white;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.banner-title {
    font-size: 96px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -3px;
    margin-bottom: 50px;
    opacity: 0;
    animation: slideInFromTop 1s ease-out 0.3s both;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    font-family: 'Nanum Gothic', sans-serif;
    transition: opacity 0.5s ease, transform 0.5s ease;
    color: white;
}

.banner-text h1 {
    font-size: 72px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 30px;
    opacity: 0;
    animation: slideInFromTop 1s ease-out 0.3s both;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    font-family: 'Nanum Gothic', sans-serif;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* 스크롤 시 배너 로고 숨김 */
.banner-text h1.scrolled {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.banner-subtitle {
	font-family: 'SangSangBodyM', sans-serif;
    font-size: 36px;
    font-weight: 500;
    margin: 0 auto;
    opacity: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    overflow: visible;
    width: 100%;
    max-width: 1200px;
    padding: 0 50px;
    box-sizing: border-box;
}

.subtitle-animation {
    position: relative;
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.subtitle-item {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    white-space: nowrap;
    width: 100%;
    left: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.subtitle-item.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.subtitle-left,
.subtitle-right {
    display: inline-block;
    font-weight: 500;
    will-change: transform, opacity;
    transition: transform 0.3s ease, opacity 0.3s ease;
    /* 메인 서브타이틀 문구는 Noto Serif KR 사용 */
    font-family: 'Noto Serif KR', 'Noto Sans KR', serif;
}

.subtitle-left {
    transform: translateX(-200px);
    opacity: 0;
}

.subtitle-right {
    transform: translateX(200px);
    opacity: 0;
}

/* Active 상태: 슬라이드 인 */
.subtitle-item.active .subtitle-left {
    animation: slideInFromLeft 1s ease-out forwards;
}

.subtitle-item.active .subtitle-right {
    animation: slideInFromRight 1s ease-out forwards;
}

/* Meet 상태: 중앙에서 만남 (이미 슬라이드 인된 상태 유지) */
.subtitle-item.meet .subtitle-left {
    transform: translateX(0);
    opacity: 1;
}

.subtitle-item.meet .subtitle-right {
    transform: translateX(0);
    opacity: 1;
}

.subtitle-item.active .highlight {
    font-weight: 500;
}

.subtitle-item.meet .highlight {
    font-weight: 700 !important;
    transition: font-weight 0.3s ease 1s;
}

/* Exit 상태: 벌어지며 사라짐 */
.subtitle-item.exit .subtitle-left {
    animation: slideOutToLeft 1s ease-in forwards;
}

.subtitle-item.exit .subtitle-right {
    animation: slideOutToRight 1s ease-in forwards;
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-200px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(200px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes stayCenter {
    0%, 100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-200px);
        opacity: 0;
    }
}

@keyframes slideOutToRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(200px);
        opacity: 0;
    }
}

/* Search Bar */
.banner-search {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 40px;
    opacity: 50;
    animation: slideInFromTop 1s ease-out 0.7s both;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 18px 60px 18px 25px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.7);
}

.search-button {
    position: absolute;
    right: 15px;
    top: 50%;
    
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    
}

.banner-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    opacity: 0;
    animation: slideInFromTop 1s ease-out 0.9s both;
}
.custom-button {
    background: rgba(50, 50, 50, 0.5);
    color: white;
    padding: 16px 32px;
    text-decoration: none;
    border-radius: 1px;
    font-size: 16px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    border: 1px solid white;
    position: relative;
    overflow: visible;
    z-index: 1;
}

/* "무료 상담 신청" 버튼만 특별 처리 - 블러 효과 */
a.custom-button[href="contact.php"],
a.custom-button[href*="contact.php"] {
    background: rgba(50, 50, 50, 0.6) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    position: relative;
    isolation: isolate;
}

a.custom-button[href="contact.php"]::before,
a.custom-button[href*="contact.php"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(50, 50, 50, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: -1;
    border-radius: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

a.custom-button[href="contact.php"]:hover,
a.custom-button[href*="contact.php"]:hover {
    /* Y축으로 살짝 위로 이동하고, 1.05배 확대 */
    transform: translateY(-5px) scale(1.05) !important;
    /* 그림자를 더 크게 만들어 입체감 강조 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    /* 배경 블러 완전 제거하여 선명하게 */
    backdrop-filter: blur(0px) !important;
    -webkit-backdrop-filter: blur(0px) !important;
    background: rgba(50, 50, 50, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
}

a.custom-button[href="contact.php"]:hover::before,
a.custom-button[href*="contact.php"]:hover::before {
    backdrop-filter: blur(0px) !important;
    -webkit-backdrop-filter: blur(0px) !important;
    background: rgba(50, 50, 50, 0.05) !important;
}

/* "서비스 보기" 버튼은 기존 스타일 유지 */
.custom-button[href="services.php"]:hover {
    /* Y축으로 살짝 위로 이동하고, 1.05배 확대 */
    transform: translateY(-5px) scale(1.05);
    /* 그림자를 더 크게 만들어 입체감 강조 */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.primary-button {
    background-color: #1E3A8A;
    color: white;
    padding: 16px 32px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    border: 2px solid transparent;
}

.primary-button:hover {
    background-color: #001B6A;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.secondary-button {
    background: #cccccc;
    color: white;
    padding: 16px 32px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    border: 2px solid transparent;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
	color:#555555 ;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: white;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.2s both;
    margin-top: 40px;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

/* 스크롤 시 scroll indicator 완전히 숨김 */
.scroll-indicator.scrolled {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
    visibility: hidden;
}

.scroll-text {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 8px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-arrow {
    font-size: 20px;
    animation: bounce 2s infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Overlay Container - KIM & CHANG 스타일 */
.overlay-container {
    position: relative;
    z-index: 2;
    margin-top: 100vh; /* 화면 밖에 숨김 */
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    padding-top: 0;
    isolation: isolate;
    transform: translateZ(0);
    will-change: transform;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Services Overlay */
.services-overlay {
    background: rgba(255, 255, 255, 0.98);
    padding: 100px 0 ;
    margin-bottom: 50px;
    margin-top: 0;
    border-radius: 30px;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    isolation: isolate;
    transform: translateZ(0);
    will-change: transform;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.services-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
}

.services-overlay h2 {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 60px;
    letter-spacing: -1px;
}

.services-overlay .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.services-overlay .service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.services-overlay .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.services-overlay .service-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.services-overlay .service-card h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 15px;
}

.services-overlay .service-card p {
    font-size: 16px;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 25px;
}

.services-overlay .service-link {
    display: inline-block;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.services-overlay .service-link:hover {
    color: #1e40af;
}

/* News Overlay - 글래스모피즘 스타일 */
.news-overlay {
    background: transparent !important;
    padding: 100px 0;
    color: #333;
    margin-top: 0;
    border-radius: 32px;
    box-shadow: none;
    position: relative;
    isolation: isolate;
    transform: translateZ(0);
    will-change: transform;
    border: none;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.news-overlay::before {
    display: none;
}

.news-overlay .container {
    padding: 0;
    max-width: none;
}

.news-overlay h2 {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 60px;
    letter-spacing: -1px;
    color: #ffffff !important;
}

.news-overlay .news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* 개별 뉴스 카드도 유리 패널 느낌으로 */
.news-overlay .news-card {
    background: rgba(255, 255, 255, 0.72); /* 카드도 약간 더 투명하게 */
    padding: 30px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.20);
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    width: 100%;
    box-sizing: border-box;
}

.news-overlay .news-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.news-overlay .news-category {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
}

.news-overlay .news-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
    color: #1f2937;
}

.news-overlay .news-card p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #4b5563;
}

.news-overlay .news-date {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .banner-content {
        padding: 0 30px;
    }
    
    .overlay-container {
        padding: 0;
    }
    
    .news-overlay .news-grid {
        padding: 0 30px;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .banner-title {
        font-size: 72px;
    }
    
    .banner-text h1 {
        font-size: 64px;
    }
    
    .banner-subtitle {
        font-size: 24px;
    }
}

@media (max-width: 968px) {
    .banner-title {
        font-size: 56px;
    }
    
    .banner-text h1 {
        font-size: 56px;
    }
    
    .banner-subtitle {
        font-size: 22px;
    }
    
    .banner-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .main-banner {
        height: 90vh;
    }
    
    .banner-content {
        padding: 0 20px;
    }
    
    .overlay-container {
        padding: 0;
        margin-top: 90vh;
    }
    
    .news-overlay .news-grid {
        padding: 0 20px;
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .services-overlay,
    .news-overlay {
        border-radius: 0;
        padding: 60px 0;
    }
    
    .banner-title {
        font-size: 48px;
        letter-spacing: -2px;
        margin-bottom: 30px;
    }
    
    .banner-text h1 {
        font-size: 42px;
        letter-spacing: -1px;
    }
    
    .banner-subtitle {
        font-size: 1.6em;
        padding: 0 20px;
    }
    
    .subtitle-item {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 10px;
    }
    
    .subtitle-left,
    .subtitle-right {
        font-size: 0.9em;
        white-space: normal;
        word-break: keep-all;
    }
    
    .banner-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .primary-button,
    .secondary-button {
        width: 200px;
        text-align: center;
    }
    
    .scroll-indicator {
        bottom: 20px;
    }
}