/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

/* Focus styles */
a:focus-visible, button:focus-visible {
    outline: 2px solid #40a890;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: #a8bdd4;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7e9fc0;
}

/* Service card hover */
.service-card {
    will-change: transform;
}

/* Navbar active state */
.nav-link.active {
    color: #0A2540;
    background: #f0f4f8;
}

/* Mobile menu animation */
#mobileMenu.opening {
    animation: slideDown 0.3s ease forwards;
}

#mobileMenu.closing {
    animation: slideUp 0.25s ease forwards;
}

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

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

/* Menu button animation */
.menu-line {
    display: block;
}

#menuToggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menuToggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menuToggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 6px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .service-card,
    .service-card div,
    a,
    button {
        transition: none;
    }
    .animate-pulse {
        animation: none;
    }
}

/* Form styles */
input, textarea {
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #40a890;
    box-shadow: 0 0 0 3px rgba(64, 168, 144, 0.15);
}

/* Success message */
#formSuccess {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
