/* Import font - Học tập từ products page */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* Base Styles - Sử dụng chung color scheme với products page */
:root {
    --color-black: #000000;
    --color-zinc-900: #18181b;
    --color-zinc-800: #27272a;
    --color-zinc-700: #3f3f46;
    --color-white: #ffffff;
    --color-gray-100: #f3f4f6;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-blue-400: #60a5fa;
    --color-blue-600: #2563eb;
    --color-yellow-400: #fbbf24;
    --color-purple-400: #a78bfa;
    --border-dark: #3f3f46;
    --border-light: #52525b;
    --header-height: 80px;
}

/* Custom wrapper for WordPress - Giống products page */
.custom-factory-wrapper {
    font-family: 'Montserrat', sans-serif !important;
    background-color: var(--color-black) !important;
    color: var(--color-gray-100) !important;
    line-height: 1.5;
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

.custom-factory-wrapper * {
    box-sizing: border-box;
}

.custom-factory-wrapper .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Override WordPress default styles - Học tập từ products */
.custom-factory-wrapper h1, 
.custom-factory-wrapper h2, 
.custom-factory-wrapper h3, 
.custom-factory-wrapper h4, 
.custom-factory-wrapper h5, 
.custom-factory-wrapper h6 {
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    font-family: 'Montserrat', sans-serif !important;
}

.custom-factory-wrapper a {
    text-decoration: none !important;
    color: inherit !important;
}

.custom-factory-wrapper button {
    cursor: pointer;
    font-family: inherit;
}

.custom-factory-wrapper ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-factory-wrapper p {
    margin: 0 !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Factory Header Section - Học tập typography từ product-header */
.custom-factory-wrapper .factory-header {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background-color: var(--color-black);
    z-index: 10;
}

.custom-factory-wrapper .factory-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    z-index: 1;
    filter: brightness(0.4);
    will-change: transform;
}

.custom-factory-wrapper .factory-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
    backdrop-filter: blur(1px);
    z-index: 2;
}

.custom-factory-wrapper .factory-header-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUpHero 1.2s ease-out 0.5s forwards;
}

/* Typography - Học tập từ products page */
.custom-factory-wrapper .factory-header h1 {
    font-size: 3.5rem !important; /* Giống product-header h1 */
    margin-bottom: 1rem !important;
    color: var(--color-white) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.custom-factory-wrapper .factory-header p {
    font-size: 1.25rem !important; /* Giống product-header p */
    margin-bottom: 2rem !important;
    color: var(--color-gray-300) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Factory Sections */
.custom-factory-wrapper .factory-section {
    position: relative;
    padding: 100px 0;
    background-color: var(--color-zinc-900);
    overflow: hidden;
}

.custom-factory-wrapper .factory-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgb(0 0 0 / 0%) 0%, rgb(24 24 27 / 0%) 100%);
    backdrop-filter: blur(0px);
    z-index: 2;
}

.custom-factory-wrapper .factory-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    z-index: 1;
    filter: brightness(0.2) blur(0.5px);
    transform: scale(1.05);
    will-change: transform;
}

.custom-factory-wrapper .factory-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

/* Typography Classes - Học tập từ products */
.custom-factory-wrapper .section-title {
    font-size: 2.5rem !important; /* Giống product-title */
    margin-bottom: 2rem !important;
    color: var(--color-white) !important;
    position: relative;
    z-index: 3;
    opacity: 0;
    transform: translateY(30px);
}

.custom-factory-wrapper .content-subtitle {
    font-size: 1.5rem !important; /* Giống product-subtitle */
    margin-bottom: 1.5rem !important;
    font-weight: 500 !important;
    color: var(--color-blue-400) !important;
    position: relative;
    z-index: 3;
    opacity: 0;
    transform: translateY(30px);
}

.custom-factory-wrapper .content-subtitle.featured {
    color: var(--color-yellow-400) !important;
    font-size: 1.8rem !important;
    text-align: center;
}

