/* ============================================
   ITBAALI — Imprimerie & Enseignes, Tanger
   ============================================ */

:root {
  --orange: #f95b03;
  --orange-dark: #d14a02;
  --orange-light: #fff1e6;
  --navy: #171717;
  --ink: #1a1a1a;
  --ink-soft: #5c5750;
  --bg: #ffffff;
  --bg-soft: #f7f5f3;
  --bg-alt: #fff1e6;
  --line: #ece7e2;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(23, 23, 23, 0.18);
  --shadow-sm: 0 4px 14px -6px rgba(23, 23, 23, 0.15);
  --gradient-brand: linear-gradient(120deg, #ff7a2e 0%, var(--orange) 55%, #c93f00 100%);
  --container: 1180px;
  --transition: 0.25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--navy); color: #f2ede7; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-dark);
  background: var(--bg-alt);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.section--navy .eyebrow { background: rgba(255,255,255,0.08); color: #ff9f52; }

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

h1, h2, h3, h4 {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--navy);
}
.section--navy h2, .section--navy h3 { color: #fff; }

h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: 20px; }

p { color: var(--ink-soft); margin: 0 0 16px; }
.section--navy p { color: #c7c2ba; }

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn--primary {
  background: #25D366;
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(37, 211, 102, 0.55);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(37, 211, 102, 0.65); }
.btn--outline {
  border-color: rgba(255,255,255,0.55);
  color: #fff;
}
.btn--outline:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.btn--dark {
  border-color: var(--navy);
  color: var(--navy);
}
.btn--dark:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }
.btn--sm { padding: 10px 20px; font-size: 13px; }
.btn--block { width: 100%; }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.header.is-scrolled {
  background: rgba(255,255,255,0.97);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -16px rgba(23,23,23,0.25);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 46px; width: auto; }
.brand__name {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.02em;
  color: var(--navy);
}
.brand__name span { color: var(--orange); }

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 0;
  background: var(--gradient-brand);
  transition: width var(--transition);
}
.nav a:hover::after { width: 100%; }

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

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-alt);
  border: 1.5px solid var(--line);
  color: var(--orange-dark);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 999px;
  transition: all var(--transition);
}
.lang-toggle:hover { border-color: var(--orange); background: #fff; }
.lang-toggle--mobile { display: none; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px; height: 40px;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px;
  height: 2px;
  background: var(--navy);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle span { top: 19px; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span::after { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 168px 0 100px;
  overflow: hidden;
  background: radial-gradient(1100px 600px at 85% -10%, rgba(249,91,3,0.10), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(23,23,23,0.05), transparent 60%),
              var(--bg-soft);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--orange-dark);
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 17.5px;
  max-width: 520px;
  margin-bottom: 32px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}
.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.hero__points li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}
.hero__points svg { width: 18px; height: 18px; color: var(--orange); flex-shrink: 0; }

.hero__visual {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}
.hero__visual .card-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 3/4;
  position: relative;
}
.hero__visual .card-img.tall { grid-row: span 2; }
.hero__visual .card-img img {
  width: 100%; height: 100%; object-fit: cover;
}

/* Gentle floating + slow Ken Burns zoom on hero photos */
.hero__visual .card-img {
  animation: heroFloat 7s ease-in-out infinite;
  will-change: transform;
}
.hero__visual .card-img:nth-child(1) { animation-delay: 0s; }
.hero__visual .card-img:nth-child(2) { animation-delay: -2.3s; }
.hero__visual .card-img:nth-child(3) { animation-delay: -4.6s; }

.hero__visual .card-img img {
  animation: heroZoom 14s ease-in-out infinite alternate;
  transform-origin: center;
}
.hero__visual .card-img:nth-child(1) img { animation-duration: 16s; }
.hero__visual .card-img:nth-child(2) img { animation-duration: 13s; animation-delay: -3s; }
.hero__visual .card-img:nth-child(3) img { animation-duration: 15s; animation-delay: -7s; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes heroZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__visual .card-img,
  .hero__visual .card-img img {
    animation: none;
  }
}

.hero__badge {
  position: absolute;
  bottom: -22px;
  left: -22px;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 5;
}
.hero__badge img { height: 34px; width: auto; }
.hero__badge strong { display: block; font-size: 13px; color: var(--navy); }
.hero__badge span { font-size: 12px; color: var(--ink-soft); }

/* ===== Trust bar ===== */
.trust {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.trust__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}
.trust__item svg { width: 26px; height: 26px; color: var(--orange); flex-shrink: 0; }

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.service-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--orange-dark);
}
.service-card__cta::after {
  content: "→";
  transition: transform var(--transition);
}
html[dir="rtl"] .service-card__cta::after { content: "←"; }
.service-card:hover .service-card__cta::after { transform: translateX(4px); }
html[dir="rtl"] .service-card:hover .service-card__cta::after { transform: translateX(-4px); }
.service-card__icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-brand);
  margin-bottom: 20px;
}
.service-card__icon svg { width: 28px; height: 28px; color: #fff; }
.service-card h3 { margin-bottom: 10px; }
.service-card p { font-size: 14.5px; margin: 0; }
.service-card.has-photo { padding: 0; overflow: hidden; }
.service-card.has-photo .photo { aspect-ratio: 16/10; overflow: hidden; }
.service-card.has-photo .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.service-card.has-photo:hover .photo img { transform: scale(1.06); }
.service-card.has-photo .body { padding: 24px 26px 28px; }

/* ===== Gallery / Realisations ===== */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 44px;
}
.filter-btn {
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: 999px;
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--orange); color: var(--orange-dark); }
.filter-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  background: var(--bg-alt);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(23,23,23,0.88) 0%, rgba(23,23,23,0.05) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-item__overlay { opacity: 1; }
.gallery-item__tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ff9f52;
  margin-bottom: 4px;
}
.gallery-item__title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.gallery-item.is-hidden { display: none; }

