/* ============================================
   Haifa Mining Company — Style Sheet
   Bold & Industrial Design with RTL Support
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --primary: #1a2332;
  --primary-light: #243044;
  --accent: #d4a843;
  --accent-dark: #b8922e;
  --text-light: #ffffff;
  --text-dark: #2c2c2c;
  --text-muted: #6c757d;
  --bg-light: #f5f5f5;
  --bg-white: #ffffff;
  --bg-dark: #1a2332;
  --shadow: 0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
  --transition: 0.3s ease;
  --radius: 4px;
  --max-width: 1200px;
  --header-height: 80px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-dark);
  line-height: 1.7;
  background: var(--bg-white);
  overflow-x: hidden;
}
[dir="rtl"] body { font-family: 'Noto Sans Arabic', 'Open Sans', sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dark); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
  font-family: 'Noto Sans Arabic', 'Oswald', sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.bg-dark { background: var(--bg-dark); color: var(--text-light); }
.bg-dark h2, .bg-dark h3 { color: var(--text-light); }
.bg-light { background: var(--bg-light); }
.section { padding: 80px 0; }
.section-title {
  font-size: 2.2rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin-top: 12px;
}
.text-center .section-title::after { margin-inline: auto; }
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 40px;
}
.text-center .section-subtitle { margin-inline: auto; }
.btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: var(--primary);
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
[dir="rtl"] .btn { font-family: 'Noto Sans Arabic', sans-serif; text-transform: none; letter-spacing: 0; }
.btn:hover { background: transparent; color: var(--accent); }
.btn-outline {
  background: transparent;
  color: var(--text-light);
  border-color: var(--text-light);
}
.btn-outline:hover { background: var(--text-light); color: var(--primary); }
.btn-dark { background: var(--primary); color: var(--text-light); border-color: var(--primary); }
.btn-dark:hover { background: transparent; color: var(--primary); }

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--primary);
  height: var(--header-height);
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.logo img { height: 55px; width: auto; }
.nav { display: flex; align-items: center; gap: 5px; }
.nav a {
  color: var(--text-light);
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
}
[dir="rtl"] .nav a {
  font-family: 'Noto Sans Arabic', sans-serif;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
}
.nav a:hover, .nav a.active { background: rgba(255,255,255,0.1); color: var(--accent); }
.lang-switch {
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  font-size: 0.85rem !important;
  padding: 6px 12px !important;
  margin-inline-start: 10px;
}
.lang-switch:hover { background: var(--accent) !important; color: var(--primary) !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--text-light);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,35,50,0.7), rgba(26,35,50,0.85));
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 20px;
}
.hero h1 {
  font-size: 4rem;
  color: var(--text-light);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.hero .tagline {
  font-size: 1.3rem;
  font-weight: 300;
  margin-bottom: 30px;
  opacity: 0.9;
}
.hero .accent-line {
  width: 80px;
  height: 4px;
  background: var(--accent);
  margin: 0 auto 30px;
}

/* Page Hero (smaller) */
.page-hero {
  position: relative;
  height: 45vh;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  overflow: hidden;
}
.page-hero h1 {
  font-size: 3rem;
  color: var(--text-light);
  text-transform: uppercase;
}

/* ============================================
   ABOUT SNIPPET (Home)
   ============================================ */
.about-snippet { display: flex; gap: 50px; align-items: center; }
.about-snippet .text { flex: 1; }
.about-snippet .text p { margin-bottom: 20px; font-size: 1.05rem; }
.about-snippet .image { flex: 1; }
.about-snippet .image img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

/* ============================================
   PRODUCT CARDS GRID
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.product-card .card-img {
  height: 220px;
  overflow: hidden;
}
.product-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .card-img img { transform: scale(1.08); }
.product-card .card-body {
  padding: 20px;
}
.product-card .card-body h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}
.product-card .card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.product-card .card-link {
  display: block;
  padding: 12px 20px;
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  border-top: 1px solid #eee;
  transition: all var(--transition);
}
[dir="rtl"] .product-card .card-link { font-family: 'Noto Sans Arabic', sans-serif; text-transform: none; letter-spacing: 0; }
.product-card .card-link:hover { background: var(--accent); color: var(--primary); }

/* ============================================
   STATS SECTION
   ============================================ */
.stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: 'Oswald', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.95rem;
  margin-top: 8px;
  opacity: 0.85;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  aspect-ratio: 4/3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26,35,50,0.0);
  transition: background var(--transition);
}
.gallery-item:hover::after { background: rgba(26,35,50,0.3); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2.5rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
  z-index: 2001;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
[dir="rtl"] .lightbox-close { right: auto; left: 20px; }
.lightbox-close:hover { color: var(--accent); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 10px 15px;
  z-index: 2001;
  user-select: none;
}
.lightbox-nav:hover { color: var(--accent); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
[dir="rtl"] .lightbox-prev { left: auto; right: 20px; }
[dir="rtl"] .lightbox-next { right: auto; left: 20px; }

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.contact-card {
  background: var(--bg-white);
  padding: 40px 30px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.contact-card:hover { transform: translateY(-5px); }
.contact-card .icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}
.contact-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.contact-card p {
  color: var(--text-muted);
  font-size: 1rem;
}
.contact-card a { color: var(--accent); font-weight: 600; }

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */
.product-detail { max-width: 900px; margin: 0 auto; }
.product-detail p { margin-bottom: 16px; font-size: 1.05rem; }
.product-detail h2 { font-size: 1.8rem; margin: 40px 0 20px; }

.spec-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 30px 0;
}
.spec-card {
  background: var(--bg-light);
  padding: 25px;
  border-radius: var(--radius);
  border-inline-start: 4px solid var(--accent);
}
.spec-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--primary);
}
.spec-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.other-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
  margin-top: 20px;
}
.other-product-link {
  display: block;
  padding: 15px;
  background: var(--bg-light);
  border-radius: var(--radius);
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--primary);
  transition: all var(--transition);
}
[dir="rtl"] .other-product-link { font-family: 'Noto Sans Arabic', sans-serif; text-transform: none; }
.other-product-link:hover { background: var(--accent); color: var(--primary); }

/* ============================================
   ABOUT / VISION PAGES
   ============================================ */
.content-page { max-width: 850px; margin: 0 auto; }
.content-page p { margin-bottom: 18px; font-size: 1.05rem; line-height: 1.8; }
.content-page h2 { font-size: 1.8rem; margin: 40px 0 20px; }

/* ============================================
   CONTACT STRIP (Home)
   ============================================ */
.contact-strip {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}
.contact-strip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
}
.contact-strip-item .icon { font-size: 1.4rem; color: var(--accent); }
.contact-strip-item span { font-size: 0.95rem; }

/* ============================================
   DIAGONAL SECTION DIVIDER
   ============================================ */
.diagonal-top {
  position: relative;
}
.diagonal-top::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 40px;
  background: inherit;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--primary);
  color: var(--text-light);
  padding: 50px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer h4 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 15px;
  text-transform: uppercase;
}
[dir="rtl"] .footer h4 { text-transform: none; }
.footer p { opacity: 0.8; font-size: 0.9rem; line-height: 1.7; }
.footer-links a {
  display: block;
  color: rgba(255,255,255,0.8);
  padding: 4px 0;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root { --header-height: 70px; }
  .hamburger { display: flex; }
  .nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 999;
  }
  .nav.open { display: flex; }
  .nav a { font-size: 1.2rem; padding: 12px 20px; }
  .lang-switch { margin-inline-start: 0; margin-top: 10px; }
  .hero h1 { font-size: 2.5rem; }
  .hero .tagline { font-size: 1rem; }
  .page-hero h1 { font-size: 2rem; }
  .about-snippet { flex-direction: column; gap: 30px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .contact-cards { grid-template-columns: 1fr; }
  .stats { gap: 30px; }
  .stat-number { font-size: 2.2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .contact-strip { flex-direction: column; align-items: center; gap: 15px; }
  .section { padding: 60px 0; }
  .section-title { font-size: 1.8rem; }
  .other-products { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2rem; }
}
