/* ── skills.css — Expertise & Capabilities Bento Grid Section ── */

#expertise-section,
#services,
.expertise-section {
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 24px 52px;
  z-index: 20;
  box-sizing: border-box;
  scroll-margin-top: 70px;
}

/* ── Elegant separator between Brands (الهويات البصرية) and Services (تصميم وبرمجة) ── */
#expertise-section::before,
#services::before,
.expertise-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(7, 25, 27, 0.07) 20%,
    rgba(7, 25, 27, 0.14) 50%,
    rgba(7, 25, 27, 0.07) 80%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 10;
}

body.dark #expertise-section::before,
body.dark #services::before,
body.dark .expertise-section::before {
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 255, 165, 0.15) 20%,
    rgba(0, 255, 165, 0.38) 50%,
    rgba(0, 255, 165, 0.15) 80%,
    transparent 100%
  );
  box-shadow: 0 0 12px rgba(0, 255, 165, 0.2);
}

/* ── Section Header ── */
.expertise-header {
  text-align: center;
  margin-bottom: 38px;
}

.expertise-badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all .2s ease;
  margin-bottom: 22px;
  cursor: default;
}

.expertise-badge-pill:hover {
  background: rgba(255, 255, 255, 0.48);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

body.dark .expertise-badge-pill {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: #e2ede8;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.dark .expertise-badge-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(0, 255, 165, 0.4);
  box-shadow: 0 4px 16px rgba(0, 255, 165, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

body.lang-ar .expertise-badge-pill,
html[lang="ar"] .expertise-badge-pill {
  font-family: var(--pf-text-face), 'Thmanyah Serif Text', 'Thmanyah Sans', sans-serif !important;
  font-weight: 600;
  letter-spacing: 0;
}

.expertise-title {
  font-family: var(--font-foreign);
  font-size: clamp(2.2rem, 3.8vw, 3.4rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

body.lang-ar .expertise-title {
  font-family: 'Thmanyah Serif Text', 'Cairo', serif;
  letter-spacing: normal;
  font-weight: 700;
}

.expertise-subtitle {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.62;
  color: var(--ink-2);
  opacity: 0.88;
}

/* ── 5-Column Bento Grid ── */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  width: 100%;
}

/* ── Bento Card Base ── */
.exp-card {
  position: relative;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 295px;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.04), inset 0 1px 2px rgba(255, 255, 255, 0.9);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.exp-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.08), inset 0 1px 2px #fff;
  border-color: rgba(255, 255, 255, 0.95);
}

body.dark .exp-card {
  background: rgba(14, 18, 16, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 14px 40px -8px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

body.dark .exp-card:hover {
  transform: translateY(-5px);
  background: rgba(14, 18, 16, 0.7);
  border-color: rgba(0, 255, 165, 0.38);
  box-shadow: 0 22px 50px -10px rgba(0, 0, 0, 0.75), 0 0 25px rgba(0, 255, 165, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* Spanning Columns */
.exp-card-speed {
  grid-column: span 2;
}

.exp-card-diversity {
  grid-column: span 2;
}

/* ── Card Icon Squircle Tile ── */
.exp-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05), inset 0 1px 1px #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  margin-bottom: 38px;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, background 0.3s ease;
}

.exp-icon-box svg {
  width: 20px;
  height: 20px;
  display: block;
}

.exp-card:hover .exp-icon-box {
  transform: scale(1.06);
}

body.dark .exp-icon-box {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* ── Card Body (Bottom Anchor) ── */
.exp-card-body {
  margin-top: auto;
}

.exp-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 9px;
  line-height: 1.25;
}

body.lang-ar .exp-card-title {
  font-family: 'Thmanyah Serif Text', 'Cairo', serif;
  letter-spacing: normal;
}

.exp-card-desc {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-2);
  opacity: 0.88;
}

/* ── Highlight Hero Card: Speed (Dark Obsidian with 3D Fluid Wave) ── */
.exp-card-speed {
  background: rgba(13, 15, 19, 0.92);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 24px 50px -15px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.exp-speed-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/speed-wave.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.82;
  mix-blend-mode: screen;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  pointer-events: none;
}

.exp-card.exp-card-speed:hover .exp-speed-bg {
  transform: scale(1.05);
  opacity: 0.96;
}

.exp-card.exp-card-speed:hover {
  transform: translateY(-5px);
  background: rgba(13, 15, 19, 0.96) !important;
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.exp-card-speed .exp-icon-box {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.exp-card.exp-card-speed:hover .exp-icon-box {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.exp-card-speed .exp-card-body {
  position: relative;
  z-index: 2;
}

.exp-card-speed .exp-card-title {
  color: #ffffff;
  transition: color 0.2s ease;
}

.exp-card.exp-card-speed:hover .exp-card-title {
  color: #ffffff;
}

.exp-card-speed .exp-card-desc {
  color: rgba(255, 255, 255, 0.85);
  opacity: 1;
  transition: color 0.2s ease;
}

.exp-card.exp-card-speed:hover .exp-card-desc {
  color: rgba(255, 255, 255, 0.95);
}

body.dark .exp-card.exp-card-speed {
  background: #090b0e;
  border-color: rgba(255, 255, 255, 0.14);
}

body.dark .exp-card.exp-card-speed:hover {
  background: #0d1015 !important;
  border-color: rgba(0, 255, 165, 0.4);
  box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 255, 165, 0.12);
}

/* ── Responsive Adaptations ── */
@media (max-width: 1080px) {
  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .exp-card-affordability { order: 1; grid-column: span 1; }
  .exp-card-consistency   { order: 2; grid-column: span 1; }
  .exp-card-speed         { order: 3; grid-column: span 2; }
  .exp-card-scalability   { order: 4; grid-column: span 1; }
  .exp-card-flexibility   { order: 5; grid-column: span 1; }
  .exp-card-diversity     { order: 6; grid-column: span 2; }
  .exp-card-support       { order: 7; grid-column: span 1; }
  .exp-card-convenience   { order: 8; grid-column: span 1; }
}

@media (max-width: 860px) {
  #expertise-section,
  #services,
  .expertise-section {
    padding: 70px 18px 90px;
  }
  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .exp-card-speed,
  .exp-card-diversity {
    grid-column: span 2;
  }
  .exp-card {
    min-height: 240px;
    padding: 24px 20px 20px;
  }
  .exp-icon-box {
    margin-bottom: 24px;
  }
}

@media (max-width: 540px) {
  #expertise-section,
  #services,
  .expertise-section {
    padding: 56px 14px 72px;
  }
  .expertise-header {
    margin-bottom: 38px;
  }
  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .exp-card-speed,
  .exp-card-diversity {
    grid-column: span 2;
  }
  .exp-card {
    min-height: 190px;
    padding: 16px 12px 14px;
    border-radius: 18px;
  }
  .exp-icon-box {
    width: 36px;
    height: 36px;
    margin-bottom: 14px;
  }
  .exp-card-title {
    font-size: 0.92rem;
  }
  .exp-card-desc {
    font-size: 0.76rem;
  }
  .exp-card-speed,
  .exp-card-diversity {
    min-height: auto;
    padding: 20px 16px;
  }
  .exp-card-speed .exp-card-title,
  .exp-card-diversity .exp-card-title {
    font-size: 1.1rem;
  }
  .expertise-title {
    font-size: 2rem;
  }
  .expertise-subtitle {
    font-size: 0.95rem;
  }
}

