/* ===================================
   CLOVA SYSTEMS - Custom Stylesheet
   =================================== */

/* Base & Reset */
html {
  scroll-padding-top: 80px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: #3182ce;
  color: #fff;
}

/* ===================================
   Hero Section
   =================================== */
.hero-gradient {
  background: linear-gradient(135deg, #0f1f38 0%, #1a365d 40%, #2c5282 100%);
}

.hero-pattern {
  background-image:
    radial-gradient(circle at 25% 25%, rgba(49, 130, 206, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(99, 179, 237, 0.1) 0%, transparent 50%);
}

/* ===================================
   Navigation
   =================================== */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(15, 31, 56, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#navbar.scrolled .nav-link,
#navbar.scrolled .mobile-nav-link {
  color: rgba(255, 255, 255, 0.85);
}

#navbar.scrolled .nav-link:hover {
  color: #fff;
}

/* ===================================
   Cards & Hover Effects
   =================================== */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* ===================================
   Fade-up Animation
   =================================== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation delay for cards in a grid */
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }
.fade-up:nth-child(5) { transition-delay: 0.4s; }

/* Hero elements should be visible immediately once triggered */
#hero .fade-up {
  transition-delay: 0s;
}

#hero .fade-up:nth-child(1) { transition-delay: 0.2s; }
#hero .fade-up:nth-child(2) { transition-delay: 0.4s; }
#hero .fade-up:nth-child(3) { transition-delay: 0.6s; }

/* ===================================
   Contact Form
   =================================== */
#contact-form input:focus,
#contact-form textarea:focus {
  border-color: #3182ce;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: #a0aec0;
}

.form-success {
  background-color: #f0fff4;
  color: #276749;
  border: 1px solid #c6f6d5;
}

.form-error {
  background-color: #fff5f5;
  color: #c53030;
  border: 1px solid #fed7d7;
}

/* ===================================
   Mobile Menu Animation
   =================================== */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
  display: block;
  max-height: 400px;
}

/* ===================================
   Responsive Adjustments
   =================================== */
@media (max-width: 640px) {
  #hero h1 {
    font-size: 1.875rem;
    line-height: 1.3;
  }

  #hero p {
    font-size: 1rem;
  }

  section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

@media (max-width: 768px) {
  .grid {
    gap: 1rem;
  }
}

/* ===================================
   Scrollbar Styling
   =================================== */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #1a365d;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2c5282;
}

/* ===================================
   Utility
   =================================== */
.section-dark {
  background-color: #1a365d;
  color: #fff;
}

/* ===================================
   Client Marquee
   =================================== */
.marquee {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.marquee::before,
.marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.marquee::before {
  left: 0;
  background: linear-gradient(to right, #fff, transparent);
}

.marquee::after {
  right: 0;
  background: linear-gradient(to left, #fff, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  animation: marquee-scroll 60s linear infinite;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.client-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 180px;
  padding: 1.25rem 1rem;
}

.client-ci {
  width: auto;
  max-width: 140px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 0.75rem;
  border-radius: 8px;
}

.client-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a365d;
  text-align: center;
  line-height: 1.4;
  word-break: keep-all;
  white-space: nowrap;
}

/* ===================================
   Language Switcher (Dropdown)
   =================================== */
.lang-switcher {
  position: relative;
}

.lang-current {
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  border: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.lang-current:hover {
  opacity: 1;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: rgba(15, 31, 56, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px;
  min-width: 130px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown .lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-dropdown .lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.lang-dropdown .lang-btn.active {
  background: rgba(49, 130, 206, 0.2);
  color: #fff;
}
