/* الخط العام */
* { box-sizing: border-box; }
html,body { height:100%; margin:0; padding:0; }

body{
  font-family: 'Tajawal', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:#f6f7f9;
  color:#0f172a;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
}

:root{
  --brand: #d40000;
  --brand-dark: #a80000;
  --muted: #6b7280;
  --surface: #ffffff;
  --radius: 12px;
}

/* SPLASH */
.splash{
  position:fixed;
  inset:0;
  display:flex;
  z-index:9999;
  background: linear-gradient(180deg, rgba(212,0,0,0.95), rgba(168,0,0,0.95));
  color:#fff;
  overflow:hidden;
  opacity:1;
  transition: opacity .8s ease;
  will-change: opacity;
}

/* عند الإخفاء */
.splash.splash-hide{
  opacity:0;
  pointer-events:none;
}

.splash .splash-curtain{
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), transparent 40%);
  z-index:2;
  transition: transform .8s cubic-bezier(.2,.9,.2,1), opacity .8s ease;
}

.splash-inner{
  position:relative;
  z-index:3;
  text-align:center;
}

/* حركة الشعار */
.splash-logo{
  width:120px;
  height:auto;
  display:block;
  margin:0 auto 12px;
  animation: float 1.6s ease-in-out infinite;
  transform-origin:center;
}
@keyframes float{
  0%{ transform: translateY(0) rotate(-3deg); }
  50%{ transform: translateY(-8px) rotate(3deg); }
  100%{ transform: translateY(0) rotate(-3deg); }
}

.splash-company{
  font-weight:800;
  margin:6px 0 4px;
  letter-spacing:0.6px;
  font-size:20px;
}
.splash-sub{ opacity:0.95; }

.splash.splash-hide .splash-curtain{
  transform: translateY(-110%);
  opacity:0;
}
.splash.splash-hide .splash-inner{
  transform: translateY(-30px);
  opacity:0;
  transition: all .8s ease;
}

/* ظهور الصفحة بعد splash */
.page.fade-in{
  opacity:0;
  transform:translateY(6px);
  animation: pageIn .5s forwards .1s;
}
@keyframes pageIn{
  to{ opacity:1; transform:none; }
}

/* NAVBAR */
.navbar{
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  padding:0.6rem 1rem;
  position:fixed;
  top:0;
  right:0;
  left:0;
  z-index:1050;
}
.navbar .logo-sm{
  height:44px;
  width:auto;
}

/* MENU */
.main-menu .nav-link{
  font-weight:700;
  font-size:0.98rem;
  letter-spacing:0.02em;
  color:#f9fafb !important;
  padding-inline:0.9rem;
}
.main-menu .nav-link:hover,
.main-menu .nav-link:focus{
  color:#ffffff !important;
  text-decoration:underline;
  text-underline-offset:4px;
}

/* HERO */
.hero-section{
  padding:6rem 1rem 3rem;
}
.welcome-pill{
  display:inline-flex;
  gap:.6rem;
  align-items:center;
  background:rgba(255,255,255,0.95);
  color:var(--brand-dark);
  padding:.35rem .75rem;
  border-radius:999px;
  font-weight:600;
  box-shadow:0 6px 18px rgba(2,6,23,0.06);
}
.welcome-pill .dot{
  width:9px;
  height:9px;
  background:var(--brand);
  border-radius:50%;
  animation: pulse 1.6s infinite;
}
@keyframes pulse{
  0%{transform:scale(1);opacity:1}
  50%{transform:scale(1.4);opacity:.6}
  100%{transform:scale(1);opacity:1}
}

.hero-title{
  font-weight:800;
  font-size:1.6rem;
}
.hero-accent{
  color:var(--brand);
  font-weight:800;
  letter-spacing:.4px;
}
.hero-sub{ max-width:460px; }

/* HERO CARD + CAROUSEL */
.hero-card{
  background:var(--surface);
  border-radius:14px;
  box-shadow:0 18px 50px rgba(2,6,23,0.08);
  padding:1rem;
}
.hero-carousel{
  position:relative;
  height:260px;
  border-radius:10px;
  overflow:hidden;
}
.carousel-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  transform:scale(1.02);
  transition: all .6s ease;
}
.carousel-img.active{
  opacity:1;
  transform:scale(1);
}

.carousel-dots .dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:rgba(15,23,42,0.08);
  margin:0 6px;
  border:none;
  outline:none;
  cursor:pointer;
}
.carousel-dots .dot.active{
  background:var(--brand);
  transform:scale(1.2);
}

/* CARDS عامة */
.card{
  border:none;
  border-radius:12px;
  overflow:hidden;
}
.product-card .card-body{
  padding:14px;
}

/* توحيد حجم كل الصور */
.unified-img{
  width:100%;
  height:220px;
  object-fit:cover;
  display:block;
}

/* ABOUT */
.about-card{
  background:var(--surface);
  border-radius:14px;
  box-shadow:0 12px 36px rgba(2,6,23,0.06);
}
.about-logo{
  max-width:170px;
  height:auto;
}

/* PROJECTS */
.project-card img{
  width:100%;
  height:300px;
  object-fit:cover;
  border-radius:10px;
}

/* TITLES */
.section-title{
  font-weight:800;
  margin-bottom:1rem;
  position:relative;
  display:inline-block;
}
.section-title::after{
  content:"";
  position:absolute;
  right:0;
  bottom:-6px;
  width:36px;
  height:3px;
  border-radius:999px;
  background:var(--brand);
}

/* BUTTONS */
.btn-rounded{
  border-radius:999px;
  padding:0.6rem 1rem;
  font-weight:700;
}
.btn-primary{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
}
.btn-primary:hover{
  background:var(--brand-dark);
  border-color:var(--brand-dark);
}
.btn-main{
  background:var(--brand);
  color:#fff;
  border:none;
  border-radius:999px;
  padding:0.55rem 1.4rem;
  font-weight:700;
}
.btn-main:hover{
  background:var(--brand-dark);
}
.btn-outline-primary{
  border-color: rgba(212,0,0,0.2);
  color:var(--brand-dark);
}
.btn-outline-primary:hover{
  background:rgba(212,0,0,0.05);
}

/* STATS */
.stat-card{
  background:var(--surface);
  border-radius:10px;
  box-shadow:0 10px 30px rgba(2,6,23,0.06);
}

/* FORM */
.card form .form-control{
  border-radius:8px;
}

/* FOOTER */
.footer{
  background:#0f172a;
  color:#dbeafe;
  border-top:1px solid rgba(255,255,255,0.02);
}
.footer-inner{
  font-size:0.95rem;
  font-weight:600;
}

/* BACK TO TOP */
.to-top{
  position:fixed;
  left:18px;
  bottom:18px;
  z-index:999;
  width:44px;
  height:44px;
  border-radius:999px;
  border:none;
  background:var(--brand);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  box-shadow:0 12px 36px rgba(2,6,23,0.25);
  opacity:0;
  transform:translateY(8px);
  transition:.3s;
}
.to-top.visible{
  opacity:1;
  transform:none;
}

/* RESPONSIVE */
@media (max-width:991px){
  .hero-section{ padding-top:5.5rem; }
  .hero-carousel{ height:220px; }
  .unified-img{ height:190px; }
  .project-card img{ height:230px; }
}

@media (max-width:575px){
  .hero-title{ font-size:1.25rem; }
  .hero-carousel{ height:200px; }
  .unified-img{ height:160px; }
  .project-card img{ height:180px; }
}
