/* ============================================================
   مؤسسة متر مكعب | project-album.css
   صفحة تفاصيل المشروع + الألبوم
   Colors مأخوذة من style.css الأصلي: #111827 / #00AEEF / #E8352B
   ============================================================ */

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

/* ══ TOKENS ══════════════════════════════════════════════════ */
:root {
  --ink:       #111827;
  --ink-deep:  #0C1220;
  --ink-mid:   #1a2535;
  --teal:      #00AEEF;
  --teal-dark: #0093CC;
  --red:       #E8352B;
  --white:     #FFFFFF;
  --off-white: #F4F6F9;
  --border:    #E2E8F0;
  --text:      #1E293B;
  --muted:     #64748B;
  --green:     #16A34A;
  --ease:      cubic-bezier(0.25,0.46,0.45,0.94);
}

/* ══ RESET ═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html  { scroll-behavior: smooth; -webkit-text-size-adjust: 100% }
body  {
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--off-white);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img   { max-width: 100%; height: auto; display: block }
a     { text-decoration: none; color: inherit }
ul    { list-style: none }
button{ font-family: inherit; cursor: pointer; border: none; background: none }
.container { width: 90%; max-width: 1100px; margin: 0 auto }

/* ══ HEADER ══════════════════════════════════════════════════ */
.album-header {
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(12,18,32,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,174,239,0.15);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 40px);
  gap: 16px;
}

/* زر الرجوع */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  padding: 8px 14px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.back-btn:hover { color: var(--white); border-color: rgba(0,174,239,0.4); background: rgba(0,174,239,0.08) }
.back-btn svg { flex-shrink: 0; stroke: var(--teal) }

/* لوجو */
.header-brand {
  display: flex;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.header-logo { height: 38px; width: auto; object-fit: contain }
.header-logo-fb {
  display: none;
  font-size: 18px;
  font-weight: 900;
  color: var(--white);
}

/* زر التواصل */
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: var(--teal);
  padding: 9px 20px;
  border-radius: 7px;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.contact-btn:hover { background: var(--teal-dark); transform: translateY(-2px) }
.contact-btn svg { flex-shrink: 0 }

/* ══ HERO ════════════════════════════════════════════════════ */
.album-hero {
  position: relative;
  height: clamp(300px, 50vh, 520px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink-deep);
}
.hero-img-wrap {
  position: absolute;
  inset: 0;
}
.hero-bg-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.75);
  scale: 1.04;
  transition: scale 8s ease;
}
.album-hero:hover .hero-bg-img { scale: 1 }

/* placeholder لو الصورة مش موجودة */
.hero-img-wrap.no-img {
  background: linear-gradient(135deg, #141c2b, #1a2535);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(12,18,32,0.96) 0%, rgba(12,18,32,0.4) 55%, transparent 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(24px, 4vw, 52px) clamp(20px, 5vw, 60px);
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}
.proj-cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(0,174,239,0.10);
  border: 1px solid rgba(0,174,239,0.25);
  padding: 5px 14px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.proj-title {
  font-size: clamp(24px, 4vw, 46px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 16px;
}
.proj-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
}
.meta-item svg { stroke: var(--teal); flex-shrink: 0 }
.meta-sep { color: rgba(255,255,255,0.2); font-size: 18px }

/* ══ PROJECT BODY ════════════════════════════════════════════ */
.proj-body {
  padding: 64px 0 80px;
}
.proj-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  margin-bottom: 72px;
}

/* Description */
.proj-desc {}
.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--teal);
  display: inline-block;
}
.proj-desc p {
  font-size: 15px;
  line-height: 2;
  color: var(--muted);
  margin-bottom: 18px;
}
.proj-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 28px 0 40px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.spec-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
}
.spec-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.spec-val.ok { color: var(--green) }

.works-list { padding-right: 4px }
.works-list li {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.8;
  padding: 8px 0 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.works-list li::before {
  content: '';
  flex-shrink: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  margin-top: 8px;
}
body[dir="rtl"] .works-list li { padding: 8px 0 }

/* Sidebar */
.proj-sidebar { display: flex; flex-direction: column; gap: 20px }

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.sidebar-card h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--off-white);
  font-size: 13.5px;
}
.info-row span { color: var(--muted) }
.info-row strong { color: var(--ink); font-weight: 700 }
.sidebar-cta {
  display: block;
  margin-top: 22px;
  text-align: center;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  padding: 13px 20px;
  border-radius: 9px;
  transition: all 0.25s var(--ease);
}
.sidebar-cta:hover { background: var(--teal-dark); transform: translateY(-2px) }

