@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&display=swap');

/* ===================================================
   DESIGN TOKENS — Dark (default) & Light theme
=================================================== */
:root {
  --black:      #121212;
  --red:        #f7192a;
  --red-dark:   #d61f27;
  --gray-dark:  #676767;
  --gray-light: #b2b2b2;
  --white:      #ffffff;
  --card-bg:    #1e1e1e;

  --body-bg:         #121212;
  --section-alt:     #0f0f0f;
  --footer-bg:       #0a0a0a;
  --nav-dropdown-bg: #1a1a1a;
  --border-subtle:   #2a2a2a;
  --border-card:     #676767;
  --hero-overlay:    linear-gradient(to right, rgba(10,10,10,0.9) 40%, rgba(10,10,10,0.3));
}

[data-theme="light"] {
  --black:      #f2f2f2;
  --white:      #1a1a1a;
  --card-bg:    #ffffff;
  --gray-light: #555555;
  --gray-dark:  #888888;

  --body-bg:         #f2f2f2;
  --section-alt:     #e6e6e6;
  --footer-bg:       #1a1a1a;
  --nav-dropdown-bg: #ffffff;
  --border-subtle:   #e0e0e0;
  --border-card:     #d0d0d0;
  --hero-overlay:    linear-gradient(to right, rgba(220,220,220,0.92) 40%, rgba(220,220,220,0.3));
}

/* ===================================================
   SMOOTH THEME TRANSITIONS
=================================================== */
body,
.product-card,
.news-card,
.news-section,
.products-section,
footer,
.footer-bottom,
.dropdown,
.page-hero,
.quality-block,
.stats-strip,
.award-image-wrap,
input, textarea, select {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ===================================================
   BASE RESET
=================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  background-color: var(--body-bg);
  color: var(--white);
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===================================================
   NAVBAR
=================================================== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(18, 18, 18, 0.95);
  border-bottom: 1px solid #2a2a2a;
  padding: 0 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo img { height: 40px; }

.nav-menu {
  display: flex;
  list-style: none;
  gap: 35px;
  align-items: center;
}

.nav-menu > li { position: relative; }

.nav-menu > li > a {
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.5px;
  padding: 5px 0;
  transition: color 0.3s;
}

.nav-menu > li > a:hover,
.nav-menu > li.active > a { color: var(--red); }

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--nav-dropdown-bg);
  border-top: 2px solid var(--red);
  min-width: 200px;
  padding: 10px 0;
  z-index: 999;
  list-style: none;
}

.nav-menu > li:hover .dropdown { display: block; }

.dropdown li a {
  display: block;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--gray-light);
  transition: all 0.3s;
  letter-spacing: 0.3px;
}

.dropdown li a:hover {
  color: var(--white);
  background-color: #252525;
  padding-left: 25px;
}

[data-theme="light"] .dropdown li a:hover {
  color: var(--red);
  background-color: #f5f5f5;
}

.nav-contact-btn {
  background-color: var(--red);
  color: var(--white) !important;
  padding: 10px 22px !important;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: background-color 0.3s !important;
}

.nav-contact-btn:hover {
  background-color: var(--red-dark) !important;
  color: var(--white) !important;
}

