/* ===== الأقسام الجديدة (تكمل layout.css) ===== */

[hidden] {
  display: none !important;
}

.section--flow {
  min-height: auto;
  align-content: start;
  padding: clamp(96px, 12vw, 140px) var(--pad-x);
}

.section__inner--wide {
  max-width: 1200px;
}

.section__inner--wide .section__text {
  max-width: 620px;
}

/* ===== About ===== */
.about-text {
  margin-top: 28px;
  max-width: 640px;
}

.about-text p {
  color: var(--text-dim);
  line-height: 1.8;
}

.about-text p + p {
  margin-top: 16px;
}

/* ===== Services ===== */
.cards-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 48px;
}

.service-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s var(--ease);
}

.service-card:hover {
  border-color: rgba(34, 211, 238, 0.35);
}

.service-card__title {
  margin-bottom: 10px;
  font-size: 1.08rem;
  font-weight: 700;
}

.service-card__text {
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.7;
}

/* أيقونة الخدمة */
.service-card__icon {
  width: 26px;
  height: 26px;
  margin-bottom: 18px;
  color: var(--accent);
}

/* ===== Skills ===== */
.skills-title {
  margin-top: 64px;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 800;
}

.skills-grid .chips li {
  padding: 7px 14px;
  font-size: 0.85rem;
}
.skills-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 48px;
}

.skills-group__title {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

html[lang='ar'] .skills-group__title {
  letter-spacing: 0;
  text-transform: none;
}

/* ===== Projects ===== */
/* flex بدل grid: لو عدد المشاريع فردي، آخر كارت بيقعد في النص بنفس عرض الباقيين (مش لوحده على جنب) */
.projects-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin-top: 56px;
}

.projects-grid > * {
  flex: 1 1 400px;
  min-width: 0;
  /* 24px = المسافة بين الكروت (extras.css) */
  max-width: calc((100% - 24px) / 2);
}

@media (max-width: 940px) {
  .projects-grid > * {
    max-width: 100%;
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.project-card:hover {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.project-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-2);
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-bottom: 1px dashed var(--line);
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.project-card__body {
  display: grid;
  align-content: start;
  gap: 14px;
  flex: 1;
  padding: 26px;
}

.project-card__cat {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-card__name {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
}

.project-card__tagline {
  color: var(--text-dim);
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.projects-empty {
  grid-column: 1 / -1;
  color: var(--text-dim);
}

html[lang='ar'] .project-card__cat {
  letter-spacing: 0;
  text-transform: none;
}

/* ===== Contact ===== */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* ===== Footer ===== */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 40px var(--pad-x) 48px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.88rem;
}

.site-footer {
  align-items: center;
}

.site-footer strong {
  color: var(--text);
}

/* لينكات التواصل في الفوتر */
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: var(--accent);
}

.site-footer__links .icon {
  width: 17px;
  height: 17px;
}

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .section--flow {
    padding-top: 84px;
    padding-bottom: 84px;
  }

  .cards-grid,
  .skills-grid {
    margin-top: 32px;
  }

  .project-card__body {
    padding: 22px;
  }
}