/* ==========================================================================
   إتْمَام | ITMAM — pages.css
   أنماط الصفحات المتخصصة ودراسات الحالة (Japandi Minimal)
   ========================================================================== */

/* ═══ أ) Hero Japandi & Full-Bleed ═══ */

.hero {
  padding-block: clamp(4rem, 8vw, 6.5rem) clamp(3rem, 6vw, 4.5rem);
}

.hero .itmam-hero-title {
  max-width: 20ch;
}

.hero-full-bleed {
  position: relative;
  min-height: clamp(520px, 82vh, 780px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-color: var(--sumi);
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}

.hero-full-bleed-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-full-bleed-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.82) contrast(1.04);
}

.hero-full-bleed-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(22, 22, 21, 0.90) 0%,
    rgba(22, 22, 21, 0.55) 45%,
    rgba(22, 22, 21, 0.25) 100%
  );
  pointer-events: none;
}

.hero-full-bleed-content {
  position: relative;
  z-index: 2;
  width: 100%;
  color: var(--washi);
}

.hero-full-bleed-content .eyebrow {
  color: var(--clay);
  letter-spacing: 0.18em;
}

.hero-full-bleed-content .itmam-hero-title {
  color: #FFFFFF;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

.hero-full-bleed-content .itmam-lead {
  color: rgba(247, 245, 240, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hero-full-bleed-content .btn--outline {
  color: var(--washi);
  border-color: rgba(247, 245, 240, 0.65);
}

.hero-full-bleed-content .btn--outline:hover {
  background-color: var(--washi);
  color: var(--sumi);
  border-color: var(--washi);
}

.hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--linen);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--image-filter);
}

@media (max-width: 768px) {
  .hero-full-bleed {
    min-height: clamp(480px, 75vh, 600px);
    padding-block: clamp(2.5rem, 6vw, 3.5rem);
  }
  .hero-image {
    aspect-ratio: 4 / 3;
  }
}

/* ═══ ب) Stat cell ═══ */

.stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.stat-cell .stat-number {
  font-size: clamp(1.875rem, 3vw, 3rem);
  word-break: keep-all;
  margin-bottom: 0;
  color: var(--sumi);
}

/* ═══ ج) Page Header ═══ */

.page-header {
  padding-block: clamp(5rem, 12vw, 10rem) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line-thin);
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.page-header .itmam-page-title {
  max-width: 22ch;
}

.page-header-media {
  margin-top: clamp(2rem, 4vw, 3rem);
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--linen);
}

.page-header-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--image-filter);
}

/* ═══ د) Project Hero Media ═══ */

.project-hero-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--linen);
}

.project-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--image-filter);
}

#project-story {
  font-size: var(--fs-lead);
  line-height: var(--lh-body);
  color: var(--stone);
}

/* ═══ هـ) Materials List ═══ */

.project-materials-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}

.project-material-item,
#project-materials-list .japandi-card {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  border-bottom: none;
  font-family: var(--font-arabic);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--sumi);
  line-height: 1.4;
}

/* ═══ و) Project Gallery — Landscape 2 columns ═══ */

.gallery-grid,
#project-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

#project-gallery .project-gallery-item,
#project-gallery .gallery-item {
  overflow: hidden;
  cursor: pointer;
  background-color: var(--linen);
  aspect-ratio: 16 / 10;
}

#project-gallery .project-gallery-item img,
#project-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--image-filter);
  transition: transform 1200ms var(--ease-out-expo);
}

#project-gallery .project-gallery-item:hover img,
#project-gallery .gallery-item:hover img {
  transform: scale(1.02);
}

@media (max-width: 640px) {
  .gallery-grid,
  #project-gallery {
    grid-template-columns: 1fr;
  }
}

/* ═══ ز) Project Nav Title ═══ */

.project-nav-title {
  font-family: var(--font-arabic);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--sumi);
  transition: color var(--duration-hover) var(--ease-out-expo);
}

.project-nav-item:hover .project-nav-title {
  color: var(--clay);
}

/* ═══ ح) Before/After Slider (الكامل) ═══ */

.ba-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  user-select: none;
  background-color: var(--linen);
  cursor: ew-resize;
}

.ba-image {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--image-filter);
  pointer-events: none;
}

.ba-image.after {
  clip-path: inset(0 0 0 50%);
  transition: clip-path 100ms linear;
}

.ba-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--washi);
  z-index: 10;
  cursor: ew-resize;
  pointer-events: none;
  transition: right 100ms linear;
}

.ba-handle-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--washi);
  color: var(--sumi);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  pointer-events: auto;
  cursor: ew-resize;
}

.ba-container:focus-within .ba-slider-handle {
  width: 3px;
}

@media (max-width: 640px) {
  .ba-container {
    aspect-ratio: 4 / 3;
  }
}

/* ═══ ط) Services Features List ═══ */

.service-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.service-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding-block: var(--space-sm);
  border-bottom: 1px solid var(--line-thin);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 300;
  color: var(--stone);
  line-height: 1.6;
}

.service-features li::before {
  content: "—";
  color: var(--clay);
  font-weight: 400;
  flex-shrink: 0;
}

