/* Body Padding for Fixed Navbar */
body {
  padding-top: 76px;
  background: white;
}

/* Navbar Scroll Effect */
#mainNav {
  transition: all 0.3s ease;
}

#mainNav.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
  padding: 10px 0 !important;
}

#mainNav.scrolled .navbar-brand img {
  height: 35px !important;
  transition: all 0.3s ease;
}

/* Navigation Link Animations */
.navbar-nav .nav-link {
  position: relative;
  padding: 8px 16px !important;
  font-weight: 700;
  color: #555 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Underline Animation on Hover */
.navbar-nav .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #feb809;
  transform: translateX(-50%);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-nav .nav-link:hover::before {
  width: 80%;
}

/* Hover Effect - Color Change */
.navbar-nav .nav-link:hover {
  color: #000 !important;
  transform: translateY(-2px);
}

/* Active/Click Effect */
.navbar-nav .nav-link:active {
  transform: translateY(0) scale(0.95);
  transition: transform 0.1s ease;
}

/* Mega Menu Styles */
.mega-dropdown .dropdown-menu {
  display: none;
}

.mega-dropdown:hover .dropdown-menu {
  display: block;
}

.mega-menu {
  width: 100%;
  left: 0;
  right: 0;
  padding: 30px 0;
  margin-top: 0;
  border: none;
  border-top: 3px solid #0d6efd;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 0;
}

.mega-menu-title {
  font-weight: bold;
  color: #333;
  padding: 10px 15px;
  margin-bottom: 10px;
  border-bottom: 2px solid #0d6efd;
}

.mega-menu .dropdown-item {
  padding: 8px 15px;
  transition: all 0.3s;
  color: #666;
}

.mega-menu .dropdown-item:hover {
  background-color: #f8f9fa;
  color: #0d6efd;
  padding-left: 20px;
}

/* Mobile Responsive for Mega Menu */
@media (max-width: 991px) {
  .mega-menu {
    position: static !important;
    width: 100%;
    box-shadow: none;
    border: none;
    padding: 10px 0;
  }

  .mega-dropdown .dropdown-menu {
    display: none;
  }

  .mega-dropdown.show .dropdown-menu {
    display: block;
  }

  .mega-menu .row {
    flex-direction: column;
  }

  .mega-menu .col-md-3,
  .mega-menu .col-md-4 {
    width: 100%;
    margin-bottom: 15px;
  }

  .mega-menu-title {
    font-size: 14px;
    margin-top: 10px;
  }

  /* Mobile Navigation Link Adjustments */
  .navbar-nav .nav-link {
    padding: 12px 16px !important;
  }

  .navbar-nav .nav-link:hover {
    transform: translateX(5px);
  }

  .navbar-nav .nav-link::before {
    height: 2px;
    left: 0;
    transform: translateX(0);
  }

  .navbar-nav .nav-link:hover::before {
    width: 100%;
  }
}

/* Hero Swiper Section */
.hero-swiper {
  position: relative;
  width: 100%;
  height: 750px;
  overflow: hidden;
  background: white;
}

.swiper-slide {
  background: white !important;
}

.swiper-wrapper {
  background: white !important;
}

.heroSwiper {
  width: 100%;
  height: 100%;
  background: white;
}

.hero-slide {
  position: relative;
  width: 100%;
  height: 750px;
  background-color: #f5f5f5;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.3s ease;
}

/* Hero Video Background */
.hero-video-slide {
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 0;
  object-fit: cover;
  animation: slowVideo 12s linear infinite;
}

@keyframes slowVideo {
  from { opacity: 1; }
  to { opacity: 1; }
}

/* Phone Icon Animation */
.phone-icon {
  display: inline-block;
  transition: all 0.3s ease;
  animation: phoneRing 2s ease-in-out infinite;
}

@keyframes phoneRing {
  0%, 100% {
    transform: rotate(0deg);
  }
  10%, 30% {
    transform: rotate(-15deg);
  }
  20%, 40% {
    transform: rotate(15deg);
  }
  50% {
    transform: rotate(0deg);
  }
}

.phone-icon:hover {
  animation: phoneShake 0.5s ease-in-out infinite;
  color: #ffca2c !important;
}

@keyframes phoneShake {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-10deg);
  }
  75% {
    transform: rotate(10deg);
  }
}