.custom-factory-wrapper .content-description {
    font-size: 1.1rem !important; /* Giống product-description */
    line-height: 1.8 !important;
    margin-bottom: 2rem !important;
    color: var(--color-white) !important;
    position: relative;
    z-index: 3;
    opacity: 0;
    transform: translateY(30px);
    text-align: left;
}

/* Content Cards */
.custom-factory-wrapper .content-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin: 40px 0;
    opacity: 0;
    transform: translateY(30px);
}

/* Equipment List Styling */
.custom-factory-wrapper .equipment-list {
    margin-top: 30px;
}

.custom-factory-wrapper .equipment-items {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.custom-factory-wrapper .equipment-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.custom-factory-wrapper .equipment-items li:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.custom-factory-wrapper .equipment-name {
    font-weight: 600;
    color: var(--color-white);
}

.custom-factory-wrapper .equipment-count {
    color: var(--color-blue-400);
    font-weight: 500;
}

/* Capacity Stats */
.custom-factory-wrapper .capacity-stat {
    text-align: center;
    margin: 30px 0;
    padding: 30px;
    background: rgba(96, 165, 250, 0.1);
    border: 2px solid var(--color-blue-400);
    border-radius: 20px;
}

.custom-factory-wrapper .stat-number {
    font-size: 3rem !important;
    font-weight: 700 !important;
    color: var(--color-blue-400) !important;
    display: block;
    margin-bottom: 10px;
}

.custom-factory-wrapper .stat-label {
    font-size: 1.1rem !important;
    color: var(--color-white) !important;
    font-weight: 500;
}

/* Installation Features */
.custom-factory-wrapper .installation-features {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

.custom-factory-wrapper .feature-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.custom-factory-wrapper .feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.custom-factory-wrapper .feature-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--color-blue-400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--color-white);
}

.custom-factory-wrapper .feature-item .content-description {
    margin-bottom: 0;
    text-align: left;
    opacity: 1;
    transform: none;
}

/* Personnel Grid */
.custom-factory-wrapper .personnel-grid {
    display: grid;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}

.custom-factory-wrapper .personnel-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(-30px);
}

.custom-factory-wrapper .personnel-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.custom-factory-wrapper .personnel-image:hover img {
    transform: scale(1.05);
}

.custom-factory-wrapper .team-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.custom-factory-wrapper .stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-factory-wrapper .stat-item .stat-number {
    font-size: 2rem !important;
    color: var(--color-purple-400) !important;
    display: block;
    margin-bottom: 8px;
}

.custom-factory-wrapper .stat-item .stat-label {
    font-size: 0.9rem !important;
    color: var(--color-gray-300) !important;
}

