/* About University (menu/about-university) — CMS rich layout */

#admin-rich-content-root .grnu-abu-page,
.grnu-inner-page .grnu-abu-page {
  --abu-green: #0f6a44;
  --abu-green-soft: rgba(15, 106, 68, 0.12);
  --abu-teal: #0d9488;
  --abu-slate: #1e293b;
  --abu-muted: #64748b;
  --abu-card: #ffffff;
  --abu-radius: 18px;
  box-sizing: border-box;
  margin: 0 0 2.5rem;
  padding: 0;
}

#admin-rich-content-root .grnu-abu-page *,
.grnu-inner-page .grnu-abu-page * {
  box-sizing: border-box;
}

/* Hero — to‘liq 100vw breakout yon panel / overflow ostida matn chapdan kesilmasin */
#admin-rich-content-root .grnu-abu-hero,
.grnu-inner-page .grnu-abu-hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  min-width: 0;
  min-height: clamp(220px, 42vw, 420px);
  overflow: hidden;
  /* Tepa + past: oq fon / subpixel orasidagi bo‘sh chiziqni yo‘qotish */
  border-radius: var(--abu-radius, 18px);
  isolation: isolate;
  -webkit-clip-path: inset(0 round var(--abu-radius, 18px));
  clip-path: inset(0 round var(--abu-radius, 18px));
  border-bottom: 3px solid #fff;
}

#admin-rich-content-root .grnu-abu-hero--no-photo,
.grnu-inner-page .grnu-abu-hero--no-photo {
  background: linear-gradient(
    135deg,
    #064e3b 0%,
    var(--abu-green) 42%,
    #0f766e 100%
  );
}

#admin-rich-content-root .grnu-abu-hero__media,
.grnu-inner-page .grnu-abu-hero__media {
  position: absolute;
  /* 1px tashqari — tepa burchakdagi sochilgan oq chiziq (anti-aliasing) */
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
}

#admin-rich-content-root .grnu-abu-hero__img,
.grnu-inner-page .grnu-abu-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
  border-radius: inherit;
  transform: translateZ(0);
}

#admin-rich-content-root .grnu-abu-hero__scrim,
.grnu-inner-page .grnu-abu-hero__scrim {
  position: absolute;
  inset: -1px;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(6, 78, 59, 0.92) 0%,
    rgba(15, 106, 68, 0.78) 38%,
    rgba(15, 106, 68, 0.35) 100%
  );
  pointer-events: none;
}

#admin-rich-content-root .grnu-abu-hero__inner,
.grnu-inner-page .grnu-abu-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: clamp(220px, 42vw, 420px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1rem, 3vw, 1.5rem) clamp(1.75rem, 4.5vw, 3rem);
}

#admin-rich-content-root .grnu-abu-hero__text,
.grnu-inner-page .grnu-abu-hero__text {
  max-width: min(720px, 100%);
  min-width: 0;
  width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

#admin-rich-content-root .grnu-abu-hero__title,
.grnu-inner-page .grnu-abu-hero__title {
  margin: 0 0 0.65rem;
  font-family: var(--grnu-font-heading, Poppins), Inter, system-ui, sans-serif;
  font-size: clamp(1.35rem, 3.2vw, 2.05rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

#admin-rich-content-root .grnu-abu-hero__lead,
.grnu-inner-page .grnu-abu-hero__lead {
  margin: 0 0 0.5rem;
  font-size: clamp(0.95rem, 1.55vw, 1.08rem);
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.94) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.94) !important;
  font-weight: 500;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.28);
  overflow-wrap: anywhere;
  word-break: break-word;
}

#admin-rich-content-root .grnu-abu-hero__lead:last-child,
.grnu-inner-page .grnu-abu-hero__lead:last-child {
  margin-bottom: 0;
}

/* Body strip + cards */
#admin-rich-content-root .grnu-abu-body,
.grnu-inner-page .grnu-abu-body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  padding-bottom: 0.5rem;
}

#admin-rich-content-root .grnu-abu-body + .grnu-abu-body,
.grnu-inner-page .grnu-abu-body + .grnu-abu-body {
  padding-top: clamp(0.75rem, 2vw, 1.25rem);
}

