/* ============================================================
   Kumawu Technical Institute — Main Stylesheet
   Colors: Navy #1a3a5c | Gold #f5a623 | Green #2ecc71
   ============================================================ */

:root {
  --primary: #1a3a5c;
  --primary-light: #e8f0f8;
  --secondary: #f5a623;
  --accent: #2ecc71;
  --danger: #e74c3c;
  --dark: #1a1a2e;
  --light-bg: #f8f9fc;
  --gradient-primary: linear-gradient(135deg, #1a3a5c 0%, #2980b9 100%);
  --gradient-gold: linear-gradient(135deg, #f5a623 0%, #e67e22 100%);
  --gradient-green: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  --sidebar-width: 250px;
  --sidebar-bg: #0f2540;
  --topbar-height: 60px;
  --font: 'Poppins', sans-serif;
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,.15);
  --radius: 12px;
  --transition: all .25s ease;
}

/* ── Base ────────────────────────────────────────────────── */
* { box-sizing: border-box; }
body { font-family: var(--font); color: #333; background: #fff; }
a { text-decoration: none; color: inherit; }
.py-6 { padding-top: 5rem; padding-bottom: 5rem; }
.z-1 { z-index: 1; }

/* ── Preloader ───────────────────────────────────────────── */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { text-align: center; position: relative; }
.preloader-logo { margin-bottom: 20px; }
.preloader-name { color: #fff; font-weight: 700; font-size: 1.1rem; margin-top: 8px; }
.preloader-motto { color: var(--secondary); font-size: .85rem; }
.preloader-ring {
  width: 56px; height: 56px; border: 4px solid rgba(255,255,255,.2);
  border-top-color: var(--secondary); border-radius: 50%;
  animation: spin .9s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ── Navbar ──────────────────────────────────────────────── */
#mainNavbar {
  background: var(--primary);
  box-shadow: 0 2px 20px rgba(0,0,0,.2);
  transition: var(--transition);
}
#mainNavbar .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-weight: 500; font-size: .88rem; padding: .5rem .9rem !important;
  border-radius: 6px; transition: var(--transition);
}
#mainNavbar .nav-link:hover { color: var(--secondary) !important; background: rgba(255,255,255,.08); }
#mainNavbar .navbar-brand { font-size: 1.1rem; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-gold { background: var(--secondary); color: var(--primary); font-weight: 600; border: none; }
.btn-gold:hover { background: #e09517; color: var(--primary); }
.btn-primary-custom { background: var(--primary); color: #fff; font-weight: 600; border: none; }
.btn-primary-custom:hover { background: #0f2540; color: #fff; }
.btn-outline-primary-custom {
  border: 2px solid var(--primary); color: var(--primary); font-weight: 600;
  background: transparent;
}
.btn-outline-primary-custom:hover { background: var(--primary); color: #fff; }
.btn-xs { font-size: .72rem; padding: .2rem .5rem; }

/* ── Section Badges & Titles ─────────────────────────────── */
.section-badge {
  display: inline-block; background: var(--primary-light); color: var(--primary);
  font-size: .78rem; font-weight: 600; padding: .3rem .8rem;
  border-radius: 20px; letter-spacing: .5px; text-transform: uppercase;
}
.section-title { font-size: 2rem; line-height: 1.2; }
.text-gold { color: var(--secondary) !important; }
.bg-primary-custom { background: var(--primary) !important; }
.bg-primary-light { background: var(--primary-light) !important; }

/* ── Hero ────────────────────────────────────────────────── */
.hero-section {
  min-height: 92vh;
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.18); }
.hero-title { text-shadow: 0 2px 20px rgba(0,0,0,.3); font-size: clamp(2rem,5vw,4rem); font-weight: 800; }
.hero-motto { text-shadow: 0 1px 8px rgba(0,0,0,.2); }
.hero-badge {
  background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.3); border-radius: 20px;
  display: inline-block; padding: .4rem 1.2rem;
}
.hero-badge .badge-text { color: #fff; font-size: .82rem; font-weight: 500; }
.hero-scroll-hint { animation: bounce 2s infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ── Stats Bar ───────────────────────────────────────────── */
.stats-bar { background: var(--primary); }
.stat-item .stat-number { font-size: 2rem; font-weight: 800; color: var(--secondary); }
.stat-item .stat-label { color: rgba(255,255,255,.8); font-size: .82rem; }

/* ── About Section ───────────────────────────────────────── */
.about-image-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.about-img-card { border-radius: var(--radius); height: 160px; }
.about-fact {
  display: flex; align-items: center; gap: 8px;
  background: var(--light-bg); padding: .6rem 1rem; border-radius: 8px; font-size: .88rem;
}

/* ── Programme Cards ─────────────────────────────────────── */
.programme-card { border-radius: var(--radius) !important; transition: var(--transition); }
.programme-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover) !important; }
.programme-card-header {
  padding: 2rem; border-radius: var(--radius) var(--radius) 0 0;
  position: relative; text-align: center;
}
.programme-badge {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,.2); color: #fff;
  font-size: .7rem; font-weight: 600; padding: .2rem .6rem; border-radius: 20px;
}
.gradient-electrical { background: linear-gradient(135deg, #1a3a5c 0%, #2980b9 100%); }
.gradient-building   { background: linear-gradient(135deg, #f5a623 0%, #e67e22 100%); }
.gradient-fashion    { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }

/* ── Achievements ────────────────────────────────────────── */
.achievements-section { background: var(--primary); }
.achievement-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius); transition: var(--transition);
}
.achievement-card:hover { background: rgba(255,255,255,.1); transform: translateY(-4px); }

/* ── News Cards ──────────────────────────────────────────── */
.news-card { border-radius: var(--radius) !important; transition: var(--transition); }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover) !important; }
.news-placeholder { height: 200px; background: var(--gradient-primary); }

/* ── Gallery ─────────────────────────────────────────────── */
.gallery-thumb { position: relative; overflow: hidden; border-radius: 8px; }
.gallery-thumb img { transition: transform .4s ease; }
.gallery-thumb:hover img { transform: scale(1.08); }
.gallery-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  opacity: 0; transition: var(--transition); padding: .8rem .5rem .5rem;
}
.gallery-thumb:hover .gallery-overlay { opacity: 1; }

/* ── Donation Section ────────────────────────────────────── */
.donation-section { background: var(--primary); }
.donation-badge {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: #fff; padding: .4rem .9rem; border-radius: 20px; font-size: .82rem;
}
.donation-impact-card { transition: var(--transition); }
.donation-impact-card:hover { border-color: var(--secondary) !important; background: #fffbf2; }

/* ── Contact ─────────────────────────────────────────────── */
.contact-info-list { display: flex; flex-direction: column; gap: 1rem; }
.contact-info-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-icon {
  width: 40px; height: 40px; background: var(--primary-light);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: .9rem; flex-shrink: 0;
}
.map-container { border-radius: var(--radius); overflow: hidden; }

/* ── Partners ────────────────────────────────────────────── */
.partner-badge {
  background: #fff; border: 1px solid #e0e0e0; padding: .5rem 1.2rem;
  border-radius: 25px; font-size: .82rem; font-weight: 500; color: #555;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer-main { background: #0a1e35; }
.footer-links a { display: block; color: #aaa; font-size: .85rem; padding: .2rem 0; transition: var(--transition); }
.footer-links a:hover { color: var(--secondary); padding-left: 4px; }
.footer-contact li { color: #aaa; font-size: .82rem; margin-bottom: .5rem; display: flex; align-items: flex-start; gap: .5rem; }
.social-icon {
  width: 36px; height: 36px; background: rgba(255,255,255,.08);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #ccc; transition: var(--transition); font-size: .85rem;
}
.social-icon:hover { background: var(--secondary); color: var(--primary); }

/* ── Auth Pages ──────────────────────────────────────────── */
.auth-page { background: linear-gradient(135deg, #0f2540 0%, #1a3a5c 50%, #2980b9 100%); }
.auth-card { border-radius: var(--radius) !important; overflow: hidden; }
.auth-card-header { background: var(--gradient-primary); }
.otp-icon-wrap {
  width: 64px; height: 64px; background: var(--primary-light);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.letter-spacing-otp { letter-spacing: 8px; font-size: 1.8rem; }
.role-selector .btn-check:checked + .btn { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Page Header ─────────────────────────────────────────── */
.page-header { background: var(--gradient-primary); }

/* ── Admin Layout ────────────────────────────────────────── */
.admin-body { background: var(--light-bg); overflow-x: hidden; }

.sidebar {
  position: fixed; top: 0; left: -var(--sidebar-width); width: var(--sidebar-width);
  left: -250px; height: 100vh; background: var(--sidebar-bg);
  z-index: 1050; overflow-y: auto; transition: left .3s ease;
  display: flex; flex-direction: column;
}
.sidebar.open { left: 0; }
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1040;
}
.sidebar-brand-text { font-size: .95rem; }
.sidebar-section-label {
  font-size: .65rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,.3); padding: .8rem 1rem .3rem; font-weight: 600;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px; padding: .6rem 1rem;
  color: rgba(255,255,255,.7); border-radius: 8px; margin: 1px 8px;
  transition: var(--transition); font-size: .85rem; font-weight: 500;
}
.sidebar-link i { width: 18px; text-align: center; font-size: .9rem; }
.sidebar-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-link.active { background: var(--secondary); color: var(--primary); font-weight: 600; }
.sidebar-user { background: rgba(255,255,255,.05); margin: 0 8px; border-radius: 8px; }
.sidebar-user-info .text-muted { color: rgba(255,255,255,.4) !important; }
.text-danger-hover:hover { color: #ff6b6b !important; }

.main-content {
  min-height: 100vh; transition: margin-left .3s ease;
  margin-left: 0;
}
.admin-topbar {
  background: #fff; height: var(--topbar-height);
  box-shadow: 0 1px 10px rgba(0,0,0,.07); position: sticky; top: 0; z-index: 100;
}
.admin-page-content { min-height: calc(100vh - var(--topbar-height)); }

/* Desktop sidebar always visible */
@media (min-width: 992px) {
  .sidebar { left: 0; }
  .main-content { margin-left: var(--sidebar-width); }
  #sidebarToggle { display: none; }
  #sidebarCollapseBtn { display: none; }
}

/* ── Admin Stat Cards ────────────────────────────────────── */
.stat-card {
  border-radius: var(--radius); padding: 1.2rem; display: flex;
  align-items: center; gap: 1rem; color: #fff; position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; right: -15px; bottom: -15px;
  width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,.1);
}
.stat-card-blue   { background: linear-gradient(135deg, #1a3a5c, #2980b9); }
.stat-card-green  { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.stat-card-gold   { background: linear-gradient(135deg, #e67e22, #f5a623); }
.stat-card-red    { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.stat-card-icon { font-size: 1.8rem; opacity: .85; }
.stat-card-number { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.stat-card-label  { font-size: .78rem; opacity: .85; font-weight: 500; margin-top: 2px; }
.stat-card-sub    { font-size: .68rem; opacity: .7; margin-top: 2px; }

/* ── Tables ──────────────────────────────────────────────── */
.table { font-size: .875rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: #666; border-bottom-width: 1px; }

/* ── Message Items ───────────────────────────────────────── */
.message-item { transition: background .2s ease; }
.message-item:hover { background: #f8f9fc !important; }

/* ── Avatar ──────────────────────────────────────────────── */
.avatar-sm { width: 34px; height: 34px; }

/* ── Event sidebar ───────────────────────────────────────── */
.event-date-sidebar { min-width: 70px; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .5s ease forwards; }

/* ══════════════════════════════════════════════════════════
   MODERN IMAGE CARDS  (added)
   ══════════════════════════════════════════════════════════ */

/* ── Image Card Base ─────────────────────────────────────── */
.img-card {
  position: relative; overflow: hidden; border-radius: 16px;
  cursor: pointer; box-shadow: 0 4px 24px rgba(0,0,0,.10);
  transition: transform .35s ease, box-shadow .35s ease;
}
.img-card:hover { transform: translateY(-8px); box-shadow: 0 16px 48px rgba(0,0,0,.18); }
.img-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.img-card:hover img { transform: scale(1.08); }

/* gradient overlay that always shows on bottom half */
.img-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,22,40,.85) 0%, rgba(10,22,40,.25) 55%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 1.2rem 1.1rem .9rem;
}
.img-card-overlay .card-cat {
  display: inline-block; font-size: .68rem; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  background: var(--secondary); color: var(--primary);
  border-radius: 20px; padding: .18rem .65rem; margin-bottom: .45rem;
  width: fit-content;
}
.img-card-overlay h5, .img-card-overlay h6 {
  color: #fff; font-weight: 700; margin-bottom: .25rem;
  text-shadow: 0 1px 6px rgba(0,0,0,.4); line-height: 1.25;
}
.img-card-overlay p { color: rgba(255,255,255,.78); font-size: .8rem; margin-bottom: 0; }
.img-card-overlay .meta { color: rgba(255,255,255,.55); font-size: .72rem; }

/* hover reveal layer */
.img-card-reveal {
  position: absolute; inset: 0;
  background: rgba(26,58,92,.88);
  opacity: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 1.2rem;
  transition: opacity .3s ease;
}
.img-card:hover .img-card-reveal { opacity: 1; }
.img-card-reveal h6 { color: #fff; font-weight: 700; margin-bottom: .5rem; }
.img-card-reveal p  { color: rgba(255,255,255,.75); font-size: .8rem; margin-bottom: .8rem; }
.img-card-reveal .btn { font-size: .78rem; }

/* ── Programme Image Cards ───────────────────────────────── */
.prog-img-card { height: 320px; }
.prog-img-card .prog-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.15); backdrop-filter: blur(6px);
  border: 2px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff; margin-bottom: .8rem;
}

/* ── News Image Cards ────────────────────────────────────── */
.news-img-card { height: 280px; }

/* ── Gallery Image Cards ─────────────────────────────────── */
.gallery-img-card { height: 220px; }
.gallery-img-card .img-card-overlay { padding: .7rem .8rem .6rem; }

/* ── Event Image Cards ───────────────────────────────────── */
.event-img-card { height: 200px; }

/* ── Admin Stat Cards v2 (with image strip) ──────────────── */
.stat-card-v2 {
  border-radius: 16px; overflow: hidden; position: relative;
  color: #fff; min-height: 130px; display: flex; flex-direction: column;
  justify-content: flex-end; box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.stat-card-v2:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.stat-card-v2 .stat-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: brightness(.55) saturate(1.2);
}
.stat-card-v2 .stat-bg-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.45) 0%, transparent 70%);
}
.stat-card-v2 .stat-body { position: relative; padding: 1rem 1.1rem .9rem; }
.stat-card-v2 .badge-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,.18); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: .6rem;
}
.stat-card-v2 .stat-number { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-card-v2 .stat-label  { font-size: .75rem; opacity: .85; font-weight: 500; margin-top: 2px; }
.stat-card-v2 .stat-change {
  position: absolute; top: .8rem; right: .9rem;
  font-size: .7rem; font-weight: 600; padding: .2rem .5rem;
  border-radius: 20px; background: rgba(255,255,255,.2);
}

/* ── Modern Admin Table Cards ────────────────────────────── */
.admin-card {
  border: none !important; border-radius: 16px !important;
  box-shadow: 0 2px 16px rgba(0,0,0,.06) !important;
  overflow: hidden;
}
.admin-card .card-header {
  border-bottom: none !important;
  padding: 1rem 1.25rem !important;
}
.admin-card-header-gradient {
  background: linear-gradient(135deg, #1a3a5c 0%, #0f2540 100%);
  border-radius: 16px 16px 0 0;
}

/* ── Person Cards (teachers/students) ────────────────────── */
.person-card {
  border: none; border-radius: 16px;
  box-shadow: 0 2px 14px rgba(0,0,0,.07);
  transition: transform .3s ease, box-shadow .3s ease;
  overflow: hidden;
}
.person-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.person-card .card-img-band {
  height: 90px;
  background: linear-gradient(135deg, #1a3a5c, #2980b9);
  position: relative;
}
.person-card .avatar-ring {
  width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid #fff; object-fit: cover;
  position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.person-card .card-body { padding-top: 38px !important; text-align: center; }

/* ── Horizontal list cards ───────────────────────────────── */
.h-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 12px; padding: .75rem 1rem;
  box-shadow: 0 1px 8px rgba(0,0,0,.06); transition: var(--transition);
  border-left: 3px solid transparent;
}
.h-card:hover { background: #f8f9fc; border-left-color: var(--secondary); transform: translateX(3px); }
.h-card .h-avatar {
  width: 44px; height: 44px; border-radius: 12px; object-fit: cover;
  flex-shrink: 0;
}
.h-card .h-avatar-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

/* ── Payment / Transaction Cards ─────────────────────────── */
.txn-card {
  background: #fff; border-radius: 12px; padding: .8rem 1rem;
  box-shadow: 0 1px 8px rgba(0,0,0,.06); display: flex;
  align-items: center; gap: 12px; transition: var(--transition);
}
.txn-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.txn-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 767px) {
  .section-title { font-size: 1.5rem; }
  .hero-title { font-size: 2rem; }
  .stat-card-number { font-size: 1.2rem; }
  .py-6 { padding-top: 3rem; padding-bottom: 3rem; }
  .prog-img-card { height: 260px; }
  .news-img-card  { height: 240px; }
  .stat-card-v2   { min-height: 110px; }
}

/* ── Hero Carousel ──────────────────────────────────────────── */
.hero-carousel { position: relative; }
.hero-carousel .carousel-item { height: 92vh; min-height: 500px; }
.hero-carousel .carousel-item img { width: 100%; height: 100%; object-fit: cover; }
.hero-carousel .carousel-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
}
.hero-carousel .carousel-caption-custom {
  text-align: center; color: #fff; padding: 0 1rem; max-width: 800px;
}
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 50px; height: 50px; top: 50%; transform: translateY(-50%);
  background: rgba(245,166,35,.8); border-radius: 50%; opacity: 1;
}
.hero-carousel .carousel-indicators [data-bs-target] {
  width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5);
}
.hero-carousel .carousel-indicators .active { background: #f5a623; }
