/* Custom CSS for Pengfa Technology Website */

/* Global Styles */
* {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
}

/* Custom Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Header Styles */
#header {
    transition: all 0.3s ease;
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #007BFF, #FF8C00);
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero-bg {
    background: linear-gradient(135deg, #1A2B4C 0%, #007BFF 100%);
}

/* Business Cards */
.business-card {
    transition: all 0.5s ease;
    transform-origin: center;
}

.business-card:hover {
    transform: translateY(-10px);
}

.business-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 43, 76, 0.05), rgba(0, 123, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 1rem;
}

.business-card:hover::before {
    opacity: 1;
}

/* Advantage Cards */
.advantage-card {
    transition: all 0.3s ease;
}

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

/* Case Cards */
.case-card {
    transition: all 0.5s ease;
}

.case-card:hover {
    transform: translateY(-8px);
}

/* Team Cards */
.team-card {
    transition: all 0.3s ease;
}

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

/* Testimonials */
.testimonial-slider {
    position: relative;
    min-height: 500px;
    overflow: hidden;
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.5s ease;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 500px;
}

.testimonial-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.testimonial-slide p {
    line-height: 1.8;
    margin-bottom: 2rem;
    word-break: break-word;
    hyphens: auto;
}

.testimonial-slide .text-xl {
    font-size: 1.125rem;
    max-width: 90%;
    margin: 0 auto;
}

.testimonial-slide .lg\:text-2xl {
    font-size: 1.5rem;
    max-width: 90%;
    margin: 0 auto;
}

.slider-btn {
    transition: all 0.3s ease;
    cursor: pointer;
}

.slider-btn.active {
    background: white !important;
    transform: scale(1.2);
}

/* Contact Form */
.contact-item {
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #007BFF, #FF8C00);
    transition: all 0.3s ease;
    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 ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: white;
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-secondary:hover::before {
    width: 100%;
}

/* Back to Top Button */
#backToTop {
    transition: all 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

/* Parallax Effect */
.parallax-element {
    transition: transform 0.1s ease-out;
}

/* Loading Animation */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1A2B4C, #007BFF);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #007BFF, #FF8C00);
}

/* Mobile Menu Styles */
#mobile-menu-overlay {
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-menu {
    transition: transform 0.3s ease;
    max-height: 100vh;
    overflow-y: auto;
}

/* Ensure proper mobile menu visibility */
.lg\:hidden {
    transition: all 0.3s ease;
}

/* Mobile menu animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .hero-bg {
        min-height: 100vh;
    }
    
    .business-card,
    .case-card,
    .team-card {
        margin-bottom: 2rem;
    }
    
    .testimonial-slider {
        min-height: 600px;
    }
    
    .testimonial-slide {
        padding: 1.5rem;
        min-height: 600px;
    }
    
    .testimonial-slide .text-xl {
        font-size: 1rem;
        max-width: 95%;
    }
    
    .testimonial-slide .lg\:text-2xl {
        font-size: 1.125rem;
        max-width: 95%;
    }
    
    .contact-item {
        margin-bottom: 1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .business-card,
    .case-card,
    .team-card {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    }
}

/* Print Styles */
@media print {
    .fixed,
    #backToTop,
    .testimonial-slider .slider-btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Keyboard Navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #007BFF;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .business-card,
    .case-card,
    .team-card {
        border: 2px solid #000;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 2px solid #000;
    }
}

