/* Custom Styles for Linghao Technology Website */

/* Artistic Heading Fonts */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif SC', 'ZCOOL XiaoWei', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Special styling for main hero title */
.hero-title {
    font-family: 'Noto Serif SC', 'ZCOOL XiaoWei', serif;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #ffffff, #f0f9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced heading hierarchy */
h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1.3;
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
    line-height: 1.4;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
    transition: color 0.2s ease;
}

.breadcrumb-item:hover {
    color: #3b82f6;
}

.breadcrumb-item.active {
    color: #1f2937;
    font-weight: 500;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #9ca3af;
}

/* Timeline Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Mobile timeline adjustments */
    .space-y-12 {
        gap: 2rem;
    }
    
    /* Hide timeline line on mobile */
    .absolute.left-1\/2.transform.-translate-x-0\.5 {
        display: none;
    }
    
    /* Mobile timeline items */
    .relative.flex.items-center {
        flex-direction: column;
        text-align: center;
    }
    
    /* Reset timeline positioning for mobile */
    .relative.flex.items-center .flex-1 {
        flex: none;
        width: 100%;
        padding: 0;
        text-align: left;
    }
    
    /* Hide timeline dots on mobile */
    .absolute.left-1\/2.transform.-translate-x-1\/2.w-4.h-4 {
        display: none;
    }
    
    /* Remove left/right borders on mobile, use top border instead */
    .border-l-4,
    .border-r-4 {
        border-left: none !important;
        border-right: none !important;
        border-top: 4px solid;
    }
    
    .border-l-4.border-blue-500 {
        border-top-color: #3b82f6 !important;
    }
    
    .border-r-4.border-green-500,
    .border-l-4.border-green-500 {
        border-top-color: #10b981 !important;
    }
    
    .border-l-4.border-purple-500,
    .border-r-4.border-purple-500 {
        border-top-color: #8b5cf6 !important;
    }
}

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

/* Custom animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Hover effects for cards */
.card-hover {
    transition: transform 0.3s ease, box-shadow 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);
}

/* Navigation active state */
.nav-link-active {
    color: #2563eb;
    background-color: #eff6ff;
}

/* Form focus states */
.form-input:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    border-color: transparent;
}

/* Button hover effects */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 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%;
    }
}

/* Mobile menu animation */
.mobile-menu-enter {
    opacity: 0;
    transform: translateY(-10px);
}

.mobile-menu-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu-exit {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-exit-active {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Success message styles */
.success-message {
    background-color: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    animation: slideIn 0.3s ease;
}

.error-message {
    background-color: #ef4444;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    animation: slideIn 0.3s ease;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Hero section styles */
.hero-section {
    position: relative;
    min-height: 100vh;
}

.hero-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-bg-1 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero-bg-1.png');
}

.hero-bg-2 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero-bg-2.png');
}

.hero-bg-3 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero-bg-3.png');
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Hero Section - Ensure static positioning */
.hero-section {
    position: relative !important;
}

.hero-section .relative {
    position: relative !important;
}

/* Hero navigation dots */
.hero-dot {
    cursor: pointer;
    transition: all 0.3s ease;
    position: static !important;
}

.hero-dot.active {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

/* Hero CTA Button - Ensure it stays in hero section */
.hero-cta-button {
    position: static !important;
    display: inline-flex !important;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Override any JavaScript parallax transforms, but keep hover effects */
.hero-cta-button[style*="translateY"] {
    transform: none !important;
}

/* Restore hover transform */
.hero-cta-button:hover {
    transform: translateY(-2px) scale(1.02) !important;
}

/* Ensure hero button container is not affected by scroll */
.hero-section .wow {
    position: static !important;
}

.hero-cta-button::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.6s ease;
}

.hero-cta-button:hover::before {
    left: 100%;
}

.hero-cta-button:hover {
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px) scale(1.02);
}

/* Image zoom effect */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.3s ease;
}

.image-zoom:hover img {
    transform: scale(1.05);
}

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile optimization styles */
@media (max-width: 768px) {
    /* Base mobile adjustments */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Hero section mobile adjustments */
    .hero-section {
        min-height: 70vh !important;
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem) !important;
        line-height: 1.1 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Navigation mobile improvements */
    .mobile-menu {
        max-height: calc(100vh - 80px) !important;
        overflow-y: auto !important;
    }
    
    /* Override Tailwind grid for mobile */
    .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    
    .grid.md\\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    
    .grid.md\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .grid.lg\\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    
    .grid.lg\\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    
    .grid.lg\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Text adjustments for mobile */
    .text-3xl.md\\:text-4xl {
        font-size: 1.875rem !important;
    }
    
    .text-4xl.md\\:text-5xl {
        font-size: 2.25rem !important;
    }
    
    .text-5xl.md\\:text-6xl {
        font-size: 3rem !important;
    }
    
    /* Padding adjustments */
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .py-16 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    /* Gap adjustments */
    .gap-8 {
        gap: 1.5rem !important;
    }
    
    .gap-12 {
        gap: 2rem !important;
    }
    
    /* Footer mobile optimization */
    footer .flex.flex-col.md\\:flex-row {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1.5rem !important;
        align-items: center !important;
    }
    
    /* Footer logo section mobile */
    footer .flex.items-center {
        flex-direction: column !important;
        text-align: center !important;
        margin-bottom: 1.5rem !important;
    }
    
    footer .flex.items-center img {
        margin-right: 0 !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Footer navigation mobile */
    footer .flex.flex-col.md\\:flex-row.items-center.space-y-2 {
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100% !important;
    }
    
    /* Footer navigation links mobile */
    footer .flex.flex-col.md\\:flex-row a {
        padding: 0.5rem 0 !important;
        border-bottom: 1px solid rgba(75, 85, 99, 0.3) !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    footer .flex.flex-col.md\\:flex-row a:last-child {
        border-bottom: none !important;
    }
    
    /* Form mobile improvements */
    .form-grid .grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Button mobile sizing */
    .btn-group button {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Card mobile spacing */
    .card-container {
        margin-bottom: 1.5rem !important;
    }
    
    /* Workflow line hide on mobile */
    .workflow-line {
        display: none !important;
    }
    
    /* Technical workflow mobile optimization */
    .workflow-steps-mobile {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .workflow-step-mobile {
        padding: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .workflow-step-mobile .bg-white {
        width: 80px !important;
        height: 80px !important;
        margin: 0 auto 1rem auto !important;
    }
    
    .workflow-step-mobile h3 {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .workflow-step-mobile p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }
    
    /* Service features mobile grid */
    .service-features-mobile {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .service-features-mobile .text-center {
        padding: 1rem !important;
        background: #f9fafb !important;
        border-radius: 0.75rem !important;
        border: 1px solid #e5e7eb !important;
    }
}

/* Tablet optimization */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .tablet-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tablet-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .workflow-tablet {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .workflow-tablet .relative::before {
        display: none;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .hero-section {
        min-height: 60vh;
        padding: 1rem;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
    }
    
    .small-mobile-padding {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .workflow-mobile {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .breadcrumb {
        padding: 0.5rem 0.75rem;
    }
    
    .breadcrumb-item {
        font-size: 0.75rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gray-50 {
        background-color: white;
    }
    
    .text-gray-600 {
        color: #000000;
    }
}

/* 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;
    }
}
