/* Homepage visual system */
main {
  --home-line: rgba(var(--text), 0.1);
  --home-surface: rgba(var(--div-bg), 0.82);
  --home-muted: rgba(var(--text), 0.68);
  --home-shadow: 0 24px 70px rgba(16, 24, 40, 0.08);
  --home-radius: 34px;
}

.home-main {
  position: relative;
  overflow: hidden;
}

.home-main::before,
.home-main::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(45vw, 680px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.home-main::before {
  top: 7%;
  left: -24%;
  background: rgba(var(--theme), 0.08);
}

.home-main::after {
  top: 48%;
  right: -28%;
  background: rgba(var(--blue), 0.07);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Keep legacy pages that also load this stylesheet on their previous hero shell. */
.hero:not(.home-hero) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  min-height: 700px;
  margin-top: 26px;
  border: 1px solid var(--home-line);
  border-radius: 60px 60px 10px 10px;
  background:
    linear-gradient(135deg, rgba(var(--theme), 0.12), transparent 42%),
    linear-gradient(315deg, rgba(var(--blue), 0.09), transparent 38%),
    rgba(var(--div-bg), 0.62);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  position: relative;
}

/* Hero */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(390px, 0.94fr);
  min-height: min(730px, calc(100vh - 110px));
  margin-top: clamp(22px, 3vw, 40px);
  border: 1px solid var(--home-line);
  border-radius: clamp(32px, 4vw, 54px);
  background:
    radial-gradient(
      circle at 12% 10%,
      rgba(var(--theme), 0.16),
      transparent 35%
    ),
    linear-gradient(
      145deg,
      rgba(var(--div-bg), 0.95),
      rgba(var(--div-bg), 0.58)
    );
  box-shadow: var(--home-shadow);
  overflow: hidden;
  position: relative;
}

.home-hero::before {
  content: "";
  position: absolute;
  left: -100px;
  bottom: -180px;
  width: 430px;
  height: 430px;
  border: 72px solid rgba(var(--theme), 0.055);
  border-radius: 50%;
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 6vw, 96px);
}

.hero-text h1 {
  margin: 22px 0 18px;
  color: rgba(var(--text), 1);
  font-size: clamp(35px, 4vw, 55px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-transform: none;
}

.hero-subtitle strong {
  display: block;
  max-width: 720px;
  margin-bottom: 18px;
  color: rgba(var(--theme), 1);
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.45;
}

.hero-text p {
  max-width: 700px;
  color: var(--home-muted);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.9;
}

.hero-text nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-text nav a,
.content-text .link a,
.view-all {
  padding: 12px 24px 10px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.hero-text nav a:hover,
.content-text .link a:hover,
.view-all:hover {
  transform: translateY(-2px);
}

.video-btn {
  color: rgba(var(--theme), 1);
}

.hero-image {
  position: relative;
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, transparent 48%, rgba(9, 13, 24, 0.58)),
    url("/assets/img/home/home.webp") center / cover no-repeat;
  overflow: hidden;
}

.hero-image::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12),
    transparent 45%
  );
  pointer-events: none;
}

.hero-image::after {
  content: "Question Bank  •  Model Test  •  Counseling";
  position: absolute;
  right: 50px;
  bottom: 50px;
  left: 50px;
  padding: 15px 20px 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(9, 13, 24, 0.42);
  font-size: clamp(12px, 1.3vw, 15px);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-align: center;
  backdrop-filter: blur(14px);
}

/* Shared section rhythm */
.services,
.popular-unis,
.ad-tech,
.qb,
.mt,
.counseling {
  margin-top: clamp(28px, 4vw, 54px);
  padding-block: clamp(50px, 6vw, 78px);
}

.services-text {
  max-width: 900px;
  margin: 0 auto clamp(30px, 4vw, 44px);
  text-align: center;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin: 0 auto clamp(30px, 4vw, 44px);
  text-align: left;
}

.services-text h2,
.section-header h2,
.content-text h2 {
  margin-bottom: 18px;
  color: rgba(var(--text), 1);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-transform: none;
}

.services-text h2::after,
.section-header h2::after,
.content-text h2::after {
  content: "";
  display: block;
  width: 46px;
  height: 4px;
  margin-top: 14px;
  border-radius: 999px;
  background: rgba(var(--theme), 1);
}

.services-text h2::after {
  margin-inline: auto;
}

.services-text p,
.section-header p,
.content-text p {
  color: var(--home-muted);
  font-size: clamp(15px, 1vw, 16px);
  line-height: 1.9;
}

.services-text p {
  width: min(100%, 790px);
  margin: 0 auto;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  list-style: none;
  border: 1px solid var(--home-line);
  border-radius: 8px;
  background: rgba(var(--div-bg), 0.76);
  overflow: hidden;
  transition: 0.24s ease;
}

.service-card:hover {
  border-color: rgba(var(--theme), 0.34);
  background: rgba(var(--theme), 0.08);
  transform: translateY(-5px);
  box-shadow: 0 20px 55px rgba(var(--theme), 0.12);
}

