/* ==========================================
   St Luke's Rehabilitation Services
   Custom Styles
   ========================================== */

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

/* ==========================================
   Geometric Background Shapes (Hero)
   ========================================== */
.geo-shape {
  position: absolute;
  opacity: 0.15;
  pointer-events: none;
}

.geo-circle-1 {
  width: 500px;
  height: 500px;
  border: 3px solid rgba(251, 191, 36, 0.4);
  border-radius: 50%;
  top: -100px;
  right: -100px;
  animation: float 8s ease-in-out infinite;
}

.geo-circle-2 {
  width: 300px;
  height: 300px;
  background: rgba(251, 191, 36, 0.1);
  border-radius: 50%;
  bottom: 10%;
  left: 5%;
  animation: float 10s ease-in-out infinite reverse;
}

.geo-square-1 {
  width: 120px;
  height: 120px;
  border: 2px solid rgba(244, 114, 182, 0.3);
  top: 30%;
  right: 15%;
  transform: rotate(45deg);
  animation: spin 20s linear infinite;
}

.geo-square-2 {
  width: 80px;
  height: 80px;
  background: rgba(251, 191, 36, 0.15);
  bottom: 25%;
  left: 15%;
  transform: rotate(30deg);
  animation: spin 15s linear infinite reverse;
}

.geo-triangle {
  width: 0;
  height: 0;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-bottom: 104px solid rgba(244, 114, 182, 0.2);
  top: 20%;
  left: 8%;
  animation: float 6s ease-in-out infinite;
}

.geo-dot-group {
  display: flex;
  gap: 12px;
  top: 60%;
  right: 8%;
  flex-wrap: wrap;
  width: 80px;
}

.geo-dot-group span {
  width: 8px;
  height: 8px;
  background: rgba(251, 191, 36, 0.5);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.geo-dot-group span:nth-child(2) { animation-delay: 0.3s; background: rgba(244, 114, 182, 0.5); }
.geo-dot-group span:nth-child(3) { animation-delay: 0.6s; }
.geo-dot-group span:nth-child(4) { animation-delay: 0.9s; background: rgba(244, 114, 182, 0.5); }
.geo-dot-group span:nth-child(5) { animation-delay: 1.2s; }

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(var(--rotation, 0deg)); }
  50% { transform: translateY(-20px) rotate(var(--rotation, 0deg)); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* ==========================================
   Navigation
   ========================================== */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background: rgba(253, 244, 248, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(128, 20, 77, 0.08);
}

.nav-link {
  position: relative;
}

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

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

/* Mobile Menu */
#mobile-menu.open {
  opacity: 1 !important;
  pointer-events: all !important;
}

.hamburger-line.active:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-line.active:nth-child(2) {
  opacity: 0;
}

.hamburger-line.active:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================
   Service Cards
   ========================================== */
.service-card {
  position: relative;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(131, 20, 77, 0.1), rgba(251, 191, 36, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

/* ==========================================
   Approach Cards
   ========================================== */
.approach-card {
  position: relative;
}

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

/* ==========================================
   Testimonial Cards
   ========================================== */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: 'Playfair Display', serif;
  font-size: 80px;
  color: rgba(131, 20, 77, 0.06);
  line-height: 1;
  pointer-events: none;
}

/* ==========================================
   Scroll Reveal Animations
   ========================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .geo-shape {
    animation: none;
  }
  
  .geo-square-1, .geo-square-2 {
    animation: none;
  }
}

/* ==========================================
   Form Styles
   ========================================== */
input:focus, select:focus, textarea:focus {
  border-color: #be185d !important;
  box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.1);
}

/* ==========================================
   Responsive Adjustments
   ========================================== */
@media (max-width: 768px) {
  .geo-circle-1 {
    width: 300px;
    height: 300px;
  }
  
  .geo-circle-2 {
    width: 150px;
    height: 150px;
  }
  
  .geo-square-1 {
    width: 60px;
    height: 60px;
  }
  
  .geo-square-2 {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 640px) {
  #hero h1 {
    font-size: 3.5rem;
  }
}
