/* Custom CSS for Pasqualino Conecta - Modern Design */

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

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2563eb 0%, #ec4899 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #db2777 100%);
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s ease;
}

/* Custom gradient text */
.gradient-text {
    background: linear-gradient(135deg, #2563eb 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Backdrop blur support for older browsers */
@supports not (backdrop-filter: blur(10px)) {
    header {
        background: rgba(255, 255, 255, 0.95) !important;
    }
}

/* ============================================
   MODERN ANIMATIONS & EFFECTS
   ============================================ */

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Gradient animation */
@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

/* Float animation for badges */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Hero content entrance animation */
.hero-content {
    animation: fadeIn 1s ease-out 0.2s both;
}

.hero-content > * {
    animation: fadeIn 0.8s ease-out both;
}

.hero-content > *:nth-child(1) { animation-delay: 0.3s; }
.hero-content > *:nth-child(2) { animation-delay: 0.5s; }
.hero-content > *:nth-child(3) { animation-delay: 0.7s; }
.hero-content > *:nth-child(4) { animation-delay: 0.9s; }
.hero-content > *:nth-child(5) { animation-delay: 1.1s; }

/* Hero image entrance animation */
.hero-image {
    animation: fadeIn 1s ease-out 0.4s both;
}

/* Header scroll effect */
header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Navigation link hover effect */
.nav-link {
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #ec4899);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 80%;
}

/* Button hover effects */
.hero-primary-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.hero-primary-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Pulse animation for stats */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Shine effect on image hover */
@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Animation for fade in 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);
}

/* Smooth scale on hover */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Glassmorphism effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

/* Touch-friendly buttons */
.touch-manipulation {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Mobile menu styles */
@media (max-width: 768px) {
    .hero-content {
        animation-delay: 0s;
    }
    
    .hero-image {
        animation-delay: 0.2s;
    }
    
    /* Adjust floating badge for mobile */
    .animate-float {
        position: relative;
        animation: none;
    }

    /* Mobile menu animation */
    #mobile-menu {
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
        opacity: 0;
    }

    #mobile-menu.mobile-open {
        max-height: 500px;
        opacity: 1;
    }

    #mobile-menu.hidden {
        display: none !important;
    }

    /* Better spacing for mobile sections */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    /* Improve card spacing on mobile */
    .grid {
        gap: 1.5rem;
    }

    /* Better text sizes for mobile */
    h1 {
        line-height: 1.1;
    }

    h2 {
        line-height: 1.2;
    }

    /* Improve button touch targets */
    button, a[role="button"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* Better image handling */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Improve form elements */
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Even tighter spacing */
    .space-y-6 > * + * {
        margin-top: 1rem;
    }

    /* Smaller text for very small screens */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

/* Print styles */
@media print {
    header {
        position: static;
    }
    
    .no-print {
        display: none;
    }
    
    .animate-float,
    .animate-pulse,
    .animate-ping {
        animation: none !important;
    }
}

/* Performance optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

