/* Custom Styles for AMPNEST Power Solutions1 */

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

/* Custom Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-fade-in-left {
    animation: fadeInLeft 1s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 1s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Navbar Scroll Effect */
#navbar.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Active Navigation Link */
.nav-link.active {
    color: #2563eb;
    font-weight: 600;
}

/* Form Input Focus Styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #fbbf24 !important;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

/* Select Dropdown Styling */
select option {
    background-color: white;
    color: #1f2937;
}

/* Scroll to Top Button Transitions */
#scroll-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#scroll-top.show {
    opacity: 1 !important;
    pointer-events: all !important;
}

#scroll-top:hover {
    transform: translateY(-3px);
}

/* Service Card Hover Effect */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Loading Animation for Form Submit */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .animate-fade-in-left,
    .animate-fade-in-right {
        animation: fadeInUp 0.8s ease-out;
    }
}

/* Stats Counter Animation */
.stat-number {
    transition: all 0.3s ease;
}

.stat-number:hover {
    transform: scale(1.1);
    color: #1e40af;
}

/* Hero Background Pattern */
#home {
    position: relative;
    overflow: hidden;
}

#home::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, rgba(59, 130, 246, 0.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(59, 130, 246, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(59, 130, 246, 0.1) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(59, 130, 246, 0.1) 75%);
    background-size: 60px 60px;
    background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
    opacity: 0.3;
    pointer-events: none;
}

/* Icon Pulse Animation */
.icon-pulse {
    animation: pulse 2s infinite;
}

/* Button Hover Effects */
button,
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

button::before,
.btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before,
.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Card Shadow Variations */
.card-shadow-sm {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.card-shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em;
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.show {
    max-height: 500px;
}

/* Section Reveal Animation */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Image Hover Effect */
img {
    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(1.02);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
}

/* Contact Form Success/Error Messages */
.form-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

/* Industry Cards Stagger Animation */
.industry-card {
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.industry-card:nth-child(1) { animation-delay: 0.1s; }
.industry-card:nth-child(2) { animation-delay: 0.2s; }
.industry-card:nth-child(3) { animation-delay: 0.3s; }
.industry-card:nth-child(4) { animation-delay: 0.4s; }

/* Accessibility - Focus Visible */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav,
    #scroll-top,
    #contact {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Wrapper */
.scroll-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* Track of scrolling images */
.scroll-track {
   	
	display: flex;
    gap: 20px;
    padding: 20px;
    animation: autoScroll 18s linear infinite alternate;
}

/* Images */
.scroll-track img {
    width: 1280px;
    height: 320px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.5s ease;
}

/* Hover zoom override */
.scroll-track img:hover {
    transform: scale(1.9);
    z-index: 100;
}

/* Center zoom effect using perspective */
.scroll-wrapper {
    perspective: 800px;
}

/* This scales items based on their position (pseudo "center zoom") */
.scroll-track img {
    transform-origin: center;
    transition: transform 0.5s ease-out;

}

/*.scroll-track img:active {
    position: relative;
    width: 600px !important;
    height: 400px !important;
    transform: none !important;
    z-index: 200;*/
}

.scroll-wrapper {
    mask-image: linear-gradient(to right, transparent 0%, black 30%, black 70%, transparent 100%);
}


/* Auto-scroll animation (left → right → left loop) */
@keyframes autoScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-90%); }
}