/* ===== Why us ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.why-card {
  text-align: center;
  padding: 10px;
}
.why-card__icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
}
.why-card__icon svg { width: 30px; height: 30px; color: #ff9f52; }
.why-card h3 { font-size: 17px; }
.why-card p { font-size: 14px; margin: 0; }

/* ===== CTA band ===== */
.cta-band {
  background: var(--gradient-brand);
  border-radius: 24px;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  color: #fff;
  margin: 0 24px;
  max-width: calc(var(--container) - 48px);
  margin-left: auto;
  margin-right: auto;
}
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.9); margin: 0; }
.cta-band .btn--primary { background: #171717; box-shadow: 0 10px 24px -8px rgba(23,23,23,0.5); }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.contact-row:last-child { border-bottom: none; }
.contact-row__icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-row__icon svg { width: 20px; height: 20px; color: var(--orange-dark); }
.contact-row strong { display: block; color: var(--navy); font-size: 15px; margin-bottom: 2px; }
.contact-row span { color: var(--ink-soft); font-size: 14px; }
.contact-visual {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/5;
}
.contact-visual img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Footer ===== */
.footer {
  background: var(--navy);
  color: #c7c2ba;
  padding: 56px 0 26px;
}
.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}
.footer__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer__brand img { height: 40px; }
.footer__brand span { font-weight: 800; font-size: 18px; color: #fff; }
.footer p.small { max-width: 320px; font-size: 14px; }
.footer__links {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}
.footer__col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer__col a, .footer__col span {
  display: block;
  font-size: 14px;
  color: #c7c2ba;
  margin-bottom: 10px;
  transition: color var(--transition);
}
.footer__col a:hover { color: #ff9f52; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #8a857e;
}

/* ===== Floating WhatsApp ===== */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px -8px rgba(37,211,102,0.65);
  animation: pulse 2.4s infinite;
}
.wa-float svg { width: 30px; height: 30px; color: #fff; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.55), 0 12px 28px -8px rgba(37,211,102,0.65); }
  70% { box-shadow: 0 0 0 14px rgba(37,211,102,0), 0 12px 28px -8px rgba(37,211,102,0.65); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0), 0 12px 28px -8px rgba(37,211,102,0.65); }
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(6, 16, 28, 0.94);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox__inner { max-width: 900px; max-height: 86vh; text-align: center; }
.lightbox img { max-width: 100%; max-height: 72vh; border-radius: 10px; margin: 0 auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6); }
.lightbox__caption { color: #fff; margin-top: 18px; font-size: 15px; font-weight: 600; }
.lightbox__caption span { display: block; color: #ff9f52; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }
.lightbox__close, .lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,0.2); }
.lightbox__close { top: 26px; right: 26px; }
.lightbox__nav svg, .lightbox__close svg { width: 20px; height: 20px; }
.lightbox__nav--prev { left: 26px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 26px; top: 50%; transform: translateY(-50%); }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .trust__grid { grid-template-columns: repeat(2, 1fr); }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 520px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-visual { max-width: 480px; margin: 0 auto; }
}

@media (max-width: 760px) {
  .section { padding: 64px 0; }
  .nav { position: fixed; top: 78px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: flex-start; padding: 20px 24px 28px; gap: 6px; box-shadow: var(--shadow); transform: translateY(-140%); opacity: 0; transition: transform var(--transition), opacity var(--transition); }
  .nav.is-open { transform: translateY(0); opacity: 1; }
  .nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .header__actions .hide-mobile { display: none; }
  .lang-toggle--mobile {
    display: inline-flex;
    margin-top: 10px;
    align-self: flex-start;
  }
  .services-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .trust__grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .cta-band { flex-direction: column; text-align: center; padding: 40px 28px; }
  .footer__top { flex-direction: column; }
  .lightbox__nav { width: 38px; height: 38px; }
  .lightbox { padding: 20px; }
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero { padding-top: 140px; }
  .hero__actions .btn { width: 100%; }
}

/* ============ Arabic / RTL support ============ */
html[dir="rtl"] body {
  font-family: "Tajawal", "Poppins", "Segoe UI", Tahoma, sans-serif;
}
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4 {
  font-family: "Tajawal", "Poppins", sans-serif;
}

/* Arabic script doesn't take uppercase/letter-spacing well */
html[dir="rtl"] .eyebrow,
html[dir="rtl"] .gallery-item__tag,
html[dir="rtl"] .lightbox__caption span,
html[dir="rtl"] .filter-btn {
  text-transform: none;
  letter-spacing: normal;
}

html[dir="rtl"] .hero__badge {
  left: auto;
  right: -22px;
}

html[dir="rtl"] .nav a::after {
  left: auto;
  right: 0;
}

html[dir="rtl"] .brand__name {
  letter-spacing: normal;
}

/* Keep phone numbers / brand wordmark left-to-right even inside RTL flow */
html[dir="rtl"] .contact-row span,
html[dir="rtl"] .footer__col a[href^="https://wa.me"],
html[dir="rtl"] .cta-band .btn--primary {
  unicode-bidi: plaintext;
}

@media (max-width: 760px) {
  html[dir="rtl"] .lang-toggle--mobile { align-self: flex-end; }
}
