/* Custom styles for agency website - SEOGrove.ai inspired */
:root {
  --primary-color: #ef2b70;
  --secondary-color: #22c55e;
  --accent-color: #8b5cf6;
  --text-dark: #0f172a;
  --text-light: #64748b;
  --bg-light: #f8fafc;
  --gradient-1: linear-gradient(135deg, #ef2b70 0%, #8b5cf6 100%);
  --gradient-2: linear-gradient(135deg, #22c55e 0%, #3b82f6 100%);
  --gradient-3: linear-gradient(135deg, #f97316 0%, #ef2b70 100%);
}

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

/* Modern button styles */
.btn-primary {
  background: var(--gradient-1);
  border-radius: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(239, 43, 112, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 43, 112, 0.3);
}

.btn-secondary {
  background: var(--gradient-2);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px 0 rgba(34, 197, 94, 0.25);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Portfolio hover effects */
.portfolio-item {
  transition: all 0.2s ease;
  cursor: pointer;
}

.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

/* Navigation active state - Desktop */
.nav-link.active {
  color: #ef2b70 !important;
  font-weight: 700 !important;
  position: relative;
}

/* Desktop navigation underline */
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ef2b70 0%, #8b5cf6 100%);
  border-radius: 2px;
}

/* Stronger selector for active nav links */
nav .nav-link.active,
ul .nav-link.active,
li .nav-link.active,
a.nav-link.active {
  color: #ef2b70 !important;
  font-weight: 700 !important;
}

/* Mobile navigation active state */
.nav-link.active.block {
  color: #ef2b70 !important;
  font-weight: 700 !important;
  border-left: 4px solid #ef2b70 !important;
  background-color: rgba(239, 43, 112, 0.1) !important;
  padding-left: 12px !important;
}

/* Service card hover effects */
.service-card {
  transition: all 0.2s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 43, 112, 0.3);
  box-shadow: 0 8px 20px rgba(239, 43, 112, 0.15);
}

.service-card i {
  transition: all 0.2s ease;
}

/* Form input focus effects */
input:focus, textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* WhatsApp floating button (optional) */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.whatsapp-float:hover {
  background-color: #128c7e;
}

/* Loading animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .pricing-card {
    margin-bottom: 2rem;
  }
}

/* Animation on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Modern card styles */
.card-modern {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-modern:hover {
  border: 1px solid rgba(239, 43, 112, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Removed floating blobs - too distracting */

/* Sparkle animation */
.sparkle {
  position: relative;
  overflow: hidden;
}

.sparkle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: sparkle 2s infinite;
}

@keyframes sparkle {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Glassmorphism effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
}

/* Modern typography */
.text-gradient {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Fallback for browsers that don't support -webkit-text-fill-color */
  color: #0f172a;
  text-shadow: none;
}

/* Ensure all text links are distinguishable and accessible */
/* Exclude navigation, logo, and icon-based links */
a:not(.btn-primary):not(.btn-secondary):not([class*="bg-"]):not([class*="rounded"]):not(.nav-link):not([href="#home"]):not(.portfolio-item) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:not(.btn-primary):not(.btn-secondary):not([class*="bg-"]):not([class*="rounded"]):not(.nav-link):not([href="#home"]):not(.portfolio-item):hover {
  text-decoration-thickness: 2px;
}

/* Navigation links should not have underlines */
nav a,
header a {
  text-decoration: none !important;
}

/* Focus visible state for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #ef2b70;
  outline-offset: 2px;
}

/* Ensure nav links have sufficient contrast and visual indicators */
nav a,
footer a {
  transition: all 0.2s ease;
}

/* Portfolio links should maintain underline on hover for clarity */
.portfolio-item:hover {
  text-decoration: none;
}

/* Social media icon links - ensure they have focus rings */
a[aria-label*="Facebook"],
a[aria-label*="Instagram"],
a[aria-label*="LinkedIn"],
a[aria-label*="YouTube"] {
  text-decoration: none;
}

/* Removed pulse glow - too distracting */

/* Pricing card specific styles */
.pricing-card {
  background: white;
  border: 3px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(239, 43, 112, 0.1), transparent);
  transition: left 0.5s;
}

.pricing-card:hover::before {
  left: 100%;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.pricing-card-featured {
  border: 3px solid var(--primary-color);
  box-shadow: 0 15px 40px rgba(239, 43, 112, 0.2);
}

.pricing-card-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(239, 43, 112, 0.25);
}

.pricing-card-featured-custom {
  background: var(--gradient-1);
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 15px 40px rgba(239, 43, 112, 0.2),
    0 0 0 1px rgba(239, 43, 112, 0.1);
  /* Removed scale */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 10;
  overflow: visible;
}

.pricing-card-featured-custom::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(45deg, rgba(255,255,255,0.3), transparent, rgba(255,255,255,0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; /* Safari compatibility */
  mask-composite: exclude;
  pointer-events: none;
}

.pricing-card-featured-custom:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(239, 43, 112, 0.25);
  z-index: 20;
}

/* Safari-compatible sticky header styles */
.header-container {
  position: -webkit-sticky; /* Safari compatibility first */
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: white;
  /* Add transform to force Safari to create a new stacking context */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.offer-bar {
  position: relative;
  width: 100%;
  height: 48px;
  z-index: 1001;
}

.main-nav {
  position: relative;
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  background: white;
  border-bottom: 1px solid #e5e7eb;
}

.main-nav > .max-w-screen-xl {
  flex: 1;
  width: 100%;
}

.hero-section {
  padding-top: 20px; /* Reduce since sticky header doesn't need as much space */
}

/* Premium animations and effects */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Removed morph animation */

/* Removed luxury glow animation */

/* Removed text shine animation */

/* Animation classes */
.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out forwards;
}

.animate-rotate-in {
  animation: rotateIn 0.8s ease-out forwards;
}

/* Simplified animation classes */

/* Premium card effects */
.premium-card {
  position: relative;
  background: linear-gradient(145deg,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.8));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 24px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.4) inset;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  overflow: hidden;
  z-index: 1;
}

/* Allow badges to overflow on featured cards */
.premium-card.border-2 {
  overflow: visible;
}

.premium-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent);
  transition: left 0.5s;
}

.premium-card:hover::before {
  left: 100%;
}

.premium-card:hover {
  border: 1px solid rgba(239, 43, 112, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

/* Floating elements */
.floating {
  animation: float 6s ease-in-out infinite;
}

.floating:nth-child(odd) {
  animation-delay: -3s;
}

.floating:nth-child(even) {
  animation-delay: -1.5s;
}

/* Premium button effects */
.btn-premium {
  position: relative;
  background: var(--gradient-1);
  border: none;
  border-radius: 16px;
  padding: 16px 32px;
  font-weight: 700;
  font-size: 16px;
  color: white;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow:
    0 8px 25px rgba(239, 43, 112, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.btn-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent);
  transition: left 0.5s;
}

.btn-premium:hover::before {
  left: 100%;
}

.btn-premium:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(239, 43, 112, 0.3);
}

/* Prevent horizontal scroll from card badges */
section {
  overflow-x: hidden;
}

/* Grid containers should allow badge overflow without causing page scroll */
.grid {
  overflow: visible;
}

/* Cookie Bar Styles */
#cookie-bar {
  backdrop-filter: blur(10px);
  background: rgba(17, 24, 39, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

#cookie-bar button {
  transition: all 0.3s ease;
}

#cookie-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
  #cookie-bar p {
    font-size: 0.75rem;
  }

  #cookie-bar button {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }

  #cookie-bar .fa-cookie-bite {
    display: none;
  }
}
