/**
 * @file css/pages.css
 * @description الأنماط المخصصة للصفحات المعمارية لاستوديو إيوان (IWAN Atelier).
 * يحتوي على تفاصيل الهيرو السينمائي، معرض الكتل المتراصة مع البارالاكس،
 * الشهادة اللامتماثلة، الخط الزمني، ونداء الإجراء المنظوري، مع تجاوب دقيق.
 */

/* --------------------------------------------------------------------------
   1. أنماط هيرو المدخل (Hero Chamber Specifics)
   -------------------------------------------------------------------------- */
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-tech);
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  position: relative;
  padding-right: 1.75rem;
}

.hero-eyebrow::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 1.5px;
  background-color: var(--accent-warm);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 700; /* وزن 700 مناسب وواضح بدون ثقل مفرط */
  line-height: 1.45; /* مساحة تنفس متسعة للحفاظ على تشكيل وحركات الحروف العربية */
  letter-spacing: 0;
  color: var(--text-primary);
  max-width: 22ch;
  margin-bottom: 2.5rem;
  text-wrap: balance;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 1.8vw, 1.35rem);
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 52ch;
  margin-bottom: 2.75rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hero-accent-text {
  font-family: var(--font-tech);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  font-weight: 700;
}

.hero-scroll-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-tech);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  animation: bounce-subtle 2.2s infinite var(--ease-subtle);
}

@keyframes bounce-subtle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* --------------------------------------------------------------------------
   2. قسم الخدمات والمعاينة اللامتماثلة (Services Asymmetric Preview)
   -------------------------------------------------------------------------- */
.section-eyebrow {
  display: block;
  font-family: var(--font-tech);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

/* التموضع اللامتماثل الصريح للكروت الثلاثة في الشبكة */
.services-preview .card-pos-1 {
  grid-column: 1 / 6;
}

.services-preview .card-pos-2 {
  grid-column: 7 / 13;
}

.services-preview .card-pos-3 {
  grid-column: 3 / 9;
}

.service-card-desc {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  min-height: 3.5rem;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-primary);
  transition: gap var(--duration-hover) var(--ease-cinematic),
              color var(--duration-hover) var(--ease-subtle);
}

.service-card:hover .service-card-link {
  color: var(--accent-warm);
  gap: 0.85rem;
}

/* --------------------------------------------------------------------------
   3. معرض المشاريع المميزة (Vertical Parallax Gallery Showcase)
   -------------------------------------------------------------------------- */
.gallery-showcase {
  background-color: var(--bg-dark);
  position: relative;
}

.gallery-block {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.gallery-bg {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  z-index: 1;
  will-change: transform;
}

.gallery-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.08) brightness(0.7);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(26, 24, 21, 0.95) 0%,
    rgba(26, 24, 21, 0.6) 40%,
    rgba(26, 24, 21, 0.15) 75%,
    transparent 100%
  );
  pointer-events: none;
}

.gallery-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding: 0 clamp(1.5rem, 5vw, 5rem) clamp(4rem, 10vh, 8rem);
  color: #F2F0EB;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-block.is-visible .gallery-content {
  opacity: 1;
  transform: translateY(0);
}

.gallery-badge {
  display: inline-block;
  font-family: var(--font-tech);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 1rem;
}

.gallery-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  color: #F2F0EB;
  margin-bottom: 1rem;
  max-width: 20ch;
}

.gallery-desc {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.75;
  color: #C0BAB2;
  max-width: 55ch;
  margin-bottom: 2rem;
}

.gallery-index {
  display: block;
  font-family: var(--font-editorial);
  font-size: 0.9375rem;
  letter-spacing: 0.1em;
  color: var(--accent-warm);
  margin-top: 2rem;
  opacity: 0.7;
  direction: ltr;
  unicode-bidi: isolate;
}

/* --------------------------------------------------------------------------
   4. قسم آراء العملاء اللامتماثل (Asymmetric Testimonial Section)
   -------------------------------------------------------------------------- */
