/* ==========================================================
   HOME PAGE - ABOUT SCHOOL SECTION (index.php)
   ========================================================== */

.ab-section {
  --ab-navy: #1d2a5b;
  --ab-navy-2: #253993;
  --ab-rose: #ff1f59;
  --ab-gold: #ffc107;
  --ab-ink: #283034;
  --ab-muted: #5f6972;
  --ab-line: #e6e9ef;
  position: relative;
  overflow: hidden;
  padding: 100px 0 90px;
  background: #fff;
}

/* soft rose glow in the bottom-left */
.ab-section::before {
  content: "";
  position: absolute;
  left: -200px;
  bottom: -200px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 31, 89, .06) 0, rgba(255, 31, 89, 0) 70%);
  pointer-events: none;
}

/* ---------- Image ---------- */
.ab-visual {
  position: relative;
  max-width: 500px;
  margin: 0 auto 0 0;
  padding: 26px 30px 40px 26px;
}

/* gradient ring behind the photo */
.ab-visual::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 70%;
  height: 70%;
  border: 3px solid transparent;
  border-radius: 32px 120px 32px 32px;
  background: linear-gradient(135deg, var(--ab-navy-2), var(--ab-rose)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .8;
}

/* dotted pattern bottom-right */
.ab-visual::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 10px;
  width: 130px;
  height: 130px;
  background-image: radial-gradient(rgba(255, 31, 89, .35) 2px, transparent 2px);
  background-size: 14px 14px;
  pointer-events: none;
}

.ab-photo {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 28px 120px 28px 28px;   /* one sweeping corner */
  box-shadow: 0 30px 60px -28px rgba(29, 42, 91, .6);
}

.ab-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 545 / 555;
  object-fit: cover;
  transition: transform .7s;
}

.ab-visual:hover .ab-photo img {
  transform: scale(1.04);
}

/* circular "Est. 2010" badge */
.ab-est {
  position: absolute;
  z-index: 2;
  right: 6px;
  bottom: 14px;
  width: 118px;
  height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 6px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ab-navy-2), var(--ab-rose));
  box-shadow: 0 16px 32px -14px rgba(255, 31, 89, .7);
}

.ab-est small {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .85;
}

.ab-est strong {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
}

/* floating "CBSE Affiliated" card */
.ab-float {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 34px -16px rgba(29, 42, 91, .5);
  animation: ab-float 4.5s ease-in-out infinite;
}

.ab-float-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--ab-navy);
  border-radius: 10px;
  background: var(--ab-gold);
}

.ab-float span:last-child {
  font-size: .82rem;
  line-height: 1.3;
  color: var(--ab-muted);
}

.ab-float strong {
  display: block;
  font-size: .95rem;
  color: var(--ab-ink);
}

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

@media (prefers-reduced-motion: reduce) {
  .ab-float { animation: none; }
}

/* ---------- Text ---------- */
.ab-txt {
  padding-left: 20px;
}

.ab-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ab-navy-2);
  border-radius: 30px;
  background: #eef1fb;
}

.ab-title {
  position: relative;
  margin: 14px 0 20px;
  padding-bottom: 14px;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--ab-ink);
}

.ab-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--ab-navy-2), var(--ab-rose));
}

.ab-txt p {
  color: var(--ab-muted);
}

.ab-txt .ab-lead {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ab-ink);
}

/* three fact tiles */
.ab-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0 22px;
}

.ab-fact {
  position: relative;
  padding: 14px 16px;
  border: 1px solid var(--ab-line);
  border-radius: 14px;
  background: #fff;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.ab-fact::before {
  content: "";
  position: absolute;
  left: 16px;
  top: -1px;
  width: 28px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--ab-navy-2), var(--ab-rose));
}

.ab-fact:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: 0 14px 28px -16px rgba(29, 42, 91, .45);
}

.ab-fact strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ab-navy-2);
}

.ab-fact span {
  font-size: .8rem;
  color: var(--ab-muted);
}

/* focus chips */
.ab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 6px;
  padding: 0;
  list-style: none;
}

.ab-chips li {
  padding: 6px 14px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ab-ink);
  border: 1px solid var(--ab-line);
  border-radius: 30px;
  background: #fafbfd;
  transition: all .2s;
}

.ab-chips li:hover {
  color: #fff;
  border-color: transparent;
  background: var(--ab-rose);
}

