/* Custom styles for Compass Management Enterprises */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #156843;
}

/* Geometric pattern for CTA section */
.cta-pattern {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 35px,
        rgba(254, 253, 248, 0.1) 35px,
        rgba(254, 253, 248, 0.1) 70px
    );
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Pulse animation for dots */
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

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

/* Rotate animation for geometric shapes */
@keyframes slow-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Apply animations */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-slow-rotate {
    animation: slow-rotate 20s linear infinite;
}

/* Service card hover effect */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
}

.service-card:hover .card-icon {
    transform: rotate(6deg) scale(1.1);
}

.card-icon {
    transition: transform 0.3s ease;
}

/* Button hover effects */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::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 ease;
}

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

/* Input focus effects */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(30, 133, 86, 0.1);
}

/* Reduced motion preference */
@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;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    .cta-pattern,
    button,
    form {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* Mobile menu animation */
#mobile-menu {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.closed {
    opacity: 0;
    transform: translateY(-10px);
}

/* Navbar scroll effect */
#navbar.scrolled #nav-bg {
    opacity: 1;
}

/* Decorative shapes */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

.geo-circle {
    border-radius: 50%;
}

.geo-square {
    border-radius: 4px;
}

.geo-diamond {
    transform: rotate(45deg);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #1e8556, #5ec992);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass morphism effect */
.glass {
    background: rgba(254, 253, 248, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Shadow utilities */
.shadow-soft {
    box-shadow: 0 4px 20px rgba(16, 65, 45, 0.08);
}

.shadow-medium {
    box-shadow: 0 8px 30px rgba(16, 65, 45, 0.12);
}

.shadow-strong {
    box-shadow: 0 12px 40px rgba(16, 65, 45, 0.16);
}

/* Loading state for buttons */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
