/* =============================================
   Métal Concept Messadine — Industrial Website
   Dark theme · Mobile-first · Responsive
   ============================================= */

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

:root {
  --clr-bg:        #0f0f0f;
  --clr-bg-alt:    #1a1a1a;
  --clr-bg-card:   #222222;
  --clr-bg-hover:  #2a2a2a;
  --clr-text:      #f0f0f0;
  --clr-text-muted:#9ca3af;
  --clr-accent:    #ff6b00;
  --clr-accent-hover: #e65c00;
  --clr-accent-glow: rgba(255, 107, 0, 0.25);
  --clr-border:    #333333;
  --clr-success:   #22c55e;
  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-w:         1200px;
  --nav-h:         64px;
  --radius:        12px;
  --radius-sm:     8px;
  --transition:    0.25s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; border: none; background: none; color: inherit; }

/* --- CONTAINER --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================================
   HEADER / NAV
   ============================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--transition), box-shadow var(--transition);
}

.header--scrolled {
  background: rgba(15, 15, 15, 0.95);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--clr-accent);
}

.header__nav {
  display: flex;
  gap: 28px;
}

.header__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  position: relative;
  transition: color var(--transition);
  letter-spacing: 0.3px;
}

.header__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 100%;
  height: 2px;
  background: var(--clr-accent);
  transition: right var(--transition);
}

.header__link:hover,
.header__link:focus-visible {
  color: var(--clr-text);
}

.header__link:hover::after,
.header__link:focus-visible::after {
  right: 0;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- LANG TOGGLE --- */
.lang-toggle {
  display: flex;
  border: 1px solid var(--clr-border);
  border-radius: 6px;
  overflow: hidden;
}

.lang-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background var(--transition), color var(--transition);
  color: var(--clr-text-muted);
}

.lang-btn--active {
  background: var(--clr-accent);
  color: #fff;
}

/* --- MOBILE TOGGLE --- */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

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

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

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

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 100px 20px 60px;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15,15,15,0.3) 0%, rgba(15,15,15,0.85) 70%, var(--clr-bg) 100%),
    linear-gradient(135deg, rgba(255,107,0,0.08) 0%, transparent 50%);
  z-index: 1;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,107,0,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(255,107,0,0.04) 0%, transparent 50%);
  z-index: 0;
}

.hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg.jpg') center / cover no-repeat;
  opacity: 0.3;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.12);
  color: var(--clr-success);
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  margin-bottom: 24px;
}

.hero__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero__profile {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--clr-accent);
  box-shadow: 0 0 24px var(--clr-accent-glow);
}

.hero__title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: 3px;
  line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #ccc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--clr-accent);
  margin-bottom: 8px;
}

.hero__sub {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: var(--clr-text-muted);
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.btn--primary {
  background: var(--clr-accent);
  color: #fff;
  box-shadow: 0 4px 14px var(--clr-accent-glow);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--clr-accent-hover);
  box-shadow: 0 6px 24px var(--clr-accent-glow);
  transform: translateY(-1px);
}

.btn--secondary {
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: #20bd5a;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--clr-text);
  border: 1.5px solid var(--clr-border);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  background: rgba(255, 107, 0, 0.06);
}

.btn--block {
  width: 100%;
  justify-content: center;
}

.btn--icon svg {
  flex-shrink: 0;
}

.hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0.4;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* =============================================
   SECTIONS (generic)
   ============================================= */
.section {
  padding: 80px 0;
}

.section__header {
  text-align: center;
  margin-bottom: 56px;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section__sub {
  font-size: 1.05rem;
  color: var(--clr-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* =============================================
   SERVICES
   ============================================= */
.services {
  background: var(--clr-bg-alt);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}

.service-card:hover {
  border-color: var(--clr-accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.service-card__icon {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.service-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.service-card__desc {
  font-size: 0.88rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
}

/* =============================================
   ABOUT
   ============================================= */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about__text p {
  margin-bottom: 16px;
  color: var(--clr-text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.about__text p strong {
  color: var(--clr-accent);
}

.about__rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--clr-success);
  font-weight: 600;
  padding: 10px 20px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 100px;
  transition: all var(--transition);
  background: rgba(34, 197, 94, 0.06);
}

.about__rating:hover {
  background: rgba(34, 197, 94, 0.12);
  transform: translateY(-1px);
}

.about__stars {
  letter-spacing: 2px;
}

.about__score {
  font-size: 1.1rem;
}

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--clr-accent);
  transform: translateY(-2px);
}

.stat-card__number {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--clr-accent);
  margin-bottom: 6px;
}

.stat-card__label {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  font-weight: 500;
}

/* =============================================
   GALLERY
   ============================================= */
.gallery {
  background: var(--clr-bg-alt);
}

.gallery__category {
  margin-bottom: 40px;
}

.gallery__category:last-of-type {
  margin-bottom: 0;
}

.gallery__category-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--clr-accent);
  display: inline-block;
  color: var(--clr-accent);
  letter-spacing: 0.3px;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

[data-category="ws"] .gallery__item {
  max-width: 280px;
}

.gallery__item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: all var(--transition);
}

.gallery__item:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  transition: transform var(--transition);
}

