/* Valdy Trim Solutions - Custom CSS with TailwindCSS */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* Logo splash screen styles */
.logo-splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.logo-splash.fade-out {
  opacity: 0;
  pointer-events: none;
}

.logo-splash img {
  max-width: 350px;
  max-height: 350px;
  animation: logoFadeIn 1s ease-in-out;
}

@keyframes logoFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Custom brand colors */
:root {
  --primary-blue: #1e3a8a;
  --light-blue: #3b82f6;
  --gray-light: #f3f4f6;
  --gray-dark: #374151;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom button styles */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(30, 58, 138, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(30, 58, 138, 0.35);
}

.btn-secondary {
  background: white;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--primary-blue);
  color: white;
  transform: translateY(-2px);
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background: #25d366;
  color: white;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.whatsapp-float:hover {
  background: #128c7e;
  transform: scale(1.1);
}

/* Gallery lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
  position: relative;
  margin: auto;
  max-width: 90%;
  max-height: 90%;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox video {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #bbb;
}

/* Video gallery styles */
.video-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  transition: all 0.3s ease;
}

.gallery-item:hover .video-overlay {
  transform: translate(-50%, -50%) scale(1.2);
}

.video-thumbnail {
  position: relative;
  background: #000;
  overflow: hidden;
}

/* Form styles */
.form-container {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin: 2rem 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--gray-dark);
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.checkbox-item:hover {
  border-color: var(--primary-blue);
  background: #f8fafc;
}

.checkbox-item input[type="checkbox"] {
  margin-right: 0.75rem;
  transform: scale(1.2);
}

.checkbox-item input[type="checkbox"]:checked + label {
  color: var(--primary-blue);
  font-weight: 600;
}

/* Service cards */
.service-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-blue);
}

/* Responsive design */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 24px;
  }

  .checkbox-group {
    grid-template-columns: 1fr;
  }

  .form-container {
    margin: 1rem;
    padding: 1.5rem;
  }
}

/* Navigation styles */
.nav-link {
  position: relative;
  color: #374151;
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-blue);
}

.nav-link.active {
  color: var(--primary-blue);
  font-weight: 600;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--primary-blue);
  transition: all 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}

/* Header styles - Optimized for all screen sizes */
header,
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  min-height: 70px;
  background-color: #ffffff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: none;
  transition: all 0.3s ease;
}

header.scrolled,
.header.scrolled {
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  border-bottom-color: transparent;
}

/* Navigation container - Optimized */
header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
}

/* Logo section */
.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Header text styles */
header .nav-link {
  color: #374151;
}

header .company-name {
  color: var(--primary-blue);
}

/* Company name styling */
.company-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-blue);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

/* Responsive company name */
@media (max-width: 640px) {
  .company-name {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .company-name {
    font-size: 1rem;
  }
}

.company-tagline {
  font-size: 0.7rem;
  color: #6b7280;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: -2px;
  line-height: 1;
}

/* Desktop navigation */
.desktop-menu {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .desktop-menu {
    display: flex;
  }
}

/* Mobile menu styles */
.mobile-menu {
  display: block;
  position: relative;
}

@media (min-width: 768px) {
  .mobile-menu {
    display: none;
  }
}

.mobile-menu-button {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.25rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.mobile-menu-button:hover {
  color: var(--primary-blue);
}

.mobile-menu-content {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  padding: 1rem 0;
  min-width: 200px;
  display: none;
  z-index: 1001;
  border: 1px solid #e5e7eb;
}

.mobile-menu-content.active {
  display: block;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu-content a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.mobile-menu-content a:hover,
.mobile-menu-content a.active {
  background-color: #f3f4f6;
  color: var(--primary-blue);
  font-weight: 600;
}

/* Content spacing to account for fixed header - Enhanced */
.content-with-header {
  padding-top: 90px;
}

/* Hero sections with header - Improved spacing */
.hero-section {
  padding-top: 90px;
  min-height: calc(100vh - 90px);
}

/* Page sections that start after header - Consistent spacing */
.page-section-first {
  padding-top: 110px;
  min-height: auto;
}

/* Ensure no content gets hidden behind header */
main {
  position: relative;
  z-index: 1;
}

/* Better responsive spacing */
@media (max-width: 768px) {
  .content-with-header,
  .hero-section,
  .page-section-first {
    padding-top: 80px;
  }

  header nav {
    padding: 0 0.75rem;
    min-height: 60px;
  }

  header {
    min-height: 60px;
  }
}

/* Hero section styles */
.hero-bg {
  background: linear-gradient(rgba(30, 58, 138, 0.7), rgba(59, 130, 246, 0.5)), url("../img/hero-background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  background-color: #1E3A8A; /* Fallback color */
}

/* Animation classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading animation for forms */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Floating Particles Background Effect */
.particles-bg {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.particles-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(
      circle at 10% 20%,
      rgba(30, 58, 138, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(59, 130, 246, 0.06) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(30, 58, 138, 0.04) 0%,
      transparent 50%
    );
  z-index: 1;
  pointer-events: none;
}

.particles-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(30, 58, 138, 0.15), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(59, 130, 246, 0.1), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(30, 58, 138, 0.1), transparent),
    radial-gradient(
      1px 1px at 130px 80px,
      rgba(59, 130, 246, 0.08),
      transparent
    ),
    radial-gradient(2px 2px at 160px 30px, rgba(30, 58, 138, 0.12), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: particlesFloat 20s linear infinite;
  z-index: 1;
  pointer-events: none;
}

.particles-bg .container {
  position: relative;
  z-index: 2;
}

@keyframes particlesFloat {
  0% {
    transform: translateY(0px) translateX(0px);
  }
  33% {
    transform: translateY(-10px) translateX(10px);
  }
  66% {
    transform: translateY(5px) translateX(-5px);
  }
  100% {
    transform: translateY(0px) translateX(0px);
  }
}

/* Lazy Loading Optimization */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

img.lazy-loaded {
  opacity: 1;
}

/* Image loading placeholder */
.image-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Critical CSS for above-the-fold content */
.hero-optimized {
  min-height: 100vh;
  background: linear-gradient(rgba(30, 58, 138, 0.8), rgba(59, 130, 246, 0.6));
}

/* Preload critical resources hint */
.preload-hint {
  display: none;
}