.service-card a {
  display: block;
  height: 100%;
  color: inherit;
}

.service-card article {
  display: grid;
  min-height: 150px;
  place-items: center;
  gap: 12px;
  padding: 26px 18px;
  text-align: center;
}

.service-card i {
  display: flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(var(--theme), 0.08);
}

.service-card svg {
  width: 30px;
  height: 30px;
  margin: 0;
  color: rgba(var(--theme), 1);
  transform: none;
}

.service-card h3 {
  color: rgba(var(--text), 0.88);
  font-size: 15px;
  font-weight: 900;
}

/* Editorial content panels */
.content,
.contents {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: clamp(36px, 5vw, 76px);
  align-items: center;
}

.contents {
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
}

.ad-tech,
.qb,
.mt,
.counseling {
  padding: clamp(36px, 5vw, 90px);
  border: 1px solid var(--home-line);
  border-radius: var(--home-radius);
  background:
    linear-gradient(145deg, rgba(var(--theme), 0.055), transparent 43%),
    var(--home-surface);
  box-shadow: 0 18px 55px rgba(16, 24, 40, 0.055);
  overflow: hidden;
}

.qb,
.counseling {
  background:
    linear-gradient(215deg, rgba(var(--blue), 0.06), transparent 42%),
    var(--home-surface);
}

.content-text {
  min-width: 0;
}

.content-text p {
  max-width: 760px;
}

.ad-tech h2 .top-text {
  display: block;
  margin-bottom: 8px;
  color: rgba(var(--theme), 0.82);
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.content-text ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 32px 0;
  counter-reset: feature;
}

.content-text ol li {
  position: relative;
  min-height: 58px;
  padding: 17px 18px 15px 50px;
  border: 1px solid rgba(var(--theme), 0.1);
  border-radius: 16px;
  background: rgba(var(--theme), 0.065);
  color: rgba(var(--text), 0.78);
  font-weight: 750;
  list-style: none;
  counter-increment: feature;
}

.content-text ol li::before {
  content: counter(feature, decimal-leading-zero);
  position: absolute;
  top: 17px;
  left: 17px;
  color: rgba(var(--theme), 1);
  font-size: 12px;
  font-weight: 900;
}

.content-img {
  position: relative;
  margin: 0;
  padding: clamp(20px, 3vw, 38px);
}

.content-img::before {
  content: "";
  position: absolute;
  inset: 8% 4%;
  z-index: 0;
  border-radius: 46% 54% 55% 45% / 45% 42% 58% 55%;
  background: rgba(var(--theme), 0.04);
  transform: rotate(-4deg);
}

.contents .content-img::before {
  transform: rotate(4deg);
}

.content-img img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  filter: drop-shadow(0 22px 30px rgba(16, 24, 40, 0.12));
}

.link {
  margin-top: 32px;
}

/* Running admissions */
.popular-unis {
  width: min(92%, 1500px);
  padding-inline: clamp(28px, 4vw, 64px);
  border-radius: var(--home-radius);
}

.section-header p {
  max-width: 800px;
}
.view-all {
  flex: 0 0 auto;
  border: 1px solid rgba(var(--theme), 0.15);
}

.uni-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 26px);
}

.uni-card {
  position: relative;
  border: 1px solid var(--home-line);
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(var(--div-bg), 0.98),
    rgba(var(--div-bg), 0.86)
  );
  box-shadow: 0 16px 42px rgba(16, 24, 40, 0.07);
  overflow: hidden;
  transition:
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.uni-card:hover {
  border-color: rgba(var(--theme), 0.34);
  transform: translateY(-4px);
  box-shadow: 0 26px 58px rgba(var(--theme), 0.13);
}

.card-link {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.card-link::after {
  content: "↗";
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #fff;
  background: rgba(9, 13, 24, 0.38);
  font-size: 17px;
  backdrop-filter: blur(10px);
  transition:
    transform 0.25s ease,
    background 0.25s ease;
}

.uni-card:hover .card-link::after {
  background: rgba(var(--theme), 0.88);
  transform: rotate(8deg);
}

.uni-card figure {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background: rgba(var(--text), 0.05);
}

.uni-card figure::after {
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(180deg, transparent, rgba(5, 10, 18, 0.7));
  content: "";
  pointer-events: none;
}

.uni-card figure > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
}

.uni-card:hover figure > img {
  transform: scale(1.055);
  opacity: 1;
}

.uni-card figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.uni-card figcaption span,
.uni-card figcaption strong {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px 4px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(9, 13, 24, 0.42);
  font-size: 11px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.uni-card figcaption strong {
  color: rgba(var(--op-theme), 1);
  background: rgba(var(--theme), 0.92);
}

.card-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 20px 20px;
}

.uni-card-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  margin-top: -24px;
  position: relative;
  z-index: 2;
}

