/* =====================================================================
   حمد القيضي — أنماط الموقع + لوحة التحكم
   هوية: كحلي غامق + ذهبي + رملي
   ===================================================================== */

:root {
  --ink-950: #0a0f1a;
  --ink-900: #0e1524;
  --ink-800: #152036;
  --ink-700: #1e2c48;
  --ink-600: #2a3c60;
  --sand: #e8e2d6;
  --accent: #c8a866;
  --white: #ffffff;
  --danger: #f87171;
  --success: #34d399;
  --radius: 16px;
  --radius-sm: 12px;
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.05);
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --max: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--ink-950);
  color: var(--sand);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(200, 168, 102, 0.3);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-inline: 1.5rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 12px;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.2s ease;
  background: transparent;
  text-align: center;
  line-height: 1.3;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink-950);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--sand);
}

.btn-ghost:hover {
  border-color: rgba(200, 168, 102, 0.6);
  color: var(--accent);
}

.btn-danger {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.1);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
}

.btn-block {
  width: 100%;
}

/* Cards / forms */
.card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(14, 21, 36, 0.85);
  backdrop-filter: blur(8px);
}

.input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(21, 32, 54, 0.7);
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--sand);
  outline: none;
  transition: border-color 0.2s;
}

.input:focus {
  border-color: rgba(200, 168, 102, 0.6);
}

.input::placeholder {
  color: rgba(232, 226, 214, 0.35);
}

.label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(232, 226, 214, 0.7);
}

.section-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  color: var(--white);
}

.section-kicker {
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  /* لا letter-spacing على العربية — يقطع الحروف المتصلة */
  letter-spacing: 0;
  word-spacing: 0.05em;
  line-height: 1.6;
  color: var(--accent);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  height: 2.5rem;
  width: auto;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
  line-height: 1.25;
}

.brand-ar {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  white-space: nowrap;
}

.brand-en {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0.95;
  /* إنجليزي LTR حتى لا يتداخل مع اتجاه RTL */
  direction: ltr;
  unicode-bidi: isolate;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-desktop a:not(.btn) {
  font-size: 0.875rem;
  color: rgba(232, 226, 214, 0.8);
  transition: color 0.2s;
}

.nav-desktop a:not(.btn):hover {
  color: var(--accent);
}

.nav-toggle {
  display: inline-flex;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--sand);
  padding: 0.5rem;
  cursor: pointer;
}

.nav-mobile {
  border-top: 1px solid var(--border-soft);
  background: var(--ink-950);
  padding: 0.75rem 1rem 1rem;
}

.nav-mobile a {
  display: block;
  padding: 0.65rem 0;
  font-size: 0.875rem;
  color: rgba(232, 226, 214, 0.8);
}

.nav-mobile a.btn {
  margin-top: 0.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
  .nav-toggle,
  .nav-mobile {
    display: none !important;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--ink-950);
  background-size: cover;
  background-position: center;
  min-height: 56vh;
  /* انترو خفيف للخلفية */
  animation: hero-bg-in 1.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-inner {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 56vh;
  padding: 4rem 1.25rem 0;
}

.hero-triangles {
  position: absolute;
  right: calc(50% + 110px);
  top: 24%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0.9;
  pointer-events: none;
  z-index: 2;
}

.hero-triangles span {
  display: block;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 11px solid #fff;
  opacity: 0;
  animation: hero-tri-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-triangles span:nth-child(1) {
  animation-delay: 0.85s;
}

.hero-triangles span:nth-child(2) {
  animation-delay: 1s;
}

.hero-triangles span:nth-child(3) {
  animation-delay: 1.15s;
}

.hero-photo {
  width: min(380px, 52vw);
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  animation: hero-photo-in 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
  will-change: transform, opacity;
}

.hero-logo {
  position: relative;
  z-index: 2;
  margin-inline-end: -70px;
  margin-bottom: clamp(60px, 14vw, 150px);
  width: min(300px, 38vw);
  opacity: 0;
  transform: translateY(16px) translateX(10px);
  animation: hero-logo-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
  will-change: transform, opacity;
  pointer-events: none;
}

.hero-fade {
  pointer-events: none;
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 7rem;
  background: linear-gradient(to bottom, transparent, var(--ink-950));
  opacity: 0;
  animation: hero-fade-in 0.9s ease 0.4s both;
}

@keyframes hero-bg-in {
  from {
    opacity: 0.35;
    background-size: 108% auto;
  }
  to {
    opacity: 1;
    background-size: cover;
  }
}

@keyframes hero-photo-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hero-logo-in {
  from {
    opacity: 0;
    transform: translateY(16px) translateX(10px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(0);
    filter: blur(0);
  }
}

@keyframes hero-tri-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.6);
  }
  to {
    opacity: 0.9;
    transform: translateY(0) scale(1);
  }
}

