+
+
+
+ {navItems.map((item) => {
+ const isActive = activeSection === item.key;
+ return (
+ -
setActiveSection(item.key)}
onClick={() => {
- setActiveSection(item.key);
- setMenuOpen(false);
+ if (item.key === "home") scroll.scrollToTop({ duration: 600 });
+ if (menuOpen) setMenuOpen(false);
}}
- className={`nav-item relative inline-flex w-full justify-center text-base md:text-lg font-semibold py-3 rounded-full transition-all duration-300 focus:outline-none select-none
- ${
- activeSection === item.key
- ? "text-yellow-500"
- : "text-gray-800 dark:text-white"
- }
- `}
- role="link"
- aria-current={activeSection === item.key ? "page" : undefined}
+ className={`nav-link cursor-pointer text-sm md:text-lg ${isActive ? "active" : "text-slate-200 dark:text-slate-200/90"}`}
+ aria-current={isActive ? "page" : undefined}
>
-
- {item.label}
+ {item.label}
- ))}
-
+ );
+ })}
+
+
+
+ {/* controls */}
+
+
+
+
- {/* mobile compact center (if needed) */}
-
-
- {navItems.slice(0, 3).map((item) => (
- setActiveSection(item.key)}
- onClick={() => {
- setActiveSection(item.key);
- setMenuOpen(false);
- }}
- className={`nav-item relative inline-flex items-center text-sm font-semibold px-4 py-2 rounded-full transition-all duration-300
- ${
- activeSection === item.key
- ? "text-yellow-500"
- : "text-gray-800 dark:text-white"
- }
- `}
- >
-
- {item.label}
-
- ))}
-
+
+
+
- {/* right: controls */}
-
- {/* Dark mode - refined icon with subtle motion */}
-
+ {/* mobile drawer */}
+
-
- {/* Mobile menu */}
-
-
- {navItems.map((item) => (
- -
- setActiveSection(item.key)}
- onClick={() => {
- setActiveSection(item.key);
- setMenuOpen(false);
- }}
- className={`block w-full text-center px-6 py-3 rounded-lg font-semibold transition-all duration-250
- ${
- activeSection === item.key
- ? "text-yellow-500 ring-4 ring-yellow-300/30 shadow-lg"
- : "text-gray-800 dark:text-white hover:text-yellow-500"
- }
- `}
- >
- {item.label}
-
-
- ))}
-
-
-
-
- {/* inline CSS for polish */}
-
-
+
+ >
);
};
diff --git a/src/Components/Sections/About/About.jsx b/src/Components/Sections/About/About.jsx
index e63b0dd..b05b274 100644
--- a/src/Components/Sections/About/About.jsx
+++ b/src/Components/Sections/About/About.jsx
@@ -1,72 +1,690 @@
-import React, { useEffect } from "react";
-import { Element } from "react-scroll";
-import { useTranslation } from "react-i18next";
-import AOS from "aos";
-import "aos/dist/aos.css";
-
-const About = () => {
- const { t } = useTranslation();
-const home10 = "https://i.imgur.com/MW2Sk0y.jpg";
+import React, { useState, useRef, useEffect } from "react";
+import { motion } from "framer-motion";
+import {
+ Building,
+ Eye,
+ MessageSquare,
+ Heart,
+ X,
+ Sparkles,
+ Zap,
+ Target,
+ Globe,
+ Shield,
+ ChevronLeft,
+ ArrowDown,
+ ChevronRight
+} from "lucide-react";
+import styled, { keyframes } from "styled-components";
+const companyInfo = [
+ {
+ id: 1,
+ title: "من نحن",
+ icon: Building,
+ description: `تتمثل غايتنا في تقديم حلول هندسية وتقنية متكاملة تشمل تصميم و تنفيذ وإشراف وإدارة المشاريع الصناعية والخدمية ابتداءً من الدراسات والتخطيط مروراً بالتنفيذ والتركيب وصولاً إلى التشغيل والصيانة، توريد و تركيب المعدات و الآلات و خطوط الإنتاج و قطع الصيانة، تمثيل الشركات و الوكالات و المشاركة في المناقصات و المزايدات مع القطاعين العام و الخاص و ذلك وفق القوانين و الأنظمة المعمول بها`,
+ features: [
+ "تنفيذ الأعمال المدنية والمعمارية و المعدنية و الميكانيكية و الكهربائية ",
+ "التحكم و تصميم و تطوير و تنفيذ الأنظمة و التطبيقات البرمجية و قواعد البيانات حسب متطلبات كل مشروع بما في ذلك أنظمة الأتمتة و التحكم",
+ "تطوير و تنفيذ أنظمة متخصصة لإدارة و تشغيل المنشآت الصناعية و محطات الوقود ",
+ "التفتيش الفني بكل أنواعه",
+ ]
+ },
+ {
+ id: 2,
+ title: "رؤيتنا",
+ icon: Eye,
+ description: `أن نكون الشريك الهندسي التقني الموثوق في تنفيذ و إدارة المشاريع الصناعية والسكنية و النفطية والمساهمة في تطوير البنية التحتية والقطاعات الإنتاجية عبر حلول حديثة ومستدامة.`,
+ features: [
+ "الشريك الهندسي الموثوق",
+ "تنمية البنية التحتية",
+ "حلول مستدامة وحديثة",
+ "الريادة في القطاع الهندسي"
+ ]
+ },
+ {
+ id: 3,
+ title: "رسالتنا",
+ icon: MessageSquare,
+ description: `تقديم خدمات هندسية ودراسات تنفيذية وإشراف متكامل بأعلى معايير الجودة والسلامة، من خلال كوادر مؤهلة وخبرات متخصصة، مع الالتزام بالوقت والتكلفة وتحقيق أعلى قيمة مضافة لعملائنا.`,
+ features: [
+ "أعلى معايير الجودة والسلامة",
+ "الالتزام بالوقت والتكلفة",
+ "فرق عمل متخصصة ومؤهلة",
+ "تحقيق القيمة المضافة للعملاء"
+ ]
+ },
+ {
+ id: 4,
+ title: "قيمنا",
+ icon: Heart,
+ description: `نؤمن بقيم ثابتة توجه أعمالنا وعلاقاتنا مع العملاء والشركاء: الجودة والتميز في كل ما نقدمه، النزاهة المهنية في التعامل، الالتزام بالاستدامة والمسؤولية البيئية والاجتماعية.`,
+ features: [
+ "الجودة الاحترافية",
+ "السلامة المهنية",
+ "الاستدامة والمسؤولية",
+ "التطوير المستمر",
+ "الشفافية و بناء الثقة"
+ ]
+ }
+];
-
- useEffect(() => {
- AOS.init({ duration: 1000, once: false });
+// Animations
+const rotating = keyframes`
+ from {
+ transform: perspective(var(--perspective)) rotateX(var(--rotateX))
+ rotateY(0);
+ }
+ to {
+ transform: perspective(var(--perspective)) rotateX(var(--rotateX))
+ rotateY(1turn);
+ }
+`;
- const handleScroll = () => {
- AOS.refresh();
+const floatAnimation = keyframes`
+ 0%, 100% {
+ transform: rotateY(calc((360deg / var(--quantity)) * var(--index)))
+ translateZ(var(--translateZ)) translateY(0px);
+ }
+ 50% {
+ transform: rotateY(calc((360deg / var(--quantity)) * var(--index)))
+ translateZ(var(--translateZ)) translateY(-10px);
+ }
+`;
+
+const StyledWrapper = styled.div`
+ width: 100%;
+ height: 100vh;
+ position: relative;
+ overflow: hidden;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ transition: background-color 0.3s ease;
+`;
+
+const Wrapper = styled.div`
+ width: 100%;
+ height: 100%;
+ position: relative;
+ text-align: center;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ overflow: hidden;
+ z-index: 2;
+`;
+
+const Inner = styled(motion.div)`
+ --quantity: ${props => props.quantity || 4};
+ --w: 250px;
+ --h: 350px;
+ --translateZ: 320px;
+ --rotateX: -8deg;
+ --perspective: 2000px;
+ position: absolute;
+ width: var(--w);
+ height: var(--h);
+ top: 26%;
+ left: calc(50% - (var(--w) / 2));
+ transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(${props => props.rotation || 0}deg);
+ transform-style: preserve-3d;
+ transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
+ z-index: 10;
+`;
+
+const Card = styled.div.attrs(props => ({
+ style: {
+ '--index': props['data-index'] || 0,
+ }
+}))`
+ position: absolute;
+ border: 2px solid ${props => props.$theme === 'dark' ? '#4a4a4a' : '#d1c9be'};
+ border-radius: 20px;
+ overflow: visible;
+ inset: 0;
+ transform: rotateY(calc((360deg / var(--quantity)) * var(--index)))
+ translateZ(var(--translateZ));
+ cursor: pointer;
+ transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
+ background: ${props => props.$theme === 'dark' ? '#f5e7c673' : '#f5e7c673'};
+ backdrop-filter: blur(15px);
+ -webkit-backdrop-filter: blur(15px);
+
+ &:hover {
+ transform: rotateY(calc((360deg / var(--quantity)) * var(--index)))
+ translateZ(calc(var(--translateZ) + 80px)) scale(1.05);
+ border-color: #e06923;
+ background: ${props => props.$theme === 'dark' ? '#F7B980' : '#F7B980'};
+ box-shadow:
+ 0 0 30px rgba(4, 28, 64, 0.3),
+ 0 0 60px rgba(4, 28, 64, 0.2);
+ }
+
+ ${props => props.$isFront && `
+ transform: rotateY(calc((360deg / var(--quantity)) * var(--index)))
+ translateZ(calc(var(--translateZ) + 50px)) scale(1.03);
+ border-color:#e06923;
+ box-shadow:
+ 0 15px 35px rgba(4, 28, 64, 0.2),
+ 0 5px 15px rgba(4, 28, 64, 0.1);
+ `}
+`;
+
+const CardContent = styled.div`
+ width: 100%;
+ height: 100%;
+ padding: 25px;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ position: relative;
+ overflow: hidden;
+ border-radius: 18px;
+ transition: all 0.3s ease;
+`;
+
+const CardHeader = styled.div`
+ position: relative;
+ z-index: 2;
+`;
+
+const IconWrapper = styled.div`
+ width: 30px;
+ height: 20px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-bottom: 20px;
+ transition: all 0.3s ease;
+`;
+
+const CardTitle = styled.h3`
+ font-size: 30px;
+ font-weight: 700;
+ color: #041c40;
+ margin-bottom: 6px;
+ text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+ letter-spacing: -0.5px;
+ text-align: center !important;
+`;
+
+const CardDescription = styled.p`
+ font-size: 14px;
+ line-height: 1.6;
+ color: ${props => props.$theme === 'dark' ? '#131313' : '#131313'};
+ margin-bottom: 6px;
+ display: -webkit-box;
+ -webkit-line-clamp: 8;
+ -webkit-box-orventical: vertical;
+ overflow: hidden;
+ text-align: right;
+ position: relative;
+ flex-grow: 1;
+ opacity: 0.9;
+`;
+
+const ArrowHint = styled(motion.div)`
+ position: absolute;
+ bottom: 15px;
+ left: 50%;
+ transform: translateX(-50%);
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 5px;
+ color: #041c40;
+ z-index: 2;
+ opacity: 0.7;
+ transition: all 0.3s ease;
+
+ span {
+ font-size: 11px;
+ color: #041c40;
+ font-weight: 500;
+ opacity: 0;
+ white-space: nowrap;
+ transition: opacity 0.3s ease;
+ }
+
+ svg {
+ animation: bounce 2s infinite;
+ transition: all 0.3s ease;
+ color: #041c40;
+ }
+
+ @keyframes bounce {
+ 0%, 100% {
+ transform: translateY(0);
+ }
+ 50% {
+ transform: translateY(5px);
+ }
+ }
+
+ &:hover {
+ opacity: 1;
+ span {
+ opacity: 1;
+ }
+ svg {
+ animation: bounce 1s infinite;
+ }
+ }
+`;
+
+const HeaderSection = styled.div`
+ text-align: center;
+ position: absolute;
+ top: 60px;
+ left: 50%;
+ transform: translateX(-50%);
+ z-index: 10;
+ width: 100%;
+`;
+
+const Title = styled.div`
+ font-size: 42px;
+ text-align: center;
+ font-weight: 800;
+ color: #041c40;
+ margin-bottom: 15px;
+ text-shadow: 0 2px 10px rgba(4, 28, 64, 0.2);
+ letter-spacing: -0.5px;
+`;
+
+const Subtitle = styled.div`
+ font-size: 16px;
+ color: ${props => props.$theme === 'dark' ? '#F5EEE6' : '#131313'};
+ opacity: 0.8;
+ max-width: 600px;
+ margin: 0 auto;
+ font-weight: 300;
+ line-height: 1.5;
+`;
+
+const DetailModal = styled(motion.div)`
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: ${props => props.$theme === 'dark' ? 'rgb(49 49 49 / 75%)' : 'rgb(245 238 230 / 65%)'};
+ backdrop-filter: blur(20px);
+ -webkit-backdrop-filter: blur(20px);
+ z-index: 2000;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 15px;
+`;
+
+const ModalContent = styled(motion.div)`
+ max-width: 650px;
+ width: 100%;
+ height: 86%;
+ background: ${props => props.$theme === 'dark' ? 'rgba(49, 49, 49, 0.9)' : 'rgba(245, 238, 230, 0.9)'};
+ backdrop-filter: blur(40px);
+ -webkit-backdrop-filter: blur(40px);
+ border-radius: 25px;
+ border: 2px solid ${props => props.$theme === 'dark' ? '#4a4a4a' : '#d1c9be'};
+ padding: 12px 20px;
+ position: relative;
+ color: ${props => props.$theme === 'dark' ? '#F5EEE6' : '#131313'};
+`;
+
+const CloseButton = styled(motion.button)`
+ position: absolute;
+ top: 10px;
+ right: 10px;
+ width: 40px;
+ height: 40px;
+ border-radius: 50%;
+ border: 1px solid rgba(4, 28, 64, 0.3);
+ background: ${props => props.$theme === 'dark' ? 'rgba(49, 49, 49, 0.8)' : 'rgba(245, 238, 230, 0.8)'};
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ color: #041c40;
+ z-index: 1001;
+ transition: all 0.3s ease;
+
+ &:hover {
+ background: rgba(4, 28, 64, 0.1);
+ transform: rotate(90deg);
+ border-color: #041c40;
+ }
+`;
+
+const NavButton = styled(motion.button)`
+ position: absolute;
+ top: 50%;
+ transform: translateY(-50%);
+ width: 60px;
+ height: 60px;
+ border-radius: 50%;
+ background: ${props => props.$theme === 'dark' ? 'rgba(49, 49, 49, 0.8)' : 'rgba(245, 238, 230, 0.8)'};
+ backdrop-filter: blur(10px);
+ border: 1px solid ${props => props.$theme === 'dark' ? '#4a4a4a' : '#d1c9be'};
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ color: ${props => props.$theme === 'dark' ? '#F5EEE6' : '#131313'};
+ z-index: 100;
+ transition: all 0.3s ease;
+
+ &:hover {
+ background: rgba(4, 28, 64, 0.1);
+ border-color: #041c40;
+ transform: translateY(-50%) scale(1.1);
+ color: #041c40;
+ }
+
+ &:disabled {
+ opacity: 0.3;
+ cursor: not-allowed;
+ &:hover {
+ background: ${props => props.$theme === 'dark' ? 'rgba(49, 49, 49, 0.8)' : 'rgba(245, 238, 230, 0.8)'};
+ transform: translateY(-50%) scale(1);
+ border-color: ${props => props.$theme === 'dark' ? '#4a4a4a' : '#d1c9be'};
+ color: ${props => props.$theme === 'dark' ? '#F5EEE6' : '#131313'};
+ }
+ }
+`;
+
+const LeftNavButton = styled(NavButton)`
+ left: 30px;
+`;
+
+const RightNavButton = styled(NavButton)`
+ right: 30px;
+`;
+
+const DotsContainer = styled.div`
+ position: absolute;
+ bottom: 40px;
+ left: 50%;
+ transform: translateX(-50%);
+ display: flex;
+ gap: 12px;
+ z-index: 100;
+`;
+
+const Dot = styled.div.attrs(props => ({
+ 'data-active': props['data-active'] || 'false'
+}))`
+ width: 12px;
+ height: 12px;
+ border-radius: 50%;
+ background: ${props =>
+ props['data-active'] === 'true'
+ ? '#041c40'
+ : props.$theme === 'dark'
+ ? 'rgba(224, 105, 35, 0.3)'
+ : 'rgba(4, 28, 64, 0.3)'
+ };
+ cursor: pointer;
+ transition: all 0.3s ease;
+
+ &:hover {
+ background: ${props =>
+ props['data-active'] === 'true'
+ ? '#041c40'
+ : props.$theme === 'dark'
+ ? 'rgba(224, 105, 35, 0.5)'
+ : 'rgba(4, 28, 64, 0.5)'
};
+ transform: scale(1.2);
+ }
+`;
- window.addEventListener("scroll", handleScroll);
- return () => window.removeEventListener("scroll", handleScroll);
- }, []);
+const About = ({ theme = 'light' }) => {
+ const [selectedCard, setSelectedCard] = useState(null);
+ const [rotation, setRotation] = useState(0);
+ const [activeCardIndex, setActiveCardIndex] = useState(0);
+ const innerRef = useRef(null);
+
+ const handleCardClick = (card) => {
+ setSelectedCard(card);
+ };
+
+ const handleCloseModal = () => {
+ setSelectedCard(null);
+ };
+
+ const handleNextCard = () => {
+ const angleStep = 360 / companyInfo.length;
+ setRotation(prev => prev - angleStep);
+ setActiveCardIndex(prev => (prev + 1) % companyInfo.length);
+ };
+
+ const handlePrevCard = () => {
+ const angleStep = 360 / companyInfo.length;
+ setRotation(prev => prev + angleStep);
+ setActiveCardIndex(prev => (prev - 1 + companyInfo.length) % companyInfo.length);
+ };
+
+ const handleDotClick = (index) => {
+ const angleStep = 360 / companyInfo.length;
+ const targetRotation = -index * angleStep;
+ setRotation(targetRotation);
+ setActiveCardIndex(index);
+ };
+
+ const isCardInFront = (index) => {
+ const cardAngle = (index * (360 / companyInfo.length) + rotation) % 360;
+ const normalizedAngle = (cardAngle + 360) % 360;
+ return Math.abs(normalizedAngle) < 30 || Math.abs(normalizedAngle - 360) < 30;
+ };
return (
-
-
- {/* صورة الخلفية */}
-
+
+
+
+ من نحن
+
+
+
+
+ رحلة التميز الهندسي والتقني، هنا حيث تلتقي الخبرة بالابتكار
+
+
+
+
+
+
-
-
+
+
+
+
+ {companyInfo.map((card, index) => {
+ const Icon = card.icon;
+ const isFront = isCardInFront(index);
- {/* مربع النص المتراكب */}
- isFront && handleCardClick(card)}
+ >
+
+
+
+
+
+ {card.title}
+
+ {card.description}
+
+
+
+
+ {isFront && (
+
+
+ إضغط لعرض التفاصيل
+
+ )}
+
+
+
+ );
+ })}
+
+
+
-
-
- {t('about.title')}
-
-
-
- {t('about.description')}
-
-
-
-
+
+
+
+
+ {companyInfo.map((_, index) => (
+ handleDotClick(index)}
+ />
+ ))}
+
+
+
+ {selectedCard && (
+
+ e.stopPropagation()}
+ >
+
+
+
+
+
+
+
+ {selectedCard.title}
+
+
+
+
+
+
+ {selectedCard.description}
+
+
+
+
+
+ {selectedCard.features.map((feature, idx) => (
+
+
+ {idx === 1 && }
+ {idx === 0 && }
+ {idx === 2 && }
+ {idx === 3 && }
+ {idx === 4 && }
+
+
+ {feature}
+
+
+ ))}
+
+
+
+
+ )}
+
);
};
export default About;
+
+
diff --git a/src/Components/Sections/DepartmentDetail/DepartmentDetail.jsx b/src/Components/Sections/DepartmentDetail/DepartmentDetail.jsx
index 694f1ff..9822afa 100644
--- a/src/Components/Sections/DepartmentDetail/DepartmentDetail.jsx
+++ b/src/Components/Sections/DepartmentDetail/DepartmentDetail.jsx
@@ -1,4 +1,3 @@
-// DepartmentDetail.jsx
import React, { useState, useEffect, useRef, useCallback } from "react";
import { motion, AnimatePresence } from "framer-motion";
import d1 from "../../../../src/assets/Images/d1.jpeg";
@@ -49,15 +48,15 @@ function ProjectsTimeline({
const stop1 = document.createElementNS(svgNS, "stop");
stop1.setAttribute("offset", "0%");
- stop1.setAttribute("style", "stop-color:#ea580c;stop-opacity:1");
+ stop1.setAttribute("style", "stop-color:#0f172a;stop-opacity:1");
const stop2 = document.createElementNS(svgNS, "stop");
stop2.setAttribute("offset", "50%");
- stop2.setAttribute("style", "stop-color:#dc2626;stop-opacity:1");
+ stop2.setAttribute("style", "stop-color:#f97316;stop-opacity:1");
const stop3 = document.createElementNS(svgNS, "stop");
stop3.setAttribute("offset", "100%");
- stop3.setAttribute("style", "stop-color:#b91c1c;stop-opacity:1");
+ stop3.setAttribute("style", "stop-color:#9ca3af;stop-opacity:1");
gradient.appendChild(stop1);
gradient.appendChild(stop2);
@@ -96,7 +95,7 @@ function ProjectsTimeline({
path.setAttribute("stroke-width", "4");
path.setAttribute("fill", "none");
path.setAttribute("stroke-linecap", "round");
- path.style.filter = "drop-shadow(0 2px 8px rgba(251, 191, 36, 0.3))";
+ path.style.filter = "drop-shadow(0 2px 8px rgba(15,23,42,0.22))";
svgEl.appendChild(path);
}
}, [itemsRefs]);
@@ -193,31 +192,30 @@ function ProjectsTimeline({
}, [itemsRefs, drawCurvedLines, projects.length]);
const css = `
- :root{--bg-start:#0f172a;--bg-mid:#1e293b;--bg-end:#334155}
+ :root{--bg-start:#0b1220;--bg-mid:#102033;--bg-end:#2b3a4a;--accent:#f97316;--muted:#9ca3af}
.projects-timeline-root { direction: rtl; min-height: 100%; }
- .timeline-scroll { overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.2) transparent; }
- .timeline-scroll::-webkit-scrollbar{ height:10px;}
- .timeline-scroll::-webkit-scrollbar-track{ background: transparent; border-radius:10px; margin:0 8px;}
- .timeline-scroll::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.12); border-radius:10px; border:2px solid transparent; background-clip:padding-box;}
+ .timeline-scroll { overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
+ .timeline-scroll::-webkit-scrollbar{ display:none; height:0; }
.timeline-wrapper { display:flex; align-items:center; position:relative; padding:clamp(48px,6vw,120px) clamp(12px,4vw,120px); min-width:max-content; }
.svg-container { position:absolute; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:0; }
.timeline-item { position:relative; display:flex; flex-direction:column; align-items:center; margin:0 clamp(20px,4vw,60px); transition:all .6s cubic-bezier(.34,1.56,.64,1); z-index:1; }
- .year-circle { width:clamp(72px,9vw,150px); height:clamp(72px,9vw,150px); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:clamp(14px,1.6vw,24px); font-weight:700; background:linear-gradient(135deg,#dc2626 0%,#b91c1c 50%,#991b1b 100%); color:white; box-shadow:0 8px 25px rgba(220,38,38,.4); transition:all .6s cubic-bezier(.34,1.56,.64,1); cursor:pointer; border:5px solid rgba(255,255,255,.25); position:relative; z-index:2; backdrop-filter: blur(10px); }
- .year-circle::after { content: ''; position:absolute; inset:-8px; border-radius:50%; border:2px solid rgba(220,38,38,.3); opacity:0; transition:all .6s ease; }
- .timeline-item.active .year-circle { width:clamp(110px,14vw,200px); height:clamp(110px,14vw,200px); font-size:clamp(18px,2.2vw,28px); box-shadow:0 15px 50px rgba(220,38,38,.5); border-color: rgba(255,255,255,.5); transform: translateY(-15px) scale(1.05); animation: glow 2s ease-in-out infinite; }
+ .year-circle { width:clamp(72px,9vw,150px); height:clamp(72px,9vw,150px); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:clamp(14px,1.6vw,24px); font-weight:700; background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); color:var(--bg-start); box-shadow: 0 6px 30px rgba(2,6,23,0.6), inset 0 1px 0 rgba(255,255,255,0.04); transition:all .6s cubic-bezier(.34,1.56,.64,1); cursor:pointer; border:1px solid rgba(255,255,255,0.08); position:relative; z-index:2; backdrop-filter: blur(8px) saturate(120%);
+ background-clip: padding-box;
+ }
+ .year-circle::after { content: ''; position:absolute; inset:-8px; border-radius:50%; border:2px solid rgba(249,115,22,0.08); opacity:0; transition:all .6s ease; }
+ .timeline-item.active .year-circle { width:clamp(110px,14vw,200px); height:clamp(110px,14vw,200px); font-size:clamp(18px,2.2vw,28px); box-shadow:0 18px 60px rgba(15,23,42,.5), inset 0 2px 6px rgba(255,255,255,0.04); border-color: rgba(249,115,22,0.18); transform: translateY(-15px) scale(1.03); }
.timeline-item.active .year-circle::after { opacity:1; inset:-12px; animation: ripple 2s ease-out infinite; }
- @keyframes glow { 0%,100%{ filter: brightness(1);} 50%{ filter: brightness(1.15);} }
- @keyframes ripple { 0%{ transform: scale(1); opacity:.6;} 100%{ transform: scale(1.3); opacity:0;} }
- .project-card { margin-top:40px; background: #ffffff; border-radius:20px; padding:28px; min-width:320px; max-width:380px; box-shadow:0 8px 30px rgba(0,0,0,.08),0 2px 8px rgba(0,0,0,.04); opacity:.6; transform: scale(.92) translateY(10px); transition:all .6s cubic-bezier(.34,1.56,.64,1); border:1px solid rgba(251,191,36,.1); position:relative; overflow:hidden;}
- .project-card::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background: linear-gradient(to left,#dc2626,#b91c1c,#991b1b); opacity:0; transition:opacity .6s ease;}
- .timeline-item.active .project-card { opacity:1; transform: scale(1) translateY(0); box-shadow:0 20px 60px rgba(0,0,0,.12),0 5px 15px rgba(0,0,0,.06),0 0 0 1px rgba(220,38,38,.15); border-color: rgba(220,38,38,.25); }
+ @keyframes ripple { 0%{ transform: scale(1); opacity:.6;} 100%{ transform: scale(1.25); opacity:0;} }
+ .project-card { margin-top:40px; background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)); border-radius:18px; padding:26px; min-width:320px; max-width:420px; box-shadow:0 12px 40px rgba(2,6,23,.45); opacity:.9; transform: scale(.98) translateY(8px); transition:all .6s cubic-bezier(.34,1.56,.64,1); border:1px solid rgba(255,255,255,.06); position:relative; overflow:hidden; backdrop-filter: blur(8px) saturate(120%); }
+ .project-card::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background: linear-gradient(to left, var(--accent), #b91c1c, var(--muted)); opacity:0; transition:opacity .6s ease; }
+ .timeline-item.active .project-card { opacity:1; transform: scale(1) translateY(0); box-shadow:0 28px 80px rgba(2,6,23,.5),0 6px 18px rgba(0,0,0,.08); border-color: rgba(249,115,22,.14); }
.timeline-item.active .project-card::before { opacity:1; }
- .project-text { font-size:15px; line-height:2; color:#1f2937; font-weight:500; }
+ .project-text { font-size:15px; line-height:2; color:#0b1220; font-weight:600; }
.project-text li { margin-bottom:12px; padding-right:12px; transition:all .3s ease; border-radius:8px; padding:8px 12px; }
- .timeline-item.active .project-text li:hover { background: rgba(220,38,38,.08); transform: translateX(-4px); }
+ .timeline-item.active .project-text li:hover { background: rgba(249,115,22,.06); transform: translateX(-4px); }
.scroll-indicator { position:absolute; bottom:30px; left:50%; transform: translateX(-50%); display:flex; gap:20px; z-index:10; }
- .scroll-btn { background: linear-gradient(135deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.85) 100%); border:none; border-radius:50%; width:56px; height:56px; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:22px; color:#dc2626; box-shadow:0 6px 20px rgba(0,0,0,.15); transition:all .4s cubic-bezier(.34,1.56,.64,1); backdrop-filter: blur(10px); }
- .scroll-btn:hover:not(:disabled){ background: linear-gradient(135deg,#fff 0%,#fee2e2 100%); transform: scale(1.15); box-shadow:0 10px 35px rgba(220,38,38,.25); }
+ .scroll-btn { background: linear-gradient(135deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.82) 100%); border:none; border-radius:50%; width:56px; height:56px; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:22px; color:var(--accent); box-shadow:0 6px 20px rgba(2,6,23,.35); transition:all .4s cubic-bezier(.34,1.56,.64,1); backdrop-filter: blur(6px); }
+ .scroll-btn:hover:not(:disabled){ background: linear-gradient(135deg,#fff 0%,#fff8f2 100%); transform: scale(1.12); box-shadow:0 10px 35px rgba(15,23,42,.22); }
.scroll-btn:active:not(:disabled){ transform: scale(1.05); }
.scroll-btn:disabled { opacity:.4; cursor:not-allowed; }
@media (max-width:768px){
@@ -234,7 +232,7 @@ function ProjectsTimeline({
.projects-timeline-root.plain-bleed .project-card { max-width:420px; }
`;
- const mainStyle = plain ? { background: "#ffffff", paddingBottom: 0 } : { background: "linear-gradient(135deg, var(--bg-start) 0%, var(--bg-mid) 30%, var(--bg-end) 60%, #475569 100%)" };
+ const mainStyle = plain ? { background: "#ffffff", paddingBottom: 0 } : { background: "linear-gradient(135deg, var(--bg-start) 0%, var(--bg-mid) 30%, var(--bg-end) 60%)" };
return (
@@ -638,4 +636,4 @@ export default function DepartmentDetail() {
);
-}
+}
\ No newline at end of file
diff --git a/src/Components/Sections/DepartmentDetail2/DepartmentDetail2.jsx b/src/Components/Sections/DepartmentDetail2/DepartmentDetail2.jsx
new file mode 100644
index 0000000..7cdef6e
--- /dev/null
+++ b/src/Components/Sections/DepartmentDetail2/DepartmentDetail2.jsx
@@ -0,0 +1,542 @@
+import React, { useState, useEffect, useRef, useCallback } from "react";
+import { motion, AnimatePresence } from "framer-motion";
+import d1 from "../../../../src/assets/Images/d1.jpeg";
+import d12 from "../../../../src/assets/Images/d12.jpeg";
+import d13 from "../../../../src/assets/Images/d13.jpeg";
+import d7 from "../../../../src/assets/Images/d7.jpeg";
+
+function ProjectsTimeline({
+ projects,
+ mainTitle = "المشاريع المنفذة",
+ subtitle = "خط زمني شامل للأعمال والإنجازات",
+ plain = false,
+}) {
+ const wrapperRef = useRef(null);
+ const scrollRef = useRef(null);
+ const svgRef = useRef(null);
+ const [itemsRefs, setItemsRefs] = useState([]);
+ const [currentIndex, setCurrentIndex] = useState(0);
+
+ useEffect(() => {
+ setItemsRefs((r) => {
+ const arr = Array(projects.length)
+ .fill()
+ .map((_, i) => r[i] || React.createRef());
+ return arr;
+ });
+ }, [projects.length]);
+
+ const drawCurvedLines = useCallback(() => {
+ const svgEl = svgRef.current;
+ const wrapper = wrapperRef.current;
+ if (!svgEl || !wrapper) return;
+
+ while (svgEl.firstChild) svgEl.removeChild(svgEl.firstChild);
+ svgEl.setAttribute("width", wrapper.scrollWidth);
+ svgEl.setAttribute("height", wrapper.offsetHeight);
+
+ if (!itemsRefs || itemsRefs.length < 2) return;
+
+ const svgNS = "http://www.w3.org/2000/svg";
+ const defs = document.createElementNS(svgNS, "defs");
+ const gradient = document.createElementNS(svgNS, "linearGradient");
+ gradient.setAttribute("id", "timeline-gradient");
+ gradient.setAttribute("x1", "0%");
+ gradient.setAttribute("y1", "0%");
+ gradient.setAttribute("x2", "100%");
+ gradient.setAttribute("y2", "0%");
+
+ const stop1 = document.createElementNS(svgNS, "stop");
+ stop1.setAttribute("offset", "0%");
+ stop1.setAttribute("style", "stop-color:#0f172a;stop-opacity:1");
+
+ const stop2 = document.createElementNS(svgNS, "stop");
+ stop2.setAttribute("offset", "50%");
+ stop2.setAttribute("style", "stop-color:#f97316;stop-opacity:1");
+
+ const stop3 = document.createElementNS(svgNS, "stop");
+ stop3.setAttribute("offset", "100%");
+ stop3.setAttribute("style", "stop-color:#9ca3af;stop-opacity:1");
+
+ gradient.appendChild(stop1);
+ gradient.appendChild(stop2);
+ gradient.appendChild(stop3);
+ defs.appendChild(gradient);
+ svgEl.appendChild(defs);
+
+ for (let i = 0; i < itemsRefs.length - 1; i++) {
+ const item1 = itemsRefs[i].current;
+ const item2 = itemsRefs[i + 1].current;
+ if (!item1 || !item2) continue;
+
+ const circle1 = item1.querySelector(".year-circle");
+ const circle2 = item2.querySelector(".year-circle");
+ if (!circle1 || !circle2) continue;
+
+ const rect1 = circle1.getBoundingClientRect();
+ const rect2 = circle2.getBoundingClientRect();
+ const wrapperRect = wrapper.getBoundingClientRect();
+
+ const x1 = rect1.left - wrapperRect.left + rect1.width / 2;
+ const y1 = rect1.top - wrapperRect.top + rect1.height / 2;
+ const x2 = rect2.left - wrapperRect.left + rect2.width / 2;
+ const y2 = rect2.top - wrapperRect.top + rect2.height / 2;
+
+ const controlPointOffset = Math.abs(x2 - x1) * 0.4;
+ const cx1 = x1 - controlPointOffset;
+ const cy1 = y1 - 40;
+ const cx2 = x2 + controlPointOffset;
+ const cy2 = y2 - 40;
+
+ const path = document.createElementNS(svgNS, "path");
+ const d = `M ${x1} ${y1} C ${cx1} ${cy1}, ${cx2} ${cy2}, ${x2} ${y2}`;
+ path.setAttribute("d", d);
+ path.setAttribute("stroke", "url(#timeline-gradient)");
+ path.setAttribute("stroke-width", "4");
+ path.setAttribute("fill", "none");
+ path.setAttribute("stroke-linecap", "round");
+ path.style.filter = "drop-shadow(0 2px 8px rgba(15,23,42,0.22))";
+ svgEl.appendChild(path);
+ }
+ }, [itemsRefs]);
+
+ const setActiveItem = useCallback(
+ (index) => {
+ setCurrentIndex(index);
+ itemsRefs.forEach((ref, i) => {
+ const el = ref.current;
+ if (!el) return;
+ if (i === index) el.classList.add("active");
+ else el.classList.remove("active");
+ });
+ },
+ [itemsRefs]
+ );
+
+ const scrollToItem = useCallback(
+ (index) => {
+ if (index < 0 || index >= itemsRefs.length) return;
+ const scrollContainer = scrollRef.current;
+ const item = itemsRefs[index].current;
+ if (!scrollContainer || !item) return;
+
+ const itemRect = item.getBoundingClientRect();
+ const containerRect = scrollContainer.getBoundingClientRect();
+ const scrollLeft = scrollContainer.scrollLeft;
+
+ const targetScroll =
+ scrollLeft + itemRect.left - containerRect.left - containerRect.width / 2 + itemRect.width / 2;
+
+ scrollContainer.scrollTo({ left: targetScroll, behavior: "smooth" });
+ setActiveItem(index);
+ },
+ [itemsRefs, setActiveItem]
+ );
+
+ const onPrev = () => {
+ if (currentIndex > 0) scrollToItem(currentIndex - 1);
+ };
+ const onNext = () => {
+ if (currentIndex < itemsRefs.length - 1) scrollToItem(currentIndex + 1);
+ };
+
+ useEffect(() => {
+ const t = setTimeout(() => {
+ drawCurvedLines();
+ setActiveItem(0);
+ }, 100);
+
+ const scrollContainer = scrollRef.current;
+ let scrollTimeout = null;
+
+ const onScroll = () => {
+ clearTimeout(scrollTimeout);
+ scrollTimeout = setTimeout(() => {
+ const containerRect = scrollContainer.getBoundingClientRect();
+ const containerCenter = containerRect.left + containerRect.width / 2;
+
+ let closestIndex = 0;
+ let closestDistance = Infinity;
+
+ itemsRefs.forEach((ref, index) => {
+ const el = ref.current;
+ if (!el) return;
+ const itemRect = el.getBoundingClientRect();
+ const itemCenter = itemRect.left + itemRect.width / 2;
+ const distance = Math.abs(containerCenter - itemCenter);
+ if (distance < closestDistance) {
+ closestDistance = distance;
+ closestIndex = index;
+ }
+ });
+
+ if (closestIndex !== currentIndex) {
+ setActiveItem(closestIndex);
+ }
+ }, 150);
+ };
+
+ if (scrollContainer) scrollContainer.addEventListener("scroll", onScroll);
+ const onResize = () => setTimeout(drawCurvedLines, 120);
+ window.addEventListener("resize", onResize);
+
+ return () => {
+ clearTimeout(t);
+ if (scrollContainer) scrollContainer.removeEventListener("scroll", onScroll);
+ window.removeEventListener("resize", onResize);
+ };
+ }, [itemsRefs, drawCurvedLines, setActiveItem]);
+
+ useEffect(() => {
+ setTimeout(() => drawCurvedLines(), 120);
+ }, [itemsRefs, drawCurvedLines, projects.length]);
+
+ const css = `
+ :root{--bg-start:#0b1220;--bg-mid:#102033;--bg-end:#2b3a4a;--accent:#f97316;--muted:#9ca3af}
+ .projects-timeline-root { direction: rtl; min-height: 100%; }
+ .timeline-scroll { overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
+ .timeline-scroll::-webkit-scrollbar{ display:none; height:0; }
+ .timeline-wrapper { display:flex; align-items:center; position:relative; padding:clamp(48px,6vw,120px) clamp(12px,4vw,120px); min-width:max-content; }
+ .svg-container { position:absolute; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:0; }
+ .timeline-item { position:relative; display:flex; flex-direction:column; align-items:center; margin:0 clamp(20px,4vw,60px); transition:all .6s cubic-bezier(.34,1.56,.64,1); z-index:1; }
+ .year-circle { width:clamp(72px,9vw,150px); height:clamp(72px,9vw,150px); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:clamp(14px,1.6vw,24px); font-weight:700; background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); color:var(--bg-start); box-shadow: 0 6px 30px rgba(2,6,23,0.6), inset 0 1px 0 rgba(255,255,255,0.04); transition:all .6s cubic-bezier(.34,1.56,.64,1); cursor:pointer; border:1px solid rgba(255,255,255,0.08); position:relative; z-index:2; backdrop-filter: blur(8px) saturate(120%);
+ background-clip: padding-box;
+ }
+ .year-circle::after { content: ''; position:absolute; inset:-8px; border-radius:50%; border:2px solid rgba(249,115,22,0.08); opacity:0; transition:all .6s ease; }
+ .timeline-item.active .year-circle { width:clamp(110px,14vw,200px); height:clamp(110px,14vw,200px); font-size:clamp(18px,2.2vw,28px); box-shadow:0 18px 60px rgba(15,23,42,.5), inset 0 2px 6px rgba(255,255,255,0.04); border-color: rgba(249,115,22,0.18); transform: translateY(-15px) scale(1.03); }
+ .timeline-item.active .year-circle::after { opacity:1; inset:-12px; animation: ripple 2s ease-out infinite; }
+ @keyframes ripple { 0%{ transform: scale(1); opacity:.6;} 100%{ transform: scale(1.25); opacity:0;} }
+ .project-card { margin-top:40px; background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)); border-radius:18px; padding:26px; min-width:320px; max-width:420px; box-shadow:0 12px 40px rgba(2,6,23,.45); opacity:.9; transform: scale(.98) translateY(8px); transition:all .6s cubic-bezier(.34,1.56,.64,1); border:1px solid rgba(255,255,255,.06); position:relative; overflow:hidden; backdrop-filter: blur(8px) saturate(120%); }
+ .project-card::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background: linear-gradient(to left, var(--accent), #b91c1c, var(--muted)); opacity:0; transition:opacity .6s ease; }
+ .timeline-item.active .project-card { opacity:1; transform: scale(1) translateY(0); box-shadow:0 28px 80px rgba(2,6,23,.5),0 6px 18px rgba(0,0,0,.08); border-color: rgba(249,115,22,.14); }
+ .timeline-item.active .project-card::before { opacity:1; }
+ .project-text { font-size:15px; line-height:2; color:#0b1220; font-weight:600; }
+ .project-text li { margin-bottom:12px; padding-right:12px; transition:all .3s ease; border-radius:8px; padding:8px 12px; }
+ .timeline-item.active .project-text li:hover { background: rgba(249,115,22,.06); transform: translateX(-4px); }
+ .scroll-indicator { position:absolute; bottom:30px; left:50%; transform: translateX(-50%); display:flex; gap:20px; z-index:10; }
+ .scroll-btn { background: linear-gradient(135deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.82) 100%); border:none; border-radius:50%; width:56px; height:56px; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:22px; color:var(--accent); box-shadow:0 6px 20px rgba(2,6,23,.35); transition:all .4s cubic-bezier(.34,1.56,.64,1); backdrop-filter: blur(6px); }
+ .scroll-btn:hover:not(:disabled){ background: linear-gradient(135deg,#fff 0%,#fff8f2 100%); transform: scale(1.12); box-shadow:0 10px 35px rgba(15,23,42,.22); }
+ .scroll-btn:active:not(:disabled){ transform: scale(1.05); }
+ .scroll-btn:disabled { opacity:.4; cursor:not-allowed; }
+ @media (max-width:768px){
+ .timeline-wrapper { padding:clamp(36px,6vw,80px) 24px; }
+ .timeline-item { margin:0 18px; }
+ .year-circle { width:90px; height:90px; font-size:15px; }
+ .timeline-item.active .year-circle { width:120px; height:120px; font-size:19px; }
+ .project-card { min-width:260px; max-width:300px; padding:20px; }
+ .project-text { font-size:13px; }
+ .scroll-btn { width:48px; height:48px; font-size:20px; }
+ }
+
+ .projects-timeline-root.plain-bleed .timeline-wrapper { padding:clamp(48px,6vw,120px) 24px; }
+ .projects-timeline-root.plain-bleed .project-card { max-width:420px; }
+ `;
+
+ const mainStyle = plain ? { background: "#ffffff", paddingBottom: 0 } : { background: "linear-gradient(135deg, var(--bg-start) 0%, var(--bg-mid) 30%, var(--bg-end) 60%)" };
+
+ return (
+
+
+
+
+ {!plain && (
+
+
+ {mainTitle}
+
+ {subtitle}
+
+ )}
+
+
+
+
+
+ );
+}
+
+const defaultProjects = [
+ { year: "2016", items: ["تنفيذ أبنية خدمية وإدارية ومشاريع إعادة تأهيل."] },
+ { year: "2017", items: ["إنشاء مدينة معارض ومكاتب سيارات (200) مكتب - المدينة الصناعية اللاذقية"] },
+ { year: "2023", items: ["تصميم وتنفيذ مشروع 1000 شقة سكنية (مساكن الإيواء) بإشراف الهلال الأحمر الإماراتي"] },
+];
+
+export default function DepartmentDetail2() {
+ const [active, setActive] = useState(null);
+
+ const buttons = [
+ { id: 1, title: "اختصاص القسم", key: "expertise" },
+ { id: 3, title: "الاعمال المنفذة", key: "works" },
+ ];
+
+ const expertiseItems = [
+ {
+ icon: (
+
+ ),
+ text: "تنفيذ المجمعات السكنية والمناطق الخدمية."
+ },
+ {
+ icon: (
+
+ ),
+ text: ". الأبنية الإدارية والتجارية."
+ },
+ {
+ icon: (
+
+ ),
+ text: ". الأبنية مسبقة الصنع والساندويش بانل والهنغارات والكرفانات المتنقلة وغرف التبريد"
+ },
+ {
+ icon: (
+
+ ),
+ text: "الأعمال المدنية والمعمارية المتكاملة."
+ },
+ {
+ icon: (
+
+ ),
+ text: ". الإكساء الداخلي والخارجي."
+ },
+ {
+ icon: (
+
+ ),
+ text: ". الالتزام بمعايير الجودة والسلامة المهنية في التنفيذ."
+ }
+ ];
+
+ const displayItems = expertiseItems;
+ const heroImage = active === "expertise" ? d12 : active === "works" ? d13 : d7;
+
+ const handleButtonClick = (key) => {
+ setActive((prev) => (prev === key ? null : key));
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+ {active === "expertise" ? (
+
+ اختصاص القسم
+ حلول متكاملة للمشاريع السكنية والخدمية
+ يتضمن هذا القسم تنفيذ المشاريع السكنية والخدمية بمختلف أنواعها، ويشمل:
+
+ ) : active === "works" ? (
+
+ الاعمال المنفذة
+ الاعمال المنفذة
+ عرض مشروعاتنا وخط الزمن الخاص بالأعمال المنفذة.
+
+ ) : (
+
+ قسم تنفيذ المرافق السكنيه والخدمية
+
+ )}
+
+
+
+
+
+
+ {!active && (
+
+
+ {buttons.map((b, index) => (
+
handleButtonClick(b.key)}
+ className="group relative rounded-2xl p-4 sm:p-6 shadow-2xl border border-transparent flex flex-col h-full text-right focus:outline-none focus:ring-4 focus:ring-amber-200 transition-all duration-300 overflow-hidden bg-white/80 backdrop-blur-sm"
+ >
+
+
+
+
+
+ {b.id}
+
+
{b.title}
+
+
+ انقر للاطّلاع على التفاصيل
+
+
+
+
+ ))}
+
+
+ )}
+
+
+
+
+
+
+
+
+
+
+
+ {!active ? (
+
+ ) : active === "works" ? (
+
+ setActive(null)} whileHover={{ x: 8 }} className="inline-flex items-center gap-3 text-amber-600 hover:text-amber-700 font-bold mb-6 sm:mb-8 group text-sm sm:text-base focus:outline-none focus:ring-2 focus:ring-amber-200 rounded-lg px-3 py-2 mr-0 md:-mr-4">
+
+ العودة للقائمة الرئيسية
+
+
+
+
+ ) : (
+
+ setActive(null)} whileHover={{ x: 8 }} className="inline-flex items-center gap-3 text-amber-600 hover:text-amber-700 font-bold mb-6 sm:mb-8 group text-sm sm:text-base focus:outline-none focus:ring-2 focus:ring-amber-200 rounded-lg px-3 py-2 mr-0 md:-mr-4">
+
+ العودة للقائمة الرئيسية
+
+
+
+ {displayItems.map((item, index) => (
+
+
+
+ ))}
+
+
+
+
+
+
خدمات احترافية متكاملة
+
+
+
+
+ )}
+
+
+
+ );
+}
diff --git a/src/Components/Sections/Departments/Departments.jsx b/src/Components/Sections/Departments/Departments.jsx
index c9767d7..e9a137f 100644
--- a/src/Components/Sections/Departments/Departments.jsx
+++ b/src/Components/Sections/Departments/Departments.jsx
@@ -11,34 +11,35 @@ import { useNavigate } from "react-router-dom";
// images
import d1 from "../../../../src/assets/Images/d1.jpeg";
-import d2 from "../../../../src/assets/Images/d2.jpeg";
-import d3 from "../../../../src/assets/Images/d3.jpeg";
-import d4 from "../../../../src/assets/Images/d4.jpeg";
-import d5 from "../../../../src/assets/Images/d5.jpeg";
-import d6 from "../../../../src/assets/Images/d6.jpeg";
-import d7 from "../../../../src/assets/Images/d7.png";
-import d8 from "../../../../src/assets/Images/d8.png";
-import d9 from "../../../../src/assets/Images/d9.png";
+import d7 from "../../../../src/assets/Images/d7.jpeg";
+import d14 from "../../../../src/assets/Images/d14.jpg";
+import d17 from "../../../../src/assets/Images/d17.png";
+import d18 from "../../../../src/assets/Images/d18.jpg";
+import d19 from "../../../../src/assets/Images/d19.jpeg";
+import d20 from "../../../../src/assets/Images/d20.jpeg";
+import d21 from "../../../../src/assets/Images/d21.jpeg";
+import d22 from "../../../../src/assets/Images/d22.jpg";
+
+
+
-// بيانات الأقسام
const departments = [
{ id: 1, title: "قسم إنشاء وصيانة المنشآت الصناعية وخطوط الإنتاج", image: d1 },
- { id: 2, title: "قسم تنفيذ المرافق السكنية والخدمية", image: d2 },
- { id: 3, title: "قسم اعادة تأهيل وصيانة المباني", image: d3 },
- { id: 4, title: "قسم محطات الوقود وصيانة المنشآت النفطية", image: d4 },
- { id: 5, title: "قسم التفتيش والفحص الفني والهندسي", image: d5 },
- { id: 6, title: "قسم المشاريع الاستراتيجية", image: d6 },
- { id: 7, title: "قسم الاعمال المعدنية والدعم الصناعي", image: d7 },
- { id: 8, title: "قسم الخدمات والدعم اللوجستي", image: d8 },
- { id: 9, title: "قسم الاتمتة والتحكم", image: d9 },
+ { id: 2, title: "قسم تنفيذ المرافق السكنية والخدمية", image: d7 },
+ { id: 3, title: "قسم اعادة تأهيل وصيانة المباني", image: d14 },
+ { id: 4, title: "قسم محطات الوقود وصيانة المنشآت النفطية", image: d17 },
+ { id: 5, title: "قسم التفتيش والفحص الفني والهندسي", image: d18 },
+ { id: 6, title: "قسم المشاريع الاستراتيجية", image: d19 },
+ { id: 7, title: "قسم الاعمال المعدنية والدعم الصناعي", image: d20 },
+ { id: 8, title: "قسم الخدمات والدعم اللوجستي", image: d21 },
+ { id: 9, title: "قسم الاتمتة والتحكم", image: d22 },
+
];
-// بطاقة القسم
function DepartmentCard({ dept, offset }) {
const navigate = useNavigate();
const wrapperRef = useRef(null);
- // mouse tilt
const rotateX = useMotionValue(0);
const rotateY = useMotionValue(0);
const scale = useMotionValue(1);
@@ -66,7 +67,6 @@ function DepartmentCard({ dept, offset }) {
scale.set(1);
};
- // scroll parallax
const { scrollY, scrollYProgress } = useScroll({ target: wrapperRef });
const velocity = useVelocity(scrollY);
const smoothVelocity = useSpring(velocity, {
@@ -91,6 +91,14 @@ function DepartmentCard({ dept, offset }) {
([v, p]) => v + p
);
+ const handleClick = () => {
+ if (dept.id === 2) {
+ navigate("/department-detail2");
+ } else {
+ navigate(`/departments/${dept.id}`);
+ }
+ };
+
return (
- {/* العنوان */}
- {/* الصورة */}
navigate(`/departments/${dept.id}`)}
+ onClick={handleClick}
style={{
rotateX: rx,
rotateY: ry,
diff --git a/src/Components/Sections/Home/Home.jsx b/src/Components/Sections/Home/Home.jsx
index 09cd481..c0b9863 100644
--- a/src/Components/Sections/Home/Home.jsx
+++ b/src/Components/Sections/Home/Home.jsx
@@ -1,10 +1,13 @@
import React, { useEffect, useState, useRef } from "react";
-import { Button, Dropdown } from "flowbite-react";
+import styled from 'styled-components';
+import { Element } from "react-scroll";
+import Departments from "../Departments/Departments";
export default function EngineeringHeroFlowbite() {
const defaultConfig = {
- main_title: "حلول هندسية متكاملة",
- subtitle: "نصمم ونبني المستقبل بخبرة ودقة واحترافية",
+ main_title: "شريكك الهندسي لتنفيذ وإدارة المشاريع باحتراف",
+ subtitle:
+ "حلول متكاملة تشمل التصميم، التنفيذ، التشغيل، والصيانة\nللمشاريع الصناعية والمدنية، وفق أحدث المعايير والتقنيات",
primary_color: "#e67e22",
background_color: "#000000",
text_color: "#ffffff",
@@ -15,9 +18,11 @@ export default function EngineeringHeroFlowbite() {
};
const [config, setConfig] = useState(defaultConfig);
- const [dropdownOpen, setDropdownOpen] = useState(false);
+ const [isMounted, setIsMounted] = useState(false);
+
const mainTitleRef = useRef(null);
const subtitleRef = useRef(null);
+ const departmentsRef = useRef(null);
useEffect(() => {
const id = "cairo-font-link";
@@ -30,6 +35,12 @@ export default function EngineeringHeroFlowbite() {
}
}, []);
+ useEffect(() => {
+ // slight delay to ensure mount then trigger animations
+ const t = setTimeout(() => setIsMounted(true), 60);
+ return () => clearTimeout(t);
+ }, []);
+
useEffect(() => {
const main = mainTitleRef.current;
const sub = subtitleRef.current;
@@ -38,17 +49,35 @@ export default function EngineeringHeroFlowbite() {
const baseSize = config.font_size || defaultConfig.font_size;
if (main) {
- main.textContent = config.main_title || defaultConfig.main_title;
+ const headingText = (config.main_title || defaultConfig.main_title)
+ .split("\n")
+ .map((s) => s.trim())
+ .filter(Boolean);
+ if (headingText.length === 1) {
+ main.textContent = headingText[0];
+ } else {
+ main.innerHTML = `${headingText[0]}${headingText
+ .slice(1)
+ .join("
")}`;
+ }
+
main.style.fontFamily = font;
- main.style.fontSize = `${baseSize * 4}px`;
+ main.style.fontSize = `${baseSize * 3.8}px`;
main.style.color = config.text_color || defaultConfig.text_color;
+ main.style.fontWeight = 800;
+ main.style.textAlign = "right";
}
if (sub) {
- sub.textContent = config.subtitle || defaultConfig.subtitle;
+ sub.innerHTML = (config.subtitle || defaultConfig.subtitle)
+ .split("\n")
+ .map((s) => `${s.trim()}
`)
+ .join("");
sub.style.fontFamily = font;
- sub.style.fontSize = `${baseSize * 1.75}px`;
+ sub.style.fontSize = `${baseSize * 1.1}px`;
sub.style.color = config.text_color || defaultConfig.text_color;
+ sub.style.textAlign = "right";
+ sub.style.maxWidth = "800px";
}
const root = document.documentElement;
@@ -139,127 +168,302 @@ export default function EngineeringHeroFlowbite() {
}
}, []);
+ const goToDepartments = (e) => {
+ e && e.preventDefault && e.preventDefault();
+ const el = document.getElementById("departments");
+ if (el) {
+ el.scrollIntoView({ behavior: "smooth", block: "start" });
+ } else {
+ window.scrollTo({ top: 0, behavior: "smooth" });
+ }
+ };
+
+ const OrangeActionButton = ({ onClick, children }) => {
+ return (
+
+
+
+ );
+ };
+
return (
-
-
-
-
-

-
-
-

-
-
-

-
-
-

-
-
-
-
- {/* removed the previous hero-image background as requested */}
-
-
-
-
+
+
+
-

+
+
-
-
-
-
-
-
-
-
-
-
- {dropdownOpen && (
-
- )}
-
-
+
+
+
+ تعرف على أقسامنا
-
+
+
+
+
+
);
}
+
+const StyledWrapper = styled.div`
+ .button {
+ position: relative;
+ transition: all 0.3s ease-in-out;
+ box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
+ padding-block: 0.5rem;
+ padding-inline: 1.25rem;
+ background-color: var(--ehb-primary, #e67e22);
+ border-radius: 9999px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #ffff;
+ gap: 10px;
+ font-weight: bold;
+ border: 3px solid #ffffff4d;
+ outline: none;
+ overflow: hidden;
+ font-size: 15px;
+ cursor: pointer;
+ }
+
+ .icon { width: 24px; height: 24px; transition: all 0.3s ease-in-out; }
+
+ .button:hover { transform: scale(1.05); border-color: #fff9; }
+ .button:hover .icon { transform: translate(4px); }
+ .button:hover::before { animation: shine 1.5s ease-out infinite; }
+
+ .button::before {
+ content: "";
+ position: absolute;
+ width: 100px;
+ height: 100%;
+ background-image: linear-gradient(
+ 120deg,
+ rgba(255, 255, 255, 0) 30%,
+ rgba(255, 255, 255, 0.8),
+ rgba(255, 255, 255, 0) 70%
+ );
+ top: 0;
+ left: -100px;
+ opacity: 0.6;
+ }
+
+ @keyframes shine {
+ 0% { left: -100px; }
+ 60% { left: 100%; }
+ to { left: 100%; }
+ }
+`;
diff --git a/src/assets/Images/d12.jpeg b/src/assets/Images/d12.jpeg
new file mode 100644
index 0000000..7665b12
Binary files /dev/null and b/src/assets/Images/d12.jpeg differ
diff --git a/src/assets/Images/d13.jpeg b/src/assets/Images/d13.jpeg
new file mode 100644
index 0000000..02adc9c
Binary files /dev/null and b/src/assets/Images/d13.jpeg differ
diff --git a/src/assets/Images/d14.jpg b/src/assets/Images/d14.jpg
new file mode 100644
index 0000000..b0e58d9
Binary files /dev/null and b/src/assets/Images/d14.jpg differ
diff --git a/src/assets/Images/d15.jpg b/src/assets/Images/d15.jpg
new file mode 100644
index 0000000..6734ae6
Binary files /dev/null and b/src/assets/Images/d15.jpg differ
diff --git a/src/assets/Images/d16.jpg b/src/assets/Images/d16.jpg
new file mode 100644
index 0000000..849af36
Binary files /dev/null and b/src/assets/Images/d16.jpg differ
diff --git a/src/assets/Images/d17.png b/src/assets/Images/d17.png
new file mode 100644
index 0000000..bcbc289
Binary files /dev/null and b/src/assets/Images/d17.png differ
diff --git a/src/assets/Images/d18.jpg b/src/assets/Images/d18.jpg
new file mode 100644
index 0000000..118d749
Binary files /dev/null and b/src/assets/Images/d18.jpg differ
diff --git a/src/assets/Images/d19.jpeg b/src/assets/Images/d19.jpeg
new file mode 100644
index 0000000..734e887
Binary files /dev/null and b/src/assets/Images/d19.jpeg differ
diff --git a/src/assets/Images/d20.jpeg b/src/assets/Images/d20.jpeg
new file mode 100644
index 0000000..adb81fc
Binary files /dev/null and b/src/assets/Images/d20.jpeg differ
diff --git a/src/assets/Images/d21.jpeg b/src/assets/Images/d21.jpeg
new file mode 100644
index 0000000..81205b9
Binary files /dev/null and b/src/assets/Images/d21.jpeg differ
diff --git a/src/assets/Images/d22.jpg b/src/assets/Images/d22.jpg
new file mode 100644
index 0000000..274e75d
Binary files /dev/null and b/src/assets/Images/d22.jpg differ
diff --git a/src/assets/Images/d7.jpeg b/src/assets/Images/d7.jpeg
new file mode 100644
index 0000000..f11b08d
Binary files /dev/null and b/src/assets/Images/d7.jpeg differ
diff --git a/src/assets/Images/d7.png b/src/assets/Images/d7.png
deleted file mode 100644
index d1c8dad..0000000
Binary files a/src/assets/Images/d7.png and /dev/null differ
diff --git a/src/assets/LOGO.png b/src/assets/LOGO.png
index d6ad400..42ea728 100644
Binary files a/src/assets/LOGO.png and b/src/assets/LOGO.png differ
diff --git a/src/assets/TPS-logo.png b/src/assets/TPS-logo.png
index 27b03c1..cf7badf 100644
Binary files a/src/assets/TPS-logo.png and b/src/assets/TPS-logo.png differ
diff --git a/src/index.css b/src/index.css
index 21353ba..a042806 100644
--- a/src/index.css
+++ b/src/index.css
@@ -3,68 +3,33 @@
@tailwind utilities;
@layer base {
:root {
- --bg-color: #f8fafc;
- --surface-color: #ffffff;
- --text-color: #1e293b;
- --border-color: #e2e8f0;
- --primary-color: #275094;
- --secondary-color: #3c3c3c;
+ --primary: #041c40;
+ --secondary: #e06923;
+ --tertiary: #313131;
+ --bg-color: #F5EEE6;
+ --text-color: #313131;
+ --border-color: #d1c9be;
}
.dark {
- --bg-color: #0f172a;
- --surface-color: #1e293b;
- --text-color: #f1f5f9;
- --border-color: #334155;
- --primary-color: #1c3a6b;
- --secondary-color: #2a2a2a;
+ --primary: #041c40;
+ --secondary: #e06923;
+ --tertiary: #313131;
+ --bg-color: #313131;
+ --text-color: #F5EEE6;
+ --border-color: #4a4a4a;
}
body {
- @apply bg-theme text-theme transition-colors duration-300;
+ margin: 0;
+ padding: 0;
+ min-height: 100vh;
+ width: 100vw;
+ overflow-x: hidden;
font-family: system-ui, -apple-system, sans-serif;
+ color: var(--text-color);
+ transition: background-color 0.3s ease, color 0.3s ease;
}
-}
-
-@layer components {
- .theme-container {
- @apply bg-theme text-theme transition-colors duration-300;
- }
- .theme-surface {
- @apply bg-surface border border-theme rounded-lg p-4 transition-colors duration-300;
- }
- .theme-card {
- @apply bg-white dark: bg-gray-800 rounded-xl shadow-lg p-6 border border-gray-200 dark: border-gray-700 transition-all duration-300 hover: shadow-xl;
- }
- .theme-btn-primary {
- @apply bg-primary hover: bg-primary-light dark: bg-primary-dark dark: hover: bg-primary text-white font-medium py-3 px-6 rounded-lg transition-all duration-200 hover: scale-105 active: scale-95;
- }
- .theme-btn-secondary {
- @apply bg-secondary hover: bg-secondary-light dark: bg-secondary-dark dark: hover: bg-secondary text-white font-medium py-3 px-6 rounded-lg transition-all duration-200 hover: scale-105 active: scale-95;
- }
- .theme-input {
- @apply w-full px-4 py-3 bg-white dark: bg-gray-800 border border-gray-300 dark: border-gray-600 rounded-lg focus: ring-2 focus: ring-primary focus: border-transparent text-gray-900 dark: text-white placeholder-gray-500 dark: placeholder-gray-400 transition-colors duration-200;
- }
- .theme-nav {
- @apply bg-white dark: bg-gray-800 shadow-md border-b border-gray-200 dark: border-gray-700 transition-colors duration-300;
- }
- .theme-nav-link {
- @apply text-gray-700 dark: text-gray-300 hover: text-primary dark: hover: text-primary-light font-medium transition-colors duration-200 px-4 py-2;
- }
- .theme-section {
- @apply py-12 md: py-16 lg: py-20 px-4 md: px-8 bg-white dark: bg-gray-900 transition-colors duration-300;
- }
- .theme-section-alt {
- @apply py-12 md: py-16 lg: py-20 px-4 md: px-8 bg-gray-50 dark: bg-gray-800 transition-colors duration-300;
- }
- .theme-heading {
- @apply text-3xl md: text-4xl lg: text-5xl font-bold text-gray-900 dark: text-white mb-6;
- }
- .theme-subheading {
- @apply text-xl md: text-2xl text-gray-600 dark: text-gray-300 mb-8;
- }
- .theme-text {
- @apply text-gray-700 dark: text-gray-300 leading-relaxed;
- }
- .theme-footer {
- @apply bg-gray-800 dark: bg-gray-900 text-white py-8 border-t border-gray-700 dark: border-gray-800 transition-colors duration-300;
+ html {
+ scroll-behavior: smooth;
+ overflow-x: hidden;
}
}
\ No newline at end of file
diff --git a/src/main.jsx b/src/main.jsx
index b9a1a6d..90b57c3 100644
--- a/src/main.jsx
+++ b/src/main.jsx
@@ -1,10 +1,15 @@
-import { StrictMode } from 'react'
-import { createRoot } from 'react-dom/client'
-import './index.css'
-import App from './App.jsx'
+import React from 'react';
+import ReactDOM from 'react-dom/client';
+import App from './App';
+import './index.css';
+import './App.css';
-createRoot(document.getElementById('root')).render(
-
+document.documentElement.style.setProperty('--bg-color', '#F5EEE6');
+document.documentElement.style.setProperty('--text-color', '#131313');
+
+const root = ReactDOM.createRoot(document.getElementById('root'));
+root.render(
+
- ,
-)
+
+);
\ No newline at end of file
diff --git a/tailwind.config.js b/tailwind.config.js
index cbac0e8..ec3770f 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,45 +1,23 @@
-/** @type {import('tailwindcss').Config} */
-export default {
+module.exports = {
+ darkMode: 'class',
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
- darkMode: 'class',
theme: {
extend: {
colors: {
- primary: '#275094',
- 'primary-light': '#3c6bc9',
- 'primary-dark': '#1c3a6b',
-
- secondary: '#3c3c3c',
- 'secondary-light': '#5a5a5a',
- 'secondary-dark': '#2a2a2a',
-
- light: {
- bg: '#f8fafc',
- surface: '#ffffff',
- text: '#1e293b',
- border: '#e2e8f0',
- accent: '#3b82f6',
- },
- dark: {
- bg: '#0f172a',
- surface: '#1e293b',
- text: '#f1f5f9',
- border: '#334155',
- accent: '#60a5fa',
- },
+ primary: '#041c40',
+ secondary: '#e06923',
+ 'dark-bg': '#313131',
+ 'light-bg': '#F5EEE6',
},
- backgroundColor: {
- 'theme': 'var(--bg-color)',
- 'surface': 'var(--surface-color)',
- },
- textColor: {
- 'theme': 'var(--text-color)',
- },
- borderColor: {
- 'theme': 'var(--border-color)',
+ backdropBlur: {
+ 'xs': '2px',
+ 'sm': '4px',
+ 'md': '8px',
+ 'lg': '12px',
+ 'xl': '20px',
},
},
},
diff --git a/vite.config.js b/vite.config.js
index 8b0f57b..03972ff 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -1,7 +1,19 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
-// https://vite.dev/config/
export default defineConfig({
- plugins: [react()],
-})
+ plugins: [react()],
+ css: {
+ postcss: './postcss.config.js',
+ },
+ build: {
+ rollupOptions: {
+ output: {
+ manualChunks: {
+ 'react-vendor': ['react', 'react-dom'],
+ 'animation-vendor': ['three', 'styled-components', 'framer-motion'],
+ }
+ }
+ }
+ }
+})
\ No newline at end of file