/* =========================================================
   Govt. Polytechnic College, Waidhan, Singrauli – Landing Page
   ========================================================= */

:root {
  --primary: #0b3d91;
  --primary-dark: #082c69;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #f4f7fc;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 61, 145, 0.08);
  --shadow-lg: 0 18px 45px rgba(11, 61, 145, 0.16);
  --heading-font: 'Poppins', sans-serif;
  --body-font: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--body-font);
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--heading-font); font-weight: 600; }

a { text-decoration: none; }

img { max-width: 100%; }

/* ---------- Buttons ---------- */
.btn-accent {
  background: var(--accent);
  color: #111;
  border: none;
  font-weight: 600;
}
.btn-accent:hover, .btn-accent:focus { background: var(--accent-dark); color: #fff; }

.btn-primary-c {
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
  font-weight: 500;
  padding: .6rem 1.5rem;
}
.btn-primary-c:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-outline-primary-c {
  border: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 500;
  padding: .6rem 1.5rem;
}
.btn-outline-primary-c:hover { background: var(--primary); color: #fff; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--primary-dark);
  color: rgba(255,255,255,.85);
  font-size: .85rem;
  padding: .45rem 0;
}
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: var(--accent); }

/* ---------- Navbar ---------- */
.navbar {
  background: rgba(255,255,255,.98);
  box-shadow: 0 2px 15px rgba(0,0,0,.06);
  padding: .7rem 0;
  transition: padding .3s ease, box-shadow .3s ease;
}
.navbar.scrolled { padding: .4rem 0; box-shadow: 0 6px 25px rgba(0,0,0,.1); }

.brand-logo {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #1d64d8);
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--heading-font); font-size: 1.05rem; color: var(--primary); }
.brand-text small { font-size: .78rem; color: var(--muted); }
.footer .brand-text strong { color: #fff; }
.footer .brand-text small { color: rgba(255,255,255,.7); }

.navbar .nav-link {
  font-weight: 500;
  color: var(--text);
  padding: .5rem .8rem !important;
  position: relative;
}
.navbar .nav-link::after {
  content: '';
  position: absolute;
  left: .8rem; right: .8rem; bottom: .2rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--primary); }
.navbar .nav-link:hover::after, .navbar .nav-link.active::after { transform: scaleX(1); }

