/* ========================================
   Global Styles for Eternal Wealth Website
   ======================================== */

/* Header/Navigation Styles */
/* 默认状态：透明背景，白色文字 */
#navbar {
    background: transparent;
    box-shadow: none;
}

#logo-text,
.navbar-link,
#menu-toggle,
.mobile-link {
    color: white;
}

.navbar-link:hover,
.mobile-link:hover {
    color: #2563eb;
}

.navbar-active,
.mobile-active {
    color: #2563eb !important;
}

#mobile-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

#mobile-menu a {
    color: #1f2937;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    transition: all 0.3s ease;
}

#mobile-menu a:hover {
    background-color: rgba(37, 99, 235, 0.05);
    border-bottom-color: #2563eb;
}

#mobile-menu a:last-child {
    border-bottom: none;
}

/* 滚动后状态：白色背景，黑色文字 */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

#logo-img {
    height: 40px !important;
    width: auto !important;
    max-height: 40px !important;
}

#navbar.scrolled #logo-text,
#logo-img {
    color: #1e293b;
}

#navbar.scrolled .navbar-link,
#navbar.scrolled #menu-toggle,
#navbar.scrolled .mobile-link {
    color: #1e293b;
}

#navbar.scrolled .navbar-link:hover,
#navbar.scrolled .mobile-link:hover {
    color: #2563eb;
}

#navbar.scrolled .navbar-active,
#navbar.scrolled .mobile-active {
    color: #2563eb !important;
    text-shadow: none;
}

/* 搜索框滚动后样式 */
#navbar.scrolled .search-input {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.25);
    color: #1e293b;
}

#navbar.scrolled .search-input::placeholder {
    color: rgba(30, 41, 59, 0.6);
}

#navbar.scrolled .search-btn {
    color: white;
}

#navbar.scrolled #mobile-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

#navbar.scrolled #mobile-menu a {
    color: #1f2937;
}

#navbar #mobile-menu #contact-btn {
    color: #fff !important;
}

/* Template Pages Navigation Override */
.template-page #navbar {
    background-color: white !important;
    backdrop-filter: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.template-page #navbar #logo-text {
    color: #1e293b;
}

.template-page #navbar .navbar-link,
.template-page #navbar .mobile-link {
    color: #1e293b !important;
}

.template-page #navbar .navbar-link:hover,
.template-page #navbar .mobile-link:hover {
    color: #2563eb !important;
}

.template-page #navbar .navbar-active,
.template-page #navbar .mobile-active {
    color: #2563eb !important;
}

.template-page #navbar .search-input {
    background: rgba(37, 99, 235, 0.08) !important;
    border-color: rgba(37, 99, 235, 0.25) !important;
    color: #1e293b !important;
}

.template-page #navbar .search-input::placeholder {
    color: rgba(30, 41, 59, 0.6) !important;
}

.template-page #navbar .search-btn {
    color: white !important;
}

/* Tailwind Utilities */
.content-auto {
    content-visibility: auto;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.transition-transform-opacity {
    transition-property: transform, opacity;
}

.scale-up-hover {
    transition: all 0.3s ease;
}

.scale-up-hover:hover {
    transform: scale(1.05);
}

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

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.gradient-bg {
    background: linear-gradient(135deg, #1e40af 0%, #3730a3 100%);
}

.breadcrumb-arrow::after {
    content: ">";
    margin: 0 8px;
    color: #9ca3af;
}

/* Hero Section Enhanced Styles - Optimized for Better Harmony */
.hero-text-shadow {
    /* Lighter, more natural text shadow */
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.6),
        0 0 12px rgba(10, 130, 241, 0.15);
}

.hero-overlay {
    /* Lighter overlay for better image visibility and harmony */
    backdrop-filter: blur(1px);
    background: linear-gradient(
        180deg,
        rgba(10, 130, 241, 0.1) 0%,
        rgba(15, 23, 42, 0.3) 40%,
        rgba(15, 23, 42, 0.6) 100%
    );
}

/* Professional Hero Section Styles */
.hero-professional {
    /* Optimized overlay for better image clarity and text readability */
    background: linear-gradient(
        180deg,
        rgba(10, 130, 241, 0.15) 0%,
        rgba(15, 23, 42, 0.35) 40%,
        rgba(15, 23, 42, 0.65) 100%
    );
    /* Removed backdrop-filter for crystal clear background image */
}

.hero-text-professional {
    /* Optimized subtle text shadow for modern look */
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.6),
        0 0 12px rgba(10, 130, 241, 0.15);
    font-weight: 600;
    /* Removed heavy background gradient for cleaner appearance */
    padding: 0.5rem 0;
}

.hero-subtitle-professional {
    /* Optimized subtle text shadow matching h1 style */
    text-shadow:
        0 1px 6px rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.7),
        0 0 8px rgba(10, 130, 241, 0.12);
    color: rgba(255, 255, 255, 0.95) !important;
    /* Lighter, more modern backdrop */
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(1px);
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    margin: 0 auto;
    display: inline-block;
}

.hero-content {
    animation: fadeInUp 1.2s ease-out;
    /* background: rgba(0, 0, 0, 0.3); */
    /* backdrop-filter: blur(10px); */
    border-radius: 20px;
    padding: 40px;
    margin: 20px;
}

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

/* Optimized Hero Buttons for Better Harmony */
.hero-button {
    /* Glass morphism effect for primary button */
    background: rgba(255, 255, 255, 0.9) !important;
    color: #0a82f1 !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.15),
        0 0 25px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-weight: 600;
}

.hero-button:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0a82f1 !important;
    box-shadow:
        0 6px 30px rgba(0, 0, 0, 0.2),
        0 0 35px rgba(255, 255, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.02);
}