#admin-rich-content-root .grnu-abu-card,
.grnu-inner-page .grnu-abu-card {
  background: var(--abu-card);
  border: 1px solid var(--abu-green-soft);
  border-radius: var(--abu-radius);
  padding: clamp(1.15rem, 2.5vw, 1.65rem) clamp(1.1rem, 2.4vw, 1.5rem);
  margin-bottom: clamp(1rem, 2.2vw, 1.35rem);
  box-shadow: 0 10px 36px rgba(15, 106, 68, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
}

#admin-rich-content-root .grnu-abu-card::before,
.grnu-inner-page .grnu-abu-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--abu-teal), var(--abu-green));
  border-radius: 4px 0 0 4px;
  opacity: 0.95;
}

#admin-rich-content-root .grnu-abu-card--plain::before,
.grnu-inner-page .grnu-abu-card--plain::before {
  opacity: 0.5;
}

#admin-rich-content-root .grnu-abu-card--intro-tail,
.grnu-inner-page .grnu-abu-card--intro-tail {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

#admin-rich-content-root .grnu-abu-section__title,
.grnu-inner-page .grnu-abu-section__title {
  margin: 0 0 0.85rem;
  padding-left: 0.65rem;
  font-family: var(--grnu-font-heading, Poppins), Inter, sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

#admin-rich-content-root .grnu-abu-section__accent,
.grnu-inner-page .grnu-abu-section__accent {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-top: 0.42em;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--abu-teal), var(--abu-green));
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.25);
}

#admin-rich-content-root .grnu-abu-prose .grnu-abu-p,
.grnu-inner-page .grnu-abu-prose .grnu-abu-p {
  margin: 0 0 0.75rem;
  font-size: clamp(0.97rem, 1.2vw, 1.03rem);
  line-height: 1.68;
  color: var(--abu-slate) !important;
}

#admin-rich-content-root .grnu-abu-prose .grnu-abu-p:last-child,
.grnu-inner-page .grnu-abu-prose .grnu-abu-p:last-child {
  margin-bottom: 0;
}

#admin-rich-content-root .grnu-abu-subhead .grnu-abu-h3,
.grnu-inner-page .grnu-abu-subhead .grnu-abu-h3 {
  margin: clamp(0.5rem, 1.5vw, 0.85rem) 0 0.5rem;
  font-size: clamp(0.95rem, 1.45vw, 1.08rem);
  font-weight: 800;
  color: var(--abu-green) !important;
  -webkit-text-fill-color: var(--abu-green) !important;
  letter-spacing: 0.01em;
}

#admin-rich-content-root .grnu-abu-list,
.grnu-inner-page .grnu-abu-list {
  list-style: none;
  margin: 0 0 clamp(1rem, 2vw, 1.35rem);
  padding: 0.35rem 0 0.15rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 0.55rem 0.75rem;
}

#admin-rich-content-root .grnu-abu-list--programs,
.grnu-inner-page .grnu-abu-list--programs {
  margin-bottom: clamp(0.35rem, 1vw, 0.65rem);
}

#admin-rich-content-root .grnu-abu-list__item,
.grnu-inner-page .grnu-abu-list__item {
  margin: 0;
  padding: 0.62rem 0.75rem 0.62rem 0.85rem;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.95), #fff);
  border: 1px solid rgba(15, 106, 68, 0.14);
  border-radius: 12px;
  font-size: clamp(0.9rem, 1.15vw, 0.98rem);
  font-weight: 600;
  line-height: 1.4;
  color: #334155 !important;
  box-shadow: 0 2px 8px rgba(15, 106, 68, 0.05);
  position: relative;
  padding-left: 1.65rem;
}

#admin-rich-content-root .grnu-abu-list__item::before,
.grnu-inner-page .grnu-abu-list__item::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--abu-teal);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.35);
}

@media (max-width: 576px) {
  #admin-rich-content-root .grnu-abu-list,
  .grnu-inner-page .grnu-abu-list {
    grid-template-columns: 1fr;
  }
}

/* Programme direction cards (image + title) */
#admin-rich-content-root .grnu-abu-prog-cards,
.grnu-inner-page .grnu-abu-prog-cards {
  list-style: none;
  margin: 0 0 clamp(1rem, 2vw, 1.35rem);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.6rem, 1.5vw, 0.95rem);
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 576px) {
  #admin-rich-content-root .grnu-abu-prog-cards,
  .grnu-inner-page .grnu-abu-prog-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  #admin-rich-content-root .grnu-abu-prog-cards,
  .grnu-inner-page .grnu-abu-prog-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem 1rem;
  }
}