.navbar-toggler { border: none; font-size: 1.9rem; color: var(--primary); padding: 0; }
.navbar-toggler:focus { box-shadow: none; }

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero .carousel-item { height: 88vh; min-height: 520px; max-height: 820px; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,44,105,.92) 0%, rgba(8,44,105,.65) 50%, rgba(8,44,105,.25) 100%);
}
.hero .carousel-caption {
  top: 50%; bottom: auto;
  transform: translateY(-50%);
  left: 8%; right: 8%;
  text-align: left;
  max-width: 720px;
}
.hero-tag {
  display: inline-block;
  background: rgba(245,158,11,.18);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: .35rem 1rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: .5px;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero p { font-size: clamp(.95rem, 1.4vw, 1.12rem); color: rgba(255,255,255,.88); margin-bottom: 1.8rem; }
.hero .carousel-item.active .carousel-caption > * { animation: fadeUp .9s ease both; }
.hero .carousel-item.active .carousel-caption > *:nth-child(2) { animation-delay: .15s; }
.hero .carousel-item.active .carousel-caption > *:nth-child(3) { animation-delay: .3s; }
.hero .carousel-item.active .carousel-caption > *:nth-child(4) { animation-delay: .45s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Ticker ---------- */
.ticker { background: var(--accent); color: #111; font-weight: 500; overflow: hidden; }
.ticker .container { padding-top: .6rem; padding-bottom: .6rem; }
.ticker-label {
  background: var(--primary-dark);
  color: #fff;
  padding: .3rem .9rem;
  border-radius: 6px;
  font-size: .85rem;
  white-space: nowrap;
  margin-right: 1rem;
  z-index: 1;
}
.ticker-track { overflow: hidden; flex: 1; }
.ticker-content {
  display: inline-flex;
  gap: 3rem;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
  padding-left: 100%;
}
.ticker-track:hover .ticker-content { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ---------- Quick links ---------- */
.quick-links { margin-top: -1px; padding: 2.5rem 0 0; }
.quick-card {
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  color: var(--primary);
  font-weight: 600;
  font-family: var(--heading-font);
  border-bottom: 3px solid transparent;
  transition: all .3s ease;
  height: 100%;
}
.quick-card i { font-size: 1.6rem; color: var(--accent); }
.quick-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: var(--shadow-lg); color: var(--primary-dark); }

/* ---------- Section commons ---------- */
.section { padding: 90px 0; }
.bg-soft { background: var(--soft); }
.section-tag {
  display: inline-block;
  color: var(--accent-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: .8rem;
  margin-bottom: .5rem;
  position: relative;
  padding-left: 32px;
}
.section-tag::before {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 24px; height: 2px; background: var(--accent);
}
.text-center .section-tag { padding-right: 32px; }
.text-center .section-tag::after {
  content: ''; position: absolute; right: 0; top: 50%;
  width: 24px; height: 2px; background: var(--accent);
}
.section-tag.light { color: var(--accent); }
.section-title { font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--primary-dark); margin-bottom: 1rem; font-weight: 700; }
.section-sub { color: var(--muted); max-width: 640px; margin: 0 auto; }
.lead-text { font-size: 1.1rem; font-weight: 500; color: var(--text); }

/* ---------- About ---------- */
.about-media { position: relative; padding: 0 40px 60px 0; }
.about-media .main-img { width: 100%; height: 420px; object-fit: cover; box-shadow: var(--shadow-lg); }
.about-media .sub-img {
  position: absolute; right: 0; bottom: 0;
  width: 48%; height: 200px; object-fit: cover;
  border: 6px solid #fff;
  box-shadow: var(--shadow-lg);
}
.exp-badge {
  position: absolute; left: -10px; bottom: 30px;
  background: var(--accent);
  color: #111;
  padding: 1rem 1.3rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.exp-badge strong { display: block; font-family: var(--heading-font); font-size: 1.5rem; }
.exp-badge span { font-size: .8rem; font-weight: 600; }

.feature-mini { font-weight: 500; }
.feature-mini i { color: var(--accent-dark); font-size: 1.15rem; margin-right: .35rem; }

.vm-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  height: 100%;
  border-left: 4px solid var(--primary);
  transition: transform .3s ease;
}
.vm-card:hover { transform: translateY(-5px); }
.vm-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(11,61,145,.1);
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.vm-card p { color: var(--muted); margin: 0; }

/* ---------- Stats ---------- */
.stats {
  background: linear-gradient(rgba(8,44,105,.9), rgba(8,44,105,.9)),
              url('https://images.unsplash.com/photo-1498243691581-b145c3f54a5a?auto=format&fit=crop&w=1920&q=60') center/cover fixed;
  background-color: var(--primary-dark);
  color: #fff;
  padding: 70px 0;
}
.stat-item i { font-size: 2.4rem; color: var(--accent); }
.stat-item h3 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; margin: .5rem 0 .2rem; }
.stat-item p { margin: 0; color: rgba(255,255,255,.8); }

/* ---------- Courses ---------- */
.course-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 100%;
  transition: transform .35s ease, box-shadow .35s ease;
}
.course-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.course-img { position: relative; height: 200px; overflow: hidden; }
.course-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.course-card:hover .course-img img { transform: scale(1.08); }
.course-badge {
  position: absolute; top: 14px; right: 14px;
  background: var(--accent); color: #111;
  font-size: .75rem; font-weight: 600;
  padding: .3rem .8rem; border-radius: 50px;
}
.course-body { padding: 2.2rem 1.5rem 1.5rem; position: relative; }
.course-icon {
  position: absolute; top: -28px; left: 1.5rem;
  width: 56px; height: 56px;
  border-radius: 12px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 20px rgba(11,61,145,.3);
}
.course-body h5 { color: var(--primary-dark); }
.course-body p { color: var(--muted); font-size: .93rem; }
.course-meta {
  display: flex; justify-content: space-between;
  border-top: 1px solid #eef1f6;
  padding-top: .9rem;
  font-size: .85rem; font-weight: 500;
  color: var(--primary);
}

/* ---------- Principal ---------- */
.principal-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.principal-card .col-md-4 { background: linear-gradient(180deg, var(--soft), #fff); }
.principal-img {
  width: 180px; height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #fff;
  box-shadow: var(--shadow-lg);
}
.quote-icon { font-size: 3.5rem; color: var(--accent); line-height: 1; display: block; }
.principal-card h3 { color: var(--primary-dark); }
.principal-card p { color: var(--muted); }

/* ---------- Admission ---------- */
.step-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  height: 100%;
  transition: all .3s ease;
  overflow: hidden;
}
.step-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.step-no {
  position: absolute; top: 8px; right: 14px;
  font-family: var(--heading-font);
  font-size: 2.6rem; font-weight: 700;
  color: rgba(11,61,145,.08);
}
.step-card > i {
  font-size: 2.2rem;
  color: var(--primary);
  display: inline-grid; place-items: center;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: rgba(245,158,11,.15);
  margin-bottom: 1rem;
  transition: all .3s ease;
}
.step-card:hover > i { background: var(--primary); color: #fff; }
.step-card p { color: var(--muted); font-size: .92rem; margin: 0; }

.info-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}
.info-box h5 { color: var(--primary-dark); margin-bottom: 1rem; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 1.8rem; margin-bottom: .6rem; color: var(--muted); }
.check-list li::before {
  content: '\F26E';
  font-family: 'bootstrap-icons';
  position: absolute; left: 0; top: 0;
  color: var(--accent-dark);
  font-size: 1.1rem;
}

/* ---------- Facilities ---------- */
.facility-card {
  border: 1px solid #e8edf5;
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  height: 100%;
  transition: all .35s ease;
  position: relative;
  overflow: hidden;
  z-index: 0;
}
.facility-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--primary), #1d64d8);
  transform: translateY(100%);
  transition: transform .4s ease;
  z-index: -1;
}
.facility-card i { font-size: 2.4rem; color: var(--primary); transition: color .3s; }
.facility-card h5 { margin: 1rem 0 .5rem; color: var(--primary-dark); transition: color .3s; }
.facility-card p { color: var(--muted); margin: 0; transition: color .3s; }
.facility-card:hover { box-shadow: var(--shadow-lg); border-color: transparent; }
.facility-card:hover::before { transform: translateY(0); }
.facility-card:hover i { color: var(--accent); }
.facility-card:hover h5, .facility-card:hover p { color: #fff; }

/* ---------- Gallery ---------- */
.filter-btn {
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  border-radius: 50px;
  padding: .4rem 1.3rem;
  margin: .25rem;
  font-weight: 500;
  transition: all .25s;
}
.filter-btn.active, .filter-btn:hover { background: var(--primary); color: #fff; }

.gallery-item { transition: opacity .35s ease, transform .35s ease; }
.gallery-item.hide { display: none; }
.gallery-link { display: block; position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
.gallery-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-link span {
  position: absolute; inset: 0;
  background: rgba(8,44,105,.6);
  display: grid; place-items: center;
  color: #fff; font-size: 2rem;
  opacity: 0;
  transition: opacity .3s ease;
}
.gallery-link:hover img { transform: scale(1.1); }
.gallery-link:hover span { opacity: 1; }

#lightbox .modal-content img { max-height: 80vh; object-fit: contain; width: 100%; }
.modal-backdrop.show { opacity: .85; }

/* ---------- Notices & Events ---------- */
.panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  height: 100%;
}
.panel-head {
  background: var(--primary);
  color: #fff;
  padding: 1rem 1.5rem;
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 1.1rem;
}
.notice-scroll { height: 420px; overflow: hidden; position: relative; }
.notice-list { list-style: none; margin: 0; padding: .5rem 1.5rem; }
.notice-list li {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px dashed #dde3ee;
}
.notice-list .date {
  flex-shrink: 0;
  width: 54px;
  text-align: center;
  background: var(--soft);
  border-radius: 8px;
  padding: .3rem 0;
  font-size: .75rem;
  color: var(--muted);
  text-transform: uppercase;
}
.notice-list .date b { display: block; font-size: 1.2rem; color: var(--primary); font-family: var(--heading-font); }
.notice-list a { color: var(--text); font-weight: 500; }
.notice-list a:hover { color: var(--primary); }

.event-item {
  display: flex; gap: 1rem; align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #eef1f6;
}
.event-item:last-child { border-bottom: none; }
.event-item img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.event-date { font-size: .8rem; color: var(--accent-dark); font-weight: 600; }
.event-item h6 { margin: .25rem 0; color: var(--primary-dark); }
.event-item p { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------- Testimonials ---------- */
.testimonials {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 60%, #1d64d8);
}
.testi-card { max-width: 760px; margin: 0 auto; text-align: center; color: #fff; padding: 0 1rem; }
.testi-card img {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  margin-bottom: 1.5rem;
}
.testi-card p { font-size: clamp(1rem, 1.6vw, 1.2rem); font-style: italic; color: rgba(255,255,255,.9); }
.testi-card h6 { margin: 1.2rem 0 .1rem; color: var(--accent); font-size: 1.05rem; }
.testi-card small { color: rgba(255,255,255,.75); }
#testiCarousel .carousel-indicators [data-bs-target] { width: 10px; height: 10px; border-radius: 50%; }

/* ---------- Contact ---------- */
.contact-info { background: var(--soft); border-radius: var(--radius); padding: 1.8rem; height: 100%; }
.ci-item { display: flex; gap: 1rem; margin-bottom: 1.3rem; }
.ci-item > i {
  width: 48px; height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  font-size: 1.2rem;
}
.ci-item h6 { margin: 0 0 .15rem; color: var(--primary-dark); }
.ci-item p { margin: 0; color: var(--muted); font-size: .93rem; }
.map-wrap { border-radius: 12px; overflow: hidden; height: 220px; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}
.contact-form .form-label { font-weight: 500; font-size: .92rem; }
.contact-form .form-control, .contact-form .form-select {
  padding: .7rem 1rem;
  border-radius: 10px;
  border-color: #dde3ee;
}
.contact-form .form-control:focus, .contact-form .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(11,61,145,.12);
}

/* ---------- Footer ---------- */
.footer { background: #061f4a; color: rgba(255,255,255,.75); padding: 70px 0 25px; }
.footer h6 { color: #fff; margin-bottom: 1.2rem; position: relative; padding-bottom: .6rem; }
.footer h6::after { content: ''; position: absolute; left: 0; bottom: 0; width: 36px; height: 2px; background: var(--accent); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: .55rem; }
.footer ul a { color: rgba(255,255,255,.75); transition: all .25s; }
.footer ul a:hover { color: var(--accent); padding-left: 4px; }
.footer-contact i { color: var(--accent); margin-right: .4rem; }
.footer hr { border-color: rgba(255,255,255,.15); margin: 2.5rem 0 1.2rem; }
.social a {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  margin-right: .4rem;
  transition: all .25s;
}
.social a:hover { background: var(--accent); color: #111; transform: translateY(-3px); }

/* ---------- Back to top ---------- */
#backToTop {
  position: fixed; right: 20px; bottom: 20px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--accent); color: #111;
  display: grid; place-items: center;
  font-size: 1.3rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  opacity: 0; visibility: hidden;
  transform: translateY(20px);
  transition: all .3s ease;
  z-index: 999;
}
#backToTop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#backToTop:hover { background: var(--primary); color: #fff; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-content { animation-duration: 120s; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: #fff;
    margin-top: .7rem;
    padding: .5rem 1rem 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
  }
  .navbar .nav-link::after { display: none; }
  .hero .carousel-caption { text-align: center; left: 6%; right: 6%; max-width: none; }
  .hero-overlay { background: rgba(8,44,105,.75); }
  .section { padding: 70px 0; }
  .about-media { padding-right: 20px; }
  .stats { background-attachment: scroll; }
}

@media (max-width: 575.98px) {
  .brand-logo { width: 40px; height: 40px; font-size: 1.25rem; }
  .brand-text strong { font-size: .92rem; }
  .brand-text small { font-size: .72rem; }
  .hero .carousel-item { height: 80vh; min-height: 480px; }
  .hero .btn-lg { padding: .55rem 1.1rem; font-size: .95rem; }
  .carousel-control-prev, .carousel-control-next { display: none; }
  .ticker-label { font-size: .75rem; padding: .25rem .6rem; }
  .quick-card { flex-direction: column; gap: .3rem; font-size: .9rem; padding: 1rem .5rem; }
  .about-media { padding: 0; }
  .about-media .main-img { height: 280px; }
  .exp-badge { left: 12px; bottom: 12px; }
  .contact-form { padding: 1.3rem; }
  .event-item img { width: 72px; height: 72px; }
  .notice-scroll { height: 360px; }
}