@keyframes hero-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* جوال: الشعار أسفل الصورة، في المنتصف، ومتداخل معها قليلاً */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
  }

  .hero-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-height: min(72vh, 640px);
    padding: 3.25rem 1rem 2.75rem;
  }

  .hero-photo {
    width: min(320px, 78vw);
    z-index: 1;
    margin: 0 auto;
    display: block;
  }

  .hero-logo {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 1.35rem;
    z-index: 3;
    width: min(250px, 74vw);
    max-width: 74vw;
    height: auto;
    margin: 0;
    margin-inline: 0 !important;
    margin-inline-end: 0 !important;
    /* منتصف الشاشة أفقياً + تداخل خفيف فوق أسفل الصورة */
    transform: translateX(-50%);
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
    animation-name: hero-logo-in-mobile;
    animation-fill-mode: both;
  }

  .hero-triangles {
    right: auto;
    left: auto;
    top: 18%;
    inset-inline-start: 12%;
    gap: 5px;
  }

  .hero-triangles span {
    border-left-width: 6px;
    border-right-width: 6px;
    border-bottom-width: 9px;
  }

  .hero-fade {
    height: 5.5rem;
  }
}

@media (max-width: 400px) {
  .hero-logo {
    bottom: 1.1rem;
    width: min(220px, 80vw);
  }
}

@keyframes hero-logo-in-mobile {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(18px);
    filter: blur(4px) drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    filter: blur(0) drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .hero-photo,
  .hero-logo,
  .hero-fade,
  .hero-triangles span {
    animation: none !important;
    opacity: 1 !important;
    filter: none !important;
  }

  .hero-photo {
    transform: none !important;
  }

  .hero-logo {
    transform: none !important;
  }

  @media (max-width: 768px) {
    .hero-logo {
      /* الإبقاء على التوسيط الأفقي حتى مع تقليل الحركة */
      transform: translateX(-50%) !important;
      filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45)) !important;
    }
  }
}

/* Works */
.section {
  padding-block: 3.5rem;
  scroll-margin-top: 5rem;
}

.section-head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.section-head.mb-lg {
  margin-bottom: 2.5rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.pill {
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: rgba(232, 226, 214, 0.7);
  cursor: pointer;
  transition: 0.2s;
}

.pill:hover {
  border-color: rgba(200, 168, 102, 0.5);
  color: var(--accent);
}

.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink-950);
}

.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}

@media (min-width: 640px) {
  .works-grid {
    grid-template-columns: 1fr 1fr;
  }
  .work-card.wide {
    grid-column: span 2;
  }
}

.work-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink-900);
}

.work-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.work-card.wide .work-card-media {
  aspect-ratio: 16 / 10;
}

@media (min-width: 640px) {
  .work-card.wide .work-card-media {
    aspect-ratio: 21 / 8;
  }
}

.work-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-card:hover .work-card-media img {
  transform: scale(1.04);
}

.work-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink-950);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
}

.work-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  background: linear-gradient(to top, rgba(10, 15, 26, 0.92), rgba(10, 15, 26, 0.1), transparent);
  opacity: 1;
  transition: opacity 0.3s;
}

@media (min-width: 640px) {
  .work-overlay {
    opacity: 0;
  }
  .work-card:hover .work-overlay,
  .work-card:focus-visible .work-overlay {
    opacity: 1;
  }
}

.work-cat {
  font-size: 0.75rem;
  color: var(--accent);
}

.work-title {
  margin: 0.15rem 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}

.work-meta {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: rgba(232, 226, 214, 0.6);
}

.empty-state {
  text-align: center;
  padding: 2.5rem;
  color: rgba(232, 226, 214, 0.6);
}

/* Partners — off-white; no box bg/border; equal visual logo scale */
.partners-section {
  border-block: 1px solid rgba(15, 23, 42, 0.08);
  background: #f4f1ea;
  overflow: clip;
  color: #1a2438;
}

.partners-section .section-kicker {
  color: #a8843a;
}

.partners-section .section-title {
  color: #0f172a;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 0.5rem;
  align-items: stretch;
}

@media (min-width: 640px) {
  .partners-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 0.75rem;
  }
}

@media (min-width: 1024px) {
  .partners-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.15rem 1rem;
  }
}

/* مساحة خلية موحّدة — بدون خلفية/حدود/ظل */
.partner-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 8rem;
  padding: 0.75rem;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

