/* ============================================================
   The Mounting Public School (H.S.) - Custom Theme
   Palette inspired by the school logo:
   deep laurel green, golden flame, warm red, cream
   ============================================================ */

:root {
  --tmps-green: #14532d;
  --tmps-green-dark: #0c3a1f;
  --tmps-green-soft: #e7f0e9;
  --tmps-gold: #e8a317;
  --tmps-gold-soft: #f7c948;
  --tmps-red: #b4322a;
  --tmps-cream: #faf6ec;
  --tmps-ink: #1e2b20;
}

body {
  font-family: 'Open Sans', 'Segoe UI', sans-serif;
  color: var(--tmps-ink);
  background-color: #fff;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand, .section-title, .btn {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
}

img { max-width: 100%; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--tmps-green-dark);
  color: #e9f2ea;
  font-size: .85rem;
}
.topbar a { color: #e9f2ea; text-decoration: none; }
.topbar a:hover { color: var(--tmps-gold-soft); }
.topbar .bi { color: var(--tmps-gold-soft); }

/* ---------- Brand header ---------- */
.brand-header {
  background: linear-gradient(90deg, #ffffff 0%, var(--tmps-cream) 100%);
  border-bottom: 4px solid var(--tmps-gold);
  padding: .9rem 0;
}
.school-logo {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--tmps-red);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.brand-header .school-name {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--tmps-green);
  margin: 0;
  line-height: 1.15;
  letter-spacing: .5px;
}
.brand-header .school-name span { color: var(--tmps-red); }
.brand-header .school-sub {
  margin: 0;
  font-size: .85rem;
  color: #5c6b5e;
}
.brand-header .school-sub .motto {
  color: var(--tmps-red);
  font-weight: 600;
  font-style: italic;
}
.estd-badge {
  border: 1px dashed var(--tmps-gold);
  color: var(--tmps-green);
  border-radius: .5rem;
  padding: .35rem .8rem;
  font-weight: 600;
  font-size: .8rem;
  text-align: center;
}
.estd-badge strong { display: block; font-size: 1.05rem; color: var(--tmps-red); }

/* ---------- Navbar ---------- */
.navbar-tmps {
  background: var(--tmps-green);
  padding-top: 0;
  padding-bottom: 0;
}
.navbar-tmps .navbar-nav .nav-link {
  color: #fdfdf5;
  font-weight: 600;
  font-size: .92rem;
  padding: .95rem .8rem;
  border-bottom: 3px solid transparent;
}
.navbar-tmps .navbar-nav .nav-link:hover,
.navbar-tmps .navbar-nav .nav-link:focus {
  color: var(--tmps-gold-soft);
  border-bottom-color: var(--tmps-gold-soft);
}
.navbar-tmps .navbar-nav .nav-link.active {
  color: var(--tmps-gold-soft);
  background: rgba(0,0,0,.18);
  border-bottom-color: var(--tmps-gold);
}
.navbar-tmps .dropdown-menu {
  border: none;
  border-radius: 0 0 .5rem .5rem;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.navbar-tmps .dropdown-item { font-size: .9rem; font-weight: 500; }
.navbar-tmps .dropdown-item:hover {
  background: var(--tmps-green-soft);
  color: var(--tmps-green-dark);
}
.navbar-tmps .navbar-toggler {
  border-color: rgba(255,255,255,.5);
  margin: .6rem 0;
}
.navbar-tmps .navbar-toggler:focus { box-shadow: 0 0 0 .15rem rgba(247,201,72,.5); }
.navbar-tmps .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- Hero carousel ---------- */
.hero-carousel .carousel-item {
  height: 520px;
  background: #000;
}
.hero-carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .92;
}
.hero-carousel .carousel-caption {
  background: linear-gradient(90deg, rgba(12,58,31,.85), rgba(12,58,31,.25));
  border-left: 5px solid var(--tmps-gold);
  border-radius: .5rem;
  left: 6%;
  right: auto;
  bottom: 14%;
  max-width: 560px;
  text-align: left;
  padding: 1.4rem 1.6rem;
}
.hero-carousel .carousel-caption h3 {
  font-weight: 700;
  color: #fff;
}
.hero-carousel .carousel-caption p { color: #f0e9d2; }
.hero-carousel .carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.hero-carousel .carousel-indicators .active { background-color: var(--tmps-gold); }

/* ---------- Notice ticker ---------- */
.notice-ticker {
  background: var(--tmps-gold);
  color: var(--tmps-green-dark);
  overflow: hidden;
}
.notice-ticker .ticker-label {
  background: var(--tmps-red);
  color: #fff;
  font-weight: 700;
  padding: .55rem 1rem;
  font-size: .85rem;
  white-space: nowrap;
  letter-spacing: 1px;
}
.notice-ticker .ticker-track {
  display: flex;
  align-items: center;
  overflow: hidden;
  flex: 1;
}
.notice-ticker .ticker-move {
  white-space: nowrap;
  animation: ticker 28s linear infinite;
  padding-left: 100%;
}
.notice-ticker:hover .ticker-move { animation-play-state: paused; }
.notice-ticker a { color: var(--tmps-green-dark); font-weight: 600; text-decoration: none; }
.notice-ticker a:hover { text-decoration: underline; }
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ---------- Sections ---------- */
.section-pad { padding: 4rem 0; }
.section-pad-alt { padding: 4rem 0; background: var(--tmps-cream); }
.section-title {
  font-weight: 700;
  color: var(--tmps-green);
  position: relative;
  margin-bottom: 1.4rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 70px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--tmps-gold), var(--tmps-red));
  margin-top: .5rem;
}
.section-title.text-center::after { margin-left: auto; margin-right: auto; }
.section-kicker {
  color: var(--tmps-red);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn-tmps {
  background: var(--tmps-green);
  border-color: var(--tmps-green);
  color: #fff;
  font-weight: 600;
}
.btn-tmps:hover { background: var(--tmps-green-dark); border-color: var(--tmps-green-dark); color: #fff; }
.btn-gold {
  background: var(--tmps-gold);
  border-color: var(--tmps-gold);
  color: var(--tmps-green-dark);
  font-weight: 700;
}
.btn-gold:hover { background: var(--tmps-gold-soft); border-color: var(--tmps-gold-soft); color: var(--tmps-green-dark); }
.btn-outline-tmps {
  border: 2px solid var(--tmps-green);
  color: var(--tmps-green);
  font-weight: 600;
}
.btn-outline-tmps:hover { background: var(--tmps-green); color: #fff; }

/* ---------- Cards ---------- */
.card-tmps {
  border: none;
  border-radius: .75rem;
  box-shadow: 0 4px 16px rgba(20,83,45,.09);
  transition: transform .2s ease, box-shadow .2s ease;
  background: #fff;
}
.card-tmps:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(20,83,45,.16);
}
.card-tmps .card-header-gold {
  background: var(--tmps-gold);
  color: var(--tmps-green-dark);
  font-weight: 700;
  border-radius: .75rem .75rem 0 0 !important;
}
.facility-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--tmps-green-soft);
  color: var(--tmps-green);
}

