/*
Theme Name: WM3
Theme URI: https://3eyes.org/
Description: Professionally designed and customized WordPress theme
Author: WangMing
Author URI: https://3eyes.org/
Version: 2.0
Tags: industrial, business, orange, white, gray, professional,TailwindCSS
Text Domain: wm3
*/

/* Custom CSS to complement TailwindCSS */

/* Custom animations for TailwindCSS */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
}

.animate-fade-in-up.delay-200 {
    animation-delay: 0.2s;
}

.animate-fade-in-up.delay-400 {
    animation-delay: 0.4s;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #e67e22;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d35400;
}

/* Font smoothing */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* All elements are optimized for desktop viewing only */

/* Ensure consistent desktop layout */

/* Selection styles */
::selection {
    background-color: #e67e22;
    color: white;
}

/* Loading animation */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e67e22;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* All styles optimized for standard desktop viewing */

/* Header Styles */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.header-top {
    background-color: #e67e22;
    color: #ffffff;
    padding: 10px 0;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-switcher {
    display: flex;
    gap: 10px;
}

.language-switcher a {
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.language-switcher a:hover,
.language-switcher a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.header-main {
    padding: 20px 0;
}

.logo {
    display: inline-block;
}

.logo img {
    max-height: 50px;
}

/* Navigation */

.main-nav {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav li a {
    color: #333;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

.main-nav li a:hover {
    color: #e67e22;
}

.main-nav li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #e67e22;
    transition: width 0.3s;
}

.main-nav li a:hover::after {
    width: 100%;
}

/* Slider Section */
.slider {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.slider-item.active {
    display: block;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.slider-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.slider-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

/* Sections Common Styles */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: #333;
    position: relative;
    padding-bottom: 20px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #e67e22;
}

/* Product Category Styles */
.product-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Navbar Dropdown Menu Styles */
.navbar {
    position: relative;
}

.navbar .menu-item {
    position: relative;
}

.navbar .menu-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 8px 0;
    border: 1px solid #e5e7eb;
}

.navbar .sub-menu .menu-item {
    display: block;
    width: 100%;
}

.navbar .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.navbar .sub-menu a:hover {
    background: #f9fafb;
    color: #e67e22;
}

.navbar .menu-item-has-children > a {
    position: relative;
    padding-right: 20px;
}

.navbar .menu-item-has-children > a::after {
    content: '▼';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.navbar .menu-item:hover .menu-item-has-children > a::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Basic Navbar Link Styles */
.navbar a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.navbar a:hover {
    color: #e67e22;
}

/* Active dropdown state */
.navbar .menu-item.dropdown-active > a {
    color: #e67e22;
}

.navbar .menu-item.dropdown-active .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Navbar Dropdown Menu Styles */
.navbar {
    position: relative;
}

.navbar .menu-item {
    position: relative;
}

.navbar .menu-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 8px 0;
    border: 1px solid #e5e7eb;
}

.navbar .sub-menu .menu-item {
    display: block;
    width: 100%;
}

.navbar .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.navbar .sub-menu a:hover {
    background: #f9fafb;
    color: #e67e22;
}

.navbar .menu-item-has-children > a {
    position: relative;
    padding-right: 20px;
}

.navbar .menu-item-has-children > a::after {
    content: '▼';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.navbar .menu-item:hover .menu-item-has-children > a::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Basic Navbar Link Styles */
.navbar a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.navbar a:hover {
    color: #e67e22;
}

/* Active dropdown state */
.navbar .menu-item.dropdown-active > a {
    color: #e67e22;
}

.navbar .menu-item.dropdown-active .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-item {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.category-image {
    height: 200px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.category-item:hover .category-image img {
    transform: scale(1.05);
}

.category-info {
    padding: 20px;
    text-align: center;
}

.category-info h3 {
    margin-bottom: 10px;
    color: #333;
}

/* Timeline Styles */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #e67e22;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.left::after {
    right: -10px;
}

.timeline-item.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timeline-year {
    font-size: 24px;
    font-weight: bold;
    color: #e67e22;
    margin-bottom: 10px;
}

/* Enhanced Timeline (tl) */
.tl .timeline-axis {
    width: 4px;
    background: linear-gradient(180deg, rgba(230,126,34,0.15) 0%, rgba(230,126,34,0.65) 50%, rgba(230,126,34,0.15) 100%);
    box-shadow: 0 0 18px rgba(230, 126, 34, 0.35);
}

.tl .timeline-item {
    position: relative;
}

.tl .tl-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(230, 126, 34, 0.18);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 6px 18px rgba(230, 126, 34, 0.12);
    backdrop-filter: blur(8px);
    transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}

.tl .tl-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.12), 0 10px 26px rgba(230, 126, 34, 0.18);
    border-color: rgba(230, 126, 34, 0.32);
}

.tl .timeline-year {
    background: linear-gradient(90deg, #e67e22 0%, #f39c12 100%);
    box-shadow: 0 4px 16px rgba(230, 126, 34, 0.35);
}

.tl .timeline-item:nth-child(odd) .tl-card {
    transform: translateX(-8px);
}

.tl .timeline-item:nth-child(even) .tl-card {
    transform: translateX(8px);
}

.tl .timeline-item .tl-card.animate-fade-in-up {
    /* allow the fade-in-up to end at neutral position */
    animation-timing-function: ease-out;
}

/* News Section Styles */
.news-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.main-news {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-news-image {
    height: 300px;
    overflow: hidden;
}

.main-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-news-content {
    padding: 20px;
}

.main-news-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.news-item {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-image {
    height: 150px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 15px;
}

.news-content h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

/* Contact Section Styles */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #e67e22;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-icon {
    margin-right: 15px;
    color: #e67e22;
    font-size: 20px;
}

.contact-form {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #e67e22;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.submit-btn {
    background-color: #e67e22;
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #d35400;
}

/* Contact Form Validation Styles */
.form-group input.error,
.form-group textarea.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-group input.valid,
.form-group textarea.valid {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.field-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    animation: fadeIn 0.3s ease-in-out;
}

.form-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease-in-out;
}

.form-message.success {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.form-message.error {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading state for submit button */
.contact-form button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.contact-form button:not([disabled]):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(230, 126, 34, 0.3);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    z-index: 999;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #f5f5f5;
    border-radius: 50%;
    color: #333;
    font-size: 20px;
    transition: all 0.3s;
}

.sidebar-link:hover {
    background-color: #e67e22;
    color: #ffffff;
    transform: translateY(-3px);
}

/* Footer Styles */
.footer {
    background-color: #333;
    color: #ffffff;
    padding: 50px 0 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo img {
    max-height: 80px;
    margin-bottom: 20px;
}

.footer-about p {
    margin-bottom: 20px;
    color: #ccc;
}

.footer-heading {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #ffffff;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #e67e22;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    color: #ccc;
}

.footer-contact i {
    margin-right: 10px;
    color: #e67e22;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #ccc;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #e67e22;
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

/* --- Hero Slider Fallback (when Tailwind isn't available) --- */
.hero-slider {
    position: relative;
    height: 100vh; /* same as Tailwind h-screen */
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0; /* same as Tailwind inset-0 */
    width: 100%;
    height: 100%;
    opacity: 0; /* same as Tailwind opacity-0 */
    transition: opacity 1s ease-in-out; /* same as duration-1000 ease-in-out */
    z-index: 0; /* same as Tailwind z-0 */
}

.hero-slide.is-active {
    opacity: 1; /* same as Tailwind opacity-100 */
    z-index: 10; /* same as Tailwind z-10 */
    background-color: #e67e22;
}


.slider-dot.is-active {
    opacity: 1;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #d35400;
    transform: translateY(-3px);
}

/* --- Text Clamp Utilities (fallback when Tailwind line-clamp not available) --- */
.clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

/* Timeline Slider Styles */
.timeline-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.timeline-item {
    flex-shrink: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-dot {
    transition: all 0.3s ease;
}

/* Modern Timeline Advanced Styles */
.timeline-advanced {
    position: relative;
    margin: 0 auto;
    padding: 20px 0 0;
}

.timeline-main-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background: linear-gradient(180deg, #e67e22 0%, #f39c12 50%, #e67e22 100%);
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(230, 126, 34, 0.4);
    z-index: 5;
}

.timeline-item-advanced {
    position: relative;
    margin-bottom: 100px;
}

.timeline-item-advanced:last-child {
    margin-bottom: 60px;
}

.timeline-content-advanced {
    position: relative;
    margin-top: 60px;
}

.timeline-content-advanced .group {
    position: relative;
}



.timeline-content-advanced .group .absolute {
    position: absolute;
}

/* Timeline Node Animation */
.timeline-item-advanced .w-8.h-8 {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.timeline-item-advanced .w-8.h-8:hover {
    transform: scale(1.2);
    box-shadow: 0 0 30px rgba(230, 126, 34, 0.6);
}

/* Timeline Card Styles */
.timeline-content-advanced .relative.bg-white {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content-advanced .relative.bg-white:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Card Header Gradient */
.timeline-content-advanced .bg-gradient-to-r.from-orange-500.to-orange-600 {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
}

/* Progress Animation */
.timeline-content-advanced .bg-gradient-to-r.from-orange-400.to-orange-500 {
    background: linear-gradient(90deg, #f39c12 0%, #e67e22 100%);
    transition: width 1.5s ease-in-out;
}

/* Timeline End Markers */
.timeline-advanced > .absolute.w-4.h-4 {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    border: 4px solid #fff;
    box-shadow: 0 0 20px rgba(230, 126, 34, 0.5);
    z-index: 10;
}

/* Responsive Adjustments for PC-only */
@media (min-width: 1024px) {
    .timeline-advanced {
        max-width: 1200px;
    }
    
    .timeline-content-advanced .group {
        max-width: 500px;
    }
}

/* Hover Effects */
.timeline-content-advanced .group:hover .absolute {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

/* Animation Delays for Staggered Appearance */
.timeline-item-advanced:nth-child(1) .animate-fade-in-up {
    animation-delay: 0.1s;
}

.timeline-item-advanced:nth-child(2) .animate-fade-in-up {
    animation-delay: 0.2s;
}

.timeline-item-advanced:nth-child(3) .animate-fade-in-up {
    animation-delay: 0.3s;
}

.timeline-item-advanced:nth-child(4) .animate-fade-in-up {
    animation-delay: 0.4s;
}

.timeline-item-advanced:nth-child(5) .animate-fade-in-up {
    animation-delay: 0.5s;
}

/* Additional Animation for Timeline Nodes */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 20px rgba(230, 126, 34, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(230, 126, 34, 0.8);
    }
    100% {
        box-shadow: 0 0 20px rgba(230, 126, 34, 0.4);
    }
}

.timeline-item-advanced .w-8.h-8 {
    animation: pulse-glow 2s ease-in-out infinite;
}

.timeline-item-advanced:hover .w-8.h-8 {
    animation: none;
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}