/* -------------------------
   Variables & base
------------------------- */
:root {
 --bg: #f5f7fb;
  /*--bg: #e3f0fc;*/
  --panel: #fff;
  --card-bg: #ffffff;
  --text: #222;
  --muted: #6b7280;
  --accent: #0066ff;
  --accent-2: #0047b5;
  --glass: rgba(255,255,255,0.6);
  --shadow: 0 8px 30px rgba(16,24,40,0.08);
  --shadow-hover: 0 14px 38px rgba(0,0,0,0.18);
  --radius: 12px;
  --tab-height: 52px;
}

@media(prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d10;
    --panel: #0f1114;
    --card-bg: #16181d;
    --text: #e6eef8;
    --muted: #9aa4b2;
    --accent: #4da3ff;
    --accent-2: #2c7be5;
    --glass: rgba(255,255,255,0.04);
    --shadow: 0 8px 40px rgba(2,6,23,0.6);
    --shadow-hover: 0 16px 48px rgba(0,0,0,0.5);
  }
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
  background: var(--bg);
  color: var(--text);
}

/* Container */
.container {
  width: 100%;
  max-width: 1100px;
 /* background-image: url('back-cover.jpg');*/
  background-size: cover;
  margin: 20px auto;
  padding-bottom: 50px;
}

/* ===============================
  HERO SECTION
   =============================== */

.hero-sec {
  width: 100%;
  padding: 20px 20px;
  text-align: center;
  background: linear-gradient(135deg, #4b6cb7, #182848);
  color: #fff;
  border-bottom-left-radius: 25px;
  border-bottom-right-radius: 25px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}

/* Animated Glow */
.hero-sec::after {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  width: 220px;
  height: 220px;
  background: rgba(255,255,255,0.15);
  filter: blur(60px);
  transform: translateX(-50%);
  animation: heroGlow 6s infinite alternate ease-in-out;
}

@keyframes heroGlow {
  from { 
      opacity: 0.6; 
      transform: translateX(-50%) translateY(0);
    }
  to   { 
      opacity: 0.9; 
      transform: translateX(-50%) translateY(10px);
    }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

/* Title */
.hero-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Subheading */
.hero-sub {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 20px;
}

/* Back Button */
.hero-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fff;
  transition: background 0.3s ease, transform 0.3s ease;
  font-size: 0.95rem;
  text-decoration: none;
}

.hero-back:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

/* Responsive */
@media(max-width:650px){
  .hero {
      height: 200px;
    }
  .hero-content h1 { 
      font-size: 18px;
    }
  .hero-sub { 
      font-size: 14px; 
    }
}
/* Dark Mode Compatibility */
.dark .hero-sec {
  background: linear-gradient(135deg, #1f1f1f, #0b0b0b);
}

.dark .hero-back {
  background: rgba(255,255,255,0.08);
}

.dark .hero-back:hover {
  background: rgba(255,255,255,0.15);
}
.back { 
    position:absolute;
    left:20px; 
    top:28px; 
    color:var(--muted); 
    text-decoration:none; }
.title {
    font-size:20px;
    font-weight:600; 
}
/* SECTION */
.section-title{
    margin:18px 0 12px;
    font-size:1.25rem;
    color:var(--accent);
    padding-left:10px;
    border-left:6px solid var(--accent)
}
/* ---------------- Tabs ---------------- */
.tabs-wrapper {
  position: static;
  top: 12px;
  display: flex;
  justify-content: center;
  z-index: 80;
  padding: 10px 0;
  backdrop-filter: blur(6px);
}

.dept-tabs {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.45));
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow);
}

@media(prefers-color-scheme: dark) {
  .dept-tabs {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.03);
  }
}

/* Tab buttons */
.tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: color .18s ease;
  z-index: 2;
}
.tab-btn.active { color: #fff; }

.tab-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  color: var(--text);
}

.tab-btn.active svg {
  color: #fff;
}

/* Sliding indicator */
.tab-indicator {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: transform .32s cubic-bezier(.2,.9,.3,1), width .28s ease;
  box-shadow: 0 6px 20px rgba(5,85,220,0.18);
  z-index: 1;
}

/* ---------------- Sections ---------------- */
.tab-section {
  display: none;
  padding: 18px 0;
  animation: fadeUp .36s ease;
}
.tab-section.active { 
    display: block;
    }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- STAFF GRID ---------------- */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  justify-items: center;
  gap: 25px;
  padding:20px;
  width: 100%;
  margin: 0 auto;
}

/* HOD full width */
.staff-grid.hod-grid .staff-card {
  grid-column: 1 / -1 !important;
  max-width: 550px;
  width: 100%;
}

/* Staff card */
.staff-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 18px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.staff-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

/* Photo */
.staff-photo {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 14px;
  margin: 6px auto 12px;
}