@media (min-width: 640px) {
  .partner-tile {
    height: 9rem;
    padding: 0.9rem;
  }
}

@media (min-width: 1024px) {
  .partner-tile {
    height: 9.5rem;
    padding: 1rem;
  }
}

/*
  صندوق الشعار: width+height ثابتان على img + object-fit:contain
  → يكبّر الشعار الصغير ويصغّر الكبير لنفس المساحة البصرية
*/
.partner-logo {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 11.5rem;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: none;
}

@media (min-width: 640px) {
  .partner-logo {
    max-width: 13rem;
  }
}

@media (min-width: 1024px) {
  .partner-logo {
    max-width: 14rem;
  }
}

.partner-logo img,
.partner-tile img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: contain;
  object-position: center;
  /* وضوح أعلى من رمادي باهت جداً */
  filter: grayscale(100%) contrast(1.15);
  opacity: 1;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.partner-tile:hover img {
  filter: none;
  transform: scale(1.04);
}

/* Packages */
.packages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .packages-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .packages-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.package-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.package-card h3 {
  margin: 0;
  font-size: 1.125rem;
  color: var(--white);
}

.package-price-note {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: rgba(232, 226, 214, 0.6);
}

.package-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.package-desc {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: rgba(232, 226, 214, 0.7);
  line-height: 1.6;
}

.package-features {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  flex: 1;
}

.package-features li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.875rem;
  color: rgba(232, 226, 214, 0.8);
  margin-bottom: 0.5rem;
}

.package-features .check {
  color: var(--accent);
  margin-top: 0.15rem;
}

.package-card .btn {
  margin-top: 1.25rem;
  width: 100%;
}

/* About */
.about-card {
  max-width: 48rem;
  margin-inline: auto;
  padding: 2rem;
  text-align: center;
}

.about-card p {
  margin: 0;
  line-height: 1.9;
  color: rgba(232, 226, 214, 0.85);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.stat-box {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(21, 32, 54, 0.6);
  padding: 1rem 0.75rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: rgba(232, 226, 214, 0.7);
}

/* Booking */
.booking-section {
  border-top: 1px solid var(--border-soft);
  background: rgba(14, 21, 36, 0.4);
}

.booking-wrap {
  max-width: 48rem;
  margin-inline: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
    padding: 2rem;
  }
  .form-span-2 {
    grid-column: span 2;
  }
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.success-box {
  padding: 2rem;
  text-align: center;
}

.success-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: rgba(14, 21, 36, 0.5);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-block: 2.5rem;
  text-align: center;
}

.footer-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}

.footer-en {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--accent);
}

.footer-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: rgba(232, 226, 214, 0.7);
}

.footer-contacts a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(232, 226, 214, 0.4);
}

.footer-credit {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: rgba(232, 226, 214, 0.45);
  letter-spacing: 0;
  line-height: 1.7;
}

.footer-credit a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.footer-credit a:hover {
  color: #e0c48a;
  border-bottom-color: rgba(200, 168, 102, 0.55);
}

/* Project page */
.project-page {
  padding-block: 3rem;
}

.back-link {
  font-size: 0.875rem;
  color: rgba(232, 226, 214, 0.6);
}

.back-link:hover {
  color: var(--accent);
}

.project-cat {
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--accent);
}

.project-title {
  margin: 0.35rem 0 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--white);
}

.project-client {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: rgba(232, 226, 214, 0.6);
}

.project-desc {
  margin-top: 0.75rem;
  max-width: 48rem;
  color: rgba(232, 226, 214, 0.8);
  line-height: 1.8;
}

/* ---- Bento gallery — موبايل متنوع / دسكتوب متوازن 3 أعمدة ---- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 0.65rem;
  margin-top: 2.5rem;
  align-items: stretch;
}

.bento-item {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--ink-800);
  cursor: zoom-in;
  isolation: isolate;
}

.bento-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 15, 26, 0.35), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

.bento-item:hover::after,
.bento-item:focus-visible::after {
  opacity: 1;
}

.bento-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bento-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}

.bento-item:hover img,
.bento-item:focus-visible img {
  transform: scale(1.045);
  filter: brightness(1.04);
}

/* —— موبايل فقط: البنتو الحالي (ممتاز) —— */
@media (max-width: 767.98px) {
  .bento-std {
    grid-column: span 1;
    grid-row: span 1;
    aspect-ratio: 1 / 1.05;
  }

  .bento-wide {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 16 / 10;
  }

  .bento-tall {
    grid-column: span 1;
    grid-row: span 2;
    aspect-ratio: 3 / 4;
    min-height: 19rem;
  }

  .bento-feature,
  .bento-hero {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: 4 / 5;
    min-height: 18rem;
  }
}

