/**
 * VSR Packers and Movers - Custom Styles
 * Complements Tailwind CSS utility classes
 */

/* ==========================================
   Base & Reset
   ========================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

::selection {
  background-color: #0f4c81;
  color: #fff;
}

/* ==========================================
   Typography
   ========================================== */

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

/* ==========================================
   Header
   ========================================== */

#mainHeader {
  transition: all 0.3s ease;
}

#mainHeader.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
  border-bottom-color: transparent;
}

/* ==========================================
   Desktop Dropdown
   ========================================== */

.group\/dd > div {
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

.group\/dd:hover > div {
  transform: translateY(0);
}

/* ==========================================
   Mobile Dropdown
   ========================================== */

.mobile-dropdown-wrap .mobile-dd-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-dropdown-wrap.open .mobile-dd-content {
  max-height: 400px;
  display: block;
}

.mobile-dropdown-wrap.open .mobile-dd-toggle i {
  transform: rotate(180deg);
}

/* ==========================================
   Scroll-down indicator animation
   ========================================== */

@keyframes scrollDown {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(8px);
  }
}

.animate-scroll-down {
  animation: scrollDown 1.5s ease-in-out infinite;
}

/* ==========================================
   Animations - Intersection Observer
   ========================================== */

[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="fade-right"] {
  transform: translateX(-40px);
}

[data-animate="fade-left"] {
  transform: translateX(40px);
}

[data-animate="fade-up"] {
  transform: translateY(30px);
}

[data-animate="zoom-in"] {
  transform: scale(0.9);
}

[data-animate].animated {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* ==========================================
   FAQ Accordion
   ========================================== */

.faq-item.active {
  border-color: #0f4c81;
  background-color: #f8fafc;
  box-shadow: 0 4px 16px rgba(15, 76, 129, 0.08);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: #0f4c81;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-content {
  max-height: 500px;
}

/* ==========================================
   Counter Animation
   ========================================== */

.counter {
  font-variant-numeric: tabular-nums;
}

/* ==========================================
   Testimonial Slider
   ========================================== */

.testimonial-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: #d1d5db;
  transition: all 0.3s ease;
  cursor: pointer;
}

.testimonial-dot.active {
  width: 24px;
  background-color: #0f4c81;
}

/* ==========================================
   Form States
   ========================================== */

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

input.error,
select.error,
textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ==========================================
   Button Loading State
   ========================================== */

.btn-loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-loading .btn-text {
  visibility: hidden;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================
   Back to Top
   ========================================== */

#backToTop {
  transition: all 0.3s ease;
}

#backToTop.show {
  display: flex;
}

/* ==========================================
   Logo Slider
   ========================================== */

.logo-slider-mask {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logo-slider-track {
  animation: logoScroll 30s linear infinite;
  width: max-content;
}

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

@keyframes logoScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ==========================================
   Gallery Hover Effects
   ========================================== */

#gallery .group:hover {
  transform: scale(1.02);
  z-index: 10;
}

#gallery .group {
  transition: transform 0.3s ease;
}

/* ==========================================
   Custom Scrollbar
   ========================================== */

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ==========================================
   Loading Animation
   ========================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* ==========================================
   Responsive Fixes
   ========================================== */

@media (max-width: 640px) {
  [data-animate] {
    transform: translateY(20px) !important;
  }

  [data-animate="fade-right"],
  [data-animate="fade-left"] {
    transform: translateY(20px) !important;
  }
}

/* ==========================================
   Blog Post Content Styles
   ========================================== */

.blog-content p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.blog-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-content h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.blog-content ul,
.blog-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.blog-content ul li,
.blog-content ol li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.blog-content a {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.blog-content strong {
  color: #1e293b;
  font-weight: 700;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================
   JustValidate Error Labels
   ========================================== */

.jv-error-label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #ef4444;
  font-weight: 500;
}

input.error,
textarea.error,
select.error {
  border-color: #ef4444 !important;
  background-color: #fff5f5 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* ==========================================
   Floating Action Buttons Animation
   ========================================== */

@keyframes bounce-slow {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.animate-bounce-slow {
  animation: bounce-slow 2s infinite ease-in-out;
}

.animate-bounce-slow:hover {
  animation: none;
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {
  header,
  footer,
  #backToTop,
  #cta,
  .fixed.bottom-6.right-6 {
    display: none !important;
  }
}