/* ---------- Notice board ---------- */
.notice-card { max-height: 420px; overflow-y: auto; }
.notice-item {
  border-left: 4px solid var(--tmps-gold);
  padding: .7rem .9rem;
  margin-bottom: .6rem;
  background: var(--tmps-cream);
  border-radius: 0 .4rem .4rem 0;
  font-size: .9rem;
}
.notice-item a { color: var(--tmps-green-dark); font-weight: 600; text-decoration: none; }
.notice-item a:hover { color: var(--tmps-red); }
.notice-item .notice-date {
  font-size: .75rem;
  color: #77816f;
}
.badge-new {
  background: var(--tmps-red);
  font-size: .62rem;
  vertical-align: middle;
  animation: blink 1.4s ease infinite;
}
@keyframes blink { 50% { opacity: .45; } }

/* ---------- Stats ---------- */
.stats-band {
  background: linear-gradient(120deg, var(--tmps-green-dark), var(--tmps-green));
  color: #fff;
}
.stat-box { text-align: center; padding: 1.2rem .5rem; }
.stat-box .stat-num {
  font-family: 'Poppins', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--tmps-gold-soft);
}
.stat-box .stat-label {
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: 1.5px;
  color: #d8e6da;
}
.stat-box .bi { font-size: 1.6rem; color: var(--tmps-gold); }

/* ---------- Leadership desks ---------- */
.desk-card {
  border: none;
  border-top: 5px solid var(--tmps-gold);
  border-radius: .75rem;
  box-shadow: 0 4px 16px rgba(20,83,45,.09);
  height: 100%;
}
.desk-card blockquote {
  font-size: .95rem;
  color: #45504a;
  font-style: italic;
  border-left: 3px solid var(--tmps-green-soft);
  padding-left: 1rem;
}
.desk-photo {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--tmps-gold);
}
.desk-initial {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--tmps-green);
  color: var(--tmps-gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  border: 3px solid var(--tmps-gold);
}

/* ---------- At a glance table ---------- */
.glance-table td {
  padding: .6rem .9rem;
  font-size: .92rem;
  border-bottom: 1px solid #eee8d6;
}
.glance-table td:first-child {
  font-weight: 600;
  color: var(--tmps-green);
  width: 55%;
}
.glance-table tr:last-child td { border-bottom: none; }

/* ---------- Gallery ---------- */
.gallery-filter .btn { margin: .15rem; }
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: .6rem;
  cursor: pointer;
}
.gallery-item img {
  height: 230px;
  width: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item .g-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(12,58,31,.9));
  color: #fff;
  font-size: .85rem;
  padding: 1.4rem .8rem .6rem;
  opacity: 0;
  transition: opacity .3s ease;
}
.gallery-item:hover .g-cap { opacity: 1; }

