/*
Theme Name: Viral Digital Agency
Theme URI: https://viralagency.it
Author: Viral Digital Agency
Author URI: https://viralagency.it
Description: Tema WordPress moderno per Viral Digital Agency - Agenzia di Marketing Digitale
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: viral-agency
*/

/* Custom CSS Variables */
:root {
  --color-primary: #3B5998;
  --color-primary-light: #4A6DB5;
  --color-primary-dark: #2D4373;
  --color-secondary: #1E3A5F;
  --color-accent: #5B8BD4;
  --color-dark: #0D1117;
  --color-dark-light: #161B22;
  --color-light: #F8FAFC;
  --gradient-primary: linear-gradient(135deg, #2D4373 0%, #3B5998 50%, #5B8BD4 100%);
  --gradient-dark: linear-gradient(135deg, #0D1117 0%, #161B22 50%, #1E293B 100%);
}

/* Mouse Glow Effect */
.mouse-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 89, 152, 0.15) 0%, rgba(59, 89, 152, 0.05) 40%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
}

@media (max-width: 768px) {
  .mouse-glow {
    display: none;
  }
}

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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #111827;
  background-color: var(--color-dark);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Container */
.container-custom {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 640px) {
  .container-custom {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

/* Section spacing */
.section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (min-width: 768px) {
  .section {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }
}

/* Glassmorphism */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 1.5rem;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.1);
}

/* Gradient text */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
  background: var(--gradient-primary);
  background-size: 200% 200%;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-size: 0.875rem;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.6);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  background-color: transparent;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-size: 0.875rem;
  text-decoration: none;
}

.btn-outline:hover {
  background: white;
  color: var(--color-primary);
  transform: translateY(-3px);
}

/* Section titles */
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 1rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

/* Icon wrapper */
.icon-wrapper {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.icon-wrapper svg {
  width: 1.75rem;
  height: 1.75rem;
  color: white;
}

/* Hero background */
.hero-bg {
  background: linear-gradient(180deg, #0a0e17 0%, #101827 100%);
  position: relative;
}

/* Hero animated background */
.hero-animated-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-animated-bg::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 89, 152, 0.5) 0%, transparent 70%);
  filter: blur(80px);
  opacity: 0.5;
  animation: lightMove1 12s ease-in-out infinite;
}

.hero-animated-bg::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 139, 212, 0.5) 0%, transparent 70%);
  filter: blur(80px);
  opacity: 0.4;
  animation: lightMove2 15s ease-in-out infinite;
}

@keyframes lightMove1 {
  0%, 100% { top: -10%; left: -10%; }
  25% { top: 20%; left: 60%; }
  50% { top: 60%; left: 70%; }
  75% { top: 40%; left: 10%; }
}

@keyframes lightMove2 {
  0%, 100% { bottom: -10%; right: -10%; }
  33% { bottom: 50%; right: 60%; }
  66% { bottom: 20%; right: 20%; }
}

/* CTA Section */
.cta-section {
  background: var(--gradient-dark);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 70%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

/* Form styles */
.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #E5E7EB;
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Social icons */
.social-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 89, 152, 0.15);
  color: #5B8BD4;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: #3B5998;
  color: white;
  transform: translateY(-3px);
}

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

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

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

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

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

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

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Image zoom */
.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-zoom:hover img {
  transform: scale(1.1);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.active > *:nth-child(1) { animation: fade-up 0.6s 0.1s forwards; }
.stagger-children.active > *:nth-child(2) { animation: fade-up 0.6s 0.2s forwards; }
.stagger-children.active > *:nth-child(3) { animation: fade-up 0.6s 0.3s forwards; }
.stagger-children.active > *:nth-child(4) { animation: fade-up 0.6s 0.4s forwards; }
.stagger-children.active > *:nth-child(5) { animation: fade-up 0.6s 0.5s forwards; }
.stagger-children.active > *:nth-child(6) { animation: fade-up 0.6s 0.6s forwards; }
.stagger-children.active > *:nth-child(7) { animation: fade-up 0.6s 0.7s forwards; }
.stagger-children.active > *:nth-child(8) { animation: fade-up 0.6s 0.8s forwards; }

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

/* Bounce animation */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-bounce {
  animation: bounce 2s infinite;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .hero-animated-bg::before,
  .hero-animated-bg::after {
    width: 250px;
    height: 250px;
    filter: blur(60px);
    opacity: 0.3;
    animation: none;
  }

  .section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .container-custom {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .bg-fixed {
    background-attachment: scroll !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;
  }
}
