/* Performance Optimizations */
/* Preload critical CSS */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Optimize font loading */
body {
    font-family: 'Open Sans', sans-serif;
    font-display: swap;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Dropdown Language Switcher */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
}

.lang-dropdown-toggle:hover {
    background-color: #0066cc;
    color: #fff;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.lang-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.lang-dropdown.active .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown-item {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
}

.lang-dropdown-item:hover {
    background-color: #f0f0f0;
    color: #0066cc;
}

.lang-dropdown-item.active {
    background-color: #0066cc;
    color: #fff;
}

/* Header */
.header {
    padding: 20px 0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Header Content */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-contact {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.contact-email {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: rgba(0, 102, 204, 0.05);
}

.contact-email i {
    font-size: 18px;
    color: #0066cc;
}

.contact-email:hover {
    background-color: rgba(0, 102, 204, 0.1);
    color: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.contact-email:active {
    transform: translateY(0);
}

/* Main Navigation */
.main-nav {
    position: relative;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-block;
    padding: 10px 0;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #0066cc;
}

.nav-link.active {
    color: #0066cc;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #0066cc;
    border-radius: 1px;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.nav-toggle-bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* RTL Support for Navigation (Arabic) */
[lang="ar"] .nav-menu {
    direction: rtl;
}

[lang="ar"] .nav-link {
    text-align: right;
}

/* Responsive Design for Navigation */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background-color: #fff;
        min-width: 200px;
        padding: 15px 0;
        border-radius: 10px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .nav-toggle-bar:first-child {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .nav-toggle.active .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .nav-toggle-bar:last-child {
        transform: rotate(-45deg) translate(8px, -8px);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-nav {
        width: 100%;
    }
    
    .nav-menu {
        left: 0;
        right: auto;
        width: 100%;
    }
}

/* Banner */
.banner {
    position: relative;
    color: #fff;
    padding: 0;
    text-align: center;
    overflow: hidden;
}

.banner-carousel {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 30px 50px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.banner h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.banner p {
    font-size: 20px;
    margin-bottom: 0;
}

/* Carousel Controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    z-index: 4;
    transition: background 0.3s ease;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #fff;
    transform: scale(1.2);
}

/* Carousel Animation */
@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Section Styles */
section {
    padding: 80px 0;
}

h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    font-weight: 700;
    color: #333;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #0066cc;
}

h3 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #333;
}

/* Company Introduction */
.company-intro {
    background-color: #f9f9f9;
}

.intro-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* Core Business */
.core-business {
    background-color: #fff;
}

.business-overview {
    text-align: center;
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.business-segments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.segment {
    background-color: #f5f5f5;
    padding: 30px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

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

.departments {
    text-align: center;
    margin-top: 40px;
}

.departments h3 {
    font-size: 22px;
    margin-bottom: 25px;
    color: #333;
    position: relative;
    display: inline-block;
}

.departments h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #0066cc;
    border-radius: 2px;
}

.department-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.department {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #fff;
    padding: 30px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-height: 140px;
    justify-content: center;
}

.department i {
    font-size: 40px;
    color: #fff;
    margin-bottom: 5px;
    display: inline-flex;
    line-height: 1;
    padding: 8px;
    position: relative;
    z-index: 1;
    min-height: 50px;
    min-width: 50px;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.department span {
    display: block;
}

.department::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fff 0%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.department:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.3);
}

.department:hover::before {
    transform: translateX(100%);
}

/* Add subtle animation on page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.department {
    animation: fadeInUp 0.5s ease forwards;
}

/* Stagger animation for each department */
.department:nth-child(1) { animation-delay: 0.1s; }
.department:nth-child(2) { animation-delay: 0.2s; }
.department:nth-child(3) { animation-delay: 0.3s; }
.department:nth-child(4) { animation-delay: 0.4s; }
.department:nth-child(5) { animation-delay: 0.5s; }
.department:nth-child(6) { animation-delay: 0.6s; }

/* Strength Guarantee */
.strength-guarantee {
    background-color: #f9f9f9;
}

.strength-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.strength-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.strength-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Market Layout */
.market-layout {
    background-color: #fff;
}

.market-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.market-domestic, .market-international {
    text-align: center;
    padding: 30px;
    background-color: #f5f5f5;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.market-domestic:hover, .market-international:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Cooperation Cases */
.cooperation-cases {
    background-color: #f9f9f9;
    text-align: center;
}

.cases-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Products */
.products {
    background-color: #fff;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-item {
    background-color: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover img {
    transform: scale(1.05);
}

.product-item h3 {
    padding: 15px;
    font-size: 18px;
    text-align: center;
    margin: 0;
}

/* Application Fields */
.application-fields {
    background-color: #f9f9f9;
    text-align: center;
}

.fields-content {
    max-width: 900px;
    margin: 0 auto;
}

/* FAQ */
.faq {
    background-color: #fff;
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 20px;
    background-color: #f5f5f5;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.faq-question:hover {
    background-color: #e0e0e0;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.faq-question.active::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #fff;
}

.faq-answer.active {
    padding: 20px;
    max-height: 200px;
}

/* Contact */
.contact {
    background-color: #f9f9f9;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-qr {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.qr-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.qr-item img {
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
}

/* Footer */
.footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Social Share Section */
.social-share {
    margin-bottom: 20px;
}

.social-share h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #fff;
    font-weight: 600;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 5px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 120px;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-btn.facebook {
    background-color: #1877f2;
}

.social-btn.linkedin {
    background-color: #0077b5;
}

.social-btn.youtube {
    background-color: #ff0000;
}

.social-btn.facebook:hover {
    background-color: #166fe5;
}

.social-btn.linkedin:hover {
    background-color: #005a82;
}

.social-btn.youtube:hover {
    background-color: #cc0000;
}

.social-icon {
    margin-right: 8px;
}

/* Footer Info */
.footer-info {
    text-align: center;
}

.footer p {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #0088ff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .language-switcher {
        top: 10px;
        right: 10px;
        padding: 5px;
    }
    
    .lang-dropdown-toggle {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .logo img {
        height: 50px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .banner-carousel {
        height: 400px;
    }
    
    .banner-content {
        padding: 20px 30px;
        text-align: center;
    }
    
    .banner h1 {
        font-size: 30px;
        margin-bottom: 15px;
    }
    
    .banner p {
        font-size: 16px;
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 18px;
        padding: 10px;
    }
    
    .carousel-indicators {
        bottom: 10px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    section {
        padding: 60px 0;
    }
    
    h2 {
        font-size: 28px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    .business-segments, .strength-list, .market-content, .product-grid, .contact-content {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .product-item img {
        height: 150px;
    }
    
    .product-item h3 {
        font-size: 16px;
        padding: 12px;
    }
    
    .department-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-qr {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .language-switcher {
        flex-wrap: wrap;
        max-width: 180px;
    }
    
    .banner h1 {
        font-size: 28px;
    }
    
    .banner p {
        font-size: 16px;
    }
    
    section {
        padding: 40px 0;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .segment, .strength-item, .market-domestic, .market-international, .contact-info, .qr-item {
        padding: 20px;
    }
    
    .department-list {
        grid-template-columns: repeat(2, 1fr);
    }
}