.gallery__item:hover .gallery__img {
  transform: scale(1.05);
}

.gallery__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--clr-bg-card) 0%, var(--clr-bg-hover) 100%);
  border: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.gallery__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: var(--clr-text);
}

.gallery__note {
  text-align: center;
  margin-top: 32px;
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  font-style: italic;
}

/* =============================================
   CONTACT
   ============================================= */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact__card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
}

.contact__card:hover {
  border-color: var(--clr-accent);
}

.contact__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 0, 0.08);
  border-radius: var(--radius-sm);
}

.contact__card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  color: var(--clr-text-muted);
}

.contact__card p,
.contact__card a {
  font-size: 0.95rem;
}

.contact__link {
  color: var(--clr-accent);
  font-weight: 600;
  transition: opacity var(--transition);
}

.contact__link:hover {
  opacity: 0.8;
}

/* --- FORM --- */
.contact__form {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 32px;
}

.contact__form h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.form__group {
  margin-bottom: 16px;
}

.form__group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--clr-text-muted);
  margin-bottom: 6px;
}

.form__group input,
.form__group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: var(--font);
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  color: var(--clr-text);
  outline: none;
  transition: border-color var(--transition);
}

.form__group input:focus,
.form__group textarea:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px var(--clr-accent-glow);
}

.form__group textarea {
  resize: vertical;
  min-height: 100px;
}

/* --- MAP --- */
.contact__map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--clr-border);
}

.contact__map iframe {
  display: block;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--clr-bg-alt);
  border-top: 1px solid var(--clr-border);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer__brand h3 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.footer__brand p {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
}

.footer__social-link {
  display: inline-flex;
  padding: 8px;
  color: var(--clr-text-muted);
  transition: color var(--transition), transform var(--transition);
}

.footer__social-link:hover {
  color: var(--clr-accent);
  transform: translateY(-2px);
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
}

/* =============================================
   WHATSAPP FLOATING BUTTON
   ============================================= */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all var(--transition);
  animation: wa-pulse 2s infinite;
}

.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

@keyframes wa-pulse {
  0% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 28px rgba(37, 211, 102, 0.6); }
  100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
}

/* =============================================
   RTL (Arabic)
   ============================================= */
[dir="rtl"] .header__nav {
  flex-direction: row-reverse;
}

[dir="rtl"] .header__logo {
  color: var(--clr-accent);
}

[dir="rtl"] .hero__content {
  direction: rtl;
}

[dir="rtl"] .about__grid {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .contact__card {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .form__group input,
[dir="rtl"] .form__group textarea {
  text-align: right;
}

[dir="rtl"] .gallery__category-title {
  border-bottom-color: var(--clr-accent);
  border-bottom-style: solid;
}

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox--open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 2.5rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition);
  line-height: 1;
}

.lightbox__close:hover {
  opacity: 1;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition);
  padding: 16px;
  line-height: 1;
}

.lightbox__nav:hover {
  opacity: 1;
}

.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

@media (max-width: 640px) {
  .lightbox__nav { font-size: 2rem; }
  .lightbox__close { font-size: 2rem; top: 12px; right: 16px; }
}

/* =============================================
   ANIMATIONS (on scroll)
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* =============================================
   RESPONSIVE
   ============================================= */

/* Tablet */
@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }

  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .header__nav {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    transform: translateY(-120%);
    opacity: 0;
    transition: all var(--transition);
    border-bottom: 1px solid var(--clr-border);
    z-index: 999;
  }

  .header__nav--open {
    transform: translateY(0);
    opacity: 1;
  }

  .header__link {
    font-size: 1rem;
    padding: 8px 0;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero__title {
    font-size: 2.2rem;
  }

  .hero__cta {
    flex-direction: column;
  }

  .hero__cta .btn {
    width: 100%;
    justify-content: center;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .about__stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 20px 16px;
  }

  .stat-card__number {
    font-size: 1.4rem;
  }

  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  [data-category="ws"] .gallery__item,
  [data-category="gate"] .gallery__item {
    max-width: none;
  }

  .section {
    padding: 56px 0;
  }

  .section__header {
    margin-bottom: 36px;
  }

  .contact__form {
    padding: 24px 20px;
  }

  .wa-float {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
}

/* Small Mobile */
@media (max-width: 400px) {
  .hero__cta .btn {
    font-size: 0.85rem;
    padding: 12px 20px;
  }

  .about__stats {
    grid-template-columns: 1fr;
  }

  .header__logo {
    font-size: 1.1rem;
  }
}