/* ═══ ي) Values Grid (يستخدم في services) ═══ */

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
}

@media (max-width: 900px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .values-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══ ك) Testimonials (testimonials.html) ═══ */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2.5rem, 5vw, 4rem);
}

.testimonial-card {
  padding-block: var(--space-xl);
  border-top: 1px solid var(--line);
}

.testimonial-card-quote {
  font-family: var(--font-arabic);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--sumi);
  margin-bottom: var(--space-lg);
}

.testimonial-card-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.testimonial-card-name {
  font-family: var(--font-arabic);
  font-size: 1rem;
  font-weight: 500;
  color: var(--sumi);
}

.testimonial-card-role {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mist);
}

@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══ ل) Materials (materials.html) ═══ */

.materials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
}

.material-card {
  display: block;
}

.material-card-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: var(--linen);
  margin-bottom: var(--space-lg);
}

.material-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--image-filter);
  transition: transform 1200ms var(--ease-out-expo);
}

.material-card:hover .material-card-media img {
  transform: scale(1.03);
}

.material-card-title {
  font-family: var(--font-arabic);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--sumi);
  margin-bottom: var(--space-sm);
}

.material-card-desc {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 300;
  color: var(--stone);
  line-height: var(--lh-body);
}

@media (max-width: 900px) {
  .materials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .materials-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══ م) FAQ Groups ═══ */

.faq-group {
  margin-bottom: clamp(3rem, 5vw, 4rem);
}

.faq-group-title {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: var(--space-md);
  display: block;
}

/* ═══ ن) Careers Rows ═══ */

.career-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: var(--space-lg);
  align-items: center;
  padding-block: var(--space-lg);
  border-bottom: 1px solid var(--line);
  transition: padding-inline var(--duration-hover) var(--ease-out-expo);
}

.career-row:hover {
  padding-inline: var(--space-md);
}

.career-row-title {
  font-family: var(--font-arabic);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--sumi);
}

.career-row-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}

@media (max-width: 768px) {
  .career-row {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
}

/* ═══ س) Journal Cards ═══ */

.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
}

.journal-card {
  display: block;
}

.journal-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--linen);
  margin-bottom: var(--space-lg);
}

.journal-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--image-filter);
  transition: transform 1200ms var(--ease-out-expo);
}

.journal-card:hover .journal-card-media img {
  transform: scale(1.02);
}

.journal-card-title {
  font-family: var(--font-arabic);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--sumi);
  line-height: 1.35;
  margin-block: var(--space-xs);
}

.journal-card-excerpt {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 300;
  color: var(--stone);
  line-height: var(--lh-body);
}

.journal-card-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  color: var(--mist);
  display: block;
  margin-top: var(--space-sm);
}

@media (max-width: 900px) {
  .journal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .journal-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══ ع) Contact Info Blocks ═══ */

.contact-info-block {
  padding-block: var(--space-lg);
  border-top: 1px solid var(--line);
}

.contact-info-block:first-child {
  padding-top: 0;
  border-top: none;
}

.contact-info-block p {
  color: var(--stone);
  margin-top: var(--space-sm);
}

.contact-info-block .itmam-link {
  display: inline-block;
  margin-bottom: var(--space-xs);
}

/* ═══ ف) Certifications Grid ═══ */

.cert-card {
  padding: var(--space-xl);
  border: 1px solid var(--line);
  background-color: transparent;
  transition: border-color var(--duration-hover) var(--ease-out-expo);
}

.cert-card:hover {
  border-color: var(--clay);
}

.cert-card-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--sumi);
  margin-bottom: var(--space-sm);
}

.cert-card-desc {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 300;
  color: var(--stone);
  line-height: var(--lh-body);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (max-width: 768px) {
  .certs-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══ ص) Message Hero (404 / thank-you) ═══ */

.message-hero {
  text-align: center;
  padding-block: clamp(6rem, 14vw, 12rem);
}

.message-hero .itmam-page-title {
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--clay);
  line-height: 1;
  margin-bottom: var(--space-lg);
}

/* ═══ Before/After List (before-after.html) ═══ */

.ba-list {
  display: flex;
  flex-direction: column;
  gap: clamp(5rem, 10vw, 8rem);
}

.ba-case {
  display: block;
}

.ba-case-meta {
  max-width: 60ch;
}

/* ═══ Team grid ═══ */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
}

