/* S&H Beauty Nails Landing Page - Custom CSS */

/* Font Loading Optimization */
@font-face {
  font-family: 'Inter';
  font-display: swap;
  src: url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
}

@font-face {
  font-family: 'Playfair Display';
  font-display: swap;
  src: url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&display=swap');
}

/* Root Variables for Easy Theme Customization */
:root {
  --primary-50: #fdf2f8;
  --primary-500: #ec4899;
  --primary-600: #db2777;
  --primary-900: #831843;
  --neutral-50: #fafafa;
  --neutral-600: #525252;
  --neutral-900: #171717;
  --gold-400: #fbbf24;
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

/* Body Base Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Improved Focus States for Accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* Custom Button Animations */
.btn-primary {
  @apply bg-primary-500 hover:bg-primary-600 text-white px-6 py-3 rounded-full font-semibold transition-all transform hover:scale-105 shadow-lg;
}

.btn-primary:hover {
  box-shadow: var(--shadow-xl);
}

/* Hero Section Animations */
.hero-content {
  animation: fadeInUp 0.8s ease-out;
}

.hero-image {
  animation: fadeInRight 1s ease-out 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Service Cards Hover Effects */
.service-card {
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

/* Star Rating Improvements */
.star-rating {
  color: var(--gold-400);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Custom Form Styling */
.form-input {
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.form-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Gallery Hover Effects */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

.gallery-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.8), rgba(219, 39, 119, 0.6));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

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

.gallery-item::after {
  content: '👁';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 20;
}

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

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

::-webkit-scrollbar-track {
  background: var(--neutral-50);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-500);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-600);
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--neutral-900);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --primary-500: #d91a72;
    --primary-600: #be185d;
    --neutral-600: #000000;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}

/* Mobile Specific Optimizations */
@media (max-width: 640px) {
  /* Improve touch targets */
  button,
  a,
  input,
  select {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Optimize form inputs for mobile */
  input[type="tel"] {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Better spacing on mobile */
  .mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

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

/* Performance Critical CSS */
.lazy-load {
  opacity: 0;
  transition: opacity 0.3s;
}

.lazy-load.loaded {
  opacity: 1;
}

/* Critical Above-the-Fold Styles */
.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
}

/* CTA Button Pulse Animation */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.cta-pulse {
  animation: pulse 2s infinite;
}

/* Trust Indicators */
.trust-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* FAQ Accordion Animation */
.faq-item {
  transition: all 0.3s ease;
}

.faq-item.active {
  background-color: var(--primary-50);
}

/* Form Success/Error States */
.form-success {
  border-color: #10b981;
  background-color: #ecfdf5;
}

.form-error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

/* Sticky Header Shadow */
.header-scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

/* Performance: Will-change for animations */
.animated-element {
  will-change: transform, opacity;
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles if business requires */
}

/* Utility Classes */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.aspect-ratio-1-1 {
  aspect-ratio: 1 / 1;
}

/* Component: Rating Stars */
.rating-stars {
  display: inline-flex;
  gap: 0.125rem;
}

.rating-stars .star {
  color: var(--gold-400);
  font-size: 1rem;
}

/* Component: Service Icon Backgrounds */
.service-icon {
  background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
  transition: all 0.3s ease;
}

.service-icon:hover {
  background: linear-gradient(135deg, var(--primary-200), var(--primary-300));
  transform: scale(1.1);
}

/* Floating Animation for Special Elements */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* Gradient Background Animations */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.animated-gradient {
  background: linear-gradient(-45deg, #ec4899, #db2777, #be185d, #a21caf);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* Enhanced Service Cards */
.service-card-enhanced {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #fdf2f8 100%);
  border: 1px solid rgba(236, 72, 153, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card-enhanced:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(236, 72, 153, 0.15);
  border-color: rgba(236, 72, 153, 0.3);
}

.service-card-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.05), rgba(219, 39, 119, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

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

/* Enhanced Review Cards */
.review-card {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #fef7ff 100%);
  border: 1px solid rgba(236, 72, 153, 0.08);
  transition: all 0.3s ease;
}

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

/* Trust Badge Enhancements */
.trust-badge-enhanced {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(236, 72, 153, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Enhanced CTA Buttons */
.cta-enhanced {
  position: relative;
  background: linear-gradient(135deg, #ec4899, #db2777);
  border: none;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cta-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.cta-enhanced:hover::before {
  left: 100%;
}

.cta-enhanced:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

/* Gallery Hover Effects Enhanced */
.gallery-item-enhanced {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  transition: all 0.4s ease;
}

.gallery-item-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(236, 72, 153, 0.8), rgba(168, 85, 247, 0.6));
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 10;
}

.gallery-item-enhanced:hover::before {
  opacity: 1;
}

.gallery-item-enhanced::after {
  content: '✨ View Details';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: 600;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 20;
  text-align: center;
}

.gallery-item-enhanced:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.gallery-item-enhanced:hover {
  transform: scale(1.05);
}

/* Intersection Observer Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Critical CSS for layout shift prevention */
.hero-image-container {
  width: 100%;
  height: 400px;
  background-color: var(--neutral-50);
  border-radius: 1rem;
}

@media (min-width: 640px) {
  .hero-image-container {
    height: 500px;
  }
}

/* Enhanced FAQ Accordion Styles */
.faq-item.active {
  background: linear-gradient(135deg, #fef7ff 0%, #fdf2f8 100%);
  border-color: rgba(236, 72, 153, 0.3);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.15);
}

.faq-answer {
  animation: slideDown 0.3s ease-out;
  overflow: hidden;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    max-height: 200px;
    transform: translateY(0);
  }
}

/* Modal Animations */
#gallery-modal {
  animation: modalFadeIn 0.3s ease-out;
}

#gallery-modal.hidden {
  animation: modalFadeOut 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

/* Enhanced Hover Effects for Gallery */
.gallery-item-enhanced img {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Sparkle Animation for Special Elements */
@keyframes sparkle {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1) rotate(0deg);
  }
  50% { 
    opacity: 0.7; 
    transform: scale(1.1) rotate(180deg);
  }
}

.sparkle-animation {
  animation: sparkle 2s ease-in-out infinite;
}

/* Enhanced Button Glow Effects */
.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.btn-glow:hover::after {
  opacity: 1;
  animation: pulse 1.5s infinite;
}

/* Testimonial Card Enhancements */
.review-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: rgba(236, 72, 153, 0.1);
  font-family: serif;
  line-height: 1;
}

/* Service Card Icon Glow */
.service-card-enhanced .group-hover\:scale-110 {
  position: relative;
}

.service-card-enhanced:hover .group-hover\:scale-110::after {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 2s infinite;
  z-index: -1;
}

/* Trust Badge Floating Effect */
.trust-badge-floating {
  animation: float 4s ease-in-out infinite;
}

.trust-badge-floating:nth-child(2) {
  animation-delay: -1s;
}

.trust-badge-floating:nth-child(3) {
  animation-delay: -2s;
}

/* Enhanced Map Container */
.map-container {
  position: relative;
  overflow: hidden;
}

.map-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 0%, rgba(236, 72, 153, 0.05) 50%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Enhanced Special Offer Section */
.offer-floating-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.offer-floating-elements::before,
.offer-floating-elements::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.offer-floating-elements::before {
  top: 20%;
  left: 10%;
  animation-delay: -2s;
}

.offer-floating-elements::after {
  bottom: 20%;
  right: 10%;
  animation-delay: -4s;
}

/* Scroll Progress Indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #ec4899, #db2777);
  z-index: 1000;
  transition: width 0.3s ease;
}

/* Enhanced Loading States */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  .gallery-item-enhanced:hover {
    transform: scale(1.02);
  }
  
  .service-card-enhanced:hover {
    transform: translateY(-4px) scale(1.01);
  }
}

/* High-end Visual Effects */
.glass-morphism {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.text-gradient {
  background: linear-gradient(135deg, #ec4899, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  .gallery-item-enhanced,
  .service-card-enhanced,
  .review-card,
  .faq-item {
    transition: none;
  }
  
  .float-animation,
  .sparkle-animation,
  .trust-badge-floating {
    animation: none;
  }
}