/* ---------- Page banner (inner pages) ---------- */
.page-banner {
  background: linear-gradient(rgba(12,58,31,.82), rgba(12,58,31,.82)),
              url('../images/campus-1.jpeg') center/cover no-repeat;
  color: #fff;
  padding: 3.4rem 0;
}
.page-banner h2 { font-weight: 700; }
.page-banner .breadcrumb { --bs-breadcrumb-divider-color: #d8c78a; }
.page-banner .breadcrumb-item a { color: var(--tmps-gold-soft); text-decoration: none; }
.page-banner .breadcrumb-item.active { color: #fff; }

/* ---------- Faculty ---------- */
.faculty-card .avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--tmps-green);
  color: var(--tmps-gold-soft);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .7rem;
  border: 3px solid var(--tmps-green-soft);
}
.nav-pills-tmps .nav-link {
  color: var(--tmps-green);
  font-weight: 600;
  border: 1px solid var(--tmps-green);
  margin: 0 .2rem;
}
.nav-pills-tmps .nav-link.active {
  background: var(--tmps-green);
  color: #fff;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--tmps-red), #8f241d);
  color: #fff;
}
.cta-band h3 { font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--tmps-green-dark);
  color: #cfe0d2;
  font-size: .9rem;
  border-top: 5px solid var(--tmps-gold);
  margin-top: 3.5rem;
}
.site-footer h5 {
  color: var(--tmps-gold-soft);
  font-weight: 700;
  margin-bottom: 1rem;
}
.site-footer a { color: #cfe0d2; text-decoration: none; }
.site-footer a:hover { color: var(--tmps-gold-soft); }
.site-footer .footer-logo {
  width: 70px; height: 70px;
  border-radius: 50%;
  border: 2px solid var(--tmps-gold);
  object-fit: cover;
}
.footer-bottom {
  background: #082b15;
  color: #9db8a3;
  font-size: .8rem;
}
.footer-social a {
  display: inline-flex;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  align-items: center;
  justify-content: center;
  margin-right: .4rem;
}
.footer-social a:hover { background: var(--tmps-gold); color: var(--tmps-green-dark); }

/* ---------- Back to top ---------- */
#backToTop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--tmps-gold);
  color: var(--tmps-green-dark);
  border: none;
  display: none;
  z-index: 1050;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}
#backToTop:hover { background: var(--tmps-gold-soft); }

/* ---------- Misc ---------- */
.text-tmps { color: var(--tmps-green) !important; }
.text-gold { color: var(--tmps-gold) !important; }
.text-red { color: var(--tmps-red) !important; }
.bg-tmps { background: var(--tmps-green) !important; }
.bg-cream { background: var(--tmps-cream) !important; }
.list-check li { list-style: none; margin-bottom: .5rem; }
.list-check li::before {
  content: "\F26E";
  font-family: 'bootstrap-icons';
  color: var(--tmps-gold);
  font-weight: 700;
  margin-right: .5rem;
}
.table thead.thead-tmps th {
  background: var(--tmps-green);
  color: #fff;
  font-weight: 600;
}
.form-control:focus, .form-select:focus {
  border-color: var(--tmps-gold);
  box-shadow: 0 0 0 .2rem rgba(232,163,23,.25);
}
.step-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--tmps-red);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
}

@media (max-width: 767.98px) {
  .brand-header .school-name { font-size: 1.15rem; }
  .school-logo { width: 64px; height: 64px; }
  .hero-carousel .carousel-item { height: 340px; }
  .hero-carousel .carousel-caption {
    left: 4%; right: 4%;
    bottom: 10%;
    padding: .9rem 1rem;
  }
  .hero-carousel .carousel-caption h3 { font-size: 1.1rem; }
  .hero-carousel .carousel-caption p { font-size: .8rem; }
  .section-pad, .section-pad-alt { padding: 2.6rem 0; }
}

/* ---------- Hostel badge ---------- */
.hostel-badge {
  border: 2px solid var(--tmps-red);
  color: var(--tmps-red);
  border-radius: .5rem;
  padding: .3rem .8rem;
  font-weight: 700;
  font-size: .7rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #fff;
}
.hostel-badge strong {
  display: block;
  font-size: .9rem;
  color: var(--tmps-green);
  letter-spacing: .5px;
}
.hostel-strip {
  background: linear-gradient(90deg, var(--tmps-red), #8f241d);
  color: #ffe9d9;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .6px;
}

/* ---------- Welcome popup ---------- */
.welcome-popup {
  border: none;
  border-radius: .85rem;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
.welcome-popup .popup-head {
  background: linear-gradient(120deg, var(--tmps-green-dark), var(--tmps-green));
  color: #fff;
  border-bottom: 4px solid var(--tmps-gold);
}
.welcome-popup .popup-logo {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 3px solid var(--tmps-gold);
  object-fit: cover;
  background: #fff;
}

/* ---------- Achievers ---------- */
.achiever-side {
  background: linear-gradient(160deg, var(--tmps-green), var(--tmps-green-dark));
  border-radius: .75rem 0 0 .75rem;
}
.achiever-card .desk-initial { width: 74px; height: 74px; font-size: 1.5rem; }
.achiever-card .medal {
  color: var(--tmps-gold-soft);
  font-size: .72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---------- WhatsApp float ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 76px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.whatsapp-float:hover {
  transform: scale(1.08);
  background: #1eb85a;
  color: #fff;
}