#admin-rich-content-root .grnu-abu-prog-card,
.grnu-inner-page .grnu-abu-prog-card {
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--abu-card);
  border: 1px solid rgba(15, 106, 68, 0.14);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(15, 106, 68, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#admin-rich-content-root .grnu-abu-prog-card:hover,
.grnu-inner-page .grnu-abu-prog-card:hover {
  box-shadow: 0 12px 36px rgba(15, 106, 68, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
}

#admin-rich-content-root .grnu-abu-prog-card__media,
.grnu-inner-page .grnu-abu-prog-card__media {
  position: relative;
  width: 100%;
  max-width: 100%;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 0;
  background: linear-gradient(145deg, #ecfdf5 0%, #f1f5f9 100%);
  overflow: hidden;
}

/* Eski brauzerlar / max-height override uchun kvadrat zaxirasi */
@supports not (aspect-ratio: 1 / 1) {
  #admin-rich-content-root .grnu-abu-prog-card__media,
  .grnu-inner-page .grnu-abu-prog-card__media {
    height: 0;
    padding-bottom: 100%;
  }
}

#admin-rich-content-root .grnu-abu-prog-card--no-photo .grnu-abu-prog-card__media,
.grnu-inner-page .grnu-abu-prog-card--no-photo .grnu-abu-prog-card__media {
  background: linear-gradient(145deg, rgba(15, 106, 68, 0.12) 0%, #e2e8f0 100%);
}

#admin-rich-content-root .grnu-abu-prog-card__img,
.grnu-inner-page .grnu-abu-prog-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

#admin-rich-content-root .grnu-abu-prog-card__ph,
.grnu-inner-page .grnu-abu-prog-card__ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(15, 106, 68, 0.08) 0%,
    rgba(13, 148, 136, 0.1) 50%,
    rgba(241, 245, 249, 0.95) 100%
  );
}

#admin-rich-content-root .grnu-abu-prog-card__body,
.grnu-inner-page .grnu-abu-prog-card__body {
  padding: 0.5rem 0.6rem 0.65rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
}

#admin-rich-content-root .grnu-abu-prog-card__title,
.grnu-inner-page .grnu-abu-prog-card__title {
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: clamp(0.85rem, 2.25vw, 0.9375rem);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: 0.01em;
  text-align: center;
  color: #1e293b !important;
  -webkit-text-fill-color: #1e293b !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#admin-rich-content-root .grnu-abu-prog-card__title .sr-only,
.grnu-inner-page .grnu-abu-prog-card__title .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 576px) {
  #admin-rich-content-root .grnu-abu-prog-cards,
  .grnu-inner-page .grnu-abu-prog-cards {
    grid-template-columns: 1fr;
  }
}

/*
 * Ichki sahifa (main.css / Bootstrap) ustidan: .page-content h4 va img height
 * changee.greenedu.uz kabi muhitlarda ham kvadrat media va kichik sarlavha.
 */
.grnu-inner-page .page-content .grnu-abu-page .grnu-abu-prog-card .grnu-abu-prog-card__media,
.grnu-inner-page #admin-rich-content-root .grnu-abu-page .grnu-abu-prog-card .grnu-abu-prog-card__media,
#admin-rich-content-root .grnu-abu-page .grnu-abu-prog-card .grnu-abu-prog-card__media {
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  position: relative !important;
  overflow: hidden !important;
}

.grnu-inner-page .page-content .grnu-abu-page .grnu-abu-prog-card .grnu-abu-prog-card__img,
.grnu-inner-page #admin-rich-content-root .grnu-abu-page .grnu-abu-prog-card .grnu-abu-prog-card__img,
#admin-rich-content-root .grnu-abu-page .grnu-abu-prog-card .grnu-abu-prog-card__img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
}

.grnu-inner-page .page-content .grnu-abu-page h4.grnu-abu-prog-card__title,
.grnu-inner-page #admin-rich-content-root .grnu-abu-page h4.grnu-abu-prog-card__title,
#admin-rich-content-root .grnu-abu-page h4.grnu-abu-prog-card__title {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  font-size: clamp(0.85rem, 2.25vw, 0.9375rem) !important;
  line-height: 1.32 !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  text-align: center !important;
}

.grnu-inner-page .page-content .grnu-abu-page .grnu-abu-prog-card .grnu-abu-prog-card__body,
.grnu-inner-page #admin-rich-content-root .grnu-abu-page .grnu-abu-prog-card .grnu-abu-prog-card__body,
#admin-rich-content-root .grnu-abu-page .grnu-abu-prog-card .grnu-abu-prog-card__body {
  align-items: center !important;
  text-align: center !important;
}