/* —— تابلت: عمودان + إيقاع 2×2 يملأ الصف —— */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 14rem;
    gap: 0.85rem;
  }

  .bento-item,
  .bento-std,
  .bento-wide,
  .bento-tall,
  .bento-feature,
  .bento-hero {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
    height: 100%;
  }

  /* صورة كبيرة كل 5: صفّان × عمودان يسار + خليتان يمين */
  .bento-grid > .bento-item:nth-child(5n + 1) {
    grid-column: span 1 !important;
    grid-row: span 2 !important;
  }

  .bento-grid[data-bento-count="1"] > .bento-item {
    grid-column: 1 / -1 !important;
    grid-row: span 2 !important;
    min-height: 22rem !important;
  }
}

/* —— دسكتوب: 3 أعمدة + ارتفاع صف ثابت + بنتو بدون فراغات —— */
@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 17.5rem;
    grid-auto-flow: dense;
    gap: 1rem;
  }

  /* إلغاء مقاسات الموبايل العشوائية — كلها خلايا قياسية أولاً */
  .bento-item,
  .bento-std,
  .bento-wide,
  .bento-tall,
  .bento-feature,
  .bento-hero {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
    height: 100%;
  }

  /*
    إيقاع بنتو يملأ 3 أعمدة دائماً:
    1) كبيرة 2×2  |  2) عادية  |  ( fore )
                 |  3) عادية  |
    4) عادية | 5) عادية | 6) عادية
  */
  .bento-grid > .bento-item:nth-child(6n + 1) {
    grid-column: span 2 !important;
    grid-row: span 2 !important;
  }

  /* تنويع خفيف: خلية طويلة في نهاية كل دورة */
  .bento-grid > .bento-item:nth-child(6n + 5) {
    grid-row: span 1 !important;
  }

  /* مشروع بصورة واحدة */
  .bento-grid[data-bento-count="1"] > .bento-item {
    grid-column: 1 / -1 !important;
    grid-row: span 2 !important;
    min-height: 28rem !important;
  }

  /* صورتان: نصفين متساويين */
  .bento-grid[data-bento-count="2"] > .bento-item {
    grid-column: span 1 !important;
    grid-row: span 2 !important;
  }

  .bento-grid[data-bento-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 3 صور: ثلاثة متساوية */
  .bento-grid[data-bento-count="3"] > .bento-item {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    min-height: 20rem;
  }

  /* 4 صور: كبيرة + اثنتان + عريضة */
  .bento-grid[data-bento-count="4"] > .bento-item:nth-child(1) {
    grid-column: span 2 !important;
    grid-row: span 2 !important;
  }

  .bento-grid[data-bento-count="4"] > .bento-item:nth-child(4) {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
}

/* توافق قديم إن وُجد masonry في صفحات أخرى */
.masonry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 2.5rem;
}

@media (min-width: 1024px) {
  .masonry {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.masonry-item {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 4 / 5;
}

.masonry-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.4s ease;
}

.masonry-item:hover img {
  transform: scale(1.03);
  opacity: 0.9;
}

.cta-box {
  margin-top: 3rem;
  border-radius: var(--radius);
  border: 1px solid rgba(200, 168, 102, 0.25);
  background: rgba(200, 168, 102, 0.05);
  padding: 2rem;
  text-align: center;
}

.cta-box h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--white);
}

.cta-box p {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: rgba(232, 226, 214, 0.7);
}

.cta-box .btn {
  margin-top: 1.25rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  padding: 1rem;
}

.lightbox.open {
  display: flex;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  padding: 0.65rem;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  border-color: var(--accent);
}

.lightbox-close {
  top: 1rem;
  left: 1rem;
}

