/* ==========================================================================
   Giorgio Gnoli - Salesforce Consultant Website
   Custom Styles
   ========================================================================== */

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-bg {
    background: linear-gradient(135deg, rgba(3, 45, 96, 0.9), rgba(1, 118, 211, 0.8));
    opacity: 1;
}

/* Fallback if image loads */
.hero-section {
    background-color: #032D60;
}

/* Cloud Float Animation */
.cloud-float {
    animation: cloudFloat 3s ease-in-out infinite;
}

@keyframes cloudFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Navigation Styles */
.navbar-scrolled {
    background: rgba(3, 45, 96, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00A1E0;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 161, 224, 0.15);
    border-color: rgba(0, 161, 224, 0.2);
}

/* Portfolio Items */
.portfolio-item {
    transition: all 0.4s ease;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.portfolio-item.hidden {
    display: none;
}

/* Filter Buttons */
.filter-btn {
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: #00A1E0;
    color: white;
}

/* Form Styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Pricing Cards Hover */
#preventivi .rounded-2xl {
    transition: all 0.3s ease;
}

#preventivi .rounded-2xl:hover {
    transform: translateY(-5px);
}

/* Certification Cards Glow */
#certificazioni .backdrop-blur {
    transition: all 0.3s ease;
}

#certificazioni .backdrop-blur:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Mobile Menu Animation */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #00A1E0, #032D60);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #00A1E0;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #032D60;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        min-height: 100vh;
        padding-top: 80px;
    }
    
    #portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Pulse Animation for CTA */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 161, 224, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(0, 161, 224, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 161, 224, 0);
    }
}

/* Smooth Section Transitions */
section {
    position: relative;
}

/* Team Card Styles */
#team .bg-white {
    transition: all 0.3s ease;
}

#team .bg-white:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

/* Contact Form Success Animation */
#formSuccess {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Hover Effects */
button,
a[href="#contatti"] {
    position: relative;
    overflow: hidden;
}

/* Stats Counter (if needed) */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Salesforce Badge Style */
.sf-badge {
    background: linear-gradient(135deg, #00A1E0, #0176D3);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 500;
}

/* Print Styles */
@media print {
    nav,
    .scroll-down,
    #contactForm,
    footer {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .service-card,
    .portfolio-item {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
