.page {
  padding: 32px 0 60px;
}
/* ===== Background image behind header + content ===== */
.page-bg {
  background-image: url("../img/back-other.jpeg"); 
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

/* ===== Header (glass, fixed position) ===== */
.top-pill {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-bottom: 1px solid rgba(255,255,255,0.35);
}

/* ===== Main content ===== */
.page {
  position: relative;
  z-index: 1;
  padding-bottom: 60px;
}

/* طبقة خفيفة عشان النص يبان (اختياري) */
.page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

/* ===== Footer (NOT affected by background) ===== */
footer {
  position: relative;
  z-index: 5;

  background: #02173f;
  margin-top: 0;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.page-head {
  text-align: center;
  margin-bottom: 28px;
}

.page-title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  margin-bottom: 10px;
  color: #02173f;
}

.page-subtitle {
  opacity: 0.75;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
  color: #02173f;
}

.companies-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}


/* card */
.company-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 8px 26px rgba(0,0,0,.06);
  padding: 18px;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

.company-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0,0,0,.10);
}

.company-logo-wrap {
  height: 110px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.company-logo-wrap img {
  max-height: 100px;
  max-width: 100%;
  object-fit: contain;
}

.company-name {
  font-size: 16px;
  font-weight: 800;
  margin: 8px 0 8px;
}

.company-desc {
  font-size: 14px;
  opacity: .75;
  line-height: 1.6;
  margin-bottom: 14px;
  min-height: 44px;
}

.company-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;

  background: rgba(139, 209, 255, 0.1);
  color: #2980b9;
}

.company-link:hover {
  background: rgba(41, 128, 185, 0.16);
}

@media (max-width: 980px) {
  .companies-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .companies-grid { grid-template-columns: 1fr; }
}

.modal { position: fixed; inset: 0; display: none; z-index: 9999; }
.modal.is-open { display: block; }

.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }

.modal__panel{
  position: relative;
  max-width: 720px;
  width: calc(100% - 32px);
  margin: 6vh auto;
  padding: 24px;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal__close{
  position: absolute; top: 14px; inset-inline-end: 14px;
  border: 0; background: transparent; font-size: 20px; cursor: pointer;
}

.modal__logo{ width: 120px; height: 120px; object-fit: contain; display:block; margin:0 auto 12px; }
.modal__name{ text-align:center; margin:6px 0; }
.modal__title{ text-align:center; opacity:.8; margin:0 0 14px; }
.modal__desc{ line-height:1.9; margin:0 0 16px; }
.modal__btn{ display:inline-block; padding:10px 14px; border-radius:10px; text-decoration:none; background: rgba(0,0,0,.08); }

/* open state */
.company-card.is-open .card-expand{
  max-height: 260px;  
  opacity: 1;
  margin-top: 12px;
}
/* default closed */
.card-expand{
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: max-height .25s ease, opacity .25s ease, margin-top .25s ease;
}

.company-card.is-open .card-expand{
  max-height: 500px; /* خليته كبير عشان أي نص طويل */
  opacity: 1;
  margin-top: 12px;
}
