/* ============================================
   Raspas y Más — Custom Styles
   ============================================ */

/* ---- Base & Smooth Scrolling ---- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* ---- Selection ---- */
::selection {
  background: #f8c5ce;
  color: #4f1d2a;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fefdfb;
}
::-webkit-scrollbar-thumb {
  background: #f19aab;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #c24a5e;
}

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

#navbar.scrolled {
  background: rgba(254, 253, 251, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 1px 0 rgba(123, 45, 59, 0.06), 0 4px 24px rgba(123, 45, 59, 0.04);
}

.nav-logo-text {
  transition: color 0.3s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
  color: #7B2D3B;
}

/* ---- Nav Links ---- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7B2D3B, #C2756E);
  border-radius: 1px;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
  width: 60%;
  left: 20%;
}

/* ---- Mobile Menu ---- */
#mobileMenu.open {
  opacity: 1;
  pointer-events: auto;
}

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7B2D3B, #C2756E);
  transition: width 0.3s ease;
}

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

/* ---- Hero Blobs ---- */
.hero-blob {
  animation: blobFloat 8s ease-in-out infinite;
}

.hero-blob-1 {
  animation-delay: 0s;
}

.hero-blob-2 {
  animation-delay: -3s;
}

.hero-blob-3 {
  animation-delay: -5s;
  animation-duration: 10s;
}

@keyframes blobFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(20px, -30px) scale(1.05);
  }
  66% {
    transform: translate(-15px, 15px) scale(0.95);
  }
}

/* ---- Logo Circle Animation ---- */
.logo-circle {
  animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

/* ---- Reveal Animations ---- */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Animations are progressive enhancement — content is visible by default */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 0;
  }

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

  .reveal-up {
    transform: translateY(40px);
  }

  .reveal-left {
    transform: translateX(-40px);
  }

  .reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
  }

  .reveal-right {
    transform: translateX(40px);
  }

  .reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ---- Button Hover Effects ---- */
button[type="submit"],
a[href="#specialties"] {
  position: relative;
  overflow: hidden;
}

button[type="submit"]::before,
a[href="#specialties"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

button[type="submit"]:hover::before,
a[href="#specialties"]:hover::before {
  opacity: 1;
}

/* ---- Card Hover ---- */
.group:hover .group-hover\\:scale-105 {
  transform: scale(1.05);
}

/* ---- Form Focus States ---- */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(248, 154, 171, 0.2);
}

/* ---- Image Hover ---- */
.rounded-2xl.overflow-hidden img {
  will-change: transform;
}

/* ---- Smooth Image Loading ---- */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* ---- Print ---- */
@media print {
  #navbar,
  #mobileMenu,
  .hero-blob {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  a {
    color: black !important;
    text-decoration: underline !important;
  }
}

/* ---- 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;
  }
}