.hero-button-outline {
    /* Glass outline button */
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: white;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-button-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 6px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Homepage specific text optimizations */
#home .hero-content h1 {
    /* Enhanced title styling for homepage */
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.6),
        0 0 15px rgba(10, 130, 241, 0.2);
}

#home .hero-content p {
    /* Optimized paragraph styling */
    text-shadow:
        0 1px 4px rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.92) !important;
    /* Add subtle backdrop for better readability */
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(1px);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 0 auto 2.5rem auto;
    display: inline-block;
}

/* Contact Page Specific Hero Optimizations */
.template-page .hero-professional {
    /* Enhanced gradient for contact page with better image visibility */
    background: linear-gradient(
        180deg,
        rgba(10, 130, 241, 0.12) 0%,
        rgba(15, 23, 42, 0.25) 30%,
        rgba(15, 23, 42, 0.45) 70%,
        rgba(15, 23, 42, 0.75) 100%
    );
}

/* Optimized CTA button - Semi-transparent glass effect to avoid blocking face */
.template-page .hero-professional + .container a {
    /* Glass morphism effect */
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white !important;
    font-weight: 600;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.2),
        0 0 25px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.template-page .hero-professional + .container a:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow:
        0 6px 30px rgba(0, 0, 0, 0.3),
        0 0 35px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.03);
}

/* Alternative: Outline button style */
.contact-hero-btn-outline {
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white !important;
    backdrop-filter: blur(8px);
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.contact-hero-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 1);
    box-shadow:
        0 6px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px) scale(1.03);
}

/* Product Page Specific Styles */
.product-card-hover {
    transition: all 0.3s ease;
}

.product-card-hover:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.lazy-image {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-image.loaded {
    opacity: 1;
}

.product-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.featured-product {
    position: relative;
    overflow: visible;
}

.featured-product::before {
    content: "";
    position: absolute;
    inset: -2px;
    padding: 2px;
    background: linear-gradient(45deg, #165dff, #36d399, #ff6b6b, #165dff);
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: rotate-border 3s linear infinite;
}

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

.product-filter.active {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.product-filter:not(.active):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.core-product-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(248, 250, 252, 0.9) 100%
    );
    backdrop-filter: blur(10px);
}

.core-product-card:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(248, 250, 252, 1) 100%
    );
}

.product-image-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.product-badge {
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.product-content-divider {
    background: linear-gradient(
        90deg,
        transparent 0%,
        #e5e7eb 50%,
        transparent 100%
    );
    height: 1px;
}

.product-image-shadow {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    margin-top: 2rem;
}

.pagination li {
    display: inline-flex;
}

.pagination li a,
.pagination li span {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 0.5rem;
}

.pagination li a {
    color: #374151;
    background-color: white;
    border: 1px solid #d1d5db;
}

.pagination li a:hover {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
    transform: scale(1.05);
}

.pagination li.active span {
    background-color: #2563eb;
    color: white;
    border: 1px solid #2563eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pagination li.disabled span {
    color: #9ca3af;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    cursor: not-allowed;
}

.pagination li:first-child a,
.pagination li:first-child span {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.pagination li:last-child a,
.pagination li:last-child span {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* Index Page Specific Styles */
body {
    font-family: system-ui;
}

/* Background Image Optimization */
.template-page section[style*="background-image"] {
    /* Enhance background image quality */
    background-attachment: fixed;
    background-blend-mode: normal;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Mobile-specific hero optimizations */
@media (max-width: 768px) {
    .template-page .hero-professional {
        /* Lighter overlay on mobile for better image visibility */
        background: linear-gradient(
            180deg,
            rgba(10, 130, 241, 0.08) 0%,
            rgba(15, 23, 42, 0.2) 30%,
            rgba(15, 23, 42, 0.4) 70%,
            rgba(15, 23, 42, 0.7) 100%
        );
    }

    .hero-subtitle-professional {
        /* Optimized mobile text background */
        background: rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(1px);
        padding: 0.6rem 1.2rem;
        border-radius: 6px;
        /* Lighter text shadow for mobile */
        text-shadow:
            0 1px 4px rgba(0, 0, 0, 0.6),
            0 1px 2px rgba(0, 0, 0, 0.8),
            0 0 6px rgba(10, 130, 241, 0.1);
    }

    .template-page section[style*="background-image"] {
        /* Disable fixed attachment on mobile for better performance */
        background-attachment: scroll;
    }

    /* Mobile optimization for hero CTA button */
    .template-page .hero-professional + .container a {
        /* Lighter glass effect on mobile */
        background: rgba(255, 255, 255, 0.12) !important;
        backdrop-filter: blur(8px);
        border: 1.5px solid rgba(255, 255, 255, 0.25);
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .template-page .hero-professional + .container a:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        transform: translateY(-1px) scale(1.02);
    }

    /* Homepage mobile optimizations */
    #home .hero-content p {
        /* Lighter backdrop on mobile */
        background: rgba(0, 0, 0, 0.03);
        backdrop-filter: blur(0.5px);
        padding: 0.8rem 1.2rem;
        border-radius: 6px;
        font-size: clamp(0.9rem, 2vw, 1.1rem);
    }

    #home .hero-button,
    #home .hero-button-outline {
        /* Adjust button sizes for mobile */
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    #home .hero-button {
        background: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(8px);
    }

    #home .hero-button-outline {
        background: rgba(255, 255, 255, 0.08);
        border: 1.5px solid rgba(255, 255, 255, 0.5);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .scale-up-hover:hover {
        transform: none;
    }

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