@media (max-width: 900px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══ الأنماط المعمارية الجديدة (Round 2) ═══ */

/* Section Markers */
.section-marker { display:flex; align-items:baseline; gap:var(--space-md); margin-bottom:var(--space-2xl); padding-bottom:var(--space-md); border-bottom:1px solid var(--line); }
.section-marker-num { font-family:var(--font-mono); font-size:0.75rem; color:var(--clay); letter-spacing:0.15em; }
.section-marker-label { font-family:var(--font-mono); font-size:0.75rem; letter-spacing:0.25em; text-transform:uppercase; color:var(--mist); }

/* Featured Asymmetric */
.featured-asymmetric { display:grid; grid-template-columns:repeat(12,1fr); gap:clamp(2rem,4vw,3.5rem); align-items:start; }
.featured-asymmetric .project-card--wide { grid-column:1/10; }
.featured-asymmetric .project-card--narrow { grid-column:10/13; margin-top:clamp(3rem,6vw,5rem); }
.featured-asymmetric .project-card--wide.project-card--offset { grid-column:3/13; margin-top:clamp(2rem,4vw,3rem); }
@media(max-width:900px){ .featured-asymmetric .project-card--wide, .featured-asymmetric .project-card--narrow, .featured-asymmetric .project-card--wide.project-card--offset { grid-column:1/-1; margin-top:0; } }
.project-card-overlay { position:absolute; inset:0; background:rgba(28,27,23,0.55); display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity var(--duration-hover) var(--ease-out-expo); pointer-events:none; }
.project-card:hover .project-card-overlay { opacity:1; }
.project-card-cta { font-family:var(--font-mono); font-size:0.75rem; letter-spacing:0.2em; text-transform:uppercase; color:var(--washi); padding:1rem 1.75rem; border:1px solid var(--washi); transform:translateY(8px); transition:transform var(--duration-hover) var(--ease-out-expo); }
.project-card:hover .project-card-cta { transform:translateY(0); }

/* Services Home Grid */
.services-home-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.service-home-card { padding:clamp(2rem,4vw,3rem); border-inline-end:1px solid var(--line); min-height:340px; display:flex; flex-direction:column; transition:background-color var(--duration-hover) var(--ease-out-expo); }
.service-home-card:last-child { border-inline-end:none; }
.service-home-card:hover { background-color:var(--linen); }
.service-home-num { font-family:var(--font-mono); font-size:0.75rem; color:var(--clay); letter-spacing:0.15em; margin-bottom:auto; }
.service-home-title { font-family:var(--font-arabic); font-size:1.375rem; font-weight:500; color:var(--sumi); margin-block:var(--space-lg) var(--space-md); }
.service-home-desc { font-family:var(--font-body); font-size:var(--fs-small); font-weight:300; color:var(--stone); }
.service-home-arrow { font-family:var(--font-mono); font-size:1rem; color:var(--clay); margin-top:var(--space-lg); transition:transform var(--duration-hover) var(--ease-out-expo); }
.service-home-card:hover .service-home-arrow { transform:translateX(-8px); }
@media(max-width:900px){ .services-home-grid{grid-template-columns:repeat(2,1fr);} .service-home-card{border-bottom:1px solid var(--line);} }
@media(max-width:600px){ .services-home-grid{grid-template-columns:1fr;} .service-home-card{border-inline-end:none;} }

/* Testimonial Featured */
.testimonial-featured { display:grid; grid-template-columns:1fr 2fr; gap:clamp(3rem,6vw,6rem); align-items:center; }
.testimonial-featured-image { width:100%; aspect-ratio:3/4; overflow:hidden; }
.testimonial-featured-image img { width:100%; height:100%; object-fit:cover; filter:grayscale(0.4) brightness(0.92); }
.testimonial-featured-quote { font-family:var(--font-arabic); font-size:clamp(1.5rem,2.8vw,2.25rem); font-weight:400; line-height:1.5; color:var(--washi); margin-block:var(--space-lg) var(--space-2xl); max-width:30ch; }
.testimonial-featured-name { font-family:var(--font-arabic); font-size:1.125rem; font-weight:500; color:var(--washi); }
.testimonial-featured-role { font-family:var(--font-mono); font-size:0.75rem; letter-spacing:0.15em; text-transform:uppercase; color:var(--clay); }
@media(max-width:768px){ .testimonial-featured{grid-template-columns:1fr;} .testimonial-featured-image{max-width:380px;margin-inline:auto;} }

/* Story Split */
.story-split { display:grid; grid-template-columns:1.2fr 1fr; gap:clamp(3rem,6vw,6rem); align-items:center; }
.story-split-image { position:relative; aspect-ratio:4/5; overflow:hidden; }
.story-split-image img { width:100%; height:100%; object-fit:cover; }
.story-split-caption { position:absolute; bottom:1.5rem; right:1.5rem; font-family:var(--font-mono); font-size:0.6875rem; letter-spacing:0.15em; text-transform:uppercase; color:var(--washi); background:rgba(28,27,23,0.75); padding:0.5rem 0.875rem; }
@media(max-width:900px){ .story-split{grid-template-columns:1fr;} }

/* Hero Scroll Indicator */
.hero-scroll-indicator { position:absolute; bottom:2rem; left:50%; transform:translateX(-50%); display:flex; flex-direction:column; align-items:center; gap:0.75rem; z-index:3; color:var(--washi); opacity:0.6; animation:heroScrollBounce 2.5s ease-in-out infinite; }
.hero-scroll-line { width:1px; height:32px; background:var(--washi); }
.hero-scroll-text { font-family:var(--font-mono); font-size:0.625rem; letter-spacing:0.3em; }
@keyframes heroScrollBounce { 0%,100%{transform:translateX(-50%) translateY(0);opacity:0.6} 50%{transform:translateX(-50%) translateY(6px);opacity:0.3} }
@media(max-width:768px){ .hero-scroll-indicator{display:none} }
