/* Custom Styles for Global Nexus Solutions */

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

/* Navigation link hover effect */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

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

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

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button animations */
button,
.btn {
    transition: all 0.3s ease;
}

button:active,
.btn:active {
    transform: scale(0.98);
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .text-responsive {
        font-size: 0.9rem;
    }
}

/* Portfolio image optimization for sharp, high-quality display */
#portfolio img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

/* Global image quality optimization */
img {
    image-rendering: auto;
    -ms-interpolation-mode: bicubic;
    max-width: 100%;
    height: auto;
}

/* Professional Transitions & Animations */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Fade in on scroll animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale in animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Apply animations to sections */
section {
    animation: fadeInUp 0.8s ease-out;
}

/* Stagger animations for cards */
.card-hover:nth-child(1) {
    animation-delay: 0.1s;
}

.card-hover:nth-child(2) {
    animation-delay: 0.2s;
}

.card-hover:nth-child(3) {
    animation-delay: 0.3s;
}

.card-hover:nth-child(4) {
    animation-delay: 0.4s;
}

/* Smooth transitions for all interactive elements */
a,
button,
input,
textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced hover effects */
a:hover,
button:hover {
    transform: translateY(-2px);
}

/* Navigation smooth transitions */
nav {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Card hover with smooth shadow transition */
[class*="rounded-2xl"]:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Image hover zoom effect */
img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Portfolio image hover */
#portfolio img:hover {
    transform: scale(1.05);
}

/* Button press effect */
button:active,
a:active {
    transform: scale(0.98);
}

/* Input focus transitions */
input:focus,
textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* Loading state animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth color transitions */
* {
    transition-property: color, background-color, border-color;
    transition-duration: 0.3s;
    transition-timing-function: ease-in-out;
}

/* Prevent transition on page load */
.preload * {
    transition: none !important;
}

/* Banner Slider Styles */
.banner-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* High-quality image rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: opacity;
}

/* Background images for each slide */
.banner-slide:nth-child(1) {
    background-image: url('../images/slider-bg-1.jpg');
}

.banner-slide:nth-child(2) {
    background-image: url('../images/slider-bg-1.jpg');
}

/* Dark overlay to ensure text readability */
.banner-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

/* Ensure content appears above overlay */
.banner-slide>div {
    position: relative;
    z-index: 2;
}

.banner-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Slider Navigation Dots */
.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.slider-dot.active {
    background-color: rgba(255, 255, 255, 1);
    width: 32px;
    border-radius: 6px;
}

/* Slider Arrows */
.slider-arrow {
    cursor: pointer;
    opacity: 0.7;
}

.slider-arrow:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Slide animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}