/* Work-space 드롭다운 메뉴 스타일 개선 */
.nav-item.dropdown[data-menu="workspace"] {
    position: relative;
}

.nav-item.dropdown[data-menu="workspace"] .dropdown-menu {
    margin-top: 0;
    border-radius: 0 0 4px 4px;
    border-top: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.2s ease-in-out;
}

.nav-item.dropdown[data-menu="workspace"]:hover .dropdown-menu {
    display: block;
}

.nav-item.dropdown[data-menu="workspace"] .dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.nav-item.dropdown[data-menu="workspace"] .dropdown-item:hover {
    background-color: #f8f9fa;
    padding-left: 1.75rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 활성화된 메뉴 아이템 스타일 */
.nav-item.dropdown[data-menu="workspace"].show .nav-link {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* 메인 페이지 스타일 */
.hero-section {
    position: relative;
    height: 100vh; /* 화면 전체 높이 */
    overflow: hidden; /* 내부 요소 넘침 방지 (텍스트 정렬 후 복구) */
}

/* 히어로 섹션 내부 컨테이너/로우 높이 100% 설정 */
.hero-section .container,
.hero-section .container .row {
    height: 100%;
}

/* 텍스트 컬럼을 flex로 만들어 내부 컨텐츠 정렬 */
.hero-section .container .row > div[class*='col-'] {
    display: flex;
    flex-direction: column;
    justify-content: center; /* 수직 중앙 정렬 */
    align-items: center; /* 수평 중앙 정렬 (text-center와 함께) */
    height: 100%; /* row 높이에 맞춰 채움 */
}

/* 텍스트 요소 마진 조정 (너무 크면 잘릴 수 있음) */
.hero-section h1 {
    margin-bottom: 1rem; /* 기본값보다 줄임 */
}
.hero-section p {
    margin-bottom: 1.5rem; /* 기본값보다 줄임 */
}

/* .hero-image 관련 규칙 제거 (이제 사용 안 함) */
/* .hero-image {...} */
/* .hero-image::before {...} */
/* .hero-image .container {...} */

/* 히어로 오버레이 및 텍스트 컨테이너 z-index 확인 */
.hero-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1; /* 동영상보다는 위, 텍스트보다는 아래 */
}
.hero-section .container {
    position: relative; /* z-index 적용 위해 */
    z-index: 2; /* 오버레이 위에 오도록 */
}

.card {
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.display-4 {
    font-weight: 700;
}

.text-primary {
    color: #0056b3 !important;
}

.btn-primary {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-primary:hover {
    background-color: #004494;
    border-color: #004494;
}

.btn-outline-primary {
    color: #0056b3;
    border-color: #0056b3;
}

.btn-outline-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
}

/* 반응형 이미지 */
.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* 아이콘 스타일 */
.bi {
    line-height: 1;
}

/* 섹션 구분선 */
section {
    position: relative;
}

section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: #0056b3;
    opacity: 0.1;
}

/* 모바일 최적화 스타일 */
@media (max-width: 767.98px) { /* 768px 미만 화면 */
    .hero-section {
        /* margin-top: -56px; 제거 */
        height: 80vh; /* 모바일에서는 높이를 약간 줄임 (100vh는 너무 클 수 있음) */
        /* 모바일에서 flex 정렬 유지 */
         display: flex; 
         align-items: center;
         justify-content: center;
    }
    
    /* 모바일 히어로 텍스트 크기 조정 */
    .hero-section h1 {
        font-size: 2.2rem !important; 
    }
    
    .hero-section p {
        font-size: 1.1rem !important;
    }

    /* .hero-image 관련 모바일 규칙 제거 */
    /* .hero-image {
        height: 400px !important;
    }
    .hero-image h1 {...}
    .hero-image p {...} */

    /* 카드 여백 조정 */
    .card {
        margin-bottom: 1rem;
    }
    
    /* 섹션 여백 조정 */
    section {
        padding: 2rem 0;
    }
    
    /* 버튼 크기 조정 */
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* 네비게이션 메뉴 조정 */
    .navbar-nav .dropdown-menu {
        border: none;
        background-color: rgba(0, 86, 179, 0.05);
        padding-left: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.8rem 1rem;
    }
    
    /* 이미지 크기 조정 */
    .card-img-top {
        height: 160px;
    }
}

/* 태블릿 디바이스 최적화 */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-image {
        height: 500px !important;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) {
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* 고해상도 디스플레이 최적화 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image {
        background-image: url('../images/hero-bg@2x.jpg');
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .bg-light {
        background-color: #1a1a1a !important;
    }
    
    .text-muted {
        color: #a0a0a0 !important;
    }
    
    .card {
        background-color: #2d2d2d;
        border-color: #404040;
    }
    
    .card-body {
        color: #ffffff;
    }
}

/* 프리로더 스타일 */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.preloader .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 이미지 지연 로딩 스타일 */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[src] {
    opacity: 1;
}

/* 네비게이션 바 스크롤 효과 */
.navbar {
    transition: background-color 0.3s ease-in-out;
}

.navbar-scrolled {
    background-color: rgba(33, 37, 41, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 모바일 메뉴 애니메이션 */
.navbar-collapse {
    transition: transform 0.3s ease-in-out;
}

.navbar-collapse.showing {
    transform: translateX(0);
}

@media (max-width: 768px) {
    .navbar-collapse {
        transform: translateX(-100%);
        position: fixed;
        top: 56px;
        left: 0;
        width: 100%;
        height: calc(100vh - 56px);
        background-color: #ffffff;
        padding: 1rem;
        overflow-y: auto;
    }
}

/* 제품 섹션 스타일 */
.products-section {
    padding: 5rem 0;
    background-color: #f8f9fa;
    position: relative;
}

.products-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom right, transparent 49.5%, #f8f9fa 50%);
    transform: translateY(-99px);
}

.products-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-content {
    padding: 1.5rem;
    text-align: center;
}

.product-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.product-card .btn {
    width: auto;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.product-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 제품 섹션 반응형 스타일 */
@media (max-width: 768px) {
    .products-section {
        padding: 3rem 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-content {
        padding: 1.25rem;
    }
    
    .product-content h3 {
        font-size: 1.25rem;
    }
}

/* 제품 카드 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }

/* 장비 소개 섹션 스타일 */
.equipment-section {
    padding: 5rem 0;
    background-color: #ffffff;
    position: relative;
}

/* 장비 카드 그리드 */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* 장비 카드 디자인 */
.equipment-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 카드 호버 효과 */
.equipment-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 장비 이미지 스타일 */
.equipment-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.equipment-card:hover .equipment-image {
    transform: scale(1.05);
}

/* 장비 정보 스타일 */
.equipment-content {
    padding: 1.5rem;
}

.equipment-content h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 1rem;
}

.equipment-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* 장비 스펙 리스트 */
.equipment-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    font-size: 0.9rem;
}

.equipment-specs li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed #eee;
    color: #555;
}

.equipment-specs li:last-child {
    border-bottom: none;
}

/* 장비 버튼 스타일 */
.equipment-card .btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* 모바일 반응형 스타일 */
@media (max-width: 768px) {
    .equipment-section {
        padding: 3rem 0;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .equipment-image {
        height: 220px;
    }
    
    .equipment-content {
        padding: 1.25rem;
    }
    
    .equipment-content h3 {
        font-size: 1.2rem;
    }
}

/* 장비 카드 애니메이션 */
.equipment-card {
    opacity: 0;
    animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 각 카드별 애니메이션 딜레이 */
.equipment-card:nth-child(1) { animation-delay: 0.1s; }
.equipment-card:nth-child(2) { animation-delay: 0.2s; }
.equipment-card:nth-child(3) { animation-delay: 0.3s; }
.equipment-card:nth-child(4) { animation-delay: 0.4s; }
.equipment-card:nth-child(5) { animation-delay: 0.5s; }
.equipment-card:nth-child(6) { animation-delay: 0.6s; }

/* 연락처 섹션 스타일 */
.contact-section {
    padding: 5rem 0;
    background-color: #f8f9fa;
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom right, transparent 49.5%, #f8f9fa 50%);
    transform: translateY(-99px);
}

.contact-info {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.contact-info:hover {
    transform: translateY(-5px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: #0056b3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.contact-icon i {
    font-size: 24px;
    color: #fff;
}

.contact-info h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.contact-info p {
    color: #666;
    margin-bottom: 0.5rem;
    text-align: center;
    line-height: 1.6;
}

.contact-info a {
    color: #0056b3;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #003d7a;
}

.contact-map {
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 연락처 섹션 반응형 스타일 */
@media (max-width: 768px) {
    .contact-section {
        padding: 3rem 0;
    }
    
    .contact-info {
        margin-bottom: 2rem;
    }
    
    .contact-map {
        height: 300px;
        margin-top: 2rem;
    }
}

/* 연락처 정보 애니메이션 */
.contact-info {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.contact-info:nth-child(1) { animation-delay: 0.1s; }
.contact-info:nth-child(2) { animation-delay: 0.2s; }
.contact-info:nth-child(3) { animation-delay: 0.3s; }

/* 푸터 스타일 */
.footer {
    background: linear-gradient(to right, #1a1a1a, #2d2d2d);
    color: #fff;
    padding: 4rem 0 2rem;
    position: relative;
}

/* 푸터 로고 스타일 */
.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 1rem;
}

/* 푸터 메뉴 스타일 */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 0.5rem;
}

.footer-menu a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-menu a:hover {
    color: #fff;
}

/* 푸터 연락처 스타일 */
.footer-contact {
    color: #adb5bd;
    font-size: 0.9rem;
}

.footer-contact p {
    margin-bottom: 0.5rem;
}

.footer-contact i {
    margin-right: 0.5rem;
    color: #0056b3;
}

/* 푸터 소셜 미디어 스타일 */
.footer-social {
    margin-top: 2rem;
}

.footer-social a {
    color: #adb5bd;
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: #fff;
}

/* 푸터 저작권 스타일 */
.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #6c757d;
    font-size: 0.85rem;
    margin: 0;
}

/* 푸터 반응형 스타일 */
@media (max-width: 768px) {
    .footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-menu {
        margin-bottom: 2rem;
    }
    
    .footer-social {
        margin-top: 1.5rem;
        text-align: center;
    }
    
    .footer-bottom {
        text-align: center;
    }
}

/* Scroll Animation Base */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Animate.css 연동을 위한 기본 클래스 */
.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
    opacity: 1;
}

/* FadeInUp Animation (Animate.css 대체 또는 기본값) */
@keyframes fadeInUp {
    from {
        transform: translate3d(0, 40px, 0);
        opacity: 0;
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}
.fadeInUp {
    animation-name: fadeInUp;
}

/* FadeInDown Animation */
@keyframes fadeInDown {
    from {
        transform: translate3d(0, -40px, 0);
        opacity: 0;
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}
.fadeInDown {
    animation-name: fadeInDown;
}

/* ZoomIn Animation */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }
  50% {
    opacity: 1;
  }
}
.zoomIn {
  animation-name: zoomIn;
}

/* FadeInLeft Animation */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(-50px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
.fadeInLeft {
  animation-name: fadeInLeft;
}

/* FadeInRight Animation */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translate3d(50px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
.fadeInRight {
  animation-name: fadeInRight;
}

/* Hero Section Overlay */
.hero-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 어두운 반투명 오버레이 */
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2; /* 오버레이 위에 컨텐츠가 오도록 */
}

/* Feature Card (회사소개 요약) */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}
.feature-icon {
    width: 60px;
    height: 60px;
    background-color: var(--bs-primary);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

/* Product Card Main (제품소개 요약) */
.product-card-main .product-image-main {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.product-card-main:hover .product-image-main {
    transform: scale(1.05);
}

/* Equipment Card Main (장비소개 요약) */
.equipment-card-main {
    transition: transform 0.3s ease;
}
.equipment-card-main:hover {
    transform: translateY(-5px);
}
.equipment-icon-main {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid var(--bs-light);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Footer Menu Links */
.footer-menu a {
    color: #adb5bd; /* Slightly lighter grey */
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}
.footer-menu a:hover {
    color: #fff;
}

/* Navbar fixed-top adjustment - 이미 header.php에 div로 추가함 */
/* body {
    padding-top: 56px; /* Adjust based on your navbar height */
/* } */

/* YouTube Background */
#youtube-player-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%; 
    transform: translate(-50%, -50%);
    z-index: 0; /* 컨텐츠 뒤로 보내기 */
    overflow: hidden; /* 중요: 비율 유지 시 넘치는 부분 숨김 */
    pointer-events: none; /* 비디오 위로 마우스 이벤트 통과 */
}

#youtube-player iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.77vh; /* 16:9 -> 100 / (9/16) = 177.77 */
    min-width: 100%;
    height: 100vh;   /* 16:9 -> 100 * (9/16) = 56.25 */
    min-height: 56.25vw;
    transform: translate(-50%, -50%);
}

.hero-image-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    display: none; /* 기본적으로 숨김, 모바일에서 표시 */
}

/* 모바일 화면 (예: 768px 미만)에서는 동영상 대신 이미지 표시 */
@media (max-width: 767.98px) {
    #youtube-player-container {
        display: none; /* 동영상 플레이어 숨김 */
    }
    .hero-image-fallback {
        display: block; /* 대체 이미지 표시 */
    }
} 