/*
 * // File: /assets/css/cards.css
 *
 * Developed by Noor United Est.
 *
 * Website: www.noor-united.com
 *
 * Kuwait
 * Tel: +965-22280990
 * Mobile: +965-60005677
 *
 * Bahrain
 * Tel: +973-16612020 / +973-16613030
 * Mobile: +973-37616010
 *
 * Copyright (c) Noor United Est.
 * All rights reserved.
 */

:root {
  --primary: #c7922b;
  --primary-dark: #9f6f18;
  --primary-soft: #f8edd6;
  --dark: #111111;
  --muted: #6b7280;
  --bg: #f7f5f1;
  --card: #ffffff;
  --border: #eadfca;
}

/* ==============================
   Premium Company Card
============================== */

.company-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 26px 22px;
  text-align: center;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.07);
  transition: 0.25s ease;
  overflow: hidden;
}

.company-card:hover {
  transform: translateY(-4px);
  border-color: rgba(199, 146, 43, 0.65);
  box-shadow: 0 24px 50px rgba(199, 146, 43, 0.14);
}

.company-card-logo {
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background: #fbf7ee;
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.company-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.company-card-logo span {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary-dark);
}

.company-card-body {
  text-align: center;
}

.company-card-body h3 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 900;
  color: var(--dark);
}

.company-card-body h3 a {
  color: var(--dark);
  text-decoration: none;
}

.company-card-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  margin: 0 auto 16px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
}

.company-card-body p {
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
  max-width: 92%;
}

.company-card-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.company-card-actions a {
  min-width: 78px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--primary-dark);
  background: #fff;
  text-decoration: none;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.company-card-actions a.primary,
.company-card-actions a:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

/* ==============================
   Old Company Profile Card Support
============================== */

.company-profile-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
}

.company-cover {
  display: block;
  width: 100%;
  height: 185px;
  overflow: hidden;
  background: linear-gradient(135deg, #fbf7ee, #ffffff);
  text-decoration: none;
}

.company-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.company-profile-card:hover .company-cover img {
  transform: scale(1.04);
}

.company-cover-placeholder {
  width: 100%;
  height: 185px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-size: 58px;
  font-weight: 900;
}

.company-info {
  position: relative;
  padding: 54px 22px 24px;
  text-align: center;
}

.company-logo {
  position: absolute;
  top: -42px;
  left: 50%;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  overflow: hidden;
  border: 5px solid #ffffff;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
}

.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.company-logo span {
  font-size: 32px;
  font-weight: 900;
}

.company-info h3 {
  margin: 0 0 8px;
  color: var(--dark);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.3;
}

.company-specialty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
}

.company-info p {
  min-height: 58px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.company-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.company-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.company-actions a.primary,
.company-actions a:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
}

/* ==============================
   Main Categories Page
============================== */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 34px;
}

.main-category-card {
  display: block;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
  text-align: center;
  text-decoration: none;
  transition: 0.25s ease;
}

.main-category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(199, 146, 43, 0.65);
}

.main-category-image {
  width: 100%;
  height: 155px;
  overflow: hidden;
  border-radius: 22px;
  background: #fbf7ee;
}

.main-category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.main-category-placeholder {
  width: 100%;
  height: 155px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-size: 52px;
  font-weight: 800;
}

.main-category-card h3 {
  margin: 16px 0 4px;
  color: var(--dark);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.4;
}

/* ==============================
   Subcategory Bar
============================== */

.subcategory-bar {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 2px 18px;
  margin: 20px 0 20px;
  scrollbar-width: none;
}

.subcategory-bar::-webkit-scrollbar {
  display: none;
}

.subcategory-bar a {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: #1f2937;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.subcategory-bar a.active,
.subcategory-bar a:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
}

/* ==============================
   General Cards / Grid
============================== */

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

/* ==============================
   Category Card
============================== */

.category-card {
  padding: 24px;
  text-align: center;
}

.category-card h3 {
  margin: 0 0 14px;
  color: var(--dark);
  font-size: 24px;
  font-weight: 800;
}

.category-card a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 700;
}

.category-card a:hover {
  text-decoration: underline;
}

/* ==============================
   Event Card
============================== */

.event-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
}

.event-card-image {
  display: block;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: #fbf7ee;
  text-decoration: none;
}

.event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placeholder-image {
  width: 100%;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.event-card-body {
  padding: 20px;
}

.event-card-type {
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
}

.event-card-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.4;
}

.event-card-title a {
  color: var(--dark);
  text-decoration: none;
}

.event-card-title a:hover {
  color: var(--primary-dark);
}

.event-card-text {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.event-card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
}

.event-card-location {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

/* ==============================
   Question Card
============================== */

.question-card {
  padding: 22px;
}

.question-card h3 {
  margin: 0 0 10px;
  color: var(--dark);
  font-size: 22px;
  font-weight: 800;
}

.question-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.question-card a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 700;
}

.question-card a:hover {
  text-decoration: underline;
}

/* ==============================
   Empty State
============================== */

.empty-state {
  grid-column: 1 / -1;
  padding: 46px 24px;
  background: #ffffff;
  border-radius: 26px;
  color: var(--muted);
  text-align: center;
  font-size: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.04);
}

/* ==============================
   Mobile
============================== */

@media (max-width: 768px) {
  .grid,
  .companies-grid,
  .listing-grid,
  .cards-grid {
    gap: 12px !important;
    row-gap: 12px !important;
    margin-top: 18px !important;
  }

  .company-card,
  .company-profile-card {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
  }

  .company-card + .company-card,
  .company-profile-card + .company-profile-card {
    margin-top: 0 !important;
  }

  .company-card {
    width: calc(100% - 32px) !important;
    margin: 18px auto !important;
    padding: 24px 18px !important;
    border-radius: 28px !important;
    min-height: auto !important;
  }

  .company-card-logo {
    width: 86px !important;
    height: 86px !important;
    border-radius: 20px !important;
    margin-bottom: 18px !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
  }

  .company-card-body h3 {
    font-size: 24px !important;
    line-height: 1.25 !important;
    margin-bottom: 12px !important;
  }

  .company-card-badge {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
  }

  .company-card-body p {
    font-size: 16px;
    line-height: 1.9;
    margin-bottom: 24px;
  }

  .company-card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .company-card-actions a {
    min-width: 0;
    height: 46px;
    padding: 0 8px;
    font-size: 15px;
  }
}

@media (max-width: 600px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .main-category-card {
    padding: 10px;
    border-radius: 22px;
  }

  .main-category-image,
  .main-category-placeholder {
    height: 120px;
  }

  .main-category-placeholder {
    font-size: 42px;
  }

  .main-category-card h3 {
    font-size: 18px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 26px;
  }

  .company-cover,
  .company-cover-placeholder {
    height: 165px;
  }

  .company-info {
    padding: 50px 18px 22px;
  }

  .company-info h3 {
    font-size: 22px;
  }

  .company-actions {
    gap: 8px;
  }

  .company-actions a {
    min-height: 42px;
    font-size: 13px;
  }

  .event-card-image,
  .placeholder-image {
    height: 170px;
  }

  .event-card-title {
    font-size: 20px;
  }
}