.ab-txt .btn {
  margin-top: 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .ab-section { padding: 70px 0 60px; }
  .ab-visual { margin: 0 auto 50px; }
  .ab-txt { padding-left: 0; }
}

@media (max-width: 575px) {
  .ab-title { font-size: 2.1rem; }
  .ab-facts { grid-template-columns: 1fr; }
  .ab-est { width: 96px; height: 96px; }
  .ab-est strong { font-size: 1.5rem; }
  .ab-float { bottom: 50px; }
  .ab-visual::after { display: none; }
}

/* ==========================================================
   HOME PAGE - ABOUT BLDEA (dark band between the light sections)
   ========================================================== */

.bd-section {
  position: relative;
  overflow: hidden;
  padding: 90px 0;
  color: #fff;
  background:
    radial-gradient(circle at 85% 0, rgba(255, 31, 89, .30) 0, rgba(255, 31, 89, 0) 45%),
    radial-gradient(circle at 10% 100%, rgba(37, 57, 147, .65) 0, rgba(37, 57, 147, 0) 50%),
    #161f45;
}

/* faint rings, top-left and bottom-right */
.bd-section::before,
.bd-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 18px solid rgba(255, 255, 255, .04);
  pointer-events: none;
}

.bd-section::before {
  width: 300px;
  height: 300px;
  left: -110px;
  top: -120px;
}

.bd-section::after {
  width: 380px;
  height: 380px;
  right: -140px;
  bottom: -170px;
}

.bd-inner {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.bd-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffb3c6;
  border-radius: 30px;
  background: rgba(255, 255, 255, .08);
}

.bd-title {
  position: relative;
  margin: 14px 0 22px;
  padding-bottom: 14px;
  font-size: 2.6rem;
  font-weight: 800;
  color: #fff;
}

.bd-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 60px;
  height: 4px;
  margin-left: -30px;
  border-radius: 4px;
  background: linear-gradient(90deg, #4c67e0, #ff1f59);
}

.bd-section p.bd-text {
  margin: 0 auto;
  color: rgba(255, 255, 255, .82);
}

.bd-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 820px;
  margin: 34px auto 34px;
}

.bd-stat {
  padding: 18px 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  transition: background .25s, transform .25s;
}

.bd-stat:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, .1);
}

.bd-stat strong {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}

.bd-stat span {
  font-size: .85rem;
  letter-spacing: .03em;
  color: rgba(255, 255, 255, .65);
}

@media (max-width: 767px) {
  .bd-section { padding: 64px 0; }
  .bd-title { font-size: 2.1rem; }
  .bd-stats { grid-template-columns: 1fr; }
}

/* ==========================================================
   HOME PAGE - NEWS & EVENTS
   ========================================================== */

.nw-section {
  --nw-navy: #1d2a5b;
  --nw-navy-2: #253993;
  --nw-rose: #ff1f59;
  --nw-ink: #283034;
  --nw-muted: #5f6972;
  --nw-line: #dfe4ee;
  position: relative;
  overflow: hidden;
  padding: 90px 0 80px;
  background: #e8ecf4;
}

/* dotted pattern in the top-right corner */
.nw-section::before {
  content: "";
  position: absolute;
  right: 40px;
  top: 40px;
  width: 140px;
  height: 140px;
  background-image: radial-gradient(rgba(37, 57, 147, .18) 2px, transparent 2px);
  background-size: 14px 14px;
  pointer-events: none;
}

/* ---------- Heading row ---------- */
.nw-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}

.nw-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--nw-rose);
  border-radius: 30px;
  background: #fff;
}

.nw-title {
  position: relative;
  margin: 14px 0 0;
  padding-bottom: 14px;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--nw-ink);
}

.nw-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--nw-navy-2), var(--nw-rose));
}

.nw-head .btn {
  flex: 0 0 auto;
  margin-bottom: 6px;
}

/* ---------- Event cards ---------- */
.nw-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  color: var(--nw-ink);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 34px -24px rgba(29, 42, 91, .45);
  transition: transform .3s, box-shadow .3s;
}

.nw-card:hover {
  color: var(--nw-ink);
  transform: translateY(-5px);
  box-shadow: 0 24px 44px -24px rgba(29, 42, 91, .6);
}

.nw-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.nw-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s;
}

.nw-card:hover .nw-card-img img {
  transform: scale(1.06);
}