.testimonials {
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.tst-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.tst-quote-mark {
  position: absolute;
  top: -3.5rem;
  right: -2rem;
  font-family: var(--font-editorial);
  font-size: clamp(8rem, 16vw, 15rem);
  line-height: 0.8;
  color: var(--accent-primary);
  opacity: 0.08;
  user-select: none;
  pointer-events: none;
  z-index: 1;
}

.tst-quote {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.8vw, 2.35rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
  position: relative;
  z-index: 2;
  max-width: 32ch;
  margin-bottom: 2rem;
}

.tst-author-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
  z-index: 2;
  padding-right: 1.5rem;
  border-right: 2px solid var(--accent-warm);
}

.tst-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  filter: saturate(0.9) contrast(1.05);
}

.tst-author-name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.tst-author-role {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   5. معاينة الخط الزمني (Process Preview Timeline Details)
   -------------------------------------------------------------------------- */
.process-preview {
  background-color: var(--bg-secondary);
}

.timeline-step-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.timeline-step-num {
  font-family: var(--font-editorial);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--accent-warm);
  margin-bottom: 0.75rem;
}

.timeline-step-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.timeline-step-desc {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   6. نداء الإجراء المنظوري (Perspective CTA Chamber)
   -------------------------------------------------------------------------- */
.cta-section {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: #F2F0EB;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

.cta-section p {
  color: #A39D96;
  font-size: clamp(1.125rem, 1.8vw, 1.35rem);
  max-width: 48ch;
  margin-inline: auto;
  margin-bottom: 2.5rem;
}

.btn-cta-large {
  padding: 1.1rem 2.8rem;
  font-size: 1.0625rem;
}

/* --------------------------------------------------------------------------
   7. الاستجابة والتكيف مع الشاشات (Responsive Breakpoints)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .services-preview .card-pos-1 {
    grid-column: 1 / 7;
  }
  .services-preview .card-pos-2 {
    grid-column: 7 / 13;
  }
  .services-preview .card-pos-3 {
    grid-column: 1 / 13;
  }

  .tst-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .services-preview .card-pos-1,
  .services-preview .card-pos-2,
  .services-preview .card-pos-3 {
    grid-column: 1 / -1;
  }

  .hero-chamber {
    min-height: 90vh;
    padding-top: 100px;
    align-items: flex-end;
    padding-bottom: 5rem;
  }

  .hero-layer-accent {
    display: none;
  }

  .gallery-block {
    height: auto;
    min-height: 90vh;
    align-items: center;
    padding: 5rem 0;
  }
  
  .gallery-content {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    text-align: center;
  }
}

/* ================== صفحة المعرض (Portfolio Page) ================== */
.page-hero {
  padding: clamp(6rem, 12vh, 10rem) 0 clamp(3rem, 6vh, 5rem);
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  max-width: 22ch;
  margin-bottom: 1.5rem;
}

.page-subtitle {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 55ch;
}

.filter-bar {
  position: sticky;
  top: 64px;
  z-index: 40;
  background-color: rgba(242, 240, 235, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.filter-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-block: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-bar-inner::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.filter-btn.is-active {
  color: var(--bg-primary);
  background-color: var(--text-primary);
  border-color: var(--text-primary);
}

.filter-count {
  margin-inline-start: auto;
  font-family: var(--font-tech);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

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

.portfolio-grid .project-card {
  grid-column: auto;
}

/* كارت واحد بأخذ عرض كامل كل 5 كروت، لتكسير الرتابة البصرية */
.portfolio-grid .project-card:nth-child(5n + 1) {
  grid-column: 1 / -1;
}

.project-card-media {
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
}

.portfolio-grid .project-card:nth-child(5n + 1) .project-card-media {
  aspect-ratio: 16 / 9; /* الكارت العريض بنسبة أوسع */
}

.project-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card-media.media-error {
  background-color: var(--bg-secondary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 24 24' fill='none' stroke='%23A39D96' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60px;
}

.project-card-media.media-error img {
  opacity: 0;
}

.portfolio-cta {
  text-align: center;
  border-top: 1px solid var(--border);
}

.portfolio-cta h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
}

.portfolio-cta p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/* ================== صفحة المشروع (Single Case Study Page) ================== */
.project-hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  overflow: hidden;
}

.project-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05) brightness(0.75);
}

.project-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 24, 21, 0.85) 0%, transparent 60%);
}

