/*
  Future of Creativity — Fullscreen Hero + Header Fixed
*/

:root {
  --color-primary: #0b3d2e;
  --color-accent: #c4a356;
  --color-bg: #000000;
  --color-text: #ffffff;
  --color-dim: #cccccc;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  transition: opacity 0.25s ease;
}

/* Page state helpers */
body.no-scroll { overflow: hidden; }
body.page-leave { opacity: 0; }

/* HEADER */
.modern-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 60px;
  z-index: 1000;
  background: transparent;
  transition: background 0.3s ease;
}
.modern-header.scrolled {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

/* LOGO */
.logo img {
  height: 100px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* RIGHT SIDE */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* CONTACT BUTTON */
.contact-btn {
  border: 1px solid var(--color-text);
  color: var(--color-text);
  text-decoration: none;
  padding: 8px 18px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s;
}
.contact-btn:hover {
  background: var(--color-text);
  color: #000;
}

/* HAMBURGER */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 4px;
  position: relative;
  z-index: 1001;
}
.menu-toggle span {
  width: 28px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s, opacity 0.3s;
}
.menu-toggle:hover span:first-child { transform: translateY(-2px); }
.menu-toggle:hover span:last-child { transform: translateY(2px); }
.menu-toggle.active span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle.active span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* SIDE MENU */
.side-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 280px;
  height: 100vh;
  background: #000;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.6);
  padding: 100px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: right 0.35s ease;
  z-index: 999;
}
.side-menu.open { right: 0; }
.side-menu ul { list-style: none; }
.side-menu a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
  transition: color 0.25s;
}
.side-menu a:hover { color: var(--color-accent); }

/* HERO SECTION */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
.hero video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* SCROLL DOWN INDICATOR */
.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  text-decoration: none;
  z-index: 3;
}
.scroll-down span {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.scroll-down .arrow {
  width: 24px;
  height: 24px;
  margin: 0 auto;
  animation: bounce 1.5s infinite;
  text-indent: -9999px; /* hide any fallback text */
  overflow: hidden;
}
/* Draw a down arrow using CSS so markup text is irrelevant */
.scroll-down .arrow::before {
  content: '';
  display: block;
  width: 0; height: 0;
  margin: 0 auto;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid #fff;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ===== WhatsApp Floating Icon ===== */
.whatsapp-float {
  position: fixed;
  top: 50%;
  right: 25px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-image: url('../images/whatsapp.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border-radius: 12px;
  border: 2px solid #1ebe5d;
  z-index: 999999;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.95;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}
.whatsapp-float:hover {
  transform: translateY(-50%) scale(1.1);
  filter: brightness(1.2);
  box-shadow: 0 0 20px var(--color-accent);
}

/* ===== Shared Grid Style (Services + Projects) ===== */
.services-grid,
.projects-grid .grid-container {
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 100px auto 60px;
  padding: 0;
}

/* Services: 3 columns (2 rows for 6 items) */
.services-grid { grid-template-columns: repeat(3, 1fr); }

/* Projects pages: 4 columns (2 rows for 8 items) */
.projects-grid .grid-container { grid-template-columns: repeat(4, 1fr); }

.service-item {
  position: relative;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.9s ease forwards;
}
.service-item:nth-child(1) { animation-delay: 0.1s; }
.service-item:nth-child(2) { animation-delay: 0.25s; }
.service-item:nth-child(3) { animation-delay: 0.4s; }
.service-item:nth-child(4) { animation-delay: 0.55s; }
.service-item:nth-child(5) { animation-delay: 0.7s; }
.service-item:nth-child(6) { animation-delay: 0.85s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.service-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.4s ease;
  z-index: 1;
}

.service-item h3 {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
  z-index: 2;
  transition: color 0.3s ease, transform 0.3s ease;
}

/* Project cards mirror service cards */
.project-item {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.9s ease forwards;
}
.project-item:nth-child(1) { animation-delay: 0.1s; }
.project-item:nth-child(2) { animation-delay: 0.25s; }
.project-item:nth-child(3) { animation-delay: 0.4s; }
.project-item:nth-child(4) { animation-delay: 0.55s; }
.project-item:nth-child(5) { animation-delay: 0.7s; }
.project-item:nth-child(6) { animation-delay: 0.85s; }

.project-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.4s ease;
  z-index: 1;
}

.project-item h3 {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
  z-index: 2;
  transition: color 0.3s ease, transform 0.3s ease;
}

.project-item:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}
.project-item:hover .overlay { background: rgba(0, 0, 0, 0.65); }
.project-item:hover h3 {
  color: var(--color-accent);
  transform: translateX(-50%) scale(1.05);
}

.service-item:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}
.service-item:hover .overlay { background: rgba(0, 0, 0, 0.65); }
.service-item:hover h3 {
  color: var(--color-accent);
  transform: translateX(-50%) scale(1.05);
}