.nw-date {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 6px 12px;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--nw-navy-2), var(--nw-rose));
}

.nw-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 20px 22px 22px;
}

.nw-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.45;
}

.nw-more {
  margin-top: auto;
  font-size: .9rem;
  font-weight: 700;
  color: var(--nw-rose);
}

.nw-more i {
  margin-left: 4px;
  transition: transform .25s;
}

.nw-card:hover .nw-more i {
  transform: translateX(4px);
}

/* ---------- "Coming soon" state ---------- */
.nw-empty {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 46px 40px 40px;
  text-align: center;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 50px -30px rgba(29, 42, 91, .5);
}

/* gradient strip along the top edge */
.nw-empty::before {
  content: "";
  position: absolute;
  left: 40px;
  right: 40px;
  top: 0;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--nw-navy-2), var(--nw-rose));
}

.nw-empty-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--nw-navy-2), var(--nw-rose));
  box-shadow: 0 0 0 10px #fff0f4, 0 14px 30px -12px rgba(255, 31, 89, .7);
}

.nw-empty-title {
  margin-bottom: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--nw-ink);
}

.nw-section p.nw-empty-text {
  margin: 0 auto 20px;
  max-width: 460px;
  color: var(--nw-muted);
}

.nw-empty-link {
  font-weight: 700;
  color: var(--nw-navy-2);
}

.nw-empty-link:hover {
  color: var(--nw-rose);
}

.nw-empty-link i {
  margin-left: 4px;
  transition: transform .25s;
}

.nw-empty-link:hover i {
  transform: translateX(4px);
}

@media (max-width: 767px) {
  .nw-section { padding: 64px 0 56px; }
  .nw-head { flex-direction: column; align-items: flex-start; }
  .nw-title { font-size: 2.1rem; }
  .nw-empty { padding: 40px 22px 32px; }
}

/* ==========================================================
   HOME PAGE - BLDEA LEGACY PORTRAITS (.legacy-p)
   ========================================================== */

.legacy-p .text-center {
  margin-bottom: 26px;
}

/* all portraits share one shape, framed with a gradient border */
.legacy-p img {
  display: block;
  --lg-h: 232px;              /* one shared height for every photo in the row */
  height: var(--lg-h);
  width: auto;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  margin: 0 auto 16px !important;
  object-fit: cover;
  object-position: center 25%;
  padding: 6px;
  border: 2px solid transparent;
  border-radius: 22px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #253993, #ff1f59) border-box;
  box-shadow: 0 18px 36px -20px rgba(29, 42, 91, .55);
  transition: transform .35s, box-shadow .35s;
}

.legacy-p .text-center:hover img {
  transform: translateY(-6px);
  box-shadow: 0 26px 44px -20px rgba(255, 31, 89, .45);
}

/* Dr. M. B. Patil's photo keeps its original wide shape, with the same frame */
.legacy-p img[src*="presidents-message-small"] {
  aspect-ratio: auto;          /* keep the wide shape; height comes from --lg-h */
  width: auto;
  object-position: center;
}

/* names */
.legacy-p .text-center p {
  position: relative;
  margin: 0;
  padding-bottom: 10px;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.4;
  color: #283034;
}

.legacy-p .text-center p::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 30px;
  height: 3px;
  margin-left: -15px;
  border-radius: 3px;
  background: linear-gradient(90deg, #253993, #ff1f59);
  transition: width .3s, margin-left .3s;
}

.legacy-p .text-center:hover p::after {
  width: 54px;
  margin-left: -27px;
}

/* line the single portrait on the right up with the three on the left */
.legacy-p > [class*="col-md-5"] .text-center {
  padding-top: 0;
}

@media (max-width: 767px) {
  .legacy-p img { --lg-h: 200px; }
}

/* tablets: the three portrait columns are narrow, so shrink the shared height */
@media (min-width: 768px) and (max-width: 991.95px) {
  .legacy-p img { --lg-h: 160px; }
}

/* ==========================================================
   HOME PAGE - FACILITIES CAROUSEL
   ========================================================== */

.hf-section {
  --hf-navy: #1d2a5b;
  --hf-navy-2: #253993;
  --hf-rose: #ff1f59;
  --hf-ink: #283034;
  position: relative;
  overflow: hidden;
  padding: 90px 0 80px;
  background: #fff;
}