/* Glass Button - Học tập từ products */
.custom-factory-wrapper .btn-glass {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50px;
    color: var(--color-white) !important;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-decoration: none !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.custom-factory-wrapper .btn-glass:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px);
    color: var(--color-white) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Animations - Học tập từ products */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUpHero {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-factory-wrapper .fade-up {
    opacity: 0;
    transform: translateY(30px);
}

.custom-factory-wrapper .fade-up.active {
    animation: fadeUp 0.8s ease forwards;
}

/* Desktop Responsive */
@media (min-width: 992px) {
    .custom-factory-wrapper .personnel-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .custom-factory-wrapper .personnel-image {
        transform: translateX(0);
    }
}

/* Mobile Responsive Design - Học tập từ products page */
@media (max-width: 768px) {
    .custom-factory-wrapper .factory-header {
        height: 70vh;
        min-height: 500px;
    }

    .custom-factory-wrapper .factory-header-bg,
    .custom-factory-wrapper .factory-bg {
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
        filter: brightness(0.3);
    }

    /* Typography Mobile - Học tập từ products */
    .custom-factory-wrapper .factory-header h1 {
        font-size: 28px !important; /* Đồng bộ với products mobile */
        line-height: 1.1 !important;
        margin-bottom: 16px !important;
    }
    
    .custom-factory-wrapper .factory-header p {
        font-size: 16px !important; /* Đồng bộ với products mobile */
        margin-bottom: 24px !important;
        line-height: 1.5 !important;
    }
    
    .custom-factory-wrapper .section-title {
        font-size: 24px !important; /* Đồng bộ với products mobile */
        margin-bottom: 16px !important;
        line-height: 1.2 !important;
    }
    
    .custom-factory-wrapper .content-subtitle {
        font-size: 16px !important; /* Đồng bộ với products mobile */
        margin-bottom: 16px !important;
        font-weight: 500 !important;
    }
    
    .custom-factory-wrapper .content-subtitle.featured {
        font-size: 18px !important;
    }
    
    .custom-factory-wrapper .content-description {
        font-size: 14px !important; /* Đồng bộ với products mobile */
        line-height: 1.5 !important;
        margin-bottom: 24px !important;
        text-align: left !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Spacing optimizations */
    .custom-factory-wrapper .factory-section {
        padding: 40px 0; /* Đồng bộ với products mobile */
    }
    
    .custom-factory-wrapper .container {
        padding: 0 16px; /* Đồng bộ với products mobile */
    }

    .custom-factory-wrapper .factory-header-content {
        padding: 0 16px;
    }

    .custom-factory-wrapper .content-card {
        padding: 24px;
        margin: 24px 0;
    }

    .custom-factory-wrapper .equipment-items li {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .custom-factory-wrapper .installation-features {
        gap: 20px;
    }

    .custom-factory-wrapper .feature-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .custom-factory-wrapper .team-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .custom-factory-wrapper .stat-number {
        font-size: 2rem !important;
    }

    .custom-factory-wrapper .stat-item .stat-number {
        font-size: 1.5rem !important;
    }

    .custom-factory-wrapper .personnel-image {
        transform: none;
    }

    .custom-factory-wrapper .personnel-image img {
        height: 250px;
    }

    /* Button optimizations */
    .custom-factory-wrapper .btn-glass {
        padding: 12px 24px;
        font-size: 14px !important;
        min-height: 44px;
        width: 100%;
        justify-content: center;
        margin-top: 16px;
    }

    /* Animation optimizations for mobile performance */
    .custom-factory-wrapper .fade-up {
        animation: none;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .custom-factory-wrapper .factory-header-content,
    .custom-factory-wrapper .section-title,
    .custom-factory-wrapper .content-subtitle,
    .custom-factory-wrapper .content-description,
    .custom-factory-wrapper .content-card,
    .custom-factory-wrapper .feature-item,
    .custom-factory-wrapper .personnel-image {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .custom-factory-wrapper .factory-section {
        padding: 32px 0;
    }
    
    .custom-factory-wrapper .container {
        padding: 0 12px;
    }
    
    .custom-factory-wrapper .factory-header h1 {
        font-size: 24px !important;
    }
    
    .custom-factory-wrapper .section-title {
        font-size: 20px !important;
    }
    
    .custom-factory-wrapper .content-subtitle {
        font-size: 14px !important;
    }
    
    .custom-factory-wrapper .content-subtitle.featured {
        font-size: 16px !important;
    }
    
    .custom-factory-wrapper .content-description {
        font-size: 13px !important;
        margin-bottom: 20px !important;
    }
    
    .custom-factory-wrapper .factory-header {
        min-height: 60vh;
        height: 60vh;
    }
    
    .custom-factory-wrapper .factory-header-content {
        padding: 0 12px;
    }
    
    .custom-factory-wrapper .content-card {
        padding: 20px;
        margin: 20px 0;
    }
    
    .custom-factory-wrapper .btn-glass {
        padding: 10px 20px;
        font-size: 13px !important;
    }
    
    .custom-factory-wrapper .stat-number {
        font-size: 1.8rem !important;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    @media (prefers-reduced-motion: reduce) {
        .custom-factory-wrapper * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
    
    .custom-factory-wrapper img {
        max-width: 100%;
        height: auto;
        image-rendering: -webkit-optimize-contrast;
    }
    
    .custom-factory-wrapper {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Touch-friendly elements */
    .custom-factory-wrapper .btn-glass,
    .custom-factory-wrapper .feature-item {
        min-height: 44px;
        min-width: 44px;
    }
}
