/* ===== Base & Utilities ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(13, 148, 136, 0.2);
    color: #0f766e;
}

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

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

#navbar.scrolled .nav-logo-text {
    color: #0f766e;
}

#navbar.scrolled a:not([class*="bg-"]) {
    color: rgba(30, 41, 59, 0.8) !important;
}

#navbar.scrolled a:not([class*="bg-"]):hover {
    color: #0f766e !important;
}

/* ===== Hero ===== */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, white, transparent);
    pointer-events: none;
    z-index: 1;
}

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #14b8a6, #0d9488);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ===== Fade-in Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

.mobile-nav-link {
    position: relative;
    padding-left: 0;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav-link:hover {
    color: #0d9488;
    padding-left: 8px;
}

/* ===== Button Ripple ===== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* ===== Focus Styles ===== */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Responsive tweaks ===== */
@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.25rem;
    }
}
