/* ===============================
   Group of Companies Section
   =============================== */
.companies {
  padding: 80px 8%;
  background: #fff;
  text-align: center;
}

/* Header Text */
.companies-header h4 {
  color: #1abc9c;
  font-size: 18px;
  margin-bottom: 10px;
}

.companies-header h1 {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #111;
}

.companies-header p {
  max-width: 700px;
  margin: 0 auto 20px;
  color: #555;
  line-height: 1.6;
}

.scroll-msg {
  display: inline-block;
  margin-top: 10px;
  color: #777;
  font-size: 14px;
  border-left: 2px solid #000;
  padding-left: 10px;
}

/* ===============================
   Companies Grid
   =============================== */
.companies-grid {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

/* --- Company Card --- */
.company-card {
  position: relative;
  background: #f8f8f8;
  border-radius: 12px;
  padding: 110px 20px 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  transition: all 0.4s ease;
  overflow: hidden;
  cursor: pointer;
  color: #333;
  min-height: 360px;
}

/* Logo */
.company-card .logo {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.company-card .logo img {
  width: 80px;
  height: auto;
}

/* Text */
.company-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.company-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* Background Hover */
.company-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
  border-radius: 12px;
}

.company-card:hover::before {
  opacity: 0.85;
}

.company-card:hover {
  color: #fff;
}

.company-card * {
  position: relative;
  z-index: 1;
}

.company-card:hover p {
  color: #fff;
}

/* ===============================
   View More Button
   =============================== */
.companies-footer {
  text-align: center;
  margin-top: 30px;
}

.view-more {
  padding: 10px 22px;
  background: #fff;
  color: #1abc9c;
  border: 2px solid #1abc9c;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.view-more:hover {
  background: #1abc9c;
  color: #fff;
}

/* ===============================
   Hidden Cards
   =============================== */
.hidden {
  display: none;
}

/* ===============================
   Responsive Adjustments
   =============================== */
@media (max-width: 1024px) {
  .companies {
    padding: 60px 6%;
  }
  .companies-header h1 {
    font-size: 28px;
  }
  .companies-header p {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .companies {
    padding: 50px 5%;
  }
  .company-card {
    padding: 90px 15px 25px;
    min-height: 320px;
  }
  .company-card .logo img {
    width: 70px;
  }
  .companies-header h1 {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .companies-header h1 {
    font-size: 22px;
  }
  .company-card {
    padding: 80px 15px 20px;
  }
  .company-card h3 {
    font-size: 16px;
  }
  .company-card p {
    font-size: 13px;
  }
  .view-more {
    padding: 8px 18px;
    font-size: 14px;
  }
}
