/* Custom Styles for Madeira Climbing Center */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

/* Hero Background */
.hero-bg {
  background: 
    linear-gradient(135deg, #1a1520 0%, #0f1114 35%, #0f1114 65%, #0e1a1a 100%);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Navbar styles */
#navbar {
  background: transparent;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#navbar.scrolled .nav-link,
#navbar.scrolled a,
#navbar.scrolled button,
#navbar.scrolled span:not([class*="bg-"]) {
  color: #374151;
}

#navbar.scrolled .nav-link:hover,
#navbar.scrolled a:hover {
  color: #111827;
}

#navbar.scrolled .font-heading,
#navbar.scrolled #nav-title {
  color: #111827;
}

/* Animations */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 1s ease forwards;
}

.animate-fade-in-up {
  animation: fade-in-up 1s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.animate-fade-in-up-delay {
  animation: fade-in-up 1s ease forwards;
  animation-delay: 0.5s;
  opacity: 0;
}

.animate-fade-in-up-delay-2 {
  animation: fade-in-up 1s ease forwards;
  animation-delay: 0.8s;
  opacity: 0;
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Activity cards stagger */
.activity-card:nth-child(1) { transition-delay: 0s; }
.activity-card:nth-child(2) { transition-delay: 0.15s; }
.activity-card:nth-child(3) { transition-delay: 0.3s; }

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Selection color */
::selection {
  background: rgba(212, 135, 46, 0.3);
  color: white;
}

/* Form select styling */
select option {
  background: white;
  color: #111827;
}

/* Back to top button active state */
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Texture overlay for sections */
.section-alt::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0,0,0,0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* Hover effects */
.activity-card > div:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

/* Smooth image placeholder gradients */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Responsive text adjustments */
@media (max-width: 640px) {
  .font-heading {
    letter-spacing: -0.02em;
  }
}

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

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

/* Dropdown animations */
#activities-dropdown-menu,
#about-dropdown-menu {
  opacity: 0;
  transform: translateY(-4px) translateX(-50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

#activities-dropdown-menu.show,
#about-dropdown-menu.show {
  opacity: 1;
  transform: translateY(0) translateX(-50%);
  pointer-events: auto;
}

#dropdown-chevron.rotated,
#about-chevron.rotated {
  transform: rotate(180deg);
}

#mobile-dd-chevron.rotated {
  transform: rotate(180deg);
}

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