.lightbox-prev {
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-stage {
  max-width: 64rem;
  width: 100%;
  text-align: center;
}

.lightbox-stage img {
  max-height: 88vh;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-counter {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Alerts */
.alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.alert-success {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

.alert-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

/* =====================================================================
   Admin
   ===================================================================== */

.admin-body {
  min-height: 100vh;
  background: var(--ink-950);
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  display: none;
  width: 15rem;
  flex-shrink: 0;
  flex-direction: column;
  border-left: 1px solid var(--border-soft);
  background: rgba(14, 21, 36, 0.7);
  padding: 1rem;
}

@media (min-width: 768px) {
  .admin-sidebar {
    display: flex;
  }
}

.admin-brand {
  display: block;
  margin-bottom: 1.5rem;
  padding-inline: 0.5rem;
}

.admin-brand-title {
  font-weight: 700;
  color: var(--white);
}

.admin-brand-sub {
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.admin-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-nav a {
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
  color: rgba(232, 226, 214, 0.7);
  transition: 0.15s;
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--sand);
}

.admin-nav a.active {
  background: rgba(200, 168, 102, 0.15);
  color: var(--accent);
  font-weight: 700;
}

.admin-sidebar-foot {
  border-top: 1px solid var(--border-soft);
  padding-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-sidebar-foot a {
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: rgba(232, 226, 214, 0.7);
}

.admin-sidebar-foot a:hover {
  color: var(--accent);
}

.text-danger {
  color: #fca5a5 !important;
}

.admin-main {
  flex: 1;
  min-width: 0;
}

.admin-mobile-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(10, 15, 26, 0.95);
  padding: 0.5rem 0.75rem;
  backdrop-filter: blur(8px);
}

.admin-mobile-nav a {
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  color: rgba(232, 226, 214, 0.7);
}

.admin-mobile-nav a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink-950);
  font-weight: 700;
}

@media (min-width: 768px) {
  .admin-mobile-nav {
    display: none;
  }
}

.admin-content {
  padding: 1rem;
}

@media (min-width: 640px) {
  .admin-content {
    padding: 2rem;
  }
}

.admin-page-title {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .stats-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  padding: 1.25rem;
}

.stat-card .num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-card .lbl {
  font-size: 0.8rem;
  color: rgba(232, 226, 214, 0.65);
  margin-top: 0.25rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(14, 21, 36, 0.7);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

table.data th,
table.data td {
  padding: 0.75rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

table.data th {
  font-size: 0.75rem;
  color: rgba(232, 226, 214, 0.55);
  font-weight: 600;
  white-space: nowrap;
}

table.data tr:last-child td {
  border-bottom: 0;
}

table.data .thumb {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--ink-800);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-new {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.3);
}

.badge-contacted {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-confirmed {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-completed {
  background: rgba(20, 184, 166, 0.15);
  color: #5eead4;
  border-color: rgba(20, 184, 166, 0.3);
}

.badge-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.badge-on {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.3);
}

.badge-off {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(232, 226, 214, 0.55);
  border-color: var(--border);
}

.badge-featured {
  background: rgba(200, 168, 102, 0.2);
  color: var(--accent);
  border-color: rgba(200, 168, 102, 0.35);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tabs a {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  color: rgba(232, 226, 214, 0.7);
}

.tabs a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink-950);
  font-weight: 700;
}

.form-card {
  padding: 1.5rem;
  max-width: 48rem;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 26rem;
  padding: 2rem;
}

.login-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  color: var(--white);
  text-align: center;
}

.login-card .sub {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(232, 226, 214, 0.55);
  margin-bottom: 1.5rem;
}

/* Media library */
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .media-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .media-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.media-item {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--ink-900);
  overflow: hidden;
}

.media-item .preview {
  aspect-ratio: 1;
  background: var(--ink-800);
  overflow: hidden;
}

.media-item .preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-item .meta {
  padding: 0.65rem;
  font-size: 0.7rem;
  color: rgba(232, 226, 214, 0.65);
}

.media-item .meta .name {
  color: var(--sand);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.media-item .meta .actions {
  margin-top: 0.5rem;
}

.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  color: rgba(232, 226, 214, 0.6);
  background: rgba(21, 32, 54, 0.35);
  transition: 0.2s;
  cursor: pointer;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(200, 168, 102, 0.08);
  color: var(--accent);
}

.dropzone input[type="file"] {
  display: none;
}

/* Project images editor */
.pi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .pi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pi-item {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--ink-800);
}

.pi-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.pi-item.is-cover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.pi-item .pi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.4rem;
  background: rgba(10, 15, 26, 0.9);
}

.pi-item .pi-actions form {
  display: inline;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  padding: 1rem;
}

.modal.open {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 56rem;
  max-height: 90vh;
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--ink-900);
  padding: 1.25rem;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-head h3 {
  margin: 0;
  color: var(--white);
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .modal-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.modal-pick {
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--ink-800);
  padding: 0;
}

.modal-pick.selected {
  border-color: var(--accent);
}

.modal-pick img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.muted {
  color: rgba(232, 226, 214, 0.55);
  font-size: 0.8rem;
}

.inline-form {
  display: inline;
}

details.request-details {
  margin-top: 0.5rem;
}

details.request-details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.8rem;
}

.notes-box {
  margin-top: 0.5rem;
  width: 100%;
}

.w-full {
  width: 100%;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

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

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
