/* Enhanced Custom Styles to extend Tailwind */
body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden; /* Prevents horizontal scroll from decorative elements */
    scroll-behavior: smooth; /* Smooth scrolling for better UX */
}

/* Loading indicator styles */
#loading-indicator {
    transition: opacity 0.3s ease-out;
}

#loading-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Enhanced focus styles for better accessibility */
*:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Style for the small red dot next to 'Career' */
.career-dot::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #ef4444; /* red-500 */
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: super;
}

/* Enhanced tech logo animations */
.tech-logo {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.tech-logo:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Enhanced mobile overlay menu with better animations */
#mobile-menu-overlay {
    transform: translateY(-100%); /* Start off-screen upwards */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    overflow-y: auto; /* Allow scrolling if menu content exceeds height */
    backdrop-filter: blur(10px);
}

#mobile-menu-overlay.open {
    transform: translateY(0); /* Slide into view */
    opacity: 1;
}

/* Enhanced mobile dropdown content with smooth animations */
.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    width: 100%; /* Ensure it takes full width in mobile menu */
    opacity: 0;
}

.mobile-dropdown-content.expanded {
    max-height: 1000px; /* Generous value to ensure full content display */
    opacity: 1;
}

/* Enhanced dropdown arrow rotation */
.mobile-dropdown-toggle svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-dropdown-toggle.active svg {
    transform: rotate(180deg);
}

/* Enhanced service card animations */
.service-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Enhanced button animations */
.btn-primary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Enhanced text animations */
.text-animate {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced scroll to top button */
#scrollToTopBtn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

#scrollToTopBtn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

/* Enhanced focus ring for better accessibility */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5);
}

/* Enhanced hover effects for interactive elements */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Enhanced loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Enhanced responsive typography */
@media (max-width: 640px) {
    .text-responsive {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }
}

/* Enhanced dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        background-color: #1f2937;
        color: #f9fafb;
    }
}

/* Enhanced print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Enhanced reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Enhanced selection styles */
::selection {
    background-color: rgba(99, 102, 241, 0.2);
    color: inherit;
}

/* Enhanced scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Enhanced image optimization */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Enhanced form elements */
input, textarea, select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Enhanced link styles */
a {
    transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

a:hover {
    text-decoration-color: currentColor;
}

/* Enhanced grid animations */
.grid-item {
    animation: fadeInScale 0.6s ease-out;
    animation-fill-mode: both;
}

.grid-item:nth-child(1) { animation-delay: 0.1s; }
.grid-item:nth-child(2) { animation-delay: 0.2s; }
.grid-item:nth-child(3) { animation-delay: 0.3s; }
.grid-item:nth-child(4) { animation-delay: 0.4s; }
.grid-item:nth-child(5) { animation-delay: 0.5s; }
.grid-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}