/* Custom Styles for Dr. Frank Lucchetti Psychology Practice */

/* Base */
html {
  scroll-behavior: smooth;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #F8F6F0;
}
::-webkit-scrollbar-thumb {
  background: #89c57d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5fa854;
}

/* Navbar Transition */
#navbar {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
  background-color: rgba(248, 246, 240, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Mobile Menu */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Mobile Menu Button Animation */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
#mobile-menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#mobile-menu-btn.active .menu-line:nth-child(3) {
  transform: translateY(-4px) translateX(4px) rotate(-45deg);
  width: 1.25rem;
}

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

/* Approach Cards */
.approach-card {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.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; }

/* 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;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Selection Color */
::selection {
  background-color: #89c57d;
  color: #163714;
}

/* Focus Styles */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #5fa854;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Select Dropdown */
select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a6b24' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

/* Form Input Transitions */
input, select, textarea {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(42, 107, 36, 0.1);
}

/* Image Hover Effects */
img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Button Ripple Effect (subtle) */
button, a {
  position: relative;
  overflow: visible;
}

/* Geometric Decorative Elements */
.geo-shape-1 {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 2px solid rgba(137, 197, 125, 0.2);
  border-radius: 20px;
  transform: rotate(45deg);
  pointer-events: none;
}

.geo-shape-2 {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px solid rgba(137, 197, 125, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

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

/* Print Styles */
@media print {
  nav, #mobile-menu, button, .service-card, .approach-card {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
  section {
    page-break-inside: avoid;
  }
}