/* ===== Clients Section (Animated Slider Restored) ===== */
.clients-section {
  text-align: center;
  padding: 100px 0 80px;
  overflow: hidden;
  position: relative;
  background: #000;
}

.clients-section h2 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 60px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* الحركة السلسة */
.logo-track {
  display: flex;
  align-items: center;
  gap: 120px;
  width: max-content;
  animation: scrollLeft 45s linear infinite;
}

.logo-track img {
  height: 120px;
  width: auto;
  background: #000;
  border-radius: 12px;
  padding: 12px;
  filter: grayscale(100%) brightness(0.9);
  opacity: 0.85;
  transition: transform 0.5s ease, filter 0.5s ease, opacity 0.5s ease;
}

/* تأثير الإضاءة والتكبير عند المرور */
.logo-track img:hover {
  transform: scale(1.3);
  filter: grayscale(0%) brightness(1.3);
  opacity: 1;
}

/* الحركة */
@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Focus rings for accessibility */
.side-menu a:focus { outline: 2px solid var(--color-accent); outline-offset: 2px; }


/* ===== Projects Section ===== */
.projects-grid {
  text-align: center;
  padding: 100px 0 80px;
  background: #000;
}
.projects-grid .section-title {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== Projects slider ===== */
.projects-slider { position: relative; overflow: hidden; }
.projects-slider .slides { display: flex; transition: transform 0.45s ease; will-change: transform; }
.projects-slider .slide { min-width: 100%; }

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.slider-dots .dot {
  width: 10px; height: 10px;
  border-radius: 999px;
  border: none; cursor: pointer;
  background: #555;
  transition: transform 0.25s ease, background 0.25s ease;
}
.slider-dots .dot.active {
  background: var(--color-accent);
  transform: scale(1.2);
}

/* ===== Contact Slice ===== */
.contact-slice { background: #000; padding: 80px 0 120px; }
.contact-inner { width: min(1200px, 92%); margin: 0 auto; }
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.eyebrow { color: var(--color-accent); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; font-size: 13px; }
.contact-title { font-size: 44px; font-weight: 800; line-height: 1.1; margin-bottom: 14px; color: #fff; }
.contact-lead { color: var(--color-dim); line-height: 1.7; margin-bottom: 26px; max-width: 560px; }
.info-list { list-style: none; display: grid; gap: 22px; margin: 0; padding: 0; }
.info-item { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; }
.icon-circle { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,0.06); display: grid; place-items: center; color: var(--color-accent); }
.info-text h4 { margin: 0 0 6px; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; }
.info-text p { margin: 0; color: #cfd2d4; }
.info-text a { color: #cfd2d4; text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,0.2); }
.info-text a:hover { color: #fff; border-bottom-color: var(--color-accent); }

.contact-card { background: rgba(255,255,255,0.05); border: 1px solid #1c1c1c; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.contact-form { display: grid; gap: 14px; }
.form-control { width: 100%; padding: 14px 16px; background: rgba(255,255,255,0.06); border: 1px solid #1d1f22; border-radius: 10px; color: #fff; outline: none; transition: border 0.2s, box-shadow 0.2s, background 0.2s; }
.form-control::placeholder { color: #9aa3aa; }
.form-control:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(196,163,86,0.2); background: rgba(255,255,255,0.08); }
.btn { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; border-radius: 10px; padding: 14px 18px; cursor: pointer; }
.btn-primary { background: var(--color-accent); color: #000; border: none; }
.btn-primary:hover { filter: brightness(1.08); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Social icons row */
.socials-bar { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 36px; flex-wrap: wrap; }
.social-icon { width: 58px; height: 58px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: #ffffff; background: rgba(255,255,255,0.08); border: 1px solid #1d1f22; transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease; text-decoration: none; }
.social-icon:hover { background: #ffffff; color: #000000; transform: translateY(-2px); }
.social-icon:focus { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.profile-pill { height: 58px; padding: 0 50px; border-radius: 999px; gap: 10px; font-weight: 700; }
.profile-pill span { font-size: 14px; letter-spacing: .2px; }

/* FOOTER */
.site-footer {
  text-align: center;
  padding: 30px 0;
  color: #aaa;
  border-top: 1px solid #222;
  background: #000;
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .modern-header { padding: 0 30px; }
  .logo img { height: 60px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid .grid-container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid .grid-container { grid-template-columns: 1fr; }
  .service-item h3 { font-size: 18px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .scroll-down .arrow { animation: none; }
  .service-item, .project-item { animation: none; transform: none; }
}

/* Project blocks with hover caption inside image */
.project-block { position: relative; display: block; }
.project-item { text-decoration: none; display: block; }
.project-title {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translate(-50%, 8px);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
  z-index: 3;
  white-space: nowrap;
}
.project-block:hover .project-title { opacity: 1; transform: translate(-50%, 0); }

/* On touch devices (no hover), keep captions visible */
@media (hover: none) {
  .project-block .project-title { opacity: 1; transform: translate(-50%, 0); }
  .service-block .service-caption { opacity: 1; transform: translate(-50%, 0); }
}

/* Simple gallery grid for inner pages */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .gallery-grid { grid-template-columns: 1fr; } }
/* Gallery responsive helpers */
.gallery-grid img { width: 100%; height: auto; display: block; border-radius: 12px; background: #0b0b0b; border: 1px solid #1d1f22; }
.gallery-grid.count-1 { grid-template-columns: 1fr; }
.gallery-grid.count-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-grid.count-3 { grid-template-columns: repeat(2, 1fr); }
.gallery-grid.count-4 { grid-template-columns: repeat(2, 1fr); }
.gallery-grid img.wide { grid-column: span 2; }
/* Make service cards fully clickable */
.service-item a { display: block; width: 100%; height: 100%; }

/* ===== Service Gallery (masonry-style by columns) ===== */
.service-gallery { padding: 60px 0; }

/* Masonry via multi-columns to keep natural image heights */
.service-gallery .grid { 
  column-count: 3; 
  column-gap: 16px; 
}
@media (max-width: 960px) { .service-gallery .grid { column-count: 2; } }
@media (max-width: 640px) { .service-gallery .grid { column-count: 1; } }

.service-block {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  border-radius: 12px;
  overflow: hidden;
  border: none; /* remove dark border */
  break-inside: avoid;
}

/* Image behaviour */
.service-block img { 
  width: 100%; 
  height: auto; 
  display: block; 
  transition: transform .4s ease; 
}

/* REMOVE ALL CAPTIONS ALWAYS */
.service-caption {
  display: none !important;
}

/* GOLD FRAME */
.service-block::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-radius: inherit;
  transition: all .3s ease;
  pointer-events: none;
}

.service-block:hover::after {
  border-color: var(--color-accent);
  box-shadow: 0 0 20px rgba(196,163,86,0.55);
}

.service-block:hover img {
  transform: scale(1.05);
}

/* Hero */
.inner-hero {
  position: relative;
  min-height: 55vh;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
}
.inner-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,.65));
}
.inner-hero .inner-content { position: relative; text-align: center; }
.inner-hero .inner-title { font-size: 40px; font-weight: 800; color: #fff; }

/* Gold frame on hover for project image */
.project-item:hover { 
  box-shadow: inset 0 0 0 2px var(--color-accent), 
              0 12px 30px rgba(0,0,0,0.6); 
}
/* ===== GENERAL FIX for all service pages ===== */
.service-page .inner-hero {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center top !important;
  background-color: #000 !important;
}

/* Optional — لو عايز ارتفاع ثابت أفضل */
.service-page .inner-hero {
  min-height: 60vh;
}
/* ===== Move inner page title downward ONLY in service pages ===== */
.service-page .inner-hero .inner-content {
  margin-top: 120px;      /* نزول العنوان لتحت */
}

/* للموبايل ننزله أكتر شوية */
@media (max-width: 640px) {
  .service-page .inner-hero .inner-content {
    margin-top: 160px;
  }
}