.contact-card { background: var(--ink-deep) }
.contact-card h3 { color: rgba(255,255,255,0.55); border-bottom-color: rgba(255,255,255,0.07) }
.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.2s;
}
.contact-link:hover { color: var(--teal) }
.contact-link svg { stroke: var(--teal); flex-shrink: 0 }
.wa-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  background: #25D366;
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 9px;
  transition: all 0.25s var(--ease);
}
.wa-btn:hover { background: #1EBE57; transform: translateY(-2px) }
.wa-btn svg { fill: var(--white); flex-shrink: 0 }

/* ══ GALLERY ═════════════════════════════════════════════════ */
.gallery-section { }
.gallery-hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  margin-top: -10px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--ink-mid);
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease), filter 0.4s ease;
  filter: brightness(0.9);
}
.gallery-item:hover img {
  transform: scale(1.07);
  filter: brightness(0.75);
}
/* Placeholder لو الصورة مش موجودة */
.gallery-item.ph {
  background: linear-gradient(135deg, #141c2b, #1a2535);
  display: flex; align-items: center; justify-content: center;
}
.gallery-item.ph::before {
  content: '📷';
  font-size: 36px;
  opacity: 0.15;
}
.gallery-item.ph img { display: none }

.gi-overlay {
  position: absolute; inset: 0;
  background: rgba(0,174,239,0.12);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gi-overlay svg { stroke: var(--white); filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4)) }
.gallery-item:hover .gi-overlay { opacity: 1 }

/* ══ LIGHTBOX ════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.open { display: flex }

.lb-img-wrap {
  max-width: min(90vw, 1000px);
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img-wrap img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  transition: opacity 0.15s ease;
}

.lb-close {
  position: fixed;
  top: 18px;
  inset-inline-end: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 9001;
}
.lb-close:hover { background: rgba(232,53,43,0.5); transform: rotate(90deg) }
.lb-close svg { stroke: var(--white) }

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 9001;
}
.lb-prev { inset-inline-end: 20px }
.lb-next { inset-inline-start: 20px }
.lb-nav:hover { background: rgba(0,174,239,0.35); transform: translateY(-50%) scale(1.08) }
.lb-nav svg { stroke: var(--white) }

.lb-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  background: rgba(0,0,0,0.4);
  padding: 5px 14px;
  border-radius: 20px;
  z-index: 9001;
}

/* ══ FOOTER ══════════════════════════════════════════════════ */
.album-footer {
  background: var(--ink-deep);
  border-top: 1px solid rgba(0,174,239,0.10);
  padding: 28px 0;
}
.album-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  flex-wrap: wrap;
}
.album-footer a {
  color: var(--teal);
  font-weight: 700;
  transition: color 0.2s;
}
.album-footer a:hover { color: var(--teal-dark) }

/* ══ RESPONSIVE ══════════════════════════════════════════════ */

/* ── Tablet landscape (≤ 1024px) ── */
@media (max-width: 1024px) {
  .proj-layout { gap: 32px }
}

/* ── Tablet portrait (≤ 900px) ── */
@media (max-width: 900px) {
  .proj-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .proj-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .proj-body { padding: 48px 0 64px }
}

/* ── Large mobile (≤ 640px) ── */
@media (max-width: 640px) {
  .gallery-grid  { grid-template-columns: 1fr 1fr }
  .proj-sidebar  { grid-template-columns: 1fr }
  .proj-specs    { grid-template-columns: 1fr 1fr }
  .album-header  { padding: 0 14px; gap: 10px }
  .contact-btn   { font-size: 12px; padding: 8px 12px }
  .proj-body     { padding: 36px 0 52px }
  .proj-layout   { margin-bottom: 48px }
  .album-hero    { height: clamp(240px, 45vw, 340px) }
  .proj-title    { font-size: clamp(20px, 6vw, 32px) }
  .section-title { font-size: 18px }
  .sidebar-card  { padding: 20px }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .album-header  { height: 56px; padding: 0 12px }
  .back-btn      { padding: 7px 11px; font-size: 12px }
  .back-btn .back-ar { display: none }
  .contact-btn span  { display: none }
  .contact-btn   { padding: 8px 10px }
  .header-brand  { position: static; transform: none }
  .album-footer .container { justify-content: center; text-align: center }
  .lb-prev { inset-inline-end: 8px }
  .lb-next { inset-inline-start: 8px }
  .lb-nav  { width: 40px; height: 40px }
}

/* ── Small mobile (≤ 380px) ── */
@media (max-width: 380px) {
  .gallery-grid { grid-template-columns: 1fr }
  .header-brand { display: none }
  .proj-specs   { grid-template-columns: 1fr }
}

/* ══ TOUCH: تأثيرات Hover تنشط بلمس على الجوال ═══════════ */
@media (hover: none) {
  .gallery-item .gi-overlay { opacity: 0.65 }
  .gallery-item img { filter: brightness(0.82) }
  .lb-nav   { width: 48px; height: 48px }
  .lb-close { width: 48px; height: 48px }
}

/* ══ منع iOS zoom على الـ input ═══════════════════════════ */
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px }
}
