/* =============================
   Elias Painting
   Custom Styles
   ============================= */

/* Tailwind directives are not needed - using CDN */

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
#navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
  background-color: rgba(26, 35, 50, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

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

/* Hero Section */
.hero-bg {
  background-image: url('../images/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 35, 50, 0.94) 0%,
    rgba(26, 35, 50, 0.7) 50%,
    rgba(26, 35, 50, 0.4) 100%
  );
  pointer-events: none;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(212, 168, 83, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(212, 168, 83, 0.05) 0%, transparent 50%);
  pointer-events: none;
}


.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
}

/* Gallery Grid */
#gallery-grid {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

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

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: #f3f4f6;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 35, 50, 0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item .gallery-overlay span {
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Lightbox */
#lightbox {
  opacity: 0;
  transition: opacity 0.3s ease;
}

#lightbox.active {
  opacity: 1;
}

#lightbox-img {
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

#lightbox.active #lightbox-img {
  transform: scale(1);
}

/* Contact Form */
#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* Loading spinner for form */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(26, 35, 50, 0.2);
  border-top-color: #1a2332;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Success animation for form */
@keyframes successPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.form-success {
  animation: successPulse 0.5s ease;
}

/* Mobile menu */
#mobile-menu {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  #gallery-grid {
    gap: 0.5rem;
  }
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 1000;
  padding: 8px 16px;
  background: #d4a853;
  color: #1a2332;
  font-weight: 600;
  transition: top 0.1s;
}

.skip-link:focus {
  top: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
