/* ==========================================================================
   Al-Bassiouni Technical Center — Industrial High-Conversion CSS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

/* ─── DESIGN TOKENS ───────────────────────────────────────────────────────── */
:root {
  --primary: #0f2027;
  --primary-mid: #203a43;
  --accent: #fca311;
  --accent-dark: #e08e0b;
  --green: #25d366;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .05);
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .12);
  --transition: all .4s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 65px;
  --header-compact: 55px;
}

/* ─── RESET ───────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg-light);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* ─── UTILITIES ───────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.pt-4 {
  padding-top: 2.5rem;
}

.pb-4 {
  padding-bottom: 2.5rem;
}

.pt-2 {
  padding-top: 1.5rem;
}

.bg-light {
  background: var(--bg-light);
}

.bg-dark {
  background: var(--primary);
}

.section {
  padding: 100px 0;
}

.section-header {
  margin-bottom: 50px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.section-sub {
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ─── LOADING SCREEN ──────────────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-white);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(15, 32, 39, 0.1);
  border-left-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-secondary {
  background: var(--primary);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--primary-mid);
}

.btn-whatsapp {
  background: var(--green);
  color: #fff;
}

.btn-whatsapp:hover {
  background: #1ebd57;
}

.btn-full {
  width: 100%;
}

.btn-large {
  padding: 18px 40px;
  font-size: 1.2rem;
}

/* Pulse animations */
@keyframes pulse-cta {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(252, 163, 17, 0.4);
  }

  70% {
    transform: scale(1.02);
    box-shadow: 0 0 0 15px rgba(252, 163, 17, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(252, 163, 17, 0);
  }
}

.cta-pulse {
  animation: pulse-cta 2s infinite;
}

/* ─── NAVBAR ──────────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  background: transparent;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  height: var(--header-compact);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  font-weight: 800;
  z-index: 1100;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo img {
  height: clamp(32px, 5vw, 42px);
  width: auto;
  max-width: 150px;
  object-fit: contain;
  transition: var(--transition);
}

.site-header.scrolled .logo {
  color: var(--primary);
}

.site-header.scrolled .logo img {
  height: clamp(28px, 4vw, 36px);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex: 1;
}

.main-nav a {
  padding: 8px 12px;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
  border-radius: 2px;
}

.site-header.scrolled .main-nav a {
  color: var(--text);
}

.site-header.scrolled .main-nav a:hover,
.site-header.scrolled .main-nav a.active {
  color: var(--primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 80%;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
  background: transparent;
}

/* Subpage Banners */
.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  padding: 160px 0 100px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
  opacity: 0.1;
  pointer-events: none;
}

.page-banner .section-title {
  color: #fff;
  margin-bottom: 20px;
  font-size: 2.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-banner .section-sub {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Header CTA */
.header-cta {
  flex-shrink: 0;
}

.header-cta .btn {
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  color: #000;

  background: linear-gradient(135deg, #fca311, #ffba3a);
  border: 1px solid rgba(255, 255, 255, 0.2);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  box-shadow: 0 4px 15px rgba(252, 163, 17, 0.25);

  transition: all 0.3s ease;
}

/* Hover Effect احترافي */
.header-cta .btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(252, 163, 17, 0.4);
}

/* Click Effect */
.header-cta .btn:active {
  transform: scale(0.96);
}

/* Burger button */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 30px;
  height: 3px;
  background: var(--text);
  border-radius: 5px;
  transition: .3s ease;
}

.site-header:not(.scrolled) .menu-toggle span {
  background: #fff;
}


.menu-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ─── HERO ────────────────────────────────────────────────────────────────── */
.hero-sales {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  /* Fallback */
  background-position: center;
  background-size: cover;
  overflow: hidden;
  text-align: center;
}

.hero-sales::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  background-position: center;
  background-size: cover;
  animation: bg-zoom 25s infinite alternate;
  z-index: 0;
}

@keyframes bg-zoom {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.1);
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 120%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(15, 32, 39, 0.45), rgba(15, 32, 39, 0.25));
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 900px;
  padding: 0 20px;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 25px;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFade 0.8s 0.2s forwards;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFade 0.8s 0.4s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFade 0.8s 0.6s forwards;
}

