/* ==========================================================================
   Florecer Pilates - Custom Styles
   ========================================================================== */

/* Custom Properties */
:root {
  --primary: #20B2AA;
  --primary-dark: #1a9089;
  --secondary: #1e3a5f;
  --accent: #cf02aa;
  --accent-light: #e855c5;
  --neutral: #f7f9fa;
  --neutral-dark: #e8eaed;
}

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

body {
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: var(--primary);
  color: white;
}

/* Focus Styles for Accessibility */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--secondary);
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s;
}

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

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

/* Navigation Link Hover Effect */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hero Section */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}

/* Service Cards Animation */
.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

/* Scroll Animations */
[data-aos] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* Form Styles */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.2);
}

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

/* Button Hover Effects */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover::before {
  left: 100%;
}

/* Scroll Indicator Animation */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-10px) translateX(-50%);
  }
  60% {
    transform: translateY(-5px) translateX(-50%);
  }
}

/* Loading State for Forms */
.form-loading {
  pointer-events: none;
  opacity: 0.7;
}

.form-loading button[type="submit"] {
  background: #9ca3af;
}

/* Success/Error States */
.form-success {
  background: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
  padding: 1rem;
  border-radius: 0.75rem;
  margin-top: 1rem;
}

.form-error {
  background: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
  padding: 1rem;
  border-radius: 0.75rem;
  margin-top: 1rem;
}

/* Map Hover Effect */
iframe {
  transition: filter 0.5s ease;
}

/* WhatsApp Button Pulse */
@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

a[href*="wa.me"]:not(.mobile-nav-link):not(.nav-link) {
  animation: pulse-green 2s infinite;
}

/* Testimonial Cards */
#testimonials .group:hover {
  transform: translateY(-5px);
}

/* Section Transitions */
section {
  position: relative;
}

/* Image Loading */
img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img.loaded {
  opacity: 1;
}

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

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

/* Smooth Scroll Offset for Fixed Header */
section[id] {
  scroll-margin-top: 80px;
}

/* Typography Enhancements */
.font-serif {
  letter-spacing: -0.02em;
}

/* Card Hover Effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }

  #hero h1 {
    font-size: 2.5rem;
  }

  section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

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

  section {
    page-break-inside: avoid;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary: #007a7a;
    --accent: #a30086;
  }

  .text-white\/70,
  .text-white\/60 {
    color: rgba(255, 255, 255, 0.9) !important;
  }
}