/* ---------- Heading row ---------- */
.hf-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}

.hf-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hf-navy-2);
  border-radius: 30px;
  background: #eef1fb;
}

.hf-title {
  position: relative;
  margin: 14px 0 0;
  padding-bottom: 14px;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--hf-ink);
}

.hf-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--hf-navy-2), var(--hf-rose));
}

.hf-head .btn {
  flex: 0 0 auto;
  margin-bottom: 6px;
}

/* ---------- Cards ---------- */
.hf-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  background: var(--hf-navy);
  box-shadow: 0 18px 36px -24px rgba(29, 42, 91, .6);
}

.hf-card img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100%;
  object-fit: cover;
  transition: transform .7s;
}

.hf-card:hover img {
  transform: scale(1.08);
}

/* dark gradient so the text reads over any photo */
.hf-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 22px 22px;
  color: #fff;
  background: linear-gradient(180deg, rgba(22, 31, 69, 0) 35%, rgba(22, 31, 69, .92) 100%);
  transition: background .4s;
}

.hf-card:hover .hf-overlay {
  background: linear-gradient(180deg, rgba(22, 31, 69, .15) 0%, rgba(22, 31, 69, .95) 100%);
}

/* gradient accent line above the name */
.hf-name {
  position: relative;
  margin: 0;
  padding-top: 14px;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.hf-name::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 3px;
  border-radius: 3px;
  background: var(--hf-rose);
  transition: width .35s;
}

.hf-card:hover .hf-name::before {
  width: 60px;
}

.hf-section p.hf-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 8px 0 0;
  font-size: .9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .8);
}

/* "Explore" slides up on hover */
.hf-more {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  font-size: .9rem;
  font-weight: 700;
  color: #ffb3c6;
  opacity: 0;
  transition: max-height .35s, margin-top .35s, opacity .35s;
}

.hf-card:hover .hf-more,
.hf-card:focus-visible .hf-more {
  max-height: 30px;
  margin-top: 12px;
  opacity: 1;
}

.hf-more i {
  margin-left: 4px;
}

.hf-card:focus-visible {
  outline: 3px solid var(--hf-rose);
  outline-offset: 3px;
}

/* ---------- Carousel arrows & dots ---------- */
.hf-carousel .owl-stage-outer {
  padding: 6px 0 20px;       /* room for the card shadows */
}

.hf-carousel .owl-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.hf-carousel .owl-nav button.owl-prev,
.hf-carousel .owl-nav button.owl-next {
  width: 46px;
  height: 46px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem !important;
  color: var(--hf-navy) !important;
  border: 1px solid #dfe4ee !important;
  border-radius: 50%;
  background: #fff !important;
  transition: all .25s;
}

.hf-carousel .owl-nav button.owl-prev:hover,
.hf-carousel .owl-nav button.owl-next:hover {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--hf-navy-2), var(--hf-rose)) !important;
}

.hf-carousel .owl-nav.disabled {
  display: none;
}

.hf-carousel .owl-dots {
  margin-top: 14px;
  text-align: center;
}

.hf-carousel .owl-dot span {
  width: 8px !important;
  height: 8px !important;
  margin: 4px !important;
  background: #cfd5e1 !important;
  transition: width .3s;
}

.hf-carousel .owl-dot.active span {
  width: 24px !important;
  background: var(--hf-rose) !important;
}

@media (max-width: 767px) {
  .hf-section { padding: 64px 0 56px; }
  .hf-head { flex-direction: column; align-items: flex-start; }
  .hf-title { font-size: 2.1rem; }
  .hf-more { max-height: 30px; margin-top: 12px; opacity: 1; }   /* no hover on touch screens */
}

/* spacing between cards (custom.js starts this carousel with no margin) */
.hf-carousel {
  width: auto;
  margin: 0 -10px;
}

.hf-carousel .owl-item {
  padding: 0 10px;
}

/* the arrows are images (images/prev.png, next.png): recolour them with a filter */
.hf-carousel .owl-nav img {
  transition: filter .25s, transform .25s;
}

.hf-carousel .owl-nav button:hover img {
  filter: brightness(0) invert(1);           /* grey arrow -> white on the gradient */
}

.hf-carousel .owl-nav button.owl-prev:hover img { transform: translateX(-3px); }
.hf-carousel .owl-nav button.owl-next:hover img { transform: translateX(3px); }
