/* =====================================================
   Studio Stephany Karlly - Custom Styles
   Fisioterapia e Pilates
   ===================================================== */

/* Base Styles */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

/* Selection */
::selection {
  background-color: #1a5f4a;
  color: white;
}

/* Focus States for Accessibility */
*:focus-visible {
  outline: 2px solid #1a5f4a;
  outline-offset: 2px;
}

/* Header Scroll Effect */
#header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

#mobile-menu.open {
  max-height: 500px;
}

/* Hero Section */
#inicio {
  min-height: 100vh;
  min-height: 100dvh;
}

/* Smooth Hover Transitions */
a, button {
  transition: all 0.3s ease;
}

/* Card Hover Effects */
.group:hover {
  transform: translateY(-8px);
}

/* Service Cards */
.group .transition-all {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form Styles */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(26, 95, 74, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

/* Button Ripple Effect */
button, .btn {
  position: relative;
  overflow: hidden;
}

button::after, .btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

button:active::after, .btn:active::after {
  width: 300px;
  height: 300px;
}

/* Lucide Icons Fill Fix */
[data-lucide="star"] {
  fill: currentColor;
}

/* WhatsApp Float Button Animation */
.fixed.bottom-6.right-6 {
  animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
}

/* Scroll Indicator Animation */
.animate-bounce {
  animation: bounce 2s infinite;
}

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

/* Testimonial Cards */
#depoimentos .bg-white {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#depoimentos .bg-white:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Image Loading Placeholder */
img {
  background-color: #f5f5f0;
}

/* Lazy Load Fade In */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded,
img:not([loading="lazy"]) {
  opacity: 1;
}

/* Gradient Text */
.text-gradient {
  background: linear-gradient(135deg, #1a5f4a 0%, #d4883a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Contact Form Success State */
#contact-form.success {
  position: relative;
}

#contact-form.success::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26, 95, 74, 0.95);
  border-radius: 1.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Map Iframe */
iframe {
  filter: grayscale(20%);
  transition: filter 0.3s ease;
}

iframe:hover {
  filter: grayscale(0%);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: #1a5f4a;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #134a39;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  /* Reduce motion for performance */
  .group:hover {
    transform: none;
  }

  /* Adjust hero text */
  #inicio h1 {
    font-size: 2.25rem;
    line-height: 1.2;
  }

  /* Stack contact cards */
  #contato .grid.sm\\:grid-cols-2 {
    grid-template-columns: 1fr;
  }

  /* Smaller floating badges */
  .absolute.-bottom-6,
  .absolute.-top-6 {
    position: relative;
    bottom: auto;
    top: auto;
    left: auto;
    right: auto;
    margin: 1rem 0;
  }
}

/* Print Styles */
@media print {
  #header,
  #mobile-menu,
  .fixed.bottom-6.right-6,
  form {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  a {
    text-decoration: none;
    color: #000;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary: #0d4030;
    --secondary: #6b2020;
    --accent: #b06b20;
  }

  body {
    color: #000;
  }

  a, button {
    text-decoration: underline;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode support
  body {
    background-color: #1a1a1a;
    color: #e5e5e5;
  }

  #header {
    background-color: rgba(26, 26, 26, 0.95);
  }
  */
}