/* ===================================================
   HERO (homepage)
=================================================== */
.hero {
  min-height: 100vh;
  background-color: #0a0a0a;
  background-image: url('../images/hero.jpeg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 0 60px;
  position: relative;
}

@media(max-width:768px){
  .hero {
    background-image: url('../images/hero-mobile.png');
    padding: 0 25px;
  }
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  transition: background 0.3s ease;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero-content h1 {
  font-size: 58px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 30px;
  color: var(--white);
  transition: color 0.3s;
}

.hero-content h1 span { color: var(--red); }

.hero-btn {
  display: inline-block;
  background-color: var(--red);
  color: #ffffff;
  padding: 14px 30px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: background-color 0.3s;
}

.hero-btn:hover { background-color: var(--red-dark); }

/* ===================================================
   INNER PAGE HERO BANNER — light mode override
   (inline styles use !important to override page <style> tags)
=================================================== */
[data-theme="light"] .page-hero {
  background: #e2e2e2 !important;
  border-bottom-color: #d0d0d0 !important;
}

[data-theme="light"] .page-hero h1 { color: #1a1a1a !important; }
[data-theme="light"] .page-hero p  { color: #555555 !important; }

[data-theme="light"] .breadcrumb,
[data-theme="light"] .breadcrumb a { color: #1a1a1a !important; }
[data-theme="light"] .breadcrumb a:hover { color: #f7192a !important; }

/* ===================================================
   SECTION TITLE
=================================================== */
.section-title {
  font-size: 36px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  color: var(--white);
  transition: color 0.3s;
}

[data-theme="light"] .section-title { color: #1a1a1a !important; }
[data-theme="light"] .section-label { color: #f7192a !important; }

.section-underline {
  width: 60px;
  height: 3px;
  background-color: var(--red);
  margin-bottom: 40px;
}

/* ===================================================
   HOMEPAGE PRODUCTS SECTION
=================================================== */
.products-section {
  padding: 90px 60px;
  background-color: var(--body-bg);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 20px;
}

.product-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-card);
  border-bottom: 3px solid var(--red);
  padding: 25px;
  transition: transform 0.3s, border-color 0.3s, background-color 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--red);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 20px;
}

.product-card h3 {
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  color: var(--white);
  transition: color 0.3s;
}

.product-card p {
  font-size: 14px;
  color: var(--gray-light);
  line-height: 1.7;
  margin-bottom: 20px;
  transition: color 0.3s;
}

.learn-more {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s;
}

.learn-more span {
  background-color: var(--red);
  padding: 3px 7px;
  font-size: 11px;
  color: #fff;
}

.learn-more:hover { color: var(--red); }

[data-theme="light"] .product-card h3 { color: #1a1a1a !important; }
[data-theme="light"] .product-card p  { color: #555 !important; }
[data-theme="light"] .learn-more      { color: #1a1a1a !important; }

/* ===================================================
   PRODUCT LISTING PAGES — elevators / generators / relays
   (overrides inline <style> tags in each page)
=================================================== */
[data-theme="light"] .product-card {
  background: #ffffff !important;
  border-color: #e0e0e0 !important;
  border-bottom-color: #f7192a !important;
}

[data-theme="light"] .product-card:hover {
  border-color: #f7192a !important;
}

[data-theme="light"] .product-card-title {
  color: #1a1a1a !important;
}

[data-theme="light"] .product-card-desc {
  color: #555555 !important;
}

[data-theme="light"] .product-card-footer {
  border-top-color: #e0e0e0 !important;
}

[data-theme="light"] .product-card-footer span {
  color: #888888 !important;
}

[data-theme="light"] .product-card-image.no-image {
  background: #eeeeee !important;
  color: #bbbbbb !important;
}

/* ===================================================
   NEWS SECTION
=================================================== */
.news-section {
  padding: 90px 60px;
  background-color: var(--section-alt);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 20px;
}

.news-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: transform 0.3s, background-color 0.3s, border-color 0.3s;
}

.news-card:hover { transform: translateY(-5px); }

.news-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 900px) {
  .news-card img {
    height: 300px;
  }
}

@media (max-width: 600px) {
  .news-card img {
    height: 240px;
  }
}


.news-card-body { padding: 20px; }

.news-date {
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.news-card-body h3 {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
  line-height: 1.4;
  color: var(--white);
  transition: color 0.3s;
}

.news-card-body p {
  font-size: 13px;
  color: var(--gray-light);
  line-height: 1.6;
  margin-bottom: 15px;
  transition: color 0.3s;
}

[data-theme="light"] .news-card           { background-color: #ffffff !important; border-color: #e0e0e0 !important; }
[data-theme="light"] .news-card-body      { background-color: #ffffff !important; }
[data-theme="light"] .news-card-body h3   { color: #1a1a1a !important; }
[data-theme="light"] .news-card-body p    { color: #555555 !important; }

/* News listing page card overlay */
[data-theme="light"] .news-card-overlay,
[data-theme="light"] .card-overlay {
  background: linear-gradient(to top, rgba(255,255,255,0.97) 40%, transparent) !important;
}
[data-theme="light"] .news-card-overlay h3,
[data-theme="light"] .news-card-overlay p,
[data-theme="light"] .card-overlay h3,
[data-theme="light"] .card-overlay p { color: #1a1a1a !important; }

/* ===================================================
   ABOUT PAGE — Quality Policy blocks
   (overrides inline <style> in about.php)
=================================================== */
[data-theme="light"] .quality-block {
  background: #ffffff !important;
  border-color: #e0e0e0 !important;
}

[data-theme="light"] .quality-block-title {
  border-bottom-color: #e0e0e0 !important;
  /* color stays red — intentional */
}

[data-theme="light"] .quality-block p {
  color: #333333 !important;
}

[data-theme="light"] .quality-block strong {
  color: #1a1a1a !important;
}

[data-theme="light"] .quality-block ul li {
  color: #333333 !important;
  border-bottom-color: #e8e8e8 !important;
}

/* Stats strip */
[data-theme="light"] .stats-strip {
  background: #e2e2e2 !important;
  border-top-color: #d0d0d0 !important;
  border-bottom-color: #d0d0d0 !important;
}

[data-theme="light"] .stat-label { color: #666666 !important; }

/* About intro text */
[data-theme="light"] .about-intro-text p { color: #555555 !important; }

/* Map placeholder box */
[data-theme="light"] .about-intro-map {
  background: #e8e8e8 !important;
  border-color: #d0d0d0 !important;
}

/* ISO badge */
[data-theme="light"] .iso-badge {
  background: #f0f0f0 !important;
  border-color: #d0d0d0 !important;
}

[data-theme="light"] .iso-badge-text { color: #555555 !important; }

/* ===================================================
   AWARDS PAGE
   User wants: grey background throughout,
   awards NOT as white cards — just text on grey bg
=================================================== */
[data-theme="light"] .awards-list {
  background: transparent !important;
}

[data-theme="light"] .award-item {
  border-bottom-color: #d0d0d0 !important;
  background: transparent !important;
}

/* Ghost number — very faint on light bg */
[data-theme="light"] .award-number {
  color: rgba(0, 0, 0, 0.07) !important;
}

[data-theme="light"] .award-title {
  color: #1a1a1a !important;
}

[data-theme="light"] .award-desc {
  color: #555555 !important;
}

[data-theme="light"] .award-image-wrap {
  border-color: #d0d0d0 !important;
}

[data-theme="light"] .award-image-wrap img {
  background: #f0f0f0 !important;
}

[data-theme="light"] .no-image {
  background: #e8e8e8 !important;
  border-color: #d0d0d0 !important;
  color: #cccccc !important;
}

/* ===================================================
   CONTACT FORM
=================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input,
textarea,
select {
  background-color: #111;
  color: #ffffff;
  border: 1px solid #2a2a2a;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="tel"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
  background-color: #ffffff !important;
  color: #1a1a1a !important;
  border-color: #d0d0d0 !important;
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder { color: #999999 !important; }

[data-theme="light"] select option {
  background-color: #ffffff;
  color: #1a1a1a;
}

[data-theme="light"] .contact-label,
[data-theme="light"] .form-label,
[data-theme="light"] label { color: #1a1a1a !important; }

[data-theme="light"] .contact-info h3,
[data-theme="light"] .contact-info h4,
[data-theme="light"] .contact-info p   { color: #1a1a1a !important; }
[data-theme="light"] .contact-info .contact-section-title { color: #f7192a !important; }

/* ===================================================
   FOOTER — always dark in both themes
=================================================== */
footer {
  background-color: var(--footer-bg);
  border-top: 2px solid var(--red);
  padding: 50px 60px 20px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 40px;
}

.footer-logo img { height: 35px; margin-bottom: 15px; }
.footer-about p  { font-size: 13px; color: #b2b2b2; line-height: 1.8; }

.footer-links h4,
.footer-contact h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  color: #ffffff;
}

.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a { font-size: 13px; color: #b2b2b2; transition: color 0.3s; }
.footer-links ul li a:hover { color: var(--red); }
.footer-contact p { font-size: 13px; color: #b2b2b2; margin-bottom: 8px; line-height: 1.6; }

.footer-bottom {
  border-top: 1px solid #2a2a2a;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p { font-size: 12px; color: #676767; }

.footer-social { display:flex; gap:10px; margin-top:16px; }
.social-btn {
  display:flex; align-items:center; justify-content:center;
  width:36px; height:36px; background:#1a1a1a;
  border:1px solid #2a2a2a; color:#b2b2b2;
  transition:.2s; border-radius:50%;
}
.social-btn:hover { background:#f7192a; border-color:#f7192a; color:#fff; }

.keysection-title {
  font-size: 36px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  color: var(--white);
  transition: color 0.3s;
}

[data-theme="light"] .keysection-title { color:#ffffff !important; }
[data-theme="light"] .keysection-label { color:#ffffff !important; }

.section-underline-milestones {
  width: 60px;
  height: 3px;
  background-color: var(--red);
  margin-bottom: 40px;
  margin-inline: auto;
}

.about-intro {
    max-width: 1300px;
    margin: 0 auto;
    padding: 60px 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start; /* back to start */
}

.about-intro-map {
    border: 1px solid #1f1f1f;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.about-intro-map img {
    width: 100%;
    height: 500px;       /* fixed height — keeps image large */
    object-fit: cover;   /* fills the box without distortion */
    display: block;
}

.about-map-btn {
  display: block;
  background-color: var(--red);
  color: #fff;
  text-align: center;
  padding: 14px 30px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.about-map-btn:hover {
  background-color: var(--red-dark);
}

.product-card img {
  height: 220px;
  object-fit: contain;
  width: 100%;
}

html {
  scroll-behavior: smooth;
}

[data-theme="light"] .key-events-section {
  background: #bababa !important;
}

[data-theme="light"] .keysection-title {
  color: #1a1a1a !important;
}

@media (max-width: 900px) {
  .products-grid,
  .news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .product-card,
  .news-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 28px;
  }

  .footer-about,
  .footer-links,
  .footer-contact {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .products-section,
  .news-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .products-grid,
  .news-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-card img,
  .news-card img {
    width: 100%;
    height: auto;
    display: block;
  }

  footer {
    padding: 36px 16px 18px;
  }

  .footer-logo img {
    height: 32px;
    margin-bottom: 12px;
  }

  .footer-about p,
  .footer-links ul li a,
  .footer-contact p {
    font-size: 12px;
  }

  .footer-links h4,
  .footer-contact h4 {
    margin-bottom: 14px;
  }
}

/* Kill color-shift on all homepage/product cards */
.product-card img,
.product-card-image img,
.news-card img,
.card-overlay,
.news-card-overlay,
.product-card::before,
.product-card::after,
.news-card::before,
.news-card::after {
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
}

.product-card:hover img,
.product-card:hover .product-card-image img,
.news-card:hover img,
.product-card:hover .card-overlay,
.news-card:hover .news-card-overlay {
  filter: none !important;
  opacity: 1 !important;
  background: transparent !important;
}

.product-card:hover,
.news-card:hover {
  transform: translateY(-5px);
}
