/* Custom styles for Custom Accounting Solutions */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #065f46;
}

/* Selection color */
::selection {
    background: #047857;
    color: #FFFDF7;
}

/* Navbar scroll effect */
.nav-scrolled {
    background: rgba(255, 253, 247, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(4, 120, 87, 0.1);
}

.nav-scrolled .text-emerald-950 {
    color: #064e3b !important;
}

/* Mobile menu animations */
.mobile-menu-enter {
    animation: slideDown 0.3s ease-out forwards;
}

.mobile-menu-exit {
    animation: slideUp 0.3s ease-in forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Mobile link hover */
.mobile-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.2s ease;
}

.mobile-link:hover {
    padding-left: 12px;
}

.mobile-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #047857;
    transition: width 0.2s ease;
}

.mobile-link:hover::before {
    width: 8px;
}

/* Service card hover glow */
.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.1);
}

.service-card {
    position: relative;
}

.service-card:hover::after {
    opacity: 1;
}

/* Fade-in animation for scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger children animations */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::after {
    width: 200px;
    height: 200px;
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Testimonial card hover */
.rounded-3xl:hover {
    transform: translateY(-4px);
}

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

@keyframes float-reverse {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(20px) rotate(-5deg);
    }
}

.float-slow {
    animation: float 8s ease-in-out infinite;
}

.float-medium {
    animation: float-reverse 6s ease-in-out infinite;
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #047857, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

/* Hero text reveal animation */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text {
    animation: textReveal 0.8s ease forwards;
    opacity: 0;
}

.hero-text-delay-1 { animation-delay: 0.1s; }
.hero-text-delay-2 { animation-delay: 0.2s; }
.hero-text-delay-3 { animation-delay: 0.3s; }
.hero-text-delay-4 { animation-delay: 0.4s; }
.hero-text-delay-5 { animation-delay: 0.5s; }

/* Image parallax container */
img {
    will-change: transform;
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}

/* Print styles */
@media print {
    nav, #contact, footer, .animate-bounce {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    section {
        padding: 20px 0 !important;
        page-break-inside: avoid;
    }
}