.project-hero-content {
  position: absolute;
  bottom: clamp(3rem, 8vh, 6rem);
  right: 0;
  left: 0;
  color: #F2F0EB;
  z-index: 2;
}

.project-category {
  display: inline-block;
  font-family: var(--font-tech);
  font-size: 0.8125rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 1rem;
}

.project-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-weight: 700;
  line-height: 1.25;
  color: #F2F0EB;
  max-width: 20ch;
}

.project-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-block: 2rem;
  border-block: 1px solid var(--border);
}

.project-meta-grid dt {
  font-family: var(--font-tech);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.project-meta-grid dd {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-story-text {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--text-secondary);
  max-width: 65ch;
}

.project-card.is-hidden {
  display: none !important;
}

.before-after-slider {
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
}

.ba-before-img,
.ba-after-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-after-layer {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
}

.ba-after-layer .ba-after-img {
  width: 100cqw; /* مطابقة دقيقة لعرض حاوية السلايدر */
  max-width: none;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background-color: #F2F0EB;
  transform: translateX(-50%);
  z-index: 3;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.ba-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #F2F0EB;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.project-materials-list {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--border);
}

.project-materials-list li {
  border-bottom: 1px solid var(--border);
}

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

.project-gallery-grid > *:first-child {
  grid-column: 1 / -1;
}

.project-nav-bottom {
  padding: clamp(3rem, 6vh, 5rem) 0;
  border-top: 1px solid var(--border);
}

.project-nav-bottom .container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .portfolio-grid .project-card:nth-child(5n + 1) {
    grid-column: 1;
  }
}

@media (max-width: 900px) {
  .project-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-gallery-grid {
    grid-template-columns: 1fr;
  }
  .project-gallery-grid > *:first-child {
    grid-column: 1;
  }
}

/* ================== صفحة الخدمات (Services Page) ================== */
.service-detail-section {
  border-bottom: 1px solid var(--border);
}

.service-detail-section:last-of-type {
  border-bottom: none;
}

.service-detail-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.service-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-detail-num {
  display: block;
  font-family: var(--font-editorial);
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  color: var(--accent-warm);
  margin-bottom: 1rem;
}

.service-detail-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.service-detail-desc {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 55ch;
}

.service-detail-list {
  list-style: none;
  padding: 0;
  margin-bottom: 2.5rem;
  border-top: 1px solid var(--border);
}

.service-detail-list li {
  padding: 0.875rem 1.5rem 0.875rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.service-detail-list li::before {
  content: "—";
  position: absolute;
  right: -1.25rem;
  color: var(--accent-warm);
  font-weight: 700;
}

/* ================== حاسبة التكلفة (Cost Estimator) ================== */
.cost-estimator-section {
  background-color: var(--bg-dark);
}

.cost-estimator {
  display: grid;
  gap: 2rem;
  max-width: 700px;
  margin-inline: auto;
  padding: 3rem;
  background-color: rgba(242, 240, 235, 0.04);
  border: 1px solid rgba(242, 240, 235, 0.1);
}

.estimator-field label {
  display: block;
  font-family: var(--font-tech);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 0.75rem;
}

.estimator-area-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 1.5rem;
  align-items: center;
}

.estimator-area-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent-warm);
}

.estimator-area-row input[type="number"],
.estimator-field select {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: rgba(26, 24, 21, 0.6);
  border: 1px solid rgba(242, 240, 235, 0.15);
  color: #F2F0EB;
  font-family: var(--font-body);
  font-size: 1rem;
}

.estimator-result {
  padding-top: 2rem;
  border-top: 1px solid rgba(242, 240, 235, 0.15);
  display: grid;
  gap: 1.5rem;
}

.estimator-result-meter,
.estimator-result-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.estimator-result-label {
  font-size: 0.9375rem;
  color: #A39D96;
}

.estimator-result-value {
  font-family: var(--font-editorial);
  font-size: 1.5rem;
  color: var(--accent-warm);
}

.estimator-total-value {
  font-family: var(--font-editorial);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #F2F0EB;
}

/* ================== صفحة كيف نعمل (Process Timeline) ================== */
.timeline-section .timeline {
  row-gap: clamp(4rem, 8vw, 7rem);
}

