/* Custom styles that complement Tailwind CSS */

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

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

/* Custom selection color */
::selection {
    background-color: #4ade80;
    color: #102a43;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Better focus styles for accessibility */
:focus-visible {
    outline: 3px solid #4ade80;
    outline-offset: 2px;
}

/* Button base styles */
.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.btn-primary:active::after {
    width: 300px;
    height: 300px;
}

/* Card shadow on hover */
.service-card {
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    padding: 2px;
    background: linear-gradient(135deg, #4ade80, #102a43);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Navbar transition */
#navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Mobile menu link hover effect */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4ade80;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Form input transitions */
input, textarea, select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

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

::-webkit-scrollbar-thumb {
    background: #627d98;
    border-radius: 5px;
}

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

/* Animation for scroll reveal */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .reveal.active {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger animation delays */
    .reveal:nth-child(1) { transition-delay: 0.1s; }
    .reveal:nth-child(2) { transition-delay: 0.2s; }
    .reveal:nth-child(3) { transition-delay: 0.3s; }
    .reveal:nth-child(4) { transition-delay: 0.4s; }
    .reveal:nth-child(5) { transition-delay: 0.5s; }
    .reveal:nth-child(6) { transition-delay: 0.6s; }
}

/* Ensure content is visible without JS */
.reveal {
    opacity: 1;
    transform: none;
}

/* Print styles */
@media print {
    nav, #contact, button {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .service-card {
        break-inside: avoid;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .btn-primary {
        border: 2px solid ButtonText;
    }
    
    .service-card {
        border: 1px solid ButtonText;
    }
}
