/* ============================================
   Apex Painting & Renevations LLC - Custom Styles
   ============================================ */

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection Color */
::selection {
  background-color: #C5985E;
  color: white;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FAF7F2;
}
::-webkit-scrollbar-thumb {
  background: #C5985E;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #A67C42;
}

/* Hide scrollbar for filter tabs */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */
#navbar.scrolled {
  background-color: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(44, 40, 36, 0.08);
}

#navbar.scrolled .nav-logo-text,
#navbar.scrolled .hamburger-line {
  color: #2C2824;
}

/* Mobile menu active state */
#mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

/* Hamburger animation */
.hamburger-active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.hamburger-active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.5rem;
}

.mobile-menu-close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  z-index: 9999;
}
/* ============================================
   ANIMATION STYLES
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Floating card animation */
.floating-card {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Service card hover effect */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(197, 152, 94, 0.05), rgba(166, 124, 66, 0.05));
  opacity: 0;
  transition: opacity 0.5s;
}

.service-card:hover::before {
  opacity: 1;
}

/* Button shine effect */
.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  transform: rotate(45deg) translateX(-100%);
  transition: transform 0.6s;
}

.btn-shine:hover::after {
  transform: rotate(45deg) translateX(100%);
}

/* ============================================
   PORTFOLIO GRID STYLES
   ============================================ */
.portfolio-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.portfolio-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-card.hiding {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

/* Filter tab styles */
.filter-tab {
  background-color: transparent;
  color: #6B6560;
  border: 1.5px solid #E8DFD0;
}

.filter-tab.active {
  background-color: #C5985E;
  color: white;
  border-color: #C5985E;
}

.filter-tab:hover:not(.active) {
  border-color: #C5985E;
  color: #C5985E;
}

/* ============================================
   LIGHTBOX STYLES
   ============================================ */
#lightbox.active {
  opacity: 1;
  pointer-events: all;
}

#lightbox-content {
  animation: lightboxIn 0.3s ease-out;
}

@keyframes lightboxIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ============================================
   FORM STYLES
   ============================================ */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(197, 152, 94, 0.15);
}

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */

/* Mobile-specific improvements */
@media (max-width: 640px) {
  /* Larger touch targets */
  a, button {
    min-height: 44px;
  }

  /* Prevent horizontal overflow */
  body {
    overflow-x: hidden;
  }

  /* Better mobile spacing */
  section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Mobile menu improvements */
  #mobile-menu a {
    padding: 0.75rem 1.5rem;
  }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .floating-card {
    animation: none;
  }

  .btn-shine::after {
    display: none;
  }

  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  nav, footer, #lightbox {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }
}