.timeline-step-duration {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-tech);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-warm);
}

/* ================== قسم ما بعد التسليم (After Delivery) ================== */
.after-delivery {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
  text-align: center;
}

.after-delivery .cta-title {
  color: #F2F0EB;
  margin-bottom: 1.5rem;
}

.after-delivery p {
  color: #A39D96;
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  max-width: 55ch;
  margin-inline: auto;
  margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
  .service-detail-section .split-60-40,
  .service-detail-section .split-40-60 {
    grid-template-columns: 1fr;
  }
  .service-detail-image {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 600px) {
  .cost-estimator {
    padding: 1.75rem;
  }
  .estimator-area-row {
    grid-template-columns: 1fr;
  }
}

/* ================== صفحة من نحن (About Page) ================== */
.about-lead {
  font-size: clamp(1.125rem, 1.8vw, 1.35rem);
  line-height: 1.85;
  color: var(--text-primary);
  margin-bottom: 2rem;
  max-width: 65ch;
}

.about-quote {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--accent-primary);
  margin: 3rem 0;
  padding-right: 2rem;
  border-right: 4px solid var(--accent-warm);
  max-width: 50ch;
}

.about-story p {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 65ch;
}

.about-team {
  background-color: var(--bg-dark);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 3rem;
}

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

.team-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin-bottom: 1.5rem;
  filter: grayscale(100%);
  transition: filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-card:hover .team-photo {
  filter: grayscale(0%);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: #F2F0EB;
  margin-bottom: 0.25rem;
}

.team-role {
  font-family: var(--font-tech);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 0.75rem;
}

.team-bio {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #A39D96;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: 3rem;
}

.value-card {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.value-num {
  font-family: var(--font-editorial);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--accent-warm);
  margin-bottom: 1rem;
}

.value-title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.value-desc {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.about-stats {
  background-color: var(--bg-dark);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-editorial);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent-warm);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-family: var(--font-tech);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #A39D96;
}

/* ================== صفحة التواصل (Contact Page) ================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
}

.contact-form-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.75rem;
}

.form-group label {
  display: block;
  font-family: var(--font-tech);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background-color: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s, background-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background-color: rgba(45, 90, 78, 0.03);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

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

.form-feedback {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 0;
  font-size: 0.9375rem;
}

.contact-info-block {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.contact-info-block:last-child {
  border-bottom: none;
}

.contact-info-block h3 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.contact-info-block p {
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.contact-info-block a {
  color: var(--accent-primary);
  text-decoration: none;
}

.contact-info-block a:hover {
  color: var(--accent-warm);
}

.office-hours {
  width: 100%;
  font-size: 0.9375rem;
}

.office-hours td {
  padding: 0.5rem 0;
  color: var(--text-secondary);
}

.office-hours td:last-child {
  text-align: left;
  font-family: var(--font-tech);
}

.service-areas {
  list-style: none;
  padding: 0;
}

.service-areas li {
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.service-areas li:last-child {
  border-bottom: none;
}

/* ================== صفحة الأسئلة الشائعة (FAQ Page) ================== */
.faq-category {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.faq-category-title {
  font-family: var(--font-heading);
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: right;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.3s;
}

.accordion-trigger:hover {
  color: var(--accent-primary);
}

.accordion-item.is-open .accordion-trigger {
  color: var(--accent-primary);
}

.accordion-icon {
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--accent-warm);
}

.accordion-item.is-open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content p {
  padding-bottom: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

/* ================== صفحة المدونة (Blog Page) ================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
}

.blog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card-link:hover {
  transform: translateY(-4px);
}

.blog-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card-link:hover .blog-card-media img {
  transform: scale(1.05);
}

.blog-category {
  display: inline-block;
  font-family: var(--font-tech);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 0.75rem;
}

.blog-title {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  transition: color 0.3s;
}

.blog-card-link:hover .blog-title {
  color: var(--accent-primary);
}

.blog-excerpt {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.blog-meta {
  font-family: var(--font-tech);
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

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

@media (max-width: 600px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
  .form-actions {
    flex-direction: column;
  }
  .form-actions .btn-primary,
  .form-actions .btn-ghost {
    width: 100%;
  }
}

