/* Global Styles */
:root {
    --vh: 1vh;
}

/* Navigation Styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 240px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 60;
    border-radius: 0.5rem;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.3s, visibility 0.3s;
    opacity: 0;
    visibility: hidden;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
    pointer-events: none;
    z-index: -1;
}

.dropdown-content::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--lightgray);
    color: var(--primary);
}

/* Mobile Menu */
.mobile-menu {
    display: none !important;
    background-color: white;
    padding: 1rem 0;
    border-top: 1px solid #e5e5e5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 0.5rem 0.5rem;
}

.mobile-menu.active {
    display: block !important;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Animation Utilities */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

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

/* Navigation Items */
.main-nav-item {
    position: relative;
    transition: all 0.3s ease;
}

/* .main-nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color, #1a1a1a);
    transition: width 0.3s ease;
}

.main-nav-item:hover::after,
.main-nav-item.active::after {
    width: 100%;
} */

.main-nav {
    background-color: white;
    padding: 0.75rem 0;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 85px;
}

/* Sub Navigation */
.sub-nav {
    background-color: #f5f5f5;
    border-bottom: 1px solid #e5e5e5;
}

.sub-nav-item {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.sub-nav-item:hover {
    opacity: 0.8;
}

/* Only apply hover effect to links */
.sub-nav-item[href]:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Header Styles */
.main-header {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    transition: all 0.3s ease;
    will-change: transform;
    background-color: white;
}

.main-header.fixed {
    position: fixed;
    transform: translateY(0);
}

.main-header.fixed.hide {
    transform: translateY(-100%);
}

.main-header.transitioning {
    transform: translateY(var(--scroll-position));
}

/* Body Padding */
html {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    position: relative;
}

body {
    padding-top: 80px;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    position: relative;
}

/* Prevent reCAPTCHA badge from causing horizontal scroll */
.grecaptcha-badge {
    right: -186px !important;
}

@media (min-width: 768px) {
    body {
        padding-top: 120px;
    }
}

/* iOS Safari Fixes */
@supports (-webkit-touch-callout: none) {
    .main-header {
        position: absolute;
    }
    .main-header.fixed {
        position: fixed;
    }
}

.ios-device .main-header {
    position: absolute;
}

.ios-device .main-header.fixed {
    position: fixed;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1), 
                transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: opacity, transform;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1), 
                transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: opacity, transform;
}

.fade-in-left.visible, .fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

.service-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* Logo Carousel Styles */
.logo-carousel {
    width: 100%;
    padding: 20px 0;
    overflow-x: scroll;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}
.logo-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.logo-track {
    display: inline-flex;
    gap: 2rem;
    user-select: none;
    white-space: nowrap;
}
.logo-slide {
    flex: 0 0 auto;
    padding: 0 1rem;
    display: inline-block;
}
.logo-slide img {
    max-width: 100%;
    opacity: 1;
    transition: transform 0.3s ease;
}
.logo-slide img:hover {
    transform: scale(1.05);
}

/* Mobile Dropdown Menu */
.mobile-dropdown-title {
    position: relative;
    font-weight: 500;
}

.mobile-dropdown-title svg {
    transition: transform 0.3s ease;
}

.mobile-dropdown-title.active svg {
    transform: rotate(180deg);
}

.mobile-dropdown-content {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}

.transition-max-height {
    transition-property: max-height;
}

/* Nav item spacing fix */
.main-nav-item.flex {
    display: inline-flex;
    align-items: center;
}