/* CSS Variables - الألوان الأساسية */
:root {
    /* الألوان الرئيسية - الأزرق الصناعي والفضي */
    --primary-blue: #0066cc;
    --dark-blue: #003366;
    --light-blue: #4d94ff;
    --silver: #f8f9fa;
    --silver-dark: #e9ecef;
    --silver-darker: #dee2e6;
    
    /* ألوان التدرج */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    --gradient-silver: linear-gradient(135deg, var(--silver), var(--silver-dark));
    --gradient-hero: linear-gradient(135deg, var(--dark-blue) 0%, #001a33 100%);
    
    /* ألوان النص */
    --text-dark: #2d3748;
    --text-light: #718096;
    --text-white: #ffffff;
    
    /* ألوان إضافية */
    --accent-teal: #00cccc;
    --accent-orange: #ff6600;
    --success: #48bb78;
    --warning: #ed8936;
    
    /* الظلال */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    
    /* الأنيميشن */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--silver);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hero);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--accent-teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: var(--text-white);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all var(--transition-fast);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-blue);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
    background: rgba(0, 102, 204, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: all var(--transition-fast);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--dark-blue);
    transition: all var(--transition-fast);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 51, 102, 0.8);
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.hero-text {
    color: var(--text-white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
}

.highlight {
    background: linear-gradient(135deg, var(--accent-teal), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::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.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--accent-teal);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(0, 204, 204, 0.3);
}

.btn-primary:hover {
    background: #00b3b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 204, 204, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-white);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.laser-beam {
    position: absolute;
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, transparent, var(--accent-teal), transparent);
    border-radius: 2px;
    animation: laserBeam 3s ease-in-out infinite;
}

.product-showcase {
    display: flex;
    gap: 2rem;
}

.showcase-item {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-white);
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.showcase-item:hover {
    transform: translateY(-10px) scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.showcase-item[data-type="co2"] { color: #ff6b6b; }
.showcase-item[data-type="fiber"] { color: #4ecdc4; }
.showcase-item[data-type="uv"] { color: #ffd93d; }

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-right: 3px solid var(--text-white);
    border-bottom: 3px solid var(--text-white);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

/* Sections Common Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-blue);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Products Section */
.products {
    background: var(--silver);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--text-white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--silver-darker);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-primary);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-silver);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.card-header h3 {
    font-size: 1.5rem;
    color: var(--dark-blue);
    flex: 1;
}

.product-badge {
    background: var(--accent-teal);
    color: var(--text-white);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-image {
    margin-bottom: 1.5rem;
}

.image-placeholder {
    height: 200px;
    background: var(--gradient-silver);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-blue);
}

.product-features {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
}

.feature i {
    color: var(--primary-blue);
    width: 20px;
}

.product-applications {
    margin-bottom: 2rem;
}

.product-applications h4 {
    color: var(--dark-blue);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.product-applications ul {
    list-style: none;
    padding: 0;
}

.product-applications li {
    padding: 0.3rem 0;
    color: var(--text-light);
    position: relative;
    padding-right: 1rem;
}

.product-applications li::before {
    content: '•';
    color: var(--primary-blue);
    font-weight: bold;
    position: absolute;
    right: 0;
}

.card-actions {
    text-align: center;
}

.btn-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--gradient-primary);
    color: var(--text-white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

/* Videos Section */
.videos-section {
    background: var(--text-white);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.video-card {
    background: var(--silver);
    border-radius: 15px;
    overflow: hidden;
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-md);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.video-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.thumbnail-placeholder {
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    gap: 1rem;
}

.thumbnail-placeholder i {
    font-size: 3rem;
    opacity: 0.8;
}

.thumbnail-placeholder span {
    font-size: 1rem;
    font-weight: 600;
}

.video-info {
    padding: 1.5rem;
}

.video-info h4 {
    color: var(--dark-blue);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.video-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    background: var(--gradient-primary);
    color: var(--text-white);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--dark-blue);
    color: var(--text-white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--accent-teal);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-teal);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item i {
    color: var(--accent-teal);
    width: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: var(--text-white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: right var(--transition-medium);
        box-shadow: var(--shadow-xl);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* تنسيقات الفيديوهات */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.video-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 10px;
}

.video-thumbnail:hover video {
    transform: scale(1.05);
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.video-thumbnail:hover .video-play-overlay {
    opacity: 1;
}

.video-play-overlay i {
    color: white;
    font-size: 2.5rem;
    background: rgba(0, 102, 204, 0.8);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover .video-play-overlay i {
    transform: scale(1.1);
}

/* تحسينات الفيديوهات */
.video-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    background: #000;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.5));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.video-thumbnail.playing .video-play-overlay {
    opacity: 0;
    pointer-events: none;
}

.video-play-overlay i {
    color: white;
    font-size: 3rem;
    background: rgba(0, 102, 204, 0.9);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.video-play-overlay:hover i {
    transform: scale(1.1);
    background: rgba(0, 102, 204, 1);
}

.video-duration {
    color: white;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* مؤشر التحميل */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.video-thumbnail.loading .video-loading {
    display: block;
}