/* Mobile Optimization for Hero */
@media (max-width: 768px) {
  .hero-swiper {
    height: 500px;
  }
  
  .hero-slide {
    height: 500px;
  }
  
  .hero-video {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
  
  .hero-content h1 {
    font-size: 1.8rem !important;
  }
  
  .hero-content p {
    font-size: 1rem !important;
  }
  
  .hero-content .btn {
    font-size: 0.9rem !important;
    padding: 10px 20px !important;
  }
}

/* Blur effect for loading images */
.hero-slide.loading {
  filter: blur(10px);
  transform: scale(1.05);
}

.hero-slide.loaded {
  filter: blur(0);
  transform: scale(1);
  transition: filter 0.6s ease, transform 0.6s ease;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* Image loading spinner */
.hero-slide.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  margin: -25px 0 0 -25px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 10;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: center;
  max-width: 800px;
  padding: 20px;
}

.hero-content h1 {
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-content p {
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* Swiper Navigation Buttons */
.swiper-button-next,
.swiper-button-prev {
  color: white;
  background: transparent;
  width: auto;
  height: auto;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 40px;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  color: #feb809;
}

/* Swiper Pagination */
.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: white;
  opacity: 0.7;
}

.swiper-pagination-bullet-active {
  background: #feb809;
  opacity: 1;
}

/* Portfolio Section */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.4s ease;
}

.portfolio-item img {
  transition: transform 0.5s ease;
  width: 100%;
  height: auto;
  display: block;
}

.portfolio-item:hover img {
  transform: scale(1.15);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.5), rgba(78, 159, 255, 0.5));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-text {
  text-align: center;
  color: white;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-text {
  transform: translateY(0);
}

.portfolio-text h5 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

.portfolio-text p {
  font-size: 14px;
  opacity: 0.9;
}

/* Feature Icons */
.feature-icon {
  font-size: 40px;
  color: #0d6efd;
}

/* Pricing Cards */
.pricing-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 30px;
  transition: 0.3s;
}

.pricing-card:hover {
  transform: translateY(-10px);
  box-shadow: 0px 10px 25px rgba(0,0,0,0.1);
}

/* Business Division Section */
.business-card {
  position: relative;
  height: 300px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.business-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.business-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.business-content {
  position: relative;
  z-index: 2;
  padding: 30px;
  text-align: left;
}

.business-content h4 {
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
  margin-bottom: 10px;
}

.business-content p {
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
  margin: 0;
}

/* Business Division Buttons */
.business-btn {
  border: 2px solid white;
  color: white;
  background: transparent;
  padding: 10px 25px;
  font-weight: 500;
  transition: all 0.3s;
}

.business-btn:hover {
  background: white;
  color: #333;
  border-color: white;
}

/* Process Section - Timeline Style */
.process-timeline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 0 auto;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  position: relative;
}

.process-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

/* 단계별 그라데이션 색상 */
.process-step:nth-child(1) .process-circle {
  background: linear-gradient(135deg, #fff44f, #ffeb3b);
}

.process-step:nth-child(2) .process-circle {
  background: linear-gradient(135deg, #ffd54f, #ffc107);
}

.process-step:nth-child(3) .process-circle {
  background: linear-gradient(135deg, #ffb74d, #ff9800);
}

.process-step:nth-child(4) .process-circle {
  background: linear-gradient(135deg, #ff9800, #ff6f00);
}

.process-step:nth-child(5) .process-circle {
  background: linear-gradient(135deg, #8d6e63, #5d4037);
}

.process-step:nth-child(6) .process-circle {
  background: linear-gradient(135deg, #424242, #212121);
}

.process-step:hover .process-circle {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.process-num {
  font-size: 15px;
  font-weight: bold;
  color: white;
  line-height: 1.4;
  text-align: center;
  padding: 10px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* 어두운 배경일 때 텍스트 색상 */
.process-step:nth-child(5) .process-num,
.process-step:nth-child(6) .process-num {
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* AS 텍스트 크기 */
.process-step:nth-child(5) .process-num {
  font-size: 24px;
}

/* 밝은 배경일 때 텍스트 색상 */
.process-step:nth-child(1) .process-num,
.process-step:nth-child(2) .process-num,
.process-step:nth-child(3) .process-num {
  color: #333;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.process-content {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-content h5 {
  font-size: 16px;
  color: #333;
  margin-bottom: 8px;
}

.process-content p {
  font-size: 13px;
  line-height: 1.5;
  color: #666;
  margin: 0;
}

.process-arrow {
  position: absolute;
  right: -50px;
  top: 35%;
  transform: translateY(-50%);
  color: #999;
  font-size: 40px;
  font-weight: bold;
  transition: all 0.3s ease;
  z-index: 1;
  cursor: default;
}

.process-arrow:after {
  content: '>';
}

.process-arrow:hover {
  color: #666;
}

.process-step:last-child .process-arrow {
  display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .process-timeline {
    flex-direction: column;
    gap: 40px;
  }

  .process-step {
    max-width: 100%;
  }

  .process-arrow {
    right: auto;
    top: auto;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
  }
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.95);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  animation: zoomIn 0.3s ease;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
}

@keyframes zoomIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10000;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #0d6efd;
  transform: rotate(90deg);
}

.lightbox-caption {
  margin-top: 20px;
  text-align: center;
  color: #fff;
  font-size: 18px;
  max-width: 700px;
}

.lightbox-caption h5 {
  font-size: 24px;
  margin-bottom: 10px;
  font-weight: bold;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 5px;
  transition: all 0.3s ease;
  user-select: none;
  z-index: 10000;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(13, 110, 253, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 20px;
  border-radius: 20px;
  z-index: 10000;
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 35px;
    padding: 10px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
}

/* Footer */
footer {
  background: #111;
  color: #aaa;
  padding: 40px 0;
}
