/* TG Brand List — rows (Our Brands page) */
.tg-brand-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 4vw, 80px);
  align-items: start;
  margin-bottom: clamp(48px, 6vw, 96px);
}
.tg-brand-media {
  aspect-ratio: 4/3;
  position: relative;
}
/* Frame = brand primary colour (inline --tg-brand-color), else the widget's frame colour, else Taif gold. */
.tg-body .tg-brand-media {
  background-color: var(--tg-brand-color, var(--tg-frame, var(--tg-gold)));
  transition: background-color 0.4s ease;
}
/* No Our Brands image: logo centred on the brand colour. */
.tg-body .tg-brand-media.is-logo-only .tg-brand-media-logo img {
  min-height: 0;
  max-height: 140px;
  max-width: 56%;
}
.tg-body .tg-brand-media > img {
  min-height: 0;
}
.tg-brand-media-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tg-body .tg-brand-media-logo img {
  width: 100%;
  height: 100%;
  max-width: 52%;
  max-height: 110px;
  min-height: 340px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.96;
}
.tg-body .tg-brand-row-body .tg-h2 {
  margin-bottom: 14px;
}
.tg-body .tg-brand-row-body .svc-label {
  display: block;
  margin: 22px 0 12px;
  font-size: inherit;
  letter-spacing: normal;
  text-transform: none;
  color: var(--tg-body);
}
.tg-brand-row-body .tg-svc-list {
  max-width: none;
}
.tg-brand-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.tg-body .tg-brand-actions .tg-btn {
  margin: 0;
  white-space: nowrap;
}
/* Contact details + social icons under the buttons (same look as the single brand page) */
.tg-brand-contact {
  margin-top: 40px;
}
.tg-brand-contact .tg-contact-row {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.tg-brand-contact .tg-contact-row > div {
  padding-block: 22px;
  min-width: 0;
}
.tg-brand-contact .tg-contact-row .v {
  display: block;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  overflow-wrap: anywhere;
}
.tg-brand-contact .tg-social {
  margin-top: 26px;
}
.tg-brand-contact .tg-social a {
  width: 46px;
  height: 46px;
}
@media (max-width: 900px) {
  .tg-brand-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 767px) {
  .tg-brand-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .tg-body .tg-brand-actions .tg-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Labels + collections lists */
.svc-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tg-muted);
  margin-bottom: 12px;
  display: block;
}
.tg-svc-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
}
.tg-svc-list li {
  position: relative;
  padding-inline-start: 18px;
  font-size: 0.92rem;
  color: var(--tg-body);
}
.tg-svc-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 10px;
  width: 8px;
  height: 1px;
  background: var(--tg-gold);
}
.tg-svc-list li a:hover {
  color: var(--tg-gold-deep);
}
@media (max-width: 520px) {
  .tg-svc-list {
    grid-template-columns: 1fr;
  }
}

/* Services cells */
.tg-brand-services {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tg-fcell.tg-svc {
  display: flex;
  flex-direction: column;
}
.tg-svc .svc-logo {
  height: 54px;
  display: flex;
  align-items: center;
  margin: 6px 0 18px;
}
.tg-body .tg-svc .svc-logo img {
  max-height: 54px;
  max-width: 140px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.85;
  transition: filter 0.4s, opacity 0.4s;
}
.tg-svc:hover .svc-logo img {
  filter: none;
  opacity: 1;
}
.tg-svc h3 {
  margin-bottom: 10px;
}
.tg-svc h3 a:hover {
  color: var(--tg-gold-deep);
}
.tg-body .tg-svc > p {
  color: var(--tg-body);
  font-size: 0.95rem;
  margin-bottom: 22px;
}
.tg-svc-foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  align-items: center;
}
@media (max-width: 620px) {
  .tg-brand-services {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Cards */
.tg-brands {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 2.5vw, 40px);
}
@media (max-width: 800px) {
  .tg-brands {
    grid-template-columns: 1fr;
  }
}
.tg-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--tg-line);
  background: var(--tg-bg);
  overflow: hidden;
  transition: box-shadow 0.4s var(--tg-ease), transform 0.4s var(--tg-ease);
}
.tg-brand:hover {
  box-shadow: 0 30px 60px -34px rgba(4, 46, 56, 0.5);
  transform: translateY(-4px);
}
.tg-brand .media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tg-dark) 0%, var(--tg-gold-deep) 130%);
}
.tg-body .tg-brand .media img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--tg-ease);
}
.tg-brand:hover .media img.bg {
  transform: scale(1.06);
}
.tg-brand .media .logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.tg-body .tg-brand .media .logo img {
  max-height: 78px;
  max-width: 160px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.96;
}
.tg-brand .idx {
  position: absolute;
  top: 20px;
  inset-inline-end: 24px;
  z-index: 3;
  font-family: var(--tg-font-head);
  font-size: 0.85rem;
  color: #fff;
  font-weight: 600;
  opacity: 0.85;
}
.tg-brand .body {
  padding: clamp(26px, 2.6vw, 40px);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tg-brand .body h2,
.tg-brand .body h3 {
  margin: 0 0 10px;
}
.tg-brand .body .tag {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tg-gold-deep);
  margin-bottom: 14px;
  display: block;
}
.tg-body .tg-brand .body p {
  color: var(--tg-body);
  font-size: 0.95rem;
  margin-bottom: 24px;
}
.tg-brand .body .tg-textlink {
  margin-top: auto;
  align-self: flex-start;
}