.staff-card h3 {
    font-size: 16px;
    margin: 6px 0 4px; 
}
.staff-card .desig { 
    color: var(--muted); 
    font-size: 13px; 
}

/* View button */
.view-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  font-weight: 600;
}

/* ---------------- Gallery ---------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.gallery-grid img {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(2,6,23,0.08);
}

/* Lightbox */
.lb-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.8);
  z-index: 1200;
}
.lb-overlay.show { display: flex; }

.lb-box { max-width: 90%; max-height: 90%; position: relative; }
.lb-box img { max-width: 100%; max-height: 100%; border-radius: 8px; }

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------------- Events ---------------- */
.events-list { display: flex; flex-direction: column; gap: 12px; }
.event-card {
  background: var(--panel);
  padding: 12px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
}
.event-meta { font-size: 12px; color: var(--muted); min-width: 110px; }

/* ---------------- WYSIWYG (About) ---------------- */
.about-editor {
  background: var(--panel);
  padding: 5px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-height: 120px;
  outline: none;
}
.editor-toolbar { 
    display: flex;
    gap: 8px; 
    margin-bottom: 10px; 
    
}
.tb-btn { 
    padding: 8px 10px;
    border-radius: 8px; 
    cursor: pointer; 
    
}

/* ---------------- Modal ---------------- */
#modal {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .25s ease, transform .25s ease;
  will-change: opacity, transform;
}

#modal.show {
  opacity: 1;
  transform: translateY(0);
}


.modal[hidden] {
    opacity: 0;
    transform: translateY(-10px); /* small motion = smooth */
}


.modal-content {
  background: #fff;
  padding: 28px 32px;
  border-radius: 14px;
  width: 95%;
  max-width: 420px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.25);

  /* Smooth instant open */
  opacity: 0;
  transform: scale(1);
  transition: opacity .18s ease;

  will-change: opacity;
}
.modal.show .modal-content {
  opacity: 1;
}


@keyframes popIn {
  from { 
      transform: scale(.85) translateY(20px); opacity: 0; 
      
  }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Close button */
.modal-content .close {
  position: absolute;
  top: 10px; right: 12px;
  width: 36px; height: 36px;
  display: flex; 
  align-items: center; 
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  transition: transform .2s ease;
}
.modal.hidden { 
    display: none;
    }
    .modal.show { 
        opacity:1; 
        pointer-events:auto 
        
    }
.modal-content .close:hover {
    transform: scale(1.15); 
    
}

/* Modal photo float */
.modal-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #e5e7eb;
  margin: 0 auto 18px;
 /* animation: floatUp 3s ease-in-out infinite;*/
}
.modal.show .modal-photo {
  animation: floatUp 3s ease-in-out infinite;
}
@keyframes floatUp {
  0% { transform: translateY(0) }
  50% { transform: translateY(-6px) }
  100% { transform: translateY(0) }
}

/* ---------------- Skeleton Loader ---------------- */
.skeleton-loader { animation: pulse 1.2s infinite ease-in-out; }
.skeleton-loader .sk-photo {
  width: 150px;
  height: 150px;
  background: #e1e1e1;
  border-radius: 8px;
}
.skeleton-loader .sk-line {
  height: 14px;
  margin-bottom: 8px;
  background: #e1e1e1;
  border-radius: 4px;
}
.skeleton-loader .sk-title { width: 60%; height: 18px; }

@keyframes pulse {
  0% { opacity: .55 }
  50% { opacity: 1 }
  100% { opacity: .55 }
}

.hidden { display: none !important; }

/* Responsive tweaks */
@media(max-width:600px) {
  .hero { margin:10px; padding:18px; }
  .staff-photo { width: 90px; height: 90px; }
  .modal-content { padding: 18px; }
}

/* ----------------------------------
   ADVANCED GALLERY MODAL
---------------------------------- */

.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.gallery-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.gallery-modal-img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
  animation: zoomIn .35s ease;
  object-fit: contain;
}

@keyframes zoomIn {
  from { transform: scale(.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.g-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 40px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  transition: .25s ease;
  z-index: 20;
}

.g-close:hover {
  transform: scale(1.2);
  color: #ff4444;
}

.g-prev,
.g-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 45px;
  color: white;
  background: rgba(0,0,0,0.35);
  border: none;
  width: 55px;
  height: 90px;
  cursor: pointer;
  border-radius: 8px;
  transition: background .25s ease;
  z-index: 20;
}

.g-prev:hover,
.g-next:hover {
  background: rgba(0,0,0,0.55);
}

.g-prev { left: 20px; }
.g-next { right: 20px; }

.gallery-caption {
  color: #fff;
  text-align: center;
  margin-top: 12px;
  font-size: 1rem;
  opacity: .8;
}