@media (max-width: 576px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@keyframes slideUpFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── BUTTON WRAPPING FIX ─── */
.btn {
  white-space: normal;
  text-align: center;
}

/* ─── HEADER OVERFLOW FIX (MOVED TO BODY) ─── */
body {
  overflow-x: hidden;
}

/* ─── TRUST ELEMENTS (ليه تختارنا) ────────────────────────────────────────── */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.trust-card {
  background: #fff;
  padding: 40px 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  text-align: center;
  transition: var(--transition);
}

.trust-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.trust-icon {
  font-size: 3.5rem;
  color: var(--accent);
  margin-bottom: 25px;
}

.trust-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.trust-card p {
  color: var(--text-muted);
}

/* ─── PRODUCTS SECTION ─────────────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.p-img {
  height: 260px;
  overflow: hidden;
  position: relative;
}

.p-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-card:hover .p-img img {
  transform: scale(1.1);
}

.product-link {
  display: block;
  border-bottom: none !important;
}

.p-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.p-content h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--primary);
  transition: var(--transition);
}

.p-content a {
  text-decoration: none;
  border: none !important;
}

.p-content a:hover h3 {
  color: var(--accent);
}

.p-content .benefit {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.p-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 25px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.spec-item {
  text-align: center;
}

.spec-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}

.spec-value {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
}

.price-box {
  background: #f1f5f9;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  margin-bottom: 20px;
  font-weight: 800;
  color: var(--primary-mid);
}

.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

@media (max-width: 480px) {
  .specs-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ─── PRODUCT DETAIL RESPONSIVE ─── */
.product-grid-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

@media (max-width: 991px) {
  .product-grid-detail {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* ─── SERVICES ────────────────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.service-item {
  background: #fff;
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
  text-align: center;
}

.service-item:hover {
  border-color: var(--accent);
  background: #fafafa;
}

.service-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 20px;
}

/* ─── TESTIMONIALS ────────────────────────────────────────────────────────── */
.testimonial-card {
  background: #fff;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-style: italic;
  border-right: 5px solid var(--accent);
}

.testimonial-user {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
  font-style: normal;
}

.testimonial-user img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

/* ─── FOOTER ──────────────────────────────────────────────────────────────── */
.footer {
  background: var(--primary);
  color: #cbd5e1;
  padding: 80px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-logo {
  margin-bottom: 25px;
}

.footer-brand h2 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.footer h3 {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 8px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 15px;
}

.footer-links a:hover {
  color: var(--accent);
  padding-right: 5px;
}

.contact-info p {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: center;
}

.contact-info i {
  color: var(--accent);
  font-size: 1.3rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  font-size: 0.95rem;
}

/* ─── FLOATING WHATSAPP ───────────────────────────────────────────────────── */
.float-wa {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 1000;
  width: 65px;
  height: 65px;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s ease;
  animation: bounce 3s infinite;
}

.float-wa:hover {
  transform: scale(1.15);
  color: #fff;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

/* ─── REVEAL ON SCROLL ────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 65px;
  }

  .menu-toggle {
    display: flex;
    z-index: 1100;
  }

  .main-nav {
    position: fixed;
    top: -100%;
    right: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    align-items: center;
    padding: 100px 30px 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    border-bottom: 4px solid var(--accent);
    z-index: 1002;
    overflow-y: auto;
  }

  .main-nav.open {
    top: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .main-nav a {
    color: var(--primary) !important;
    padding: 18px 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--border);
    font-size: 1.2rem;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s ease;
  }

  .main-nav.open a {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger links entrance */
  .main-nav.open a:nth-child(1) {
    transition-delay: 0.1s;
  }

  .main-nav.open a:nth-child(2) {
    transition-delay: 0.2s;
  }

  .main-nav.open a:nth-child(3) {
    transition-delay: 0.3s;
  }

  .main-nav.open a:nth-child(4) {
    transition-delay: 0.4s;
  }

  .main-nav.open a:nth-child(5) {
    transition-delay: 0.5s;
  }

  .main-nav.open a:nth-child(6) {
    transition-delay: 0.6s;
  }

  .header-cta {
    display: none;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section {
    padding: 40px 0;
  }

  .section-header {
    margin-bottom: 30px;
  }

  .section-title {
    font-size: 1.8rem;
  }

  /* Logo adjustment for extra small screens */
  @media (max-width: 400px) {
    .logo-text {
      font-size: 1rem;
    }
  }
}