.uni-logo {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  padding: 6px;
  border: 1px solid rgba(var(--text), 0.1);
  border-radius: 8px;
  background: rgba(var(--div-bg), 1);
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.12);
}

.uni-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
}

.uni-card h3 {
  color: #fff;
  font-size: clamp(20px, 1.5vw, 24px);
  font-weight: 950;
  line-height: 1.05;
}

.uni-card p {
  min-height: 42px;
  margin: 7px 0 0;
  color: rgba(var(--text), 0.58);
  font-size: 14px;
  line-height: 1.55;
}

.uni-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 12px;
}

.uni-meta span {
  min-width: 0;
  padding: 10px 8px 8px;
  border: 1px solid rgba(var(--text), 0.075);
  border-radius: 8px;
  color: rgba(var(--text), 0.54);
  background: rgba(var(--theme), 0.045);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.uni-meta b {
  display: block;
  margin-bottom: 3px;
  color: rgba(var(--text), 0.92);
  font-size: 14px;
  font-weight: 950;
}

.uni-details {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.uni-details span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  color: rgba(var(--text), 0.68);
  background: rgba(var(--text), 0.045);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.uni-details svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: rgba(var(--theme), 1);
}

.uni-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(var(--text), 0.075);
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 999px;
  color: rgba(var(--text), 0.72);
  background: rgba(var(--orange), 0.08);
  font-size: 12px;
  font-weight: 800;
}

.rating svg {
  width: 13px;
  height: 13px;
  color: rgba(var(--orange), 1);
}

.trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 11px 4px;
  border-radius: 999px;
  color: rgba(var(--theme), 1);
  background: rgba(var(--theme), 0.09);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

/* CEO */
.ceo-message {
  padding-block: clamp(86px, 10vw, 150px) clamp(40px, 6vw, 80px);
}

.ceo-message .content {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: clamp(38px, 6vw, 90px);
  padding: 40px clamp(30px, 6vw, 90px);
  border: 1px solid var(--home-line);
  border-radius: var(--home-radius);
  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(var(--theme), 0.13),
      transparent 32%
    ),
    linear-gradient(
      145deg,
      rgba(var(--div-bg), 0.94),
      rgba(var(--div-bg), 0.65)
    );
  box-shadow: var(--home-shadow);
}

.ceo-message .content-text article {
  max-width: 820px;
  color: var(--home-muted);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 2;
}

.ceo-message .content-text article p + p {
  margin-top: 16px;
}

.quote-sign {
  display: inline-block;
  color: rgb(var(--theme));
  font-size: 48px;
  line-height: 0.3;
  transform: translateY(9px);
}

.ceo_img {
  width: min(100%, 320px);
  margin: 0 auto;
  animation: float 4s ease-in-out infinite;
}

.ceo_img svg {
  display: block;
  width: 100%;
  height: auto;
  color: rgba(var(--theme), 0.72);
}

.mask-image,
.mask-head {
  width: 550px;
}

html[data-theme="dark"] .home-main {
  --home-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

@media (max-width: 1180px) {
  .home-hero,
  .content,
  .contents {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: 0;
  }
  .hero-image {
    min-height: 480px;
  }

  .content-img {
    width: min(100%, 620px);
    margin-inline: auto;
  }

  .ad-tech .content-img,
  .mt .content-img {
    grid-row: 1;
  }

  .services-grid,
  .uni-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ceo-message .content-text {
    order: 2;
  }
  .ceo_img {
    order: 1;
  }
}

@media (max-width: 768px) {
  .home-main {
    --home-radius: 26px;
  }

  .home-hero {
    width: 92%;
    margin-top: 18px;
    border-radius: 28px;
  }

  .hero-text {
    padding: 42px 26px 38px;
  }
  .hero-text h1 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .hero-text nav,
  .hero-text nav a {
    width: 100%;
  }

  .hero-image {
    min-height: 340px;
  }
  .hero-image::before {
    inset: 16px;
    border-radius: 20px;
  }

  .hero-image::after {
    right: 28px;
    bottom: 28px;
    left: 28px;
    padding-inline: 12px;
  }

  .services,
  .ad-tech,
  .qb,
  .mt,
  .counseling {
    width: 92%;
  }

  .services {
    padding-block: 48px;
  }

  .ad-tech,
  .qb,
  .mt,
  .counseling {
    padding: 32px 24px;
  }

  .popular-unis {
    width: 94%;
    padding: 48px 22px;
  }

  .section-header {
    flex-direction: column;
  }

  .services-grid,
  .uni-grid {
    grid-template-columns: 1fr;
  }

  .uni-card-head {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .uni-logo {
    width: 54px;
    height: 54px;
  }

  .uni-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .rating,
  .trend {
    width: 100%;
  }

  .content-text ol {
    grid-template-columns: 1fr;
  }
  .content-img {
    padding: 10px;
  }

  .ceo-message .content {
    width: 92%;
    padding: 36px 24px;
  }
}
