/* ===== Custom Styles for Cristina Sáez Peluquería & Estética ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1a1a1a;
}
::-webkit-scrollbar-thumb {
  background: #383838;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #e8734a;
}

/* Selection */
::selection {
  background: rgba(232, 115, 74, 0.3);
  color: #f7f7f7;
}

/* ===== Header ===== */
#header {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#header.scrolled {
  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 1px;
  background: #e8734a;
  transition: width 0.3s ease, left 0.3s ease;
}

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

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

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

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

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

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

/* Menu button animation */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  width: 1.25rem;
}

/* ===== Hero Floating Cards ===== */
.floating-card-1 {
  animation: float1 4s ease-in-out infinite;
}

.floating-card-2 {
  animation: float2 5s ease-in-out infinite;
}

.floating-card-3 {
  animation: float3 4.5s ease-in-out infinite;
}

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

@keyframes float2 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

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

/* Scroll indicator */
.animate-scroll-indicator {
  animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -16px; opacity: 0; }
  50% { opacity: 1; }
  100% { top: 48px; opacity: 0; }
}

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

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e8734a, transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

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

/* ===== Gallery ===== */
.gallery-item {
  cursor: pointer;
}

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

.reveal.visible {
  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; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .floating-card-1,
  .floating-card-2,
  .floating-card-3 {
    display: none;
  }
}

/* ===== Focus visible ===== */
:focus-visible {
  outline: 2px solid #e8734a;
  outline-offset: 2px;
}

/* ===== Print ===== */
@media print {
  #header, footer {
    background: white !important;
    